This is a migrated thread and some comments may be shown as answers.

Question installing upgrade 2012.1.326.35

10 Answers 206 Views
Installer and Visual Studio Extensions
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 02 May 2012, 04:24 PM
Hi,

actually with my VS2008 I use V2011.3.1220.35 and I'm trying to upgrade to V2012.1.326.35 and I have some questions. Actually
my "C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2011 SP1" folder contain the following folders:

Binaries
Demos
LicenseAgreements
Themes
VSExtensions

and the new folder ("C:\Users\agosselin\AppData\Roaming\Telerik\Updates\RadControls_for_WPF_2012_1_0326_Dev_hotfix") created by Telerik download process contain the following folders:

Binaries
Binaries.NoXaml
LicenseAgreements
Themes.Implicit

the folders structure are not the same!!! I would like to know what should I do and consider to upgrade my current version of Telerik???

PS: In our development environment, we have a specific folder containing each Telerik versions regarding the one we use with the project we work on.

Thank's

10 Answers, 1 is accepted

Sort by
0
Chavdar Dimitrov
Telerik team
answered on 03 May 2012, 01:21 PM
Hello Oliver,

Thank you for contacting us.

With Q1 2012 SP1 we introduced new set of assemblies (Binaries.NoXaml), i.e. assemblies with absolutely no XAML included so you can add manually only needed resources for your application (Themes.Implicit). The main goal is assembly size optimization.

You can read more about this in the following articles:
http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html
http://www.telerik.com/community/forums/wpf/gridview/radcontrols-for-wpf-q1-2012-sp1-binaries-noxaml.aspx

The other two folders Themes, VSExtensions and Demos are not provided in the hotfixes by design, i.e. the Visual Studio extensions are installed only by our *.msi installers (you can keep them up-to-date through the Visual Studio Extension manager) and the demos are removed in order to optimize the hotfix package size (all examples are available on our web site as separate packages).

The Binaries folder (and its content) has no changes.

I hope this will help. Please, let me know if you have any further questions.

Kind regards,
Chavdar,
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Oliver
Top achievements
Rank 1
answered on 03 May 2012, 02:17 PM
Hi Chavdar,

in other word, I just have to replace existing folders by the new one (Binaries, LicenseAgreements) and add the news folder (Binaries.NoXaml and Themes.Implicit)?

I also remark that in my actual Binaries folder, there is a Telerik.Windows.Controls.Scheduler.dll file and this file seem's to be no longer present in the new folder, is this normal?

Thank's
0
Chavdar Dimitrov
Telerik team
answered on 03 May 2012, 03:28 PM
Hi Oliver,

Just a notice - the Themes folder is not provided in the hotfix. If you plan to use anything from this folder, you should use the full *.msi installer in order to get it. Otherwise, you can do exactly what you mentioned.

Regarding the Telerik.Windows.Controls.Scheduler.dll assembly - it's deprecated and replaced by Telerik.Windows.Controls.ScheduleView.dll.

Let me know if I can be of any further assistance.

All the best,
Chavdar,
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Oliver
Top achievements
Rank 1
answered on 03 May 2012, 04:36 PM
I Chavdar,

