Example #1
0
 public static void SaveData()
 {
     Database.Preferences preferences = new Database.Preferences()
     {
         ColourControls    = Preferences.ColourControls,
         ColourFont        = Preferences.ColourFont,
         FontReader        = Preferences.FontReader,
         FontSystem        = Preferences.FontSystem,
         FontWriter        = Preferences.FontWriter,
         PrinterName       = Preferences.PrinterName,
         PrinterScheme     = Preferences.PrinterScheme,
         ROD_MaxNumber     = Preferences.ROD_MaxNumber,
         ShowWelcomeScreen = Preferences.ShowWelcomeScreen,
         SortingFilter     = Preferences.SortingFilter
     };
     preferences.Update(preferences);
 }
Example #2
0
 /// <summary>
 /// The class constructor.
 /// </summary>
 public static void SetPreferences()
 {
     try
     {
         Database.Preferences prefs = Database.Preferences.SelectAllStatic()[0];
         printerName       = prefs.PrinterName;
         printerScheme     = prefs.PrinterScheme;
         sortingFilter     = prefs.SortingFilter;
         rod_maxnumber     = prefs.ROD_MaxNumber;
         colourFont        = prefs.ColourFont;
         colourControls    = prefs.ColourControls;
         fontSystem        = prefs.FontSystem;
         fontReader        = prefs.FontReader;
         fontWriter        = prefs.FontWriter;
         showwelcomescreen = prefs.ShowWelcomeScreen;
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }