DevExpress installation and upgrade

Source: Internet
Author: User

This article takes DevExpress7.x as an example. Other versions are the same. For more information, see the DevExpress Website: http://www.devexpress.com/

1) install the DXperience Control

1) if DXperience is installed, uninstall the old DXperience control.
Close VS2005/VS2008 IDE and uninstall the old version of DXperience control by adding/deleting programs on the control panel.

2) download the desired file
For the DXperience trial version of the corresponding version, both the compiling script and the localization package must be downloaded from the DevExpress official website.
The download link is provided below, and you can click Download directly:
DXperience trial: Click to enter the download page
Compile the Script: Click to enter the download page

2) install the trial version
Installation of the trial version is required because it includes DEMO code, help documentation, and various tools not included in the source code package.
Double-click the DXperience trial installation package to install it.
Note: The version of the downloaded trial version must correspond to the source code version.

3) decompress the source code file
Decompress all files in the source code package to the Sources subdirectory in the installation directory of the trial version.
The default installation directory is C: Program FilesDeveloper Express. NET v7.x.
Therefore, the source code package should be decompressed to the C: Program FilesDeveloper Express. NET v7.xSources directory.
(X should replace the corresponding version number, which is not repeated below)
After decompression, we should see that there are more than a dozen source code subdirectories under the Sources directory.

4) decompress the compilation script
Decompress the downloaded compiled script package and enter the subdirectory of the corresponding version,
Copy all files (excluding the subdirectory PatchInternalVisibleTo) to the Sources subdirectory of the DXperience installation directory.

5) use the compilation script for compilation
Run clear. bat to delete the trial version of the Assembly DLL in the global cache, and then run buildall. cmd to generate the formal version of the Assembly DLL.
Some yellow warnings may be displayed during compilation. Don't worry, there will be no errors.

Note: installation may be required for DXperience 7.3
A). NET Compact Frame 2.0 SP2 (click to enter the download page)
Otherwise, an error will be reported during compilation of the following two projects:
DevExpress. Data. Compact. csproj
DevExpress. Xpo. Compact. csproj
B). NET Framework 3.5 (click to download)
Otherwise, an error will be reported during compilation of the following project:
DevExpress. Xpo. Linq. csproj

There are problems with the directory path and compiling script of ASPxScheduler in DXperience 7.3.5 source code. Click to download the corrected source code and compiling script.

6) regenerate the Toolbox Tab
Choose Start> All Programs> Developer Express. NET v7.x> Tools> ToolboxCreator.
To delete the VS2005/VS2008 toolkit tabs of the trial version, and regenerate the VS2005/VS2008 toolkit tabs of the official version.

7) Confirm that the upgrade is successful
The control has been upgraded. Let's confirm it.
Open VS2005, create a Windows application, and press Ctrl + Alt + X to display the toolbox. Four tabs are displayed:
DX: WinScheduler. v7.x
DX: WinLib. v7.x,
DX: Win. v7.x
DX: General. v7.x

Expand the Developer Express: Win. v7.x tab, drag GridControl to Form1, right-click GridControl,
In the shortcut menu that appears, select "About". You can see that the XtraGrid version has been updated,
Serial Number is displayed as -- trial version --. Although it is displayed as a trial version, it is already in the official VERSION.
If you drag GridControl to Form the real trial version, the dialog box


2) Upgrade the original application

1) Close VS2005/VS2008 and back up the application to be upgraded.
For example, use WinRAR/7-Zip to create a backup package.

2) upgrade through ProjectConverter provided by DXperience
Start running-> All Programs-> Developer Express. NET v7.x-> Tools-> ProjectConverter
In the displayed dialog box, select the path of the VS project file, remove the create backup file check box, and then press Upgrade.
ProjectConverter converts all references to the older DXperience assembly in the project to the new version.