since I upgrade to the lastest version of Telerik, my solution refuse to complie :( In my solution, I have a persistence class and I have a lot of error during the compilation (just lokk at the Telerik one):

PS: I had to switch back to my previous version of Telerik until a solution was found. Since that, all my grid view localization still in english. My WIndows 7 is in french and before I tried to upgrade Telerik, my localization was ok.

Error 2 Unable to copy file "obj\Debug\Localisation.dll" to "bin\Debug\Localisation.dll". The process cannot access the file 'bin\Debug\Localisation.dll' because it is being used by another process. Localisation
Error 5 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' ne contient pas une définition pour 'Member' et aucune méthode d'extension 'Member' acceptant un premier argument de type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 554 74 ClientHelper
Error 6 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' ne contient pas une définition pour 'Member' et aucune méthode d'extension 'Member' acceptant un premier argument de type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 562 74 ClientHelper
Error 7 'Telerik.Windows.Controls.GridViewColumn' ne contient pas une définition pour 'DataMemberBinding' et aucune méthode d'extension 'DataMemberBinding' acceptant un premier argument de type 'Telerik.Windows.Controls.GridViewColumn' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 581 78 ClientHelper
Error 8 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' est inaccessible en raison de son niveau de protection D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 646 25 ClientHelper
Error 9 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' est inaccessible en raison de son niveau de protection D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 646 58 ClientHelper
Error 10 Impossible de créer une instance de la classe abstraite ou de l'interface 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 646 54 ClientHelper
Error 11 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'FieldFilter' et aucune méthode d'extension 'FieldFilter' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 650 33 ClientHelper
Error 12 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'FieldFilter' et aucune méthode d'extension 'FieldFilter' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 651 33 ClientHelper
Error 13 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'FieldFilter' et aucune méthode d'extension 'FieldFilter' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 652 33 ClientHelper
Error 14 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'FieldFilter' et aucune méthode d'extension 'FieldFilter' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 657 33 ClientHelper
Error 15 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'FieldFilter' et aucune méthode d'extension 'FieldFilter' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 658 33 ClientHelper
Error 16 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'FieldFilter' et aucune méthode d'extension 'FieldFilter' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 659 33 ClientHelper
Error 17 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'DistinctFilter' et aucune méthode d'extension 'DistinctFilter' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 668 33 ClientHelper
Error 18 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' ne contient pas une définition pour 'Column' et aucune méthode d'extension 'Column' acceptant un premier argument de type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 670 52 ClientHelper
Error 19 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\obj\Debug\ClientHelper.dll' or one of its dependencies. Le fichier spécifié est introuvable. Line 5 Position 71.'  D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\AddressControl.xaml 5 71 ClientHelper
Error 20 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\obj\Debug\ClientHelper.dll' or one of its dependencies. Le fichier spécifié est introuvable. Line 6 Position 92.'  D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\LoggedTransactionsViewer.xaml 6 92 ClientHelper
Error 21 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\obj\Debug\ClientHelper.dll' or one of its dependencies. Le fichier spécifié est introuvable. Line 7 Position 5.'  D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\DatesSelectorForm.xaml 7 5 ClientHelper
Error 22 The tag 'DocTypeBorderColorConverter' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication'. Line 17 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\InterDependencyImagesControl.xaml 17 14 ClientHelper
Error 23 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\obj\Debug\ClientHelper.dll' or one of its dependencies. Le fichier spécifié est introuvable. Line 6 Position 30.'  D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\LockDialogWPF.xaml 6 30 ClientHelper
Error 24 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\obj\Debug\ClientHelper.dll' or one of its dependencies. Le fichier spécifié est introuvable. Line 6 Position 112.'  D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PatientFileForm.xaml 6 112 ClientHelper
Error 25 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\obj\Debug\ClientHelper.dll' or one of its dependencies. Le fichier spécifié est introuvable. Line 6 Position 5.'  D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PhonesControl.xaml 6 5 ClientHelper
Error 26 Metadata file 'D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\bin\Debug\ClientHelper.dll' could not be found Neuron
Error 27 The tag 'WPFonMFCControl' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 1 Position 25. D:\Developpement\GestX.Courant\RisGC\Client\VisitBillingDetails\BillingDetails.xaml 1 25 VisitBillingDetails
Error 28 The tag 'WPFonMFCControl' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 1 Position 25. D:\Developpement\GestX.Courant\RisGC\Client\ReportControl\ReportControl.xaml 1 25 ReportControl
Error 29 Assembly 'ClientHelper' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. D:\Developpement\GestX.Courant\RisGC\Client\VisitBillingDetails\BillingDetails.xaml 3 18 VisitBillingDetails
Error 30 The type 'Helper:WPFonMFCControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\Developpement\GestX.Courant\RisGC\Client\VisitBillingDetails\BillingDetails.xaml 1 2 VisitBillingDetails
Error 31 The attachable property 'Resources' was not found in type 'UserControl'. D:\Developpement\GestX.Courant\RisGC\Client\VisitBillingDetails\BillingDetails.xaml 5 6 VisitBillingDetails
Error 32 Metadata file 'D:\Developpement\GestX.Courant\RisGC\bin\Debug\Neuron30\Neuron.exe' could not be found DictationModule
Error 33 Metadata file 'D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\bin\Debug\ClientHelper.dll' could not be found DictationModule
Error 34 Le fichier de métadonnées 'D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\bin\Debug\ClientHelper.dll' est introuvable D:\Developpement\GestX.Courant\RisGC\Client\NeuronWPF\CSC NeuronWPF
Error 35 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\NeuronWPF\obj\Debug\NeuronWPF.exe' or one of its dependencies. Le fichier spécifié est introuvable. Line 6 Position 5.'  D:\Developpement\GestX.Courant\RisGC\Client\NeuronWPF\InternalLoginWPF.xaml 6 5 NeuronWPF
Error 36 Unknown build error, 'Could not load file or assembly 'file:///D:\Developpement\GestX.Courant\RisGC\Client\NeuronWPF\obj\Debug\NeuronWPF.exe' or one of its dependencies. Le fichier spécifié est introuvable. Line 6 Position 5.'  D:\Developpement\GestX.Courant\RisGC\Client\NeuronWPF\Neuron.xaml 6 5 NeuronWPF
Error 37 The tag 'StringToResource' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 17 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\MonitorModule\ExportEdit.xaml 17 14 MonitorModule
Error 38 The tag 'LetterFormatWidth' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 22 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\DictationModuleWPF\DictationForm.xaml 22 14 DictationModuleWPF
Error 39 The tag 'HospitalDate' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 17 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\DictationModuleWPF\DictationList.xaml 17 14 DictationModuleWPF
Error 40 fatal error C1192: #using failed on 'd:\Developpement\GestX.Courant\RisGC\Client\VisitBillingDetails\bin\Debug\VisitBillingDetails.dll' d:\Developpement\GestX.Courant\RisGC\GestXTree\StdAfxCLI.cpp 1 GestX
Error 41 error BK1506 : cannot open file '.\Debug\AdrDestArray.sbr': No such file or directory BSCMAKE GestX
Error 42 Metadata file 'D:\Developpement\GestX.Courant\RisGC\bin\Debug\Neuron30\Neuron.exe' could not be found DynamicListModule
Error 43 Metadata file 'D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\bin\Debug\ClientHelper.dll' could not be found DynamicListModule
Error 46 The tag 'BoolToVisibility' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 23 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml 23 14 BillingModule
Error 47 The tag 'HospitalDate' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 11 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml 11 14 BillingModule
Error 48 The tag 'HospitalDate' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=Clienthelper'. Line 10 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml 10 14 BillingModule
Error 49 The tag 'CustomGridView' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 63 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\CancelableBatches.xaml 63 14 BillingModule
Error 50 The tag 'HospitalTime' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 22 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\AddPaymentForm.xaml 22 14 BillingModule
Error 51 The tag 'IsSelected' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=NeuronWPF'. Line 8 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ExportationModule\ExportationControl.xaml 8 14 ExportationModule
Error 52 The tag 'ListToIndex' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 13 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\AutoSend.xaml 13 14 ExportModule
Error 53 The tag 'ListToIndex' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 15 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\Condition.xaml 15 14 ExportModule
Error 54 The tag 'ListToIndex' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 14 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\Destination.xaml 14 14 ExportModule
Error 55 The tag 'RequiredField' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 42 Position 30. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\DicomServer.xaml 42 30 ExportModule
Error 56 The tag 'IsSelected' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 12 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\ExportationControl.xaml 12 14 ExportModule
Error 57 The tag 'ListToIndex' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 12 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\Function.xaml 12 14 ExportModule
Error 58 The tag 'RequiredField' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 36 Position 26. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\LocalDicom.xaml 36 26 ExportModule
Error 59 The tag 'ListToIndex' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 12 Position 14. D:\Developpement\GestX.Courant\RisGC\Client\ExportModule\Scheduler.xaml 12 14 ExportModule
Error 60 The tag 'DocTypeBorderColorConverter' does not exist in XML namespace 'clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper'. Line 26 Position 8. D:\Developpement\GestX.Courant\RisGC\Client\SignatureModule\SignatureForm.xaml 26 8 SignatureModule
Message 68 Could not find schema information for the element 'system.serviceModel'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 33 4 Miscellaneous Files
Message 69 Could not find schema information for the element 'services'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 34 6 Miscellaneous Files
Message 70 Could not find schema information for the element 'service'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 35 8 Miscellaneous Files
Message 71 Could not find schema information for the attribute 'name'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 35 16 Miscellaneous Files
Message 72 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 35 70 Miscellaneous Files
Message 73 Could not find schema information for the element 'host'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 36 10 Miscellaneous Files
Message 74 Could not find schema information for the element 'baseAddresses'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 37 12 Miscellaneous Files
Message 75 Could not find schema information for the element 'add'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 38 14 Miscellaneous Files
Message 76 Could not find schema information for the attribute 'baseAddress'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 38 18 Miscellaneous Files
Message 77 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 41 10 Miscellaneous Files
Message 78 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 41 19 Miscellaneous Files
Message 79 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 41 54 Miscellaneous Files
Message 80 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 41 78 Miscellaneous Files
Message 81 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 41 111 Miscellaneous Files
Message 82 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 41 170 Miscellaneous Files
Message 83 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 42 10 Miscellaneous Files
Message 84 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 42 19 Miscellaneous Files
Message 85 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 42 39 Miscellaneous Files
Message 86 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 42 66 Miscellaneous Files
Message 87 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 42 103 Miscellaneous Files
Message 88 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 42 162 Miscellaneous Files
Message 89 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 43 10 Miscellaneous Files
Message 90 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 43 19 Miscellaneous Files
Message 91 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 43 48 Miscellaneous Files
Message 92 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 43 73 Miscellaneous Files
Message 93 Could not find schema information for the element 'service'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 45 8 Miscellaneous Files
Message 94 Could not find schema information for the attribute 'name'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 45 16 Miscellaneous Files
Message 95 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 45 74 Miscellaneous Files
Message 96 Could not find schema information for the element 'host'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 46 10 Miscellaneous Files
Message 97 Could not find schema information for the element 'baseAddresses'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 47 12 Miscellaneous Files
Message 98 Could not find schema information for the element 'add'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 48 14 Miscellaneous Files
Message 99 Could not find schema information for the attribute 'baseAddress'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 48 18 Miscellaneous Files
Message 100 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 51 10 Miscellaneous Files
Message 101 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 51 19 Miscellaneous Files
Message 102 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 51 54 Miscellaneous Files
Message 103 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 51 78 Miscellaneous Files
Message 104 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 51 111 Miscellaneous Files
Message 105 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 51 174 Miscellaneous Files
Message 106 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 52 10 Miscellaneous Files
Message 107 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 52 19 Miscellaneous Files
Message 108 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 52 43 Miscellaneous Files
Message 109 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 52 70 Miscellaneous Files
Message 110 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 52 107 Miscellaneous Files
Message 111 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 52 170 Miscellaneous Files
Message 112 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 53 10 Miscellaneous Files
Message 113 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 53 19 Miscellaneous Files
Message 114 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 53 48 Miscellaneous Files
Message 115 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 53 73 Miscellaneous Files
Message 116 Could not find schema information for the element 'service'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 55 8 Miscellaneous Files
Message 117 Could not find schema information for the attribute 'name'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 55 16 Miscellaneous Files
Message 118 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 55 67 Miscellaneous Files
Message 119 Could not find schema information for the element 'host'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 56 10 Miscellaneous Files
Message 120 Could not find schema information for the element 'baseAddresses'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 57 12 Miscellaneous Files
Message 121 Could not find schema information for the element 'add'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 58 14 Miscellaneous Files
Message 122 Could not find schema information for the attribute 'baseAddress'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 58 18 Miscellaneous Files
Message 123 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 61 10 Miscellaneous Files
Message 124 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 61 19 Miscellaneous Files
Message 125 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 61 54 Miscellaneous Files
Message 126 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 61 78 Miscellaneous Files
Message 127 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 61 111 Miscellaneous Files
Message 128 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 61 167 Miscellaneous Files
Message 129 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 62 10 Miscellaneous Files
Message 130 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 62 19 Miscellaneous Files
Message 131 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 62 36 Miscellaneous Files
Message 132 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 62 63 Miscellaneous Files
Message 133 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 62 100 Miscellaneous Files
Message 134 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 62 156 Miscellaneous Files
Message 135 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 63 10 Miscellaneous Files
Message 136 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 63 19 Miscellaneous Files
Message 137 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 63 48 Miscellaneous Files
Message 138 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 63 73 Miscellaneous Files
Message 139 Could not find schema information for the element 'service'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 65 8 Miscellaneous Files
Message 140 Could not find schema information for the attribute 'name'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 65 16 Miscellaneous Files
Message 141 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 65 68 Miscellaneous Files
Message 142 Could not find schema information for the element 'host'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 66 10 Miscellaneous Files
Message 143 Could not find schema information for the element 'baseAddresses'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 67 12 Miscellaneous Files
Message 144 Could not find schema information for the element 'add'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 68 14 Miscellaneous Files
Message 145 Could not find schema information for the attribute 'baseAddress'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 68 18 Miscellaneous Files
Message 146 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 71 10 Miscellaneous Files
Message 147 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 71 19 Miscellaneous Files
Message 148 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 71 54 Miscellaneous Files
Message 149 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 71 78 Miscellaneous Files
Message 150 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 71 111 Miscellaneous Files
Message 151 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 71 168 Miscellaneous Files
Message 152 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 72 10 Miscellaneous Files
Message 153 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 72 19 Miscellaneous Files
Message 154 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 72 37 Miscellaneous Files
Message 155 Could not find schema information for the attribute 'bindingConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 72 64 Miscellaneous Files
Message 156 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 72 101 Miscellaneous Files
Message 157 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 72 158 Miscellaneous Files
Message 158 Could not find schema information for the element 'endpoint'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 73 10 Miscellaneous Files
Message 159 Could not find schema information for the attribute 'contract'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 73 19 Miscellaneous Files
Message 160 Could not find schema information for the attribute 'binding'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 73 48 Miscellaneous Files
Message 161 Could not find schema information for the attribute 'address'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 73 73 Miscellaneous Files
Message 162 Could not find schema information for the element 'service'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 75 8 Miscellaneous Files
Message 163 Could not find schema information for the attribute 'name'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 75 16 Miscellaneous Files
Message 164 Could not find schema information for the attribute 'behaviorConfiguration'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 75 69 Miscellaneous Files
Message 165 Could not find schema information for the element 'host'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 76 10 Miscellaneous Files
Message 166 Could not find schema information for the element 'baseAddresses'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 77 12 Miscellaneous Files
Message 167 Could not find schema information for the element 'add'. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 78 14 Miscellaneous Files
Message 170 The maximum number of errors or warnings has been reached. D:\Developpement\GestX.Courant\RisGC\bin\Debug\BLService\BLService.exe.config 289 17 Miscellaneous Files
Error 171 The name 'InitializeComponent' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 38 13 BillingModule
Error 172 The name 'gvRelatedBills' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 681 52 BillingModule
Error 173 The name 'gvTransactions' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 740 52 BillingModule
Error 174 The name 'gvErrorsReport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 797 52 BillingModule
Error 175 The name 'gvStatementOfAccount' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 854 52 BillingModule
Error 176 The name 'gvErrorsReport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 873 25 BillingModule
Error 177 The name 'gvErrorsReport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 875 25 BillingModule
Error 178 The name 'gvErrorsReport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 877 73 BillingModule
Error 179 The name 'gvRelatedBills' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 880 25 BillingModule
Error 180 The name 'gvRelatedBills' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 882 25 BillingModule
Error 181 The name 'gvRelatedBills' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 884 71 BillingModule
Error 182 The name 'gvStatementOfAccount' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 887 25 BillingModule
Error 183 The name 'gvStatementOfAccount' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 889 25 BillingModule
Error 184 The name 'gvStatementOfAccount' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 891 79 BillingModule
Error 185 The name 'gvTransactions' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 894 25 BillingModule
Error 186 The name 'gvTransactions' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 896 25 BillingModule
Error 187 The name 'gvTransactions' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 898 73 BillingModule
Error 188 The name 'btnRebill' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 940 13 BillingModule
Error 189 The name 'btnConciliate' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 941 13 BillingModule
Error 190 The name 'btnRebill' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 941 39 BillingModule
Error 191 The name 'btnPrevious' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 942 13 BillingModule
Error 192 The name 'btnNext' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingDetails.xaml.cs 943 13 BillingModule
Error 193 The name 'InitializeComponent' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 72 13 BillingModule
Error 194 The name 'Title1' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 78 17 BillingModule
Error 195 The name 'Title2' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 79 17 BillingModule
Error 196 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 118 122 BillingModule
Error 197 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 164 17 BillingModule
Error 198 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 168 21 BillingModule
Error 199 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 264 33 BillingModule
Error 200 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 290 17 BillingModule
Error 201 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 297 51 BillingModule
Error 202 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 308 21 BillingModule
Error 203 'com.christiegrp.Neuron.ClientApplication.BillingInfosGrid' does not contain a definition for 'radGridViewList' and no extension method 'radGridViewList' accepting a first argument of type 'com.christiegrp.Neuron.ClientApplication.BillingInfosGrid' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 477 67 BillingModule
Error 204 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 494 71 BillingModule
Error 205 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 507 71 BillingModule
Error 206 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 529 63 BillingModule
Error 207 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 530 67 BillingModule
Error 208 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 552 65 BillingModule
Error 209 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 553 67 BillingModule
Error 210 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 577 81 BillingModule
Error 211 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 595 48 BillingModule
Error 212 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 599 48 BillingModule
Error 213 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 662 43 BillingModule
Error 214 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 844 21 BillingModule
Error 215 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 856 48 BillingModule
Error 216 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 872 21 BillingModule
Error 217 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 930 21 BillingModule
Error 218 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 961 13 BillingModule
Error 219 The name 'radButtonTransmitBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 967 28 BillingModule
Error 220 The name 'radButtonReception' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 968 28 BillingModule
Error 221 The name 'radButtonMergeFiles' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 969 28 BillingModule
Error 222 The name 'radButtonVisit' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 970 28 BillingModule
Error 223 The name 'radButtonPatientFile' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 971 28 BillingModule
Error 224 The name 'radButtonPrepareBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 975 28 BillingModule
Error 225 The name 'radButtonCancelBatch' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 976 28 BillingModule
Error 226 The name 'radButtonTransmitBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 977 28 BillingModule
Error 227 The name 'radButtonReception' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 978 28 BillingModule
Error 228 The name 'radButtonMergeFiles' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 979 28 BillingModule
Error 229 The name 'radButtonVisit' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 980 28 BillingModule
Error 230 The name 'radButtonPatientFile' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 981 28 BillingModule
Error 231 The name 'radButtonCancelConciliation' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 995 28 BillingModule
Error 232 The name 'radButtonExport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1011 13 BillingModule
Error 233 The name 'mnuiExport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1011 41 BillingModule
Error 234 The name 'txtDateRanges' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1016 17 BillingModule
Error 235 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1030 13 BillingModule
Error 236 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1060 29 BillingModule
Error 237 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1064 29 BillingModule
Error 238 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1067 52 BillingModule
Error 239 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1094 17 BillingModule
Error 240 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1101 17 BillingModule
Error 241 The name 'radGridViewList' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1118 43 BillingModule
Error 242 The name 'Title2' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1207 21 BillingModule
Error 243 The name 'Title2' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingInfosGrid.xaml.cs 1211 21 BillingModule
Error 244 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' does not contain a definition for 'Member' and no extension method 'Member' accepting a first argument of type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 554 74 ClientHelper
Error 245 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' does not contain a definition for 'Member' and no extension method 'Member' accepting a first argument of type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 562 74 ClientHelper
Error 246 'Telerik.Windows.Controls.GridViewColumn' does not contain a definition for 'DataMemberBinding' and no extension method 'DataMemberBinding' accepting a first argument of type 'Telerik.Windows.Controls.GridViewColumn' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 581 78 ClientHelper
Error 247 The type or namespace name 'ColumnFilterDescriptor' could not be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 646 25 ClientHelper
Error 248 The type or namespace name 'ColumnFilterDescriptor' could not be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 646 58 ClientHelper
Error 249 The name 'InitializeComponent' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 49 13 BillingModule
Error 250 The name 'Title1' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 51 13 BillingModule
Error 251 The name 'Title2' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 52 13 BillingModule
Error 252 The name 'textBlockRebill' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 110 17 BillingModule
Error 253 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 113 13 BillingModule
Error 254 The name 'radButtonExport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 118 13 BillingModule
Error 255 The name 'mnuiExport' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 118 41 BillingModule
Error 256 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 131 13 BillingModule
Error 257 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 159 25 BillingModule
Error 258 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 160 52 BillingModule
Error 259 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 187 17 BillingModule
Error 260 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 195 17 BillingModule
Error 261 The name 'radBusyIndicator' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 350 21 BillingModule
Error 262 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 362 48 BillingModule
Error 263 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 438 29 BillingModule
Error 264 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 440 59 BillingModule
Error 265 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 513 51 BillingModule
Error 266 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 516 34 BillingModule
Error 267 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 559 47 BillingModule
Error 268 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 564 30 BillingModule
Error 269 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 565 17 BillingModule
Error 270 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 566 17 BillingModule
Error 271 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 567 17 BillingModule
Error 272 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 608 84 BillingModule
Error 273 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 608 120 BillingModule
Error 274 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 613 47 BillingModule
Error 275 The name 'btnAddPayment' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 623 17 BillingModule
Error 276 The name 'btnAddPayment' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 627 17 BillingModule
Error 277 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 639 43 BillingModule
Error 278 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 655 17 BillingModule
Error 279 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 657 47 BillingModule
Error 280 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 675 17 BillingModule
Error 281 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 677 37 BillingModule
Error 282 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 693 43 BillingModule
Error 283 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 847 33 BillingModule
Error 284 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 912 71 BillingModule
Error 285 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 925 71 BillingModule
Error 286 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 947 63 BillingModule
Error 287 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 948 67 BillingModule
Error 288 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 970 65 BillingModule
Error 289 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 971 67 BillingModule
Error 290 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1115 81 BillingModule
Error 291 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1135 21 BillingModule
Error 292 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1135 64 BillingModule
Error 293 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1141 48 BillingModule
Error 294 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1151 21 BillingModule
Error 295 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1151 64 BillingModule
Error 296 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1157 48 BillingModule
Error 297 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1165 21 BillingModule
Error 298 The name 'radGridViewBilling' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1165 64 BillingModule
Error 299 The name 'btnConciliate' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1175 33 BillingModule
Error 300 The name 'btnRebill' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1179 33 BillingModule
Error 301 'com.christiegrp.Neuron.ClientApplication.BillingGrid' does not contain a definition for 'radGridViewBilling' and no extension method 'radGridViewBilling' accepting a first argument of type 'com.christiegrp.Neuron.ClientApplication.BillingGrid' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1190 63 BillingModule
Error 302 The name 'Title2' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1210 21 BillingModule
Error 303 The name 'Title2' does not exist in the current context D:\Developpement\GestX.Courant\RisGC\Client\BillingModule\BillingGrid.xaml.cs 1214 21 BillingModule



//====================================================================================
// Author.......:
// Creation date:
// Fonction.....:
//====================================================================================
// Date       Prg  TT#    Details
// ---------- ---- ------ ------------------------------------------------------------
//
//====================================================================================

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Data;
using Telerik.Windows.Documents.FormatProviders.Txt;
using Telerik.Windows.Persistence;
using Telerik.Windows.Persistence.Services;
using Telerik.Windows.Persistence.Storage;
using Telerik.Windows.Zip;

using com.christiegrp.Neuron.Client;
using com.ChristieGrp.Infrastructure;

namespace com.christiegrp.Neuron.ClientApplication
{
    static public class PersistenceStorage
    {       
        #region Public methods.
        /// <summary>
        /// Set a StorageId before Loading/Saving a control and removing it's StorageId after the action was taken.
        /// The file location is "$APPDATA\IsolatedStorage\..."
        /// </summary>
        /// <param name="pPersistenceAction">Load/Save</param>
        /// <param name="pObjectToPersist">Object to persist.</param>
        /// <param name="pStorageId">StorageId of the object to persist. Null mean that a custom StorageId will be use.</param>
        /// <param name="pErrorMessage">Error received during the persistence.</param>
        /// <returns>true if successfull otherwise false</returns>
        static public bool Persist(PersistenceAction pPersistenceAction, System.Windows.DependencyObject pObjectToPersist, string pStorageId, out string pErrorMessage)
        {           
            bool result = false;
            pErrorMessage = string.Empty;

            if (pObjectToPersist != null)
            {
                // Validate if we need to generate a custom StorageId.
                if (string.IsNullOrEmpty(pStorageId))
                {
                    pStorageId = GetCustomStorageId(pObjectToPersist);
                }

                try
                {
                    PersistenceManager.SetStorageId(pObjectToPersist, pStorageId);
                    result = Persist(pPersistenceAction, out pErrorMessage);
                }
                finally
                {
                    pObjectToPersist.ClearValue(PersistenceManager.StorageIdProperty);
                }
            }

            return result;
        }

        /// <summary>
        /// Load/Save all controls that contain "telerik:PersistenceManager.StorageId="..."
        /// The file location is "$APPDATA\IsolatedStorage\..."
        /// </summary>
        /// <param name="pPersistenceAction">Load/Save</param>
        /// <param name="pErrorMessage">Error received during the persistence.</param>
        /// <returns>true if successfull otherwise false</returns>
        static public bool Persist(PersistenceAction pPersistenceAction, out string pErrorMessage)
        {           
            pErrorMessage = string.Empty;
            PersistenceManager manager = new PersistenceManager();
            manager.PropertyPersisting += new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);
            IsolatedStorageProvider storage = new IsolatedStorageProvider(manager);

            try
            {
                try
                {
                    if (pPersistenceAction == PersistenceAction.Load)
                    {
                        //storage.LoadFromStorage(); // TODO CHECK
                    }
                    else if (pPersistenceAction == PersistenceAction.Save)
                    {
                        //storage.SaveToStorage(); // TODO CHECK
                    }

                    return true;
                }
                catch (Exception ex)
                {
                    GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                    tracingTool.Log(GclLogger.Level.Error, "PERST001", "Error occured during '{0}' file. Message: {1}", pPersistenceAction.ToString(), ex.ToString());
                    pErrorMessage = ex.Message;
                    return false;
                }
            }
            finally
            {
                manager.PropertyPersisting += new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);
            }
        }

        /// <summary>
        /// Load/Save from/to stream object.
        /// </summary>
        /// <param name="pDataSource">If different from null, we persist load/save from/in database.</param>
        /// <param name="pObject">Object to load/save.</param>
        /// <param name="pStream">Stream that contain the serialized object. Object content is ignored if pDatabaseStorage is true.</param>
        /// <param name="pPersistenceAction">Load/Save</param>       
        /// <param name="pErrorMessage">Error received during the persistence.</param>
        /// <returns></returns>
        static public bool Persist(NeuronDataSource pDataSource, object pObject, ref Stream pStream, PersistenceAction pPersistenceAction, out string pErrorMessage)
        {
            // TODO: Compress/Uncompress the stream before save/load to/from database.

            mResult = true;
            pErrorMessage = string.Empty;
            PersistenceManager manager = new PersistenceManager();
            manager.PersistenceError += new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);
            manager.PropertyPersisting += new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);

            try
            {
                if (pPersistenceAction == PersistenceAction.Load)
                {
                    if (pObject != null && pStream != null)
                    {
                        pStream.Position = 0L; // TO CHECK
                        manager.Load(pObject, pStream); // TO CHECK
                    }
                    else
                    {
                        pErrorMessage = "pObject and/or pStream cannot be null.";
                        GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                        tracingTool.Log(GclLogger.Level.Error, "PERST005", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), pErrorMessage);
                        mResult = false;
                    }
                }
                else if (pPersistenceAction == PersistenceAction.Save)
                {
                    if (pObject != null)
                    {
                        pStream = manager.Save(pObject); // TO CHECK
                    }
                    else
                    {
                        pErrorMessage = "pObject cannot be null.";
                        GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                        tracingTool.Log(GclLogger.Level.Error, "PERST006", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), pErrorMessage);
                        mResult = false;
                    }
                }
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST002", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), ex.Message.ToString());
                pErrorMessage = ex.Message;
                mResult = false;
            }
            finally
            {
                manager.PersistenceError -= new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);
                manager.PropertyPersisting -= new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);
                pErrorMessage = mErrorMessage;
            }

            return mResult;
        }

        /// <summary>
        /// Deleting all persistence files.
        /// </summary>
        /// <param name="pErrorMessage">Error receiving during deleting files.</param>
        static public void DeleteAll(out string pErrorMessage)
        {
            pErrorMessage = string.Empty;
            IsolatedStorageProvider iso = new IsolatedStorageProvider();
            try
            {
                iso.DeleteIsolatedStorageFiles();
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST007", "Error occured during deleting files. Message: {0}", ex.Message.ToString());
                pErrorMessage = ex.Message;
            }
        }

        /// <summary>
        /// Generate a custom StorageId.
        /// </summary>
        /// <param name="pObjectToPersist"></param>
        /// <returns></returns>
        static public string GetCustomStorageId(System.Windows.DependencyObject pObjectToPersist)
        {
            string customStorageId = string.Empty;
           

            if (pObjectToPersist != null)
            {
                Assembly assembly = pObjectToPersist.GetType().Assembly;
                customStorageId = assembly.GetName().Name + "." + pObjectToPersist.GetType().Name;               
            }

            return customStorageId;
        }
        #endregion

        #region Private methods.
        /// <summary>
        ///
        /// </summary>
        /// <param name="input"></param>
        /// <param name="output"></param>
        private static void copyTo(Stream input, Stream output)
        {
            byte[] buffer = new byte[32768]; // Fairly arbitrary size
            int bytesRead;

            while ((bytesRead = input.Read(buffer, 0, buffer.Length)) > 0)
            {
                output.Write(buffer, 0, bytesRead);
            }
        }

        /// <summary>
        /// Uncompress a stream.
        /// </summary>
        /// <param name="pStreamIn"></param>
        /// <param name="pStreamOut"></param>
        /// <returns></returns>
        private static bool uncompressStream(MemoryStream pStreamIn, out Stream pStreamOut)
        {
            pStreamOut = null;
            try
            {   
                //TODO: Uncompress stream
                return true;
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST003", "{0}", ex.Message.ToString());
                mErrorMessage = ex.Message;
                return false;
            }
        }

        /// <summary>
        /// Compream a stream.
        /// </summary>
        /// <param name="pStreamIn"></param>
        /// <param name="pStreamOut"></param>
        /// <returns></returns>
        private static bool compressStream(ref Stream pStreamIn, out MemoryStream pStreamOut)
        {
            pStreamOut = null;
            try
            {
                pStreamOut = new MemoryStream();
                ZipPackage package = ZipPackage.Create(pStreamOut);
                package.AddStream(pStreamIn, "WindowPersistedData");
                pStreamIn.Position = 0L;
                return true;
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST004", "{0}", ex.Message.ToString());
                mErrorMessage = ex.Message;
                return false;
            }
        }

        /// <summary>
        /// Event triggered when the stream persistence didn't worked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void manager_PersistenceError(object sender, Telerik.Windows.Persistence.Events.PersistenceErrorEventArgs e)
        {
            mErrorMessage = e.Exception.Message;
            mResult = false;
            throw new NotImplementedException();
        }

        /// <summary>
        /// This event is used to prevent any BroderBrush to have a transparent color when we persist an object.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void manager_PropertyPersisting(object sender, Telerik.Windows.Persistence.Events.PersistingPropertyEventArgs e)
        {
            //Not needed since version 2011.3.1116.35 of Telerik
            //if (e.Name == "BorderBrush")
            //    e.Cancel = true;
        }
        #endregion

        #region Private declarations.
        /// <summary>
        /// Persist a streaming object into or from database.
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="pStream"></param>
        /// <returns></returns>
        static private Boolean databaseStorage(PersistenceAction pAction, ref MemoryStream pStream)
        {
            Boolean result = true;

            if (pAction == PersistenceAction.Load)
            {
                throw new NotImplementedException();
            }
            else if (pAction == PersistenceAction.Save)
            {
                throw new NotImplementedException();
            }
           
            return result;
        }
        #endregion

        #region Enumerators.
        public enum PersistenceAction { Load, Save }
        #endregion

        #region Private declarations.
        static private string mErrorMessage;
        static private bool mResult;
        #endregion
    }

    //====================================================================================
    //
    //====================================================================================
    public class DockingCustomPropertyProvider : ICustomPropertyProvider
    {
        public CustomPropertyInfo[] GetCustomProperties()
        {
            // Create two custom properties to serialize the Layout of the RadDocking and the Content of the RadPanes
            return new CustomPropertyInfo[]
        {
            new CustomPropertyInfo("Layout", typeof(string)),
            new CustomPropertyInfo("Content", typeof(List<PaneProxy>)) { AllowCreateInstance =false, TreatAsUI = false},
        };
        }

        public void InitializeObject(object context)
        {
        }

        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            if (customPropertyInfo.Name == "Content")
            {
                // See remarks in ProvideValue method:
                // provide the values on which the saved properties will be restored upon
                RadDocking docking = context as RadDocking;
                List<PaneProxy> proxies = new List<PaneProxy>();
                foreach (RadPane pane in this.GetOrderedPanes(docking).ToArray())
                {
                    proxies.Add(new PaneProxy() { Content = pane.Content });
                }
                return proxies;
            }
            return null;
        }

        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            RadDocking docking = context as RadDocking;
            if (customPropertyInfo.Name == "Layout")
            {
                // let the RadDocking save the layout of the Panes:
                return this.SaveLayoutAsString(docking);
            }
            else if (customPropertyInfo.Name == "Content")
            {
                // create proxies for all of the Panes and save their content
                IEnumerable<RadPane> panes = this.GetOrderedPanes(docking);
                List<PaneProxy> proxies = new List<PaneProxy>();
                foreach (RadPane pane in panes)
                {
                    proxies.Add(new PaneProxy() { Content = pane.Content });
                }
                return proxies;
            }
            return null;
        }

        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            if (customPropertyInfo.Name == "Layout")
            {
                // let the RadDocking load the layout of the RadPanes
                this.LoadLayoutFromString(value.ToString(), context as RadDocking);
            }
            else if (customPropertyInfo.Name == "Content")
            {
                // the PersistenceManager does not re-create UI elements - in this case the Content of the RadPane.
                // So, instead of providing a value on which the saved properties will be applied,
                // we will use the InitializeValue method.
            }
        }

        private string SaveLayoutAsString(RadDocking instance)
        {
            MemoryStream stream = new MemoryStream();
            instance.SaveLayout(stream);

            stream.Seek(0, SeekOrigin.Begin);

            StreamReader reader = new StreamReader(stream);
            return reader.ReadToEnd();
        }

        private void LoadLayoutFromString(string xml, RadDocking instance)
        {
            using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
            {
                stream.Seek(0, SeekOrigin.Begin);
                instance.LoadLayout(stream);
            }
        }

        private IEnumerable<RadPane> GetOrderedPanes(RadDocking docking)
        {
            // get the RadPanes always in the same order:
            RadPane[] array = docking.Panes.ToArray();
            Array.Sort(array, new RadPaneComparer());
            return array;
        }
    }

    public class RadPaneComparer : IComparer<RadPane>
    {
        int IComparer<RadPane>.Compare(RadPane x, RadPane y)
        {
            // compare RadPanes by their serialization tag:
            string xSerializationTag = RadDocking.GetSerializationTag(x);
            string ySerializationTag = RadDocking.GetSerializationTag(y);

            return xSerializationTag.CompareTo(ySerializationTag);
        }
    }

    //====================================================================================
    //
    //====================================================================================
    public class GridViewCustomPropertyProvider : ICustomPropertyProvider
    {
        public CustomPropertyInfo[] GetCustomProperties()
        {
            // Create three custom properties to persist the Columns, Sorting and Group descriptors using proxy objects
            return new CustomPropertyInfo[]
            {
                new CustomPropertyInfo("Columns", typeof(List<ColumnProxy>)),
                new CustomPropertyInfo("SortDescriptors", typeof(List<SortDescriptorProxy>)),
                new CustomPropertyInfo("FilterDescriptors", typeof(List<FilterSetting>)),
                new CustomPropertyInfo("GroupDescriptors", typeof(List<GroupDescriptorProxy>)),
            };
        }

        public void InitializeObject(object context)
        {
            if (context is RadGridView)
            {
                RadGridView gridView = context as RadGridView;
                gridView.SortDescriptors.Clear();
                gridView.GroupDescriptors.Clear();
                gridView.FilterDescriptors.Clear();
            }
        }

        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return null;
        }

        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            RadGridView gridView = context as RadGridView;
            if (customPropertyInfo.Name == "Columns")
            {
                // create proxies for all of the columns and save only specific properties
                List<ColumnProxy> proxies = new List<ColumnProxy>();
                foreach (GridViewColumn column in gridView.Columns)
                {
                    proxies.Add(new ColumnProxy()
                    {
                        UniqueName = column.UniqueName,
                        Header = column.Header.ToString(),
                        DisplayOrder = column.DisplayIndex,
                        Width = column.Width,
                    });
                }
                return proxies;
            }
            else if (customPropertyInfo.Name == "SortDescriptors")
            {
                // create proxies for all of the sort descriptors and save only specific properties
                List<SortDescriptorProxy> proxies = new List<SortDescriptorProxy>();
                foreach (ColumnSortDescriptor descriptor in gridView.SortDescriptors)
                {
                    proxies.Add(new SortDescriptorProxy()
                    {
                        ColumnUniqueName = descriptor.Column.UniqueName,
                        SortDirection = descriptor.SortDirection,
                    });
                }
                return proxies;
            }
            else if (customPropertyInfo.Name == "GroupDescriptors")
            {
                // create proxies for all of the group descriptors and save only specific properties
                List<GroupDescriptorProxy> proxies = new List<GroupDescriptorProxy>();
                foreach (ColumnGroupDescriptor descriotor in gridView.GroupDescriptors)
                {
                    proxies.Add(new GroupDescriptorProxy()
                    {
                        ColumnUniqueName = descriotor.Column.UniqueName,
                        SortDirection = descriotor.SortDirection,
                    });
                }
                return proxies;
            }
            else if (customPropertyInfo.Name == "FilterDescriptors")
            {
                // create proxies for all of the filter descriptors and save only specific properties
                List<FilterSetting> proxies = new List<FilterSetting>();
                foreach (IColumnFilterDescriptor cfd in gridView.FilterDescriptors.OfType<IColumnFilterDescriptor>())
                {
                    FilterSetting setting = new FilterSetting();

                    if (cfd.FieldFilter.Filter1.Value != Telerik.Windows.Data.FilterDescriptor.UnsetValue)
                    {
                        setting.Filter1 = new FilterDescriptorProxy();
                        setting.Filter1.Member = cfd.FieldFilter.Filter1.Member;
                        setting.Filter1.Operator = cfd.FieldFilter.Filter1.Operator;
                        setting.Filter1.Value = cfd.FieldFilter.Filter1.Value;
                    }

                    if (cfd.FieldFilter.Filter2.Value != Telerik.Windows.Data.FilterDescriptor.UnsetValue)
                    {
                        setting.Filter2 = new FilterDescriptorProxy();
                        setting.Filter2.Member = cfd.FieldFilter.Filter2.Member;
                        setting.Filter2.Operator = cfd.FieldFilter.Filter2.Operator;
                        setting.Filter2.Value = cfd.FieldFilter.Filter2.Value;
                    }
                    foreach (Telerik.Windows.Data.FilterDescriptor fd in cfd.DistinctFilter.FilterDescriptors.OfType<Telerik.Windows.Data.FilterDescriptor>())
                    {
                        if (fd.Value == Telerik.Windows.Data.FilterDescriptor.UnsetValue)
                        {
                            continue;
                        }

                        FilterDescriptorProxy fds = new FilterDescriptorProxy();
                        fds.Member = fd.Member;
                        fds.Operator = fd.Operator;
                        fds.Value = fd.Value;
                        setting.SelectedDistinctValues.Add(fds);
                    }

                    proxies.Add(setting);
                    setting.PropertyName = setting.PropertyName = cfd.Column.DataMemberBinding.Path.Path;
                }
                return proxies;
            }
            return null;
        }

        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            RadGridView gridView = context as RadGridView;
            if (customPropertyInfo.Name == "Columns")
            {
                List<ColumnProxy> savedProxies = value as List<ColumnProxy>;

                // restore properties on the saved columns:
                foreach (ColumnProxy proxy in savedProxies)
                {
                    GridViewColumn column = this.GetColumnInstance(gridView, proxy.UniqueName);
                    if (column != null)
                    {
                        column.DisplayIndex = proxy.DisplayOrder;
                        column.Header = proxy.Header;
                        column.Width = proxy.Width;
                    }
                }
            }
            else if (customPropertyInfo.Name == "SortDescriptors")
            {
                gridView.SortDescriptors.Clear();
                List<SortDescriptorProxy> savedProxies = value as List<SortDescriptorProxy>;

                // restore properties on the saved sort descriptors:
                foreach (SortDescriptorProxy proxy in savedProxies)
                {
                    GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);
                    gridView.SortDescriptors.Add(new ColumnSortDescriptor() { Column = column, SortDirection = proxy.SortDirection });
                }
            }
            else if (customPropertyInfo.Name == "GroupDescriptors")
            {
                gridView.GroupDescriptors.Clear();
                List<GroupDescriptorProxy> savedProxies = value as List<GroupDescriptorProxy>;

                // restore properties on the saved group descriptors:
                foreach (GroupDescriptorProxy proxy in savedProxies)
                {
                    GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);
                    gridView.GroupDescriptors.Add(new ColumnGroupDescriptor() { Column = column, SortDirection = proxy.SortDirection });
                }
            }
            else if (customPropertyInfo.Name == "FilterDescriptors")
            {
                gridView.FilterDescriptors.Clear();
                List<FilterSetting> settings = value as List<FilterSetting>;
                foreach (FilterSetting setting in settings)
                {
                    FilterSetting currentSetting = setting;

                    GridViewDataColumn matchingColumn =
                    (from column in gridView.Columns.OfType<GridViewDataColumn>()
                     where column.DataMemberBinding.Path.Path == currentSetting.PropertyName
                     select column).FirstOrDefault();

                    if (matchingColumn != null)
                    {
                        ColumnFilterDescriptor cfd = new ColumnFilterDescriptor(matchingColumn);

                        if (setting.Filter1 != null && setting.Filter1.Member != null)
                        {
                            cfd.FieldFilter.Filter1.Member = setting.Filter1.Member;
                            cfd.FieldFilter.Filter1.Operator = setting.Filter1.Operator;
                            cfd.FieldFilter.Filter1.Value = setting.Filter1.Value;
                        }

                        if (setting.Filter2 != null && setting.Filter2.Member != null)
                        {
                            cfd.FieldFilter.Filter2.Member = setting.Filter2.Member;
                            cfd.FieldFilter.Filter2.Operator = setting.Filter2.Operator;
                            cfd.FieldFilter.Filter2.Value = setting.Filter2.Value;
                        }

                        foreach (FilterDescriptorProxy fds in setting.SelectedDistinctValues)
                        {
                            Telerik.Windows.Data.FilterDescriptor fd = new Telerik.Windows.Data.FilterDescriptor();
                            fd.Member = fds.Member;
                            fd.Operator = fds.Operator;
                            fd.Value = fds.Value;
                            cfd.DistinctFilter.FilterDescriptors.Add(fd);
                        }
                        setting.PropertyName = cfd.Column.DataMemberBinding.Path.Path;

                        gridView.FilterDescriptors.Add(cfd);
                    }
                }
            }
        }

        private GridViewColumn GetColumnInstance(RadGridView gridView, string uniqueName)
        {
            foreach (GridViewColumn column in gridView.Columns)
            {
                if (column.UniqueName == uniqueName)
                    return column;
            }
            return null;
        }
    }

    public class ColumnProxy
    {
        public string UniqueName { get; set; }
        public int DisplayOrder { get; set; }
        public string Header { get; set; }
        public GridViewLength Width { get; set; }
    }

    public class SortDescriptorProxy
    {
        public string ColumnUniqueName { get; set; }
        public ListSortDirection SortDirection { get; set; }
    }

    public class GroupDescriptorProxy
    {
        public string ColumnUniqueName { get; set; }
        public ListSortDirection? SortDirection { get; set; }
    }

    public class FilterDescriptorProxy
    {
        public string Member { get; set; }
        public FilterOperator Operator { get; set; }
        public object Value { get; set; }
        public bool IsCaseSEnsitive { get; set; }
    }

    public class FilterSetting
    {
        public string PropertyName { get; set; }
        List<FilterDescriptorProxy> _SelectedDistinctValues;
        public List<FilterDescriptorProxy> SelectedDistinctValues
        {
            get
            {
                if (_SelectedDistinctValues == null)
                {
                    _SelectedDistinctValues = new List<FilterDescriptorProxy>();
                }
                return _SelectedDistinctValues;
            }
        }

        FilterDescriptorProxy _Filter1;
        public FilterDescriptorProxy Filter1
        {
            get
            {
                return _Filter1;
            }
            set
            {
                _Filter1 = value;
            }
        }

        FilterDescriptorProxy _Filter2;
        public FilterDescriptorProxy Filter2
        {
            get
            {
                return _Filter2;
            }
            set
            {
                _Filter2 = value;
            }
        }
    }

    //====================================================================================
    //
    //====================================================================================
    public class RichTextBoxCustomPropertyProvider : ICustomPropertyProvider
    {
        #region ICustomPropertyProvider Members
        public CustomPropertyInfo[] GetCustomProperties()
        {
            // Create two custom properties to serialize the RichTextBox properties and content
            return new CustomPropertyInfo[]
                {
                    new CustomPropertyInfo("Content", typeof(string)),
                    new CustomPropertyInfo("AcceptsReturn", typeof(bool)),
                };
        }

        public void InitializeObject(object context)
        {

        }

        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return null;
        }

        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            RadRichTextBox owner = context as RadRichTextBox;
            if (customPropertyInfo.Name == "Content")
            {
                TxtFormatProvider provider = new TxtFormatProvider();
                string content = provider.Export(owner.Document);
                return content;
            }
            else
            {
                return this.GetValueSafely(customPropertyInfo.Name, owner);
            }
        }

        private object GetValueSafely(string propertyName, RadRichTextBox owner)
        {
            PropertyInfo info = owner.GetType().GetProperty(propertyName);
            if (info != null)
            {
                return info.GetValue(owner, null);
            }
            else
                throw new Exception();
        }

        private void SetValueSafely(string propertyName, object value, RadRichTextBox owner)
        {
            PropertyInfo info = owner.GetType().GetProperty(propertyName);
            if (info != null)
            {
                info.SetValue(owner, value, null);
            }
            else
                throw new Exception();
        }

        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            RadRichTextBox owner = context as RadRichTextBox;
            if (customPropertyInfo.Name == "Content")
            {
                TxtFormatProvider provider = new TxtFormatProvider();
                owner.Document = provider.Import(value.ToString());
            }
            else
            {
                this.SetValueSafely(customPropertyInfo.Name, value, owner);
            }
        }
        #endregion
    }

    //====================================================================================
    //
    //====================================================================================
    public class PaneProxy
    {
        public object Content { get; set; }
    }
}

0
Chavdar Dimitrov
Telerik team
answered on 04 May 2012, 03:58 PM
Hi Oliver,

Thank you for sending the error list.

Unfortunately, some of the errors are in French (not sure). Is is possible to send us an error list in English?

Additionally, it will be very helpful if you tell us which are the exact versions of the controls - the old one and the new one.

Looking forward to your reply.

Kind regards,
Chavdar,
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Oliver
Top achievements
Rank 1
answered on 04 May 2012, 04:15 PM
Hi Chavdar,

as I mentionned in my initial email, V2011.3.1220.35 for the old control and V2012.1.326.35 for the new control.

Traduction was made by Google and I add a filter on Telerik error message ;)

Error 5 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' does not contain a definition for 'Member' and no extension method 'Member' accepting a first argument of type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 554 74 ClientHelper
Error 6 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' does not contain a definition for 'Member' and no extension method 'Member' accepting a first argument of type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 562 74 ClientHelper
Error 7 'Telerik.Windows.Controls.GridViewColumn' does not contain a definition for 'DataMemberBinding' and no extension method 'DataMemberBinding' accepting a first argument of type 'Telerik.Windows.Controls.GridViewColumn' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 581 78 ClientHelper
Error 8 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' is inaccessible due to its protection level D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 646 25 ClientHelper
Error 9 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' is inaccessible due to its protection level D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 646 58 ClientHelper
Error 10 Can not create an instance of abstract class or interface 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 646 54 ClientHelper
Error 11 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'FieldFilter' and no extension method 'FieldFilter' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 650 33 ClientHelper
Error 12 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'FieldFilter' and no extension method 'FieldFilter' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 651 33 ClientHelper
Error 13 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'FieldFilter' and no extension method 'FieldFilter' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 652 33 ClientHelper
Error 14 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'FieldFilter' and no extension method 'FieldFilter' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 657 33 ClientHelper
Error 15 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'FieldFilter' and no extension method 'FieldFilter' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 658 33 ClientHelper
Error 16 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'FieldFilter' and no extension method 'FieldFilter' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 659 33 ClientHelper
Error 17 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'DistinctFilter' and no extension method 'DistinctFilter' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 668 33 ClientHelper
Error 18 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' does not contain a definition for 'Column' and no extension method 'Column' accepting a first argument of type 'Telerik.Windows.Controls.GridView.ColumnFilterDescriptor' n ' was found (a using directive or an assembly reference is missing it?) D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs 670 52 ClientHelperError 244 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' does not contain a definition for 'Member' and no extension method 'Member' accepting a first argument of type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 554 74 ClientHelper
Error 245 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' does not contain a definition for 'Member' and no extension method 'Member' accepting a first argument of type 'Telerik.Windows.Data.OperatorValueFilterDescriptorBase' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 562 74 ClientHelper
Error 246 'Telerik.Windows.Controls.GridViewColumn' does not contain a definition for 'DataMemberBinding' and no extension method 'DataMemberBinding' accepting a first argument of type 'Telerik.Windows.Controls.GridViewColumn' could be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 581 78 ClientHelper
Error 247 The type or namespace name 'ColumnFilterDescriptor' could not be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 646 25 ClientHelper
Error 248 The type or namespace name 'ColumnFilterDescriptor' could not be found (are you missing a using directive or an assembly reference?) D:\Developpement\GestX.Courant\RisGC\Client\ClientHelper\PersistenceStorage.cs 646 58 ClientHelper

Thank's
0
Chavdar Dimitrov
Telerik team
answered on 07 May 2012, 07:50 AM
Hello Oliver,

Sorry for the confusion regarding the versions.

We have introduced breaking changes in the filtering features with the Q1 2012 version of the Controls. Please, check here for detailed information on all the changes done.

I hope this will help. Do not hesitate to come back to us if you have any additional questions.

Kind regards,
Chavdar,
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Oliver
Top achievements
Rank 1
answered on 07 May 2012, 03:23 PM

Hi Chavdar.

I'm a little bit confuse with all this :(

The piece of code I use for my persistence was provided by Telerik couples moneth ago. Can you check it and tell me what I have to do because I'm not sure exatcly what I ihave to do.

Thank's

public class GridViewCustomPropertyProvider : ICustomPropertyProvider
    {
        public CustomPropertyInfo[] GetCustomProperties()
        {
            // Create three custom properties to persist the Columns, Sorting and Group descriptors using proxy objects
            return new CustomPropertyInfo[]
            {
                new CustomPropertyInfo("Columns", typeof(List<ColumnProxy>)),
                new CustomPropertyInfo("SortDescriptors", typeof(List<SortDescriptorProxy>)),
                new CustomPropertyInfo("FilterDescriptors", typeof(List<FilterSetting>)),
                new CustomPropertyInfo("GroupDescriptors", typeof(List<GroupDescriptorProxy>)),
            };
        }

        public void InitializeObject(object context)
        {
            if (context is RadGridView)
            {
                RadGridView gridView = context as RadGridView;
                gridView.SortDescriptors.Clear();
                gridView.GroupDescriptors.Clear();
                gridView.FilterDescriptors.Clear();
            }
        }

        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return null;
        }

        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            RadGridView gridView = context as RadGridView;
            if (customPropertyInfo.Name == "Columns")
            {
                // create proxies for all of the columns and save only specific properties
                List<ColumnProxy> proxies = new List<ColumnProxy>();
                foreach (GridViewColumn column in gridView.Columns)
                {
                    proxies.Add(new ColumnProxy()
                    {
                        UniqueName = column.UniqueName,
                        Header = column.Header.ToString(),
                        DisplayOrder = column.DisplayIndex,
                        Width = column.Width,
                    });
                }
                return proxies;
            }
            else if (customPropertyInfo.Name == "SortDescriptors")
            {
                // create proxies for all of the sort descriptors and save only specific properties
                List<SortDescriptorProxy> proxies = new List<SortDescriptorProxy>();
                foreach (ColumnSortDescriptor descriptor in gridView.SortDescriptors)
                {
                    proxies.Add(new SortDescriptorProxy()
                    {
                        ColumnUniqueName = descriptor.Column.UniqueName,
                        SortDirection = descriptor.SortDirection,
                    });
                }
                return proxies;
            }
            else if (customPropertyInfo.Name == "GroupDescriptors")
            {
                // create proxies for all of the group descriptors and save only specific properties
                List<GroupDescriptorProxy> proxies = new List<GroupDescriptorProxy>();
                foreach (ColumnGroupDescriptor descriotor in gridView.GroupDescriptors)
                {
                    proxies.Add(new GroupDescriptorProxy()
                    {
                        ColumnUniqueName = descriotor.Column.UniqueName,
                        SortDirection = descriotor.SortDirection,
                    });
                }
                return proxies;
            }
            else if (customPropertyInfo.Name == "FilterDescriptors")
            {
                // create proxies for all of the filter descriptors and save only specific properties
                List<FilterSetting> proxies = new List<FilterSetting>();
                foreach (IColumnFilterDescriptor cfd in gridView.FilterDescriptors.OfType<IColumnFilterDescriptor>())
                {
                    FilterSetting setting = new FilterSetting();

                    if (cfd.FieldFilter.Filter1.Value != Telerik.Windows.Data.FilterDescriptor.UnsetValue)
                    {
                        setting.Filter1 = new FilterDescriptorProxy();
                        setting.Filter1.Member = cfd.FieldFilter.Filter1.Member;
                        setting.Filter1.Operator = cfd.FieldFilter.Filter1.Operator;
                        setting.Filter1.Value = cfd.FieldFilter.Filter1.Value;
                    }

                    if (cfd.FieldFilter.Filter2.Value != Telerik.Windows.Data.FilterDescriptor.UnsetValue)
                    {
                        setting.Filter2 = new FilterDescriptorProxy();
                        setting.Filter2.Member = cfd.FieldFilter.Filter2.Member;
                        setting.Filter2.Operator = cfd.FieldFilter.Filter2.Operator;
                        setting.Filter2.Value = cfd.FieldFilter.Filter2.Value;
                    }
                    foreach (Telerik.Windows.Data.FilterDescriptor fd in cfd.DistinctFilter.FilterDescriptors.OfType<Telerik.Windows.Data.FilterDescriptor>())
                    {
                        if (fd.Value == Telerik.Windows.Data.FilterDescriptor.UnsetValue)
                        {
                            continue;
                        }

                        FilterDescriptorProxy fds = new FilterDescriptorProxy();
                        fds.Member = fd.Member;
                        fds.Operator = fd.Operator;
                        fds.Value = fd.Value;
                        setting.SelectedDistinctValues.Add(fds);
                    }

                    proxies.Add(setting);
                    setting.PropertyName = setting.PropertyName = cfd.Column.DataMemberBinding.Path.Path;
                }
                return proxies;
            }
            return null;
        }

        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            RadGridView gridView = context as RadGridView;
            if (customPropertyInfo.Name == "Columns")
            {
                List<ColumnProxy> savedProxies = value as List<ColumnProxy>;

                // restore properties on the saved columns:
                foreach (ColumnProxy proxy in savedProxies)
                {
                    GridViewColumn column = this.GetColumnInstance(gridView, proxy.UniqueName);
                    if (column != null)
                    {
                        column.DisplayIndex = proxy.DisplayOrder;
                        column.Header = proxy.Header;
                        column.Width = proxy.Width;
                    }
                }
            }
            else if (customPropertyInfo.Name == "SortDescriptors")
            {
                gridView.SortDescriptors.Clear();
                List<SortDescriptorProxy> savedProxies = value as List<SortDescriptorProxy>;

                // restore properties on the saved sort descriptors:
                foreach (SortDescriptorProxy proxy in savedProxies)
                {
                    GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);
                    gridView.SortDescriptors.Add(new ColumnSortDescriptor() { Column = column, SortDirection = proxy.SortDirection });
                }
            }
            else if (customPropertyInfo.Name == "GroupDescriptors")
            {
                gridView.GroupDescriptors.Clear();
                List<GroupDescriptorProxy> savedProxies = value as List<GroupDescriptorProxy>;

                // restore properties on the saved group descriptors:
                foreach (GroupDescriptorProxy proxy in savedProxies)
                {
                    GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);
                    gridView.GroupDescriptors.Add(new ColumnGroupDescriptor() { Column = column, SortDirection = proxy.SortDirection });
                }
            }
            else if (customPropertyInfo.Name == "FilterDescriptors")
            {
                gridView.FilterDescriptors.Clear();
                List<FilterSetting> settings = value as List<FilterSetting>;
                foreach (FilterSetting setting in settings)
                {
                    FilterSetting currentSetting = setting;

                    GridViewDataColumn matchingColumn =
                    (from column in gridView.Columns.OfType<GridViewDataColumn>()
                     where column.DataMemberBinding.Path.Path == currentSetting.PropertyName
                     select column).FirstOrDefault();

                    if (matchingColumn != null)
                    {
                        ColumnFilterDescriptor cfd = new ColumnFilterDescriptor(matchingColumn);      

                        if (setting.Filter1 != null && setting.Filter1.Member != null)
                        {
                            cfd.FieldFilter.Filter1.Member = setting.Filter1.Member;
                            cfd.FieldFilter.Filter1.Operator = setting.Filter1.Operator;
                            cfd.FieldFilter.Filter1.Value = setting.Filter1.Value;
                        }

                        if (setting.Filter2 != null && setting.Filter2.Member != null)
                        {
                            cfd.FieldFilter.Filter2.Member = setting.Filter2.Member;
                            cfd.FieldFilter.Filter2.Operator = setting.Filter2.Operator;
                            cfd.FieldFilter.Filter2.Value = setting.Filter2.Value;
                        }

                        foreach (FilterDescriptorProxy fds in setting.SelectedDistinctValues)
                        {
                            Telerik.Windows.Data.FilterDescriptor fd = new Telerik.Windows.Data.FilterDescriptor();
                            fd.Member = fds.Member;
                            fd.Operator = fds.Operator;
                            fd.Value = fds.Value;
                            cfd.DistinctFilter.FilterDescriptors.Add(fd);
                        }
                        setting.PropertyName = cfd.Column.DataMemberBinding.Path.Path;

                        gridView.FilterDescriptors.Add(cfd);
                    }
                }
            }
        }

        private GridViewColumn GetColumnInstance(RadGridView gridView, string uniqueName)
        {
            foreach (GridViewColumn column in gridView.Columns)
            {
                if (column.UniqueName == uniqueName)
                    return column;
            }
            return null;
        }
    }

