Exemplo n.º 1
0
 public void Load(OpenControls.Wpf.Serialisation.IConfigurationSerialiser configurationSerialiser)
 {
     Zoom                = configurationSerialiser.ReadEntry("Zoom", Zoom);
     ZScale              = configurationSerialiser.ReadEntry("ZScale", ZScale);
     BackgroundColour    = configurationSerialiser.ReadEntry("BackgroundColour", string.IsNullOrEmpty(BackgroundColour) ? "Black" : BackgroundColour);
     ShowAxes            = configurationSerialiser.ReadEntry("ShowAxes", ShowAxes);
     ShowAxesTitles      = configurationSerialiser.ReadEntry("ShowAxesTitles", ShowAxesTitles);
     ShowZBar            = configurationSerialiser.ReadEntry("ShowZBar", ShowZBar);
     ShowFrame           = configurationSerialiser.ReadEntry("ShowFrame", ShowFrame);
     FrameColour         = configurationSerialiser.ReadEntry("FrameColour", string.IsNullOrEmpty(FrameColour) ? "White" : FrameColour);
     ShowLabels          = configurationSerialiser.ReadEntry("ShowLabels", ShowLabels);
     LabelColour         = configurationSerialiser.ReadEntry("LabelColour", string.IsNullOrEmpty(LabelColour) ? "White" : LabelColour);
     LabelFontSize       = configurationSerialiser.ReadEntry("LabelFontSize", LabelFontSize);
     LabelAngleInDegrees = configurationSerialiser.ReadEntry("LabelAngleInDegrees", LabelAngleInDegrees);
     XYLabelPosition     = configurationSerialiser.ReadEntry <XYLabelPosition>("XYLabelPosition", XYLabelPosition);
     Perspective         = configurationSerialiser.ReadEntry("Perspective", Perspective);
     ViewProjection      = configurationSerialiser.ReadEntry <ViewProjection>("ViewProjection", ViewProjection);
     ShowGrid            = configurationSerialiser.ReadEntry("ShowGrid", ShowGrid);
     GridColour          = configurationSerialiser.ReadEntry("GridColour", string.IsNullOrEmpty(GridColour) ? "White" : GridColour);
     ShowScatterPlot     = configurationSerialiser.ReadEntry("ShowScatterPlot", ShowScatterPlot);
     ShowShading         = configurationSerialiser.ReadEntry("ShowShading", ShowShading);
     ShadingMethod       = configurationSerialiser.ReadEntry <ShadingMethod>("ShadingMethod", ShadingMethod);
     ShadingAlgorithm    = configurationSerialiser.ReadEntry <ShadingAlgorithm>("ShadingAlgorithm", ShadingAlgorithm);
     BlueLevel           = configurationSerialiser.ReadEntry("BlueLevel", BlueLevel);
     RedLevel            = configurationSerialiser.ReadEntry("RedLevel", RedLevel);
 }
 public void Load()
 {
     SavePassword                       = IConfigurationSerialiser.ReadEntry <bool>("SavePassword", SavePassword);
     SelectedDatabaseProvider           = IConfigurationSerialiser.ReadEntry <Model.DatabaseProvider>("SelectedDatabaseProvider", SelectedDatabaseProvider);
     SQLite_Folder                      = IConfigurationSerialiser.ReadEntry <string>("SQLite_Folder", SQLite_Folder);
     SQLServer_DatabaseName             = IConfigurationSerialiser.ReadEntry <string>("SQLite_Database", SQLServer_DatabaseName);
     SQLite_Filename                    = IConfigurationSerialiser.ReadEntry <string>("SQLite_Filename", SQLite_Filename);
     SQLServer_UseLocalServer           = IConfigurationSerialiser.ReadEntry <bool>("SQLServer_UseLocalServer", SQLServer_UseLocalServer);
     SQLServer_IPAddress                = IConfigurationSerialiser.ReadEntry <string>("SQLServer_IPAddress", SQLServer_IPAddress);
     SQLServer_UseIPv6                  = IConfigurationSerialiser.ReadEntry <bool>("SQLServer_UseIPv6", SQLServer_UseIPv6);
     SQLServer_Port                     = IConfigurationSerialiser.ReadEntry <ushort>("SQLServer_Port", SQLServer_Port);
     SQLServer_UseWindowsAuthentication = IConfigurationSerialiser.ReadEntry <bool>("SQLServer_UseWindowsAuthentication", SQLServer_UseWindowsAuthentication);
     if (SavePassword)
     {
         SQLServer_UserName = IConfigurationSerialiser.ReadEntry <string>("SQLServer_UserName", SQLServer_UserName);
         SQLServer_Password = IConfigurationSerialiser.ReadEntry <string>("SQLServer_Password", SQLServer_Password);
     }
     SQLServer_Folder       = IConfigurationSerialiser.ReadEntry <string>("SQLServer_Folder", SQLServer_Folder);
     SQLServer_Filename     = IConfigurationSerialiser.ReadEntry <string>("SQLServer_Filename", SQLServer_Filename);
     SQLServer_DatabaseName = IConfigurationSerialiser.ReadEntry <string>("SQLServer_DatabaseName", SQLServer_DatabaseName);
     PostgreSQL_IPAddress   = IConfigurationSerialiser.ReadEntry <string>("PostgreSQL_IPAddress", PostgreSQL_IPAddress);
     PostgreSQL_UseIPv6     = IConfigurationSerialiser.ReadEntry <bool>("PostgreSQL_UseIPv6", PostgreSQL_UseIPv6);
     PostgreSQL_Port        = IConfigurationSerialiser.ReadEntry <ushort>("PostgreSQL_Port", PostgreSQL_Port);
     PostgreSQL_UseWindowsAuthentication = IConfigurationSerialiser.ReadEntry <bool>("PostgreSQL_UseWindowsAuthentication", PostgreSQL_UseWindowsAuthentication);
     if (SavePassword)
     {
         PostgreSQL_UserName = IConfigurationSerialiser.ReadEntry <string>("PostgreSQL_UserName", PostgreSQL_UserName);
         PostgreSQL_Password = IConfigurationSerialiser.ReadEntry <string>("PostgreSQL_Password", PostgreSQL_Password);
     }
     PostgreSQL_DatabaseName = IConfigurationSerialiser.ReadEntry <string>("PostgreSQL_DatabaseName", PostgreSQL_DatabaseName);
     MySQL_IPAddress         = IConfigurationSerialiser.ReadEntry <string>("MySQL_IPAddress", MySQL_IPAddress);
     MySQL_UseIPv6           = IConfigurationSerialiser.ReadEntry <bool>("MySQL_UseIPv6", MySQL_UseIPv6);
     MySQL_Port = IConfigurationSerialiser.ReadEntry <ushort>("MySQL_Port", MySQL_Port);
     MySQL_UseWindowsAuthentication = IConfigurationSerialiser.ReadEntry <bool>("MySQL_UseWindowsAuthentication", MySQL_UseWindowsAuthentication);
     if (SavePassword)
     {
         MySQL_UserName = IConfigurationSerialiser.ReadEntry <string>("MySQL_UserName", MySQL_UserName);
         MySQL_Password = IConfigurationSerialiser.ReadEntry <string>("MySQL_Password", MySQL_Password);
     }
     MySQL_DatabaseName = IConfigurationSerialiser.ReadEntry <string>("MySQL_DatabaseName", MySQL_DatabaseName);
 }