DevExpress Installation, upgrade

Source: Internet
Author: User
Tags foreach compact pack

This article takes devexpress7.x as an example, the other versions are identical. Related Downloads Reference DevExpress website: http://www.devexpress.com/

One) Install the DXperience control

1 if the installation has dxperience uninstall Old DXperience control
Close the vs2005/vs2008 IDE and uninstall the old version of the DXperience control through the Add/Remove Programs feature of the Control Panel

2) Download the required files
The corresponding version of the DXperience Beta, both the compilation script and the localization pack need to be downloaded to the DevExpress official website
Below gives the download link, directly clicks downloads can:
DXperience Trial Version: Click to enter the download page
Compile script: Click to go to download page

2) Install the trial version
It is necessary to install the beta because it includes demo code, help documentation, and various tools that are not in the source package.
Double-click the dxperience Beta installation package for installation.
Note here: The version number of the trial version of the download should correspond to the source version

3) Extract source file
extract all files from the source pack into the sources subdirectory of the trial version of the installation directory
The default installation directory is: C:Program filesdeveloper Express. NET v7.x
So the source package should be extracted to the C:Program filesdeveloper Express. NET v7.xsources Directory
(x should replace the corresponding minor version number, the following no longer repeat the description)
After the decompression is completed, you should see more than 10 more source subdirectories in the sources directory.

4) Unzip the compilation script
unzip the downloaded compilation script, and then go to the corresponding version of the subdirectory.
Copy all files (excluding subdirectories patchinternalvisibleto) to the sources subdirectory of the DXperience installation directory

5 compiling using a compilation script
Perform clear.bat to delete the trial version of the assembly DLL in the global cache, and then execute buildall.cmd to regenerate the official version of the assembly DLL
There may be some yellow warnings (warning) at compile time, no worries, no errors (Error)

Note: DXperience 7.3 may require installation
a). NET Compact Frame 2.0 SP2 ( Click to go to download page )
Otherwise, the compilation of the following two items will be an error:
DevExpress.Data.Compact.csproj
DevExpress.Xpo.Compact.csproj
B. NET Framework 3.5 ( click to download )
Otherwise, the compilation of one of the following items will be an error:
DevExpress.Xpo.Linq.csproj

There is a problem with the Aspxscheduler directory path and the compilation script in the DXperience 7.3.5 source code, Click to download the revised source code and compile the script

6) Rebuild Toolbox tab
Click Start Menu-> All Programs-> Developer Express. NET v7.x-> Tools-> toolboxcreator
To remove the trial version of the Vs2005/vs2008 Toolbox tab and regenerate the official version of the Vs2005/vs2008 Toolbox tab

7) Confirm Upgrade success
to this control has been upgraded complete, let's confirm
Open VS2005, create a new Windows application, and press Ctrl+alt+x to display the Toolbox and find four new tabs:
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, and then right-click the Gridcontrol.
In the pop-up shortcut menu, select "About", then you can see that the Xtragrid version number has been updated,
Serial number is shown as--trial version--, although it appears as a trial version, but it's actually a formal version.
The real trial version simply drags the Gridcontrol onto the form and it automatically pops up on the dialog box.


( II) Upgrading of existing applications

1 Close vs2005/vs2008, backup the application to be upgraded
For example, use Winrar/7-zip to make a backup package.

2) through the dxperience provided by the Projectconverter to upgrade
Execute start-> All Programs-> Developer Express. NET v7.x-> Tools-> projectconverter
Select the path to the VS project file in the pop-up dialog box and remove the tick that created the backup file and press upgrade.
Projectconverter converts all references to the old version dxperience assembly to the new version in the project

3) Open vs2005/vs2008, recompile project
A. Upgrade from DevExpress Windows Controls 3.x (VS2005) 7.x
you may need to change some code, and there are three places that need to be changed:
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 Find and Replace dialog box to replace all CS files for the current project
Until the project can be successfully compiled

The code is fine, but the interface needs to be changed.
When the application runs, it finds that the interface doesn't look like it.
The controls and toolbars have the wrong background color, and the picture on the button becomes opaque.
Open Program.cs in Solution Explorer, Application.Run (new Forms.formmain ()) of the main () function, and enter the following code before this line of code



Set the default style for DXperience controls #region Set the default style for DXperience controls
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 uniformly

Add the following three static methods to the main screen class, and then
Call the Navbaritemtransparent () method in the screen Formload event that includes the Navbarcontrol control
Call the Baritemtransparent () method in the screen Formload event that includes the Barmanager control



       Bitmap Transparency#regionBitmap Transparency
Public Static voidbitmptransparent (Bitmap Bitmap)
...{
if (bitmap = null)
return;

Bitmap. Maketransparent (Color.fuchsia);
Bitmap. Maketransparent (Color.Black);
}
#endregion
navbar icon Transparent#regionnavbar icon Transparent
Public Static voidnavbaritemtransparent (Navbarcontrol navbar)
...{
foreach(Navbargroup Group inNavBar. Groups)
...{
Formmain.bitmptransparent (group. Smallimage asBitmap);
Formmain.bitmptransparent (group. Largeimage asBitmap);

foreach(Navbaritemlink itemlink inGroup. Itemlinks)
...{
Formmain.bitmptransparent ((Itemlink.item as navbaritem). Smallimage as Bitmap);
}
}
}
#endregion
bar icon Transparent#regionbar icon Transparent
Public Static voidbaritemtransparent (Barmanager bar)
... {
              foreach   (baritem item  in  bar. Items)
             ... {
                  if   (item. GLYPH&NBSP ! =   null )
                      Formmain.bitmptransparent (item. glyph  as  bitmap);
            }
        }
#endregion

B. Upgrade from 7.1/7.2 to 7.3
A resource file (*.RESX) control version error may occur at compile time, navigate to the line where the error occurred, and find the nearest publickeytoken=xxxxxxxxxxxxxxxx
To the source directory sources to find PublicKeyToken.txt, this text file is compiled in the previous steps automatically generated, the public key token recorded.
The Projectconverter does not automatically replace the public key code when it is converted.
Select the publickeytoken=xxxxxxxxxxxxxxxx of the error resource file, press Ctrl+h to eject the Replace dialog box, and then enter publickeytoken= with the text box.
The public key in the PublicKeyToken.txt is then copied and pasted to the back, and the lookup range is changed to: The entire solution, performing all replacements
And then rebuild the solution, no problem.

4) Change the ClickOnce cloth Department
Finally, there is a need to make some adjustments to the ClickOnce layout
Click the Item menu-> Properties ... Start the Project Properties screen, select the Publish tab and click the "Application file (i) ..." button
Select the display all files in the pop-up screen, remove the old dxperience assembly DLL from it, and change the publication status of the new DXperience assembly DLL to "include"
Click on the "Publish Now" button to publish, from the client update after testing, smoothly through

If you are using the installer, just replace the DXperience assembly DLL.

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.