0
Oliver
Top achievements
Rank 1
answered on 07 May 2012, 03:45 PM
Hi Chavdar,

I get the code from the lastest demo and the compilation seem's to be ok.

Thank's
0
Oliver
Top achievements
Rank 1
answered on 07 May 2012, 10:17 PM
Hi,

I imported all the persistence data from the latest Telerik demo and after after testing some of my things, I came accross the following problem. When I persist a form, I received the following error message (Class PersistenceStorage is at the end):

Error occurred during 'Save' file. Message: System.InvalidCastException: Unable to cast object of type 'Telerik.Windows.Data.SortDescriptor' to type 'Telerik.Windows.Controls.GridView.ColumnSortDescriptor'.
to customPropertyInfo, Object context) in D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs: line 519
to Telerik.Windows.Persistence.Serialization.Serializer.HandleCustomPropertyProvider (Object objectToSerialize, Type type, String path, ReferenceValue parentValue, PropertyData parentPropData, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth) in 557
to Telerik.Windows.Persistence.Serialization.Serializer.GeneratePropertyTree (objectToSerialize Object, String path, ReferenceValue parentValue, PropertyData parentPropData, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth) in 172
to Telerik.Windows.Persistence.Serialization.Serializer.SaveCollectionValue (IEnumerable collection, String propertyName, Type propertyType, String propertyPath, ReferenceValue parentValue, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth, MatchResult propDataMatchResult) in 724
to Telerik.Windows.Persistence.Serialization.Serializer.SaveProperty (PropertyInfo property, String path, Object obj, ReferenceValue parentValue, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth, PropertyData parentPropData, MatchResult parentMatchResult) in 393
to Telerik.Windows.Persistence.Serialization.UISerializer.SaveProperty (PropertyInfo property, String path, Object obj, ReferenceValue parentValue, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth, PropertyData parentPropData, MatchResult parentMatchResult) in 90
to Telerik.Windows.Persistence.Serialization.Serializer.GeneratePropertyTree (objectToSerialize Object, String path, ReferenceValue parentValue, PropertyData parentPropData, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth) in 221
to Telerik.Windows.Persistence.Serialization.Serializer.SaveClassValue (Object value, String propertyName, Type propertyType, String propertyPath, ReferenceValue parentValue, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth, MatchResult propDataMatchResult) in 792
to Telerik.Windows.Persistence.Serialization.Serializer.SaveProperty (PropertyInfo property, String path, Object obj, ReferenceValue parentValue, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth, PropertyData parentPropData, MatchResult parentMatchResult) in 419
to Telerik.Windows.Persistence.Serialization.UISerializer.SaveProperty (PropertyInfo property, String path, Object obj, ReferenceValue parentValue, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth, PropertyData parentPropData, MatchResult parentMatchResult) in 90
to Telerik.Windows.Persistence.Serialization.Serializer.GeneratePropertyTree (objectToSerialize Object, String path, ReferenceValue parentValue, PropertyData parentPropData, SerializationMetadataCollection options, Boolean shouldValidateCriteria, Int32 nestingDepth) in 221
to Telerik.Windows.Persistence.Serialization.Serializer.GenerateRootElementTree (Object objectToSerialize) in 470
to Telerik.Windows.Persistence.Serialization.Serializer.Serialize (Object obj) in 53
to Telerik.Windows.Persistence.PersistenceManager.Save (Object obj) in 86
to Telerik.Windows.Persistence.Storage.IsolatedStorageProvider.SaveToStorage () in 82
to com.christiegrp.Neuron.ClientApplication.PersistenceStorage.Persist (PersistenceAction pPersistenceAction, String & pErrorMessage) in D: \ Development \ GestX.Courant \ RisGC \ Client \ ClientHelper \ PersistenceStorage.cs: line 96



//====================================================================================
// Author.......:
// Creation date:
// Fonction.....:
//====================================================================================
// Date       Prg  TT#    Details
// ---------- ---- ------ ------------------------------------------------------------
//
//====================================================================================

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Data;
using Telerik.Windows.Documents.FormatProviders.Txt;
using Telerik.Windows.Persistence;
using Telerik.Windows.Persistence.Services;
using Telerik.Windows.Persistence.Storage;
using Telerik.Windows.Zip;

using com.christiegrp.Neuron.Client;
using com.ChristieGrp.Infrastructure;

namespace com.christiegrp.Neuron.ClientApplication
{
    static public class PersistenceStorage
    {       
        #region Public methods.
        /// <summary>
        /// Set a StorageId before Loading/Saving a control and removing it's StorageId after the action was taken.
        /// The file location is "$APPDATA\IsolatedStorage\..."
        /// </summary>
        /// <param name="pPersistenceAction">Load/Save</param>
        /// <param name="pObjectToPersist">Object to persist.</param>
        /// <param name="pStorageId">StorageId of the object to persist. Null mean that a custom StorageId will be use.</param>
        /// <param name="pErrorMessage">Error received during the persistence.</param>
        /// <returns>true if successfull otherwise false</returns>
        static public bool Persist(PersistenceAction pPersistenceAction, System.Windows.DependencyObject pObjectToPersist, string pStorageId, out string pErrorMessage)
        {           
            bool result = false;
            pErrorMessage = string.Empty;

            if (pObjectToPersist != null)
            {
                // Validate if we need to generate a custom StorageId.
                if (string.IsNullOrEmpty(pStorageId))
                {
                    pStorageId = GetCustomStorageId(pObjectToPersist);
                }

                try
                {
                    PersistenceManager.SetStorageId(pObjectToPersist, pStorageId);
                    result = Persist(pPersistenceAction, out pErrorMessage);
                }
                finally
                {
                    pObjectToPersist.ClearValue(PersistenceManager.StorageIdProperty);
                }
            }

            return result;
        }

        /// <summary>
        /// Load/Save all controls that contain "telerik:PersistenceManager.StorageId="..."
        /// The file location is "$APPDATA\IsolatedStorage\..."
        /// </summary>
        /// <param name="pPersistenceAction">Load/Save</param>
        /// <param name="pErrorMessage">Error received during the persistence.</param>
        /// <returns>true if successfull otherwise false</returns>
        static public bool Persist(PersistenceAction pPersistenceAction, out string pErrorMessage)
        {           
            pErrorMessage = string.Empty;
            PersistenceManager manager = new PersistenceManager();
            manager.PropertyPersisting += new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);
            IsolatedStorageProvider storage = new IsolatedStorageProvider(manager);