3) Open VS2005/VS2008 and recompile the project
A. Upgrade 7.x from DevExpress Windows Controls 3.x (VS2005)
You may need to change some code. You need to modify the code in three places:
GridView. ExportToExcel-> GridView. ExportToXls
GridView. OptionsView. ShowFilterPanel = false-> GridView. OptionsView. ShowFilterPanelMode = ShowFilterPanelMode. Never
GridView. OptionsView. ShowFilterPanel = true-> GridView. OptionsView. ShowFilterPanelMode = ShowFilterPanelMode. ShowAlways
GridView. OptionsBehavior. ShowEditorOnMouseUp = true-> GridView. OptionsBehavior. EditorShowMode = EditorShowMode. MouseUp
You can press Ctrl + H to activate the search and replace dialog box to replace all the cs files in the current project.
Until the project can be compiled smoothly

The code is okay, but the interface still needs to be modified.
After the application is running, the interface becomes abnormal.
The background color of the control and toolbar is incorrect, and the image on the button becomes opaque.
Open Program. cs in Solution Explorer and enter the following code before the Main () function's Application. Run (new Forms. FormMain ().



Set the default style of the DXperience control # region sets the default style of the DXperience Control
UserLookAndFeel defaultLookAndFeel = UserLookAndFeel. Default;
DefaultLookAndFeel. UseWindowsXPTheme = false;
DefaultLookAndFeel. Style = LookAndFeelStyle. Office2003;
# Endregion

The function of this Code is to set the default style of the DXperience control.

Add the following three static methods to the main painting class, and then
Call the NavBarItemTransparent () method in the FormLoad event of the screen that includes the NavBarControl control.
Call the BarItemTransparent () method in the FormLoad event of the screen that includes the BarManager control.



Bitmap transparency # region bitmap transparency
Public static void BitmpTransparent (Bitmap bitmap)
...{
If (bitmap = null)
Return;

Bitmap. MakeTransparent (Color. Fuchsia );
Bitmap. MakeTransparent (Color. Black );
}
# Endregion
NavBar icon transparency # region NavBar icon transparency
Public static void NavBarItemTransparent (NavBarControl navbar)
...{
Foreach (NavBarGroup group in navbar. Groups)
...{
FormMain. BitmpTransparent (group. SmallImage as Bitmap );
FormMain. BitmpTransparent (group. LargeImage as Bitmap );

Foreach (NavBarItemLink itemLink in group. ItemLinks)
...{
FormMain. BitmpTransparent (itemLink. Item as NavBarItem). SmallImage as Bitmap );
}
}
}
# Endregion
Bar icon transparency # region Bar icon transparency
Public static void BarItemTransparent (BarManager bar)
...{
Foreach (BarItem item in bar. Items)
...{
If (item. Glyph! = Null)
FormMain. BitmpTransparent (item. Glyph as Bitmap );
}
}
# Endregion

B. upgrade from 7.1/7.2 to 7.3
The version of the resource file (*. resx) control may be incorrect during compilation. Locate the wrong row and locate the most recent PublicKeyToken = xxxxxxxxxxxxxxxx place.
You can find publickeytoken.txt under the source code directory sources. this text file is automatically generated during the compilation according to the previous steps, and the Public Key mark is recorded.
The public key is not automatically replaced when ProjectConverter is converted.
Select the PublicKeyToken = xxxxxxxxxxxxxxxx of the error resource file, press Ctrl + H to bring up the replace dialog box, and enter PublicKeyToken = In the Replace with text box,
Copy and paste the public key in publickeytoken.txt to the end, and change the search range to: the entire solution, and replace all
And then regenerate the solution.

4) change the ClickOnce deployment
Finally, you need to adjust the ClickOnce deployment.
Click the project menu-> properties... to start the project properties screen, select the "release" tab, and click the "Application file (I)..." button
In the displayed dialog box, select all files, delete the old DXperience Assembly DLL, and change the release status of the new DXperience Assembly DLL to "include"
Click the "Publish now" button to release the instance. The instance passes the test after updating the client.

If you are using the installer, you only need to replace the DXperience Assembly DLL.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.