            try
            {
                try
                {
                    if (pPersistenceAction == PersistenceAction.Load)
                    {
                        storage.LoadFromStorage(); // TODO CHECK
                    }
                    else if (pPersistenceAction == PersistenceAction.Save)
                    {
                        storage.SaveToStorage(); // TODO CHECK
                    }

                    return true;
                }
                catch (Exception ex)
                {
                    GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                    tracingTool.Log(GclLogger.Level.Error, "PERST001", "Error occured during '{0}' file. Message: {1}", pPersistenceAction.ToString(), ex.ToString());
                    pErrorMessage = ex.Message;
                    return false;
                }
            }
            finally
            {
                manager.PropertyPersisting += new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);
            }
        }

        /// <summary>
        /// Load/Save from/to stream object.
        /// </summary>
        /// <param name="pDataSource">If different from null, we persist load/save from/in database.</param>
        /// <param name="pObject">Object to load/save.</param>
        /// <param name="pStream">Stream that contain the serialized object. Object content is ignored if pDatabaseStorage is true.</param>
        /// <param name="pPersistenceAction">Load/Save</param>       
        /// <param name="pErrorMessage">Error received during the persistence.</param>
        /// <returns></returns>
        static public bool Persist(NeuronDataSource pDataSource, object pObject, ref Stream pStream, PersistenceAction pPersistenceAction, out string pErrorMessage)
        {
            // TODO: Compress/Uncompress the stream before save/load to/from database.

            mResult = true;
            pErrorMessage = string.Empty;
            PersistenceManager manager = new PersistenceManager();
            manager.PersistenceError += new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);
            manager.PropertyPersisting += new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);

            try
            {
                if (pPersistenceAction == PersistenceAction.Load)
                {
                    if (pObject != null && pStream != null)
                    {
                        pStream.Position = 0L; // TO CHECK
                        manager.Load(pObject, pStream); // TO CHECK
                    }
                    else
                    {
                        pErrorMessage = "pObject and/or pStream cannot be null.";
                        GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                        tracingTool.Log(GclLogger.Level.Error, "PERST005", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), pErrorMessage);
                        mResult = false;
                    }
                }
                else if (pPersistenceAction == PersistenceAction.Save)
                {
                    if (pObject != null)
                    {
                        pStream = manager.Save(pObject); // TO CHECK
                    }
                    else
                    {
                        pErrorMessage = "pObject cannot be null.";
                        GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                        tracingTool.Log(GclLogger.Level.Error, "PERST006", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), pErrorMessage);
                        mResult = false;
                    }
                }
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST002", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), ex.Message.ToString());
                pErrorMessage = ex.Message;
                mResult = false;
            }
            finally
            {
                manager.PersistenceError -= new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);
                manager.PropertyPersisting -= new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);
                pErrorMessage = mErrorMessage;
            }

            return mResult;
        }

        /// <summary>
        /// Deleting all persistence files.
        /// </summary>
        /// <param name="pErrorMessage">Error receiving during deleting files.</param>
        static public void DeleteAll(out string pErrorMessage)
        {
            pErrorMessage = string.Empty;
            IsolatedStorageProvider iso = new IsolatedStorageProvider();
            try
            {
                iso.DeleteIsolatedStorageFiles();
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST007", "Error occured during deleting files. Message: {0}", ex.Message.ToString());
                pErrorMessage = ex.Message;
            }
        }

        /// <summary>
        /// Generate a custom StorageId.
        /// </summary>
        /// <param name="pObjectToPersist"></param>
        /// <returns></returns>
        static public string GetCustomStorageId(System.Windows.DependencyObject pObjectToPersist)
        {
            string customStorageId = string.Empty;
           

            if (pObjectToPersist != null)
            {
                Assembly assembly = pObjectToPersist.GetType().Assembly;
                customStorageId = assembly.GetName().Name + "." + pObjectToPersist.GetType().Name;               
            }

            return customStorageId;
        }
        #endregion

        #region Private methods.
        /// <summary>
        ///
        /// </summary>
        /// <param name="input"></param>
        /// <param name="output"></param>
        private static void copyTo(Stream input, Stream output)
        {
            byte[] buffer = new byte[32768]; // Fairly arbitrary size
            int bytesRead;

            while ((bytesRead = input.Read(buffer, 0, buffer.Length)) > 0)
            {
                output.Write(buffer, 0, bytesRead);
            }
        }

        /// <summary>
        /// Uncompress a stream.
        /// </summary>
        /// <param name="pStreamIn"></param>
        /// <param name="pStreamOut"></param>
        /// <returns></returns>
        private static bool uncompressStream(MemoryStream pStreamIn, out Stream pStreamOut)
        {
            pStreamOut = null;
            try
            {   
                //TODO: Uncompress stream
                return true;
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST003", "{0}", ex.Message.ToString());
                mErrorMessage = ex.Message;
                return false;
            }
        }

        /// <summary>
        /// Compream a stream.
        /// </summary>
        /// <param name="pStreamIn"></param>
        /// <param name="pStreamOut"></param>
        /// <returns></returns>
        private static bool compressStream(ref Stream pStreamIn, out MemoryStream pStreamOut)
        {
            pStreamOut = null;
            try
            {
                pStreamOut = new MemoryStream();
                ZipPackage package = ZipPackage.Create(pStreamOut);
                package.AddStream(pStreamIn, "WindowPersistedData");
                pStreamIn.Position = 0L;
                return true;
            }
            catch (Exception ex)
            {
                GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
                tracingTool.Log(GclLogger.Level.Error, "PERST004", "{0}", ex.Message.ToString());
                mErrorMessage = ex.Message;
                return false;
            }
        }

        /// <summary>
        /// Event triggered when the stream persistence didn't worked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void manager_PersistenceError(object sender, Telerik.Windows.Persistence.Events.PersistenceErrorEventArgs e)
        {
            mErrorMessage = e.Exception.Message;
            mResult = false;
            throw new NotImplementedException();
        }

        /// <summary>
        /// This event is used to prevent any BroderBrush to have a transparent color when we persist an object.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void manager_PropertyPersisting(object sender, Telerik.Windows.Persistence.Events.PersistingPropertyEventArgs e)
        {
            //Not needed since version 2011.3.1116.35 of Telerik
            //if (e.Name == "BorderBrush")
            //    e.Cancel = true;
        }
        #endregion

        #region Private declarations.
        /// <summary>
        /// Persist a streaming object into or from database.
        /// </summary>
        /// <param name="pAction"></param>
        /// <param name="pStream"></param>
        /// <returns></returns>
        static private Boolean databaseStorage(PersistenceAction pAction, ref MemoryStream pStream)
        {
            Boolean result = true;

            if (pAction == PersistenceAction.Load)
            {
                throw new NotImplementedException();
            }
            else if (pAction == PersistenceAction.Save)
            {
                throw new NotImplementedException();
            }
           
            return result;
        }
        #endregion

        #region Enumerators.
        public enum PersistenceAction { Load, Save }
        #endregion

        #region Private declarations.
        static private string mErrorMessage;
        static private bool mResult;
        #endregion
    }

    //====================================================================================
    //
    //====================================================================================
    public class DockingCustomPropertyProvider : ICustomPropertyProvider
    {
        public CustomPropertyInfo[] GetCustomProperties()
        {
            // Create two custom properties to serialize the Layout of the RadDocking and the Content of the RadPanes
            return new CustomPropertyInfo[]
        {
            new CustomPropertyInfo("Layout", typeof(string)),
            new CustomPropertyInfo("Content", typeof(List<PaneProxy>)) { AllowCreateInstance =false, TreatAsUI = false},
        };
        }

        public void InitializeObject(object context)
        {
        }

        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            if (customPropertyInfo.Name == "Content")
            {
                // See remarks in ProvideValue method:
                // provide the values on which the saved properties will be restored upon
                RadDocking docking = context as RadDocking;
                List<PaneProxy> proxies = new List<PaneProxy>();
                foreach (RadPane pane in this.GetOrderedPanes(docking).ToArray())
                {
                    proxies.Add(new PaneProxy() { Content = pane.Content });
                }
                return proxies;
            }
            return null;
        }

        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            RadDocking docking = context as RadDocking;
            if (customPropertyInfo.Name == "Layout")
            {
                // let the RadDocking save the layout of the Panes:
                return this.SaveLayoutAsString(docking);
            }
            else if (customPropertyInfo.Name == "Content")
            {
                // create proxies for all of the Panes and save their content
                IEnumerable<RadPane> panes = this.GetOrderedPanes(docking);
                List<PaneProxy> proxies = new List<PaneProxy>();
                foreach (RadPane pane in panes)
                {
                    proxies.Add(new PaneProxy() { Content = pane.Content });
                }
                return proxies;
            }
            return null;
        }

        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            if (customPropertyInfo.Name == "Layout")
            {
                // let the RadDocking load the layout of the RadPanes
                this.LoadLayoutFromString(value.ToString(), context as RadDocking);
            }
            else if (customPropertyInfo.Name == "Content")
            {
                // the PersistenceManager does not re-create UI elements - in this case the Content of the RadPane.
                // So, instead of providing a value on which the saved properties will be applied,
                // we will use the InitializeValue method.
            }
        }

        private string SaveLayoutAsString(RadDocking instance)
        {
            MemoryStream stream = new MemoryStream();
            instance.SaveLayout(stream);

            stream.Seek(0, SeekOrigin.Begin);

            StreamReader reader = new StreamReader(stream);
            return reader.ReadToEnd();
        }

        private void LoadLayoutFromString(string xml, RadDocking instance)
        {
            using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
            {
                stream.Seek(0, SeekOrigin.Begin);
                instance.LoadLayout(stream);
            }
        }

        private IEnumerable<RadPane> GetOrderedPanes(RadDocking docking)
        {
            // get the RadPanes always in the same order:
            RadPane[] array = docking.Panes.ToArray();
            Array.Sort(array, new RadPaneComparer());
            return array;
        }
    }

    public class RadPaneComparer : IComparer<RadPane>
    {
        int IComparer<RadPane>.Compare(RadPane x, RadPane y)
        {
            // compare RadPanes by their serialization tag:
            string xSerializationTag = RadDocking.GetSerializationTag(x);
            string ySerializationTag = RadDocking.GetSerializationTag(y);

            return xSerializationTag.CompareTo(ySerializationTag);
        }
    }

    //====================================================================================
    //
    //====================================================================================
 public class GridViewCustomPropertyProvider : ICustomPropertyProvider
 {
  public CustomPropertyInfo[] GetCustomProperties()
  {
   // Create three custom properties to persist the Columns, Sorting and Group descriptors using proxy objects
   return new CustomPropertyInfo[]
            {
                new CustomPropertyInfo("Columns", typeof(List<ColumnProxy>)),
                new CustomPropertyInfo("SortDescriptors", typeof(List<SortDescriptorProxy>)),
                new CustomPropertyInfo("FilterDescriptors", typeof(List<FilterSetting>)),
                new CustomPropertyInfo("GroupDescriptors", typeof(List<GroupDescriptorProxy>)),
            };
  }

  public void InitializeObject(object context)
  {
   if (context is RadGridView)
   {
    RadGridView gridView = context as RadGridView;
    gridView.SortDescriptors.Clear();
    gridView.GroupDescriptors.Clear();
    gridView.FilterDescriptors.Clear();
   }
  }

  public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
  {
   return null;
  }

  public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
  {
   RadGridView gridView = context as RadGridView;
   if (customPropertyInfo.Name == "Columns")
   {
    // create proxies for all of the columns and save only specific properties
    List<ColumnProxy> proxies = new List<ColumnProxy>();
    foreach (GridViewColumn column in gridView.Columns)
    {
     proxies.Add(new ColumnProxy()
     {
      UniqueName = column.UniqueName,
      Header = column.Header.ToString(),
      DisplayOrder = column.DisplayIndex,
      Width = column.Width,
     });
    }
    return proxies;
   }
   else if (customPropertyInfo.Name == "SortDescriptors")
   {
    // create proxies for all of the sort descriptors and save only specific properties
    List<SortDescriptorProxy> proxies = new List<SortDescriptorProxy>();
    foreach (ColumnSortDescriptor descriptor in gridView.SortDescriptors)
    {
     proxies.Add(new SortDescriptorProxy()
     {
      ColumnUniqueName = descriptor.Column.UniqueName,
      SortDirection = descriptor.SortDirection,
     });
    }
    return proxies;
   }
   else if (customPropertyInfo.Name == "GroupDescriptors")
   {
    // create proxies for all of the group descriptors and save only specific properties
    List<GroupDescriptorProxy> proxies = new List<GroupDescriptorProxy>();
    foreach (ColumnGroupDescriptor descriotor in gridView.GroupDescriptors)
    {
     proxies.Add(new GroupDescriptorProxy()
     {
      ColumnUniqueName = descriotor.Column.UniqueName,
      SortDirection = descriotor.SortDirection,
     });
    }
    return proxies;
   }
   else if (customPropertyInfo.Name == "FilterDescriptors")
   {
    List<FilterSetting> settings = new List<FilterSetting>();

    foreach (GridViewDataColumn column in gridView.Columns
     .OfType<GridViewDataColumn>()
     .Where(column => column.ColumnFilterDescriptor.IsActive))
    {
     FilterSetting setting = new FilterSetting();

     setting.ColumnUniqueName = column.UniqueName;

     if (column.ColumnFilterDescriptor.FieldFilter.Filter1.IsActive)
     {
      setting.Filter1 = new FilterDescriptorProxy();
      setting.Filter1.Operator = column.ColumnFilterDescriptor.FieldFilter.Filter1.Operator;
      setting.Filter1.Value = column.ColumnFilterDescriptor.FieldFilter.Filter1.Value;
      setting.Filter1.IsCaseSensitive = column.ColumnFilterDescriptor.FieldFilter.Filter1.IsCaseSensitive;
     }

     if (column.ColumnFilterDescriptor.FieldFilter.Filter2.IsActive)
     {
      setting.Filter2 = new FilterDescriptorProxy();
      setting.Filter2.Operator = column.ColumnFilterDescriptor.FieldFilter.Filter2.Operator;
      setting.Filter2.Value = column.ColumnFilterDescriptor.FieldFilter.Filter2.Value;
      setting.Filter2.IsCaseSensitive = column.ColumnFilterDescriptor.FieldFilter.Filter2.IsCaseSensitive;
     }

     foreach (object distinctValue in column.ColumnFilterDescriptor.DistinctFilter.DistinctValues)
     {
      setting.SelectedDistinctValues.Add(distinctValue);
     }

     settings.Add(setting);
    }

    return settings;
   }

   return null;
  }

  public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
  {
   RadGridView gridView = context as RadGridView;
   if (customPropertyInfo.Name == "Columns")
   {
    List<ColumnProxy> savedProxies = value as List<ColumnProxy>;

    // restore properties on the saved columns:
    foreach (ColumnProxy proxy in savedProxies)
    {
     GridViewColumn column = this.GetColumnInstance(gridView, proxy.UniqueName);
     if (column != null)
     {
      column.DisplayIndex = proxy.DisplayOrder;
      column.Header = proxy.Header;
      column.Width = proxy.Width;
     }
    }
   }
   else if (customPropertyInfo.Name == "SortDescriptors")
   {
    gridView.SortDescriptors.Clear();
    List<SortDescriptorProxy> savedProxies = value as List<SortDescriptorProxy>;

    // restore properties on the saved sort descriptors:
    foreach (SortDescriptorProxy proxy in savedProxies)
    {
     GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);
     gridView.SortDescriptors.Add(new ColumnSortDescriptor() { Column = column, SortDirection = proxy.SortDirection });
    }
   }
   else if (customPropertyInfo.Name == "GroupDescriptors")
   {
    gridView.GroupDescriptors.Clear();
    List<GroupDescriptorProxy> savedProxies = value as List<GroupDescriptorProxy>;

    // restore properties on the saved group descriptors:
    foreach (GroupDescriptorProxy proxy in savedProxies)
    {
     GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);
     gridView.GroupDescriptors.Add(new ColumnGroupDescriptor() { Column = column, SortDirection = proxy.SortDirection });
    }
   }
   else if (customPropertyInfo.Name == "FilterDescriptors")
   {
    gridView.FilterDescriptors.SuspendNotifications();

    foreach (var c in gridView.Columns)
    {
     if (c.ColumnFilterDescriptor.IsActive)
     {
      c.ClearFilters();
     }
    }

    List<FilterSetting> settings = value as List<FilterSetting>;

    foreach (FilterSetting setting in settings)
    {
     GridViewDataColumn column = gridView.Columns
      .OfType<GridViewDataColumn>()
      .Single(c => c.UniqueName == setting.ColumnUniqueName);

     if (column != null)
     {
      IColumnFilterDescriptor cfd = column.ColumnFilterDescriptor;

      if (setting.Filter1 != null)
      {
       cfd.FieldFilter.Filter1.Operator = setting.Filter1.Operator;
       cfd.FieldFilter.Filter1.Value = setting.Filter1.Value;
       cfd.FieldFilter.Filter1.IsCaseSensitive = setting.Filter1.IsCaseSensitive;
      }

      if (setting.Filter2 != null)
      {
       cfd.FieldFilter.Filter2.Operator = setting.Filter2.Operator;
       cfd.FieldFilter.Filter2.Value = setting.Filter2.Value;
       cfd.FieldFilter.Filter2.IsCaseSensitive = setting.Filter2.IsCaseSensitive;
      }

      foreach (object distinctValue in setting.SelectedDistinctValues)
      {
       cfd.DistinctFilter.AddDistinctValue(distinctValue);
      }
     }
    }

    gridView.FilterDescriptors.ResumeNotifications();
   }
  }

  private GridViewColumn GetColumnInstance(RadGridView gridView, string uniqueName)
  {
   foreach (GridViewColumn column in gridView.Columns)
   {
    if (column.UniqueName == uniqueName)
     return column;
   }
   return null;
  }
 }

 //====================================================================================
 //
 //====================================================================================
    public class ColumnProxy
    {
        public string UniqueName { get; set; }
        public int DisplayOrder { get; set; }
        public string Header { get; set; }
        public GridViewLength Width { get; set; }
    }

    public class SortDescriptorProxy
    {
        public string ColumnUniqueName { get; set; }
        public ListSortDirection SortDirection { get; set; }
    }

    public class GroupDescriptorProxy
    {
        public string ColumnUniqueName { get; set; }
        public ListSortDirection? SortDirection { get; set; }
    }

    public class FilterDescriptorProxy
    {
        public FilterOperator Operator { get; set; }
        public object Value { get; set; }
        public bool IsCaseSensitive { get; set; }
    }

    public class FilterSetting
    {
  public string ColumnUniqueName { get; set; }
  
  List<object> _SelectedDistinctValues;
       
  public List<object> SelectedDistinctValues
        {
            get
            {
                if (_SelectedDistinctValues == null)
                {
                    _SelectedDistinctValues = new List<object>();
                }
                return _SelectedDistinctValues;
            }
        }

        FilterDescriptorProxy _Filter1;
        public FilterDescriptorProxy Filter1
        {
            get
            {
                return _Filter1;
            }
            set
            {
                _Filter1 = value;
            }
        }

        FilterDescriptorProxy _Filter2;
        public FilterDescriptorProxy Filter2
        {
            get
            {
                return _Filter2;
            }
            set
            {
                _Filter2 = value;
            }
        }
    }

    //====================================================================================
    //
    //====================================================================================
    public class RichTextBoxCustomPropertyProvider : ICustomPropertyProvider
    {
        #region ICustomPropertyProvider Members
        public CustomPropertyInfo[] GetCustomProperties()
        {
            // Create two custom properties to serialize the RichTextBox properties and content
            return new CustomPropertyInfo[]
                {
                    new CustomPropertyInfo("Content", typeof(string)),
                    new CustomPropertyInfo("AcceptsReturn", typeof(bool)),
                };
        }

        public void InitializeObject(object context)
        {

        }

        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return null;
        }

        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            RadRichTextBox owner = context as RadRichTextBox;
            if (customPropertyInfo.Name == "Content")
            {
                TxtFormatProvider provider = new TxtFormatProvider();
                string content = provider.Export(owner.Document);
                return content;
            }
            else
            {
                return this.GetValueSafely(customPropertyInfo.Name, owner);
            }
        }

        private object GetValueSafely(string propertyName, RadRichTextBox owner)
        {
            PropertyInfo info = owner.GetType().GetProperty(propertyName);
            if (info != null)
            {
                return info.GetValue(owner, null);
            }
            else
                throw new Exception();
        }

        private void SetValueSafely(string propertyName, object value, RadRichTextBox owner)
        {
            PropertyInfo info = owner.GetType().GetProperty(propertyName);
            if (info != null)
            {
                info.SetValue(owner, value, null);
            }
            else
                throw new Exception();
        }

        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            RadRichTextBox owner = context as RadRichTextBox;
            if (customPropertyInfo.Name == "Content")
            {
                TxtFormatProvider provider = new TxtFormatProvider();
                owner.Document = provider.Import(value.ToString());
            }
            else
            {
                this.SetValueSafely(customPropertyInfo.Name, value, owner);
            }
        }
        #endregion
    }

    //====================================================================================
    //
    //====================================================================================
    public class PaneProxy
    {
        public object Content { get; set; }
    }
}

//====================================================================================

// Author.......: Alain Gosselin

// Creation date: 2011-10-12

// Fonction.....: Permit to serialize an object and save or restore his state.

//====================================================================================

// Date Prg TT# Details

// ---------- ---- ------ ------------------------------------------------------------

//

//====================================================================================

using

 

System;

using

 

System.Collections.Generic;

using

 

System.ComponentModel;

using

 

System.IO;

using

 

System.Linq;

using

 

System.Reflection;

using

 

System.Text;

using

 

Telerik.Windows.Controls;

using

 

Telerik.Windows.Controls.GridView;

using

 

Telerik.Windows.Data;

using

 

Telerik.Windows.Documents.FormatProviders.Txt;

using

 

Telerik.Windows.Persistence;

using

 

Telerik.Windows.Persistence.Services;

using

 

Telerik.Windows.Persistence.Storage;

using

 

Telerik.Windows.Zip;

using

 

com.christiegrp.Neuron.Client;

using

 

com.ChristieGrp.Infrastructure;

namespace

 

com.christiegrp.Neuron.ClientApplication

{

static public class PersistenceStorage

{

#region

 

Public methods.

/// <summary>

/// Set a StorageId before Loading/Saving a control and removing it's StorageId after the action was taken.

/// The file location is "$APPDATA\IsolatedStorage\..."

/// </summary>

/// <param name="pPersistenceAction">Load/Save</param>

/// <param name="pObjectToPersist">Object to persist.</param>

/// <param name="pStorageId">StorageId of the object to persist. Null mean that a custom StorageId will be use.</param>

/// <param name="pErrorMessage">Error received during the persistence.</param>

/// <returns>true if successfull otherwise false</returns>

static public bool Persist(PersistenceAction pPersistenceAction, System.Windows.DependencyObject pObjectToPersist, string pStorageId, out string pErrorMessage)

{

bool result = false;

pErrorMessage =

string.Empty;

if (pObjectToPersist != null)

{

// Validate if we need to generate a custom StorageId.

if (string.IsNullOrEmpty(pStorageId))

{

pStorageId = GetCustomStorageId(pObjectToPersist);

}

try

{

PersistenceManager.SetStorageId(pObjectToPersist, pStorageId);

result = Persist(pPersistenceAction,

out pErrorMessage);

}

finally

{

pObjectToPersist.ClearValue(

PersistenceManager.StorageIdProperty);

}

}

return result;

}

/// <summary>

/// Load/Save all controls that contain "telerik:PersistenceManager.StorageId="..."

/// The file location is "$APPDATA\IsolatedStorage\..."

/// </summary>

/// <param name="pPersistenceAction">Load/Save</param>

/// <param name="pErrorMessage">Error received during the persistence.</param>

/// <returns>true if successfull otherwise false</returns>

static public bool Persist(PersistenceAction pPersistenceAction, out string pErrorMessage)

{

pErrorMessage =

string.Empty;

PersistenceManager manager = new PersistenceManager();

manager.PropertyPersisting +=

new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);

IsolatedStorageProvider storage = new IsolatedStorageProvider(manager);

try

{

try

{

if (pPersistenceAction == PersistenceAction.Load)

{

storage.LoadFromStorage();

// TODO CHECK

}

else if (pPersistenceAction == PersistenceAction.Save)

{

storage.SaveToStorage();

// TODO CHECK

}

return true;

}

catch (Exception ex)

{

GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

tracingTool.Log(

GclLogger.Level.Error, "PERST001", "Error occured during '{0}' file. Message: {1}", pPersistenceAction.ToString(), ex.ToString());

pErrorMessage = ex.Message;

return false;

}

}

finally

{

manager.PropertyPersisting +=

new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);

}

}

/// <summary>

/// Load/Save from/to stream object.

/// </summary>

/// <param name="pDataSource">If different from null, we persist load/save from/in database.</param>

/// <param name="pObject">Object to load/save.</param>

/// <param name="pStream">Stream that contain the serialized object. Object content is ignored if pDatabaseStorage is true.</param>

/// <param name="pPersistenceAction">Load/Save</param>

/// <param name="pErrorMessage">Error received during the persistence.</param>

/// <returns></returns>

static public bool Persist(NeuronDataSource pDataSource, object pObject, ref Stream pStream, PersistenceAction pPersistenceAction, out string pErrorMessage)

{

// TODO: Compress/Uncompress the stream before save/load to/from database.

mResult =

true;

pErrorMessage =

string.Empty;

PersistenceManager manager = new PersistenceManager();

manager.PersistenceError +=

new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);

manager.PropertyPersisting +=

new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);

try

{

if (pPersistenceAction == PersistenceAction.Load)

{

if (pObject != null && pStream != null)

{

pStream.Position = 0L;

// TO CHECK

manager.Load(pObject, pStream);

// TO CHECK

}

else

{

pErrorMessage =

"pObject and/or pStream cannot be null.";

GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

tracingTool.Log(

GclLogger.Level.Error, "PERST005", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), pErrorMessage);

mResult =

false;

}

}

else if (pPersistenceAction == PersistenceAction.Save)

{

if (pObject != null)

{

pStream = manager.Save(pObject);

// TO CHECK

}

else

{

pErrorMessage =

"pObject cannot be null.";

GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

tracingTool.Log(

GclLogger.Level.Error, "PERST006", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), pErrorMessage);

mResult =

false;

}

}

}

catch (Exception ex)

{

GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

tracingTool.Log(

GclLogger.Level.Error, "PERST002", "Error occured during '{0}' stream. Message: {1}", pPersistenceAction.ToString(), ex.Message.ToString());

pErrorMessage = ex.Message;

mResult =

false;

}

finally

{

manager.PersistenceError -=

new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);

manager.PropertyPersisting -=

new Telerik.Windows.Persistence.Events.PropertyPersistingEventHandler(manager_PropertyPersisting);

pErrorMessage = mErrorMessage;

}

return mResult;

}

/// <summary>

/// Deleting all persistence files.

/// </summary>

/// <param name="pErrorMessage">Error receiving during deleting files.</param>

static public void DeleteAll(out string pErrorMessage)

{

pErrorMessage =

string.Empty;

IsolatedStorageProvider iso = new IsolatedStorageProvider();

try

{

iso.DeleteIsolatedStorageFiles();

}

catch (Exception ex)

{

GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

tracingTool.Log(

GclLogger.Level.Error, "PERST007", "Error occured during deleting files. Message: {0}", ex.Message.ToString());

pErrorMessage = ex.Message;

}

}

/// <summary>

/// Generate a custom StorageId.

/// </summary>

/// <param name="pObjectToPersist"></param>

/// <returns></returns>

static public string GetCustomStorageId(System.Windows.DependencyObject pObjectToPersist)

{

string customStorageId = string.Empty;

if (pObjectToPersist != null)

{

Assembly assembly = pObjectToPersist.GetType().Assembly;

customStorageId = assembly.GetName().Name +

"." + pObjectToPersist.GetType().Name;

}

return customStorageId;

}

#endregion

#region

 

Private methods.

/// <summary>

///

/// </summary>

/// <param name="input"></param>

/// <param name="output"></param>

private static void copyTo(Stream input, Stream output)

{

byte[] buffer = new byte[32768]; // Fairly arbitrary size

int bytesRead;

while ((bytesRead = input.Read(buffer, 0, buffer.Length)) > 0)

{

output.Write(buffer, 0, bytesRead);

}

}

/// <summary>

/// Uncompress a stream.

/// </summary>

/// <param name="pStreamIn"></param>

/// <param name="pStreamOut"></param>

/// <returns></returns>

private static bool uncompressStream(MemoryStream pStreamIn, out Stream pStreamOut)

{

pStreamOut =

null;

try

{

//TODO: Uncompress stream

return true;

}

catch (Exception ex)

{

GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

tracingTool.Log(

GclLogger.Level.Error, "PERST003", "{0}", ex.Message.ToString());

mErrorMessage = ex.Message;

return false;

}

}

/// <summary>

/// Compream a stream.

/// </summary>

/// <param name="pStreamIn"></param>

/// <param name="pStreamOut"></param>

/// <returns></returns>

private static bool compressStream(ref Stream pStreamIn, out MemoryStream pStreamOut)

{

pStreamOut =

null;

try

{

pStreamOut =

new MemoryStream();

ZipPackage package = ZipPackage.Create(pStreamOut);

package.AddStream(pStreamIn,

"WindowPersistedData");

pStreamIn.Position = 0L;

return true;

}

catch (Exception ex)

{

GclLogger tracingTool = GclLogger.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

tracingTool.Log(

GclLogger.Level.Error, "PERST004", "{0}", ex.Message.ToString());

mErrorMessage = ex.Message;

return false;

}

}

/// <summary>

/// Event triggered when the stream persistence didn't worked.

/// </summary>

/// <param name="sender"></param>

/// <param name="e"></param>

static void manager_PersistenceError(object sender, Telerik.Windows.Persistence.Events.PersistenceErrorEventArgs e)

{

mErrorMessage = e.Exception.Message;

mResult =

false;

throw new NotImplementedException();

}

/// <summary>

/// This event is used to prevent any BroderBrush to have a transparent color when we persist an object.

/// </summary>

/// <param name="sender"></param>

/// <param name="e"></param>

static void manager_PropertyPersisting(object sender, Telerik.Windows.Persistence.Events.PersistingPropertyEventArgs e)

{

//Not needed since version 2011.3.1116.35 of Telerik

//if (e.Name == "BorderBrush")

// e.Cancel = true;

}

#endregion

#region

 

Private declarations.

/// <summary>

/// Persist a streaming object into or from database.

/// </summary>

/// <param name="pAction"></param>

/// <param name="pStream"></param>

/// <returns></returns>

static private Boolean databaseStorage(PersistenceAction pAction, ref MemoryStream pStream)

{

Boolean result = true;

if (pAction == PersistenceAction.Load)

{

throw new NotImplementedException();

}

else if (pAction == PersistenceAction.Save)

{

throw new NotImplementedException();

}

return result;

}

#endregion

#region

 

Enumerators.

public enum PersistenceAction { Load, Save }

#endregion

#region

 

Private declarations.

static private string mErrorMessage;

static private bool mResult;

#endregion

}

 

//====================================================================================

//

//====================================================================================

public class DockingCustomPropertyProvider : ICustomPropertyProvider

{

public CustomPropertyInfo[] GetCustomProperties()

{

// Create two custom properties to serialize the Layout of the RadDocking and the Content of the RadPanes

return new CustomPropertyInfo[]

{

new CustomPropertyInfo("Layout", typeof(string)),

new CustomPropertyInfo("Content", typeof(List<PaneProxy>)) { AllowCreateInstance =false, TreatAsUI = false},

};

}

public void InitializeObject(object context)

{

}

public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)

{

if (customPropertyInfo.Name == "Content")

{

// See remarks in ProvideValue method:

// provide the values on which the saved properties will be restored upon

RadDocking docking = context as RadDocking;

List<PaneProxy> proxies = new List<PaneProxy>();

foreach (RadPane pane in this.GetOrderedPanes(docking).ToArray())

{

proxies.Add(

new PaneProxy() { Content = pane.Content });

}

return proxies;

}

return null;

}

public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)

{

RadDocking docking = context as RadDocking;

if (customPropertyInfo.Name == "Layout")

{

// let the RadDocking save the layout of the Panes:

return this.SaveLayoutAsString(docking);

}

else if (customPropertyInfo.Name == "Content")

{

// create proxies for all of the Panes and save their content

IEnumerable<RadPane> panes = this.GetOrderedPanes(docking);

List<PaneProxy> proxies = new List<PaneProxy>();

foreach (RadPane pane in panes)

{

proxies.Add(

new PaneProxy() { Content = pane.Content });

}

return proxies;

}

return null;

}

public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)

{

if (customPropertyInfo.Name == "Layout")

{

// let the RadDocking load the layout of the RadPanes

this.LoadLayoutFromString(value.ToString(), context as RadDocking);

}

else if (customPropertyInfo.Name == "Content")

{

// the PersistenceManager does not re-create UI elements - in this case the Content of the RadPane.

// So, instead of providing a value on which the saved properties will be applied,

// we will use the InitializeValue method.

}

}

private string SaveLayoutAsString(RadDocking instance)

{

MemoryStream stream = new MemoryStream();

instance.SaveLayout(stream);

stream.Seek(0,

SeekOrigin.Begin);

StreamReader reader = new StreamReader(stream);

return reader.ReadToEnd();

}

private void LoadLayoutFromString(string xml, RadDocking instance)

{

using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))

{

stream.Seek(0,

SeekOrigin.Begin);

instance.LoadLayout(stream);

}

}

private IEnumerable<RadPane> GetOrderedPanes(RadDocking docking)

{

// get the RadPanes always in the same order:

RadPane[] array = docking.Panes.ToArray();

Array.Sort(array, new RadPaneComparer());

return array;

}

}

public class RadPaneComparer : IComparer<RadPane>

{

int IComparer<RadPane>.Compare(RadPane x, RadPane y)

{

// compare RadPanes by their serialization tag:

string xSerializationTag = RadDocking.GetSerializationTag(x);

string ySerializationTag = RadDocking.GetSerializationTag(y);

return xSerializationTag.CompareTo(ySerializationTag);

}

}

//====================================================================================

//

//====================================================================================

public class GridViewCustomPropertyProvider : ICustomPropertyProvider

{

public CustomPropertyInfo[] GetCustomProperties()

{

// Create three custom properties to persist the Columns, Sorting and Group descriptors using proxy objects

return new CustomPropertyInfo[]

{

new CustomPropertyInfo("Columns", typeof(List<ColumnProxy>)),

new CustomPropertyInfo("SortDescriptors", typeof(List<SortDescriptorProxy>)),

new CustomPropertyInfo("FilterDescriptors", typeof(List<FilterSetting>)),

new CustomPropertyInfo("GroupDescriptors", typeof(List<GroupDescriptorProxy>)),

};

}

public void InitializeObject(object context)

{

if (context is RadGridView)

{

RadGridView gridView = context as RadGridView;

gridView.SortDescriptors.Clear();

gridView.GroupDescriptors.Clear();

gridView.FilterDescriptors.Clear();

}

}

public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)

{

return null;

}

public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)

{

RadGridView gridView = context as RadGridView;

if (customPropertyInfo.Name == "Columns")

{

// create proxies for all of the columns and save only specific properties

List<ColumnProxy> proxies = new List<ColumnProxy>();

foreach (GridViewColumn column in gridView.Columns)

{

proxies.Add(

new ColumnProxy()

{

UniqueName = column.UniqueName,

Header = column.Header.ToString(),

DisplayOrder = column.DisplayIndex,

Width = column.Width,

});

}

return proxies;

}

else if (customPropertyInfo.Name == "SortDescriptors")

{

// create proxies for all of the sort descriptors and save only specific properties

List<SortDescriptorProxy> proxies = new List<SortDescriptorProxy>();

foreach (ColumnSortDescriptor descriptor in gridView.SortDescriptors)

{

proxies.Add(

new SortDescriptorProxy()

{

ColumnUniqueName = descriptor.Column.UniqueName,

SortDirection = descriptor.SortDirection,

});

}

return proxies;

}

else if (customPropertyInfo.Name == "GroupDescriptors")

{

// create proxies for all of the group descriptors and save only specific properties

List<GroupDescriptorProxy> proxies = new List<GroupDescriptorProxy>();

foreach (ColumnGroupDescriptor descriotor in gridView.GroupDescriptors)

{

proxies.Add(

new GroupDescriptorProxy()

{

ColumnUniqueName = descriotor.Column.UniqueName,

SortDirection = descriotor.SortDirection,

});

}

return proxies;

}

else if (customPropertyInfo.Name == "FilterDescriptors")

{

List<FilterSetting> settings = new List<FilterSetting>();

foreach (GridViewDataColumn column in gridView.Columns

.OfType<

GridViewDataColumn>()

.Where(column => column.ColumnFilterDescriptor.IsActive))

{

FilterSetting setting = new FilterSetting();

setting.ColumnUniqueName = column.UniqueName;

if (column.ColumnFilterDescriptor.FieldFilter.Filter1.IsActive)

{

setting.Filter1 =

new FilterDescriptorProxy();

setting.Filter1.Operator = column.ColumnFilterDescriptor.FieldFilter.Filter1.Operator;

setting.Filter1.Value = column.ColumnFilterDescriptor.FieldFilter.Filter1.Value;

setting.Filter1.IsCaseSensitive = column.ColumnFilterDescriptor.FieldFilter.Filter1.IsCaseSensitive;

}

if (column.ColumnFilterDescriptor.FieldFilter.Filter2.IsActive)

{

setting.Filter2 =

new FilterDescriptorProxy();

setting.Filter2.Operator = column.ColumnFilterDescriptor.FieldFilter.Filter2.Operator;

setting.Filter2.Value = column.ColumnFilterDescriptor.FieldFilter.Filter2.Value;

setting.Filter2.IsCaseSensitive = column.ColumnFilterDescriptor.FieldFilter.Filter2.IsCaseSensitive;

}

foreach (object distinctValue in column.ColumnFilterDescriptor.DistinctFilter.DistinctValues)

{

setting.SelectedDistinctValues.Add(distinctValue);

}

settings.Add(setting);

}

return settings;

}

return null;

}

public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)

{

RadGridView gridView = context as RadGridView;

if (customPropertyInfo.Name == "Columns")

{

List<ColumnProxy> savedProxies = value as List<ColumnProxy>;

// restore properties on the saved columns:

foreach (ColumnProxy proxy in savedProxies)

{

GridViewColumn column = this.GetColumnInstance(gridView, proxy.UniqueName);

if (column != null)

{

column.DisplayIndex = proxy.DisplayOrder;

column.Header = proxy.Header;

column.Width = proxy.Width;

}

}

}

else if (customPropertyInfo.Name == "SortDescriptors")

{

gridView.SortDescriptors.Clear();

List<SortDescriptorProxy> savedProxies = value as List<SortDescriptorProxy>;

// restore properties on the saved sort descriptors:

foreach (SortDescriptorProxy proxy in savedProxies)

{

GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);

gridView.SortDescriptors.Add(

new ColumnSortDescriptor() { Column = column, SortDirection = proxy.SortDirection });

}

}

else if (customPropertyInfo.Name == "GroupDescriptors")

{

gridView.GroupDescriptors.Clear();

List<GroupDescriptorProxy> savedProxies = value as List<GroupDescriptorProxy>;

// restore properties on the saved group descriptors:

foreach (GroupDescriptorProxy proxy in savedProxies)

{

GridViewColumn column = this.GetColumnInstance(gridView, proxy.ColumnUniqueName);

gridView.GroupDescriptors.Add(

new ColumnGroupDescriptor() { Column = column, SortDirection = proxy.SortDirection });

}

}

else if (customPropertyInfo.Name == "FilterDescriptors")

{

gridView.FilterDescriptors.SuspendNotifications();

foreach (var c in gridView.Columns)

{

if (c.ColumnFilterDescriptor.IsActive)

{

c.ClearFilters();

}

}

List<FilterSetting> settings = value as List<FilterSetting>;

foreach (FilterSetting setting in settings)

{

GridViewDataColumn column = gridView.Columns

.OfType<

GridViewDataColumn>()

.Single(c => c.UniqueName == setting.ColumnUniqueName);

if (column != null)

{

IColumnFilterDescriptor cfd = column.ColumnFilterDescriptor;

if (setting.Filter1 != null)

{

cfd.FieldFilter.Filter1.Operator = setting.Filter1.Operator;

cfd.FieldFilter.Filter1.Value = setting.Filter1.Value;

cfd.FieldFilter.Filter1.IsCaseSensitive = setting.Filter1.IsCaseSensitive;

}

if (setting.Filter2 != null)

{

cfd.FieldFilter.Filter2.Operator = setting.Filter2.Operator;

cfd.FieldFilter.Filter2.Value = setting.Filter2.Value;

cfd.FieldFilter.Filter2.IsCaseSensitive = setting.Filter2.IsCaseSensitive;

}

foreach (object distinctValue in setting.SelectedDistinctValues)

{

cfd.DistinctFilter.AddDistinctValue(distinctValue);

}

}

}

gridView.FilterDescriptors.ResumeNotifications();

}

}

private GridViewColumn GetColumnInstance(RadGridView gridView, string uniqueName)

{

foreach (GridViewColumn column in gridView.Columns)

{

if (column.UniqueName == uniqueName)

return column;

}

return null;

}

}

//====================================================================================

//

//====================================================================================

public class ColumnProxy

{

public string UniqueName { get; set; }

public int DisplayOrder { get; set; }

public string Header { get; set; }

public GridViewLength Width { get; set; }

}

public class SortDescriptorProxy

{

public string ColumnUniqueName { get; set; }

public ListSortDirection SortDirection { get; set; }

}

public class GroupDescriptorProxy

{

public string ColumnUniqueName { get; set; }

public ListSortDirection? SortDirection { get; set; }

}

public class FilterDescriptorProxy

{

public FilterOperator Operator { get; set; }

public object Value { get; set; }

public bool IsCaseSensitive { get; set; }

}

public class FilterSetting

{

public string ColumnUniqueName { get; set; }

List<object> _SelectedDistinctValues;

public List<object> SelectedDistinctValues

{

get

{

if (_SelectedDistinctValues == null)

{

_SelectedDistinctValues =

new List<object>();

}

return _SelectedDistinctValues;

}

}

FilterDescriptorProxy _Filter1;

public FilterDescriptorProxy Filter1

{

get

{

return _Filter1;

}

set

{

_Filter1 =

value;

}

}

FilterDescriptorProxy _Filter2;

public FilterDescriptorProxy Filter2

{

get

{

return _Filter2;

}

set

{

_Filter2 =

value;

}

}

}

//====================================================================================

//

//====================================================================================

public class RichTextBoxCustomPropertyProvider : ICustomPropertyProvider

{

#region

 

ICustomPropertyProvider Members

public CustomPropertyInfo[] GetCustomProperties()

{

// Create two custom properties to serialize the RichTextBox properties and content

return new CustomPropertyInfo[]

{

new CustomPropertyInfo("Content", typeof(string)),

new CustomPropertyInfo("AcceptsReturn", typeof(bool)),

};

}

public void InitializeObject(object context)

{

}

public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)

{

return null;

}

public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)

{

RadRichTextBox owner = context as RadRichTextBox;

if (customPropertyInfo.Name == "Content")

{

TxtFormatProvider provider = new TxtFormatProvider();

string content = provider.Export(owner.Document);

return content;

}

else

{

return this.GetValueSafely(customPropertyInfo.Name, owner);

}

}

private object GetValueSafely(string propertyName, RadRichTextBox owner)

{

PropertyInfo info = owner.GetType().GetProperty(propertyName);

if (info != null)

{

return info.GetValue(owner, null);

}

else

throw new Exception();

}

private void SetValueSafely(string propertyName, object value, RadRichTextBox owner)

{

PropertyInfo info = owner.GetType().GetProperty(propertyName);

if (info != null)

{

info.SetValue(owner, value,

null);

}

else

throw new Exception();

}

public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)

{

RadRichTextBox owner = context as RadRichTextBox;

if (customPropertyInfo.Name == "Content")

{

TxtFormatProvider provider = new TxtFormatProvider();

owner.Document = provider.Import(value.ToString());

}

else

{

this.SetValueSafely(customPropertyInfo.Name, value, owner);

}

}

#endregion

}

//====================================================================================

//

//====================================================================================

public class PaneProxy

{

public object Content { get; set; }

}

}

Tags
Installer and Visual Studio Extensions
Asked by
Oliver
Top achievements
Rank 1
Answers by
Chavdar Dimitrov
Telerik team
Oliver
Top achievements
Rank 1
Share this question
or