public void UpdateOnStartup(Settings settings)
 {
     if(settings.CheckForUpdateOnStartup)
     {
         updateService.CheckForUpdate();
     }
 }
        public MainForm()
        {
            InitializeComponent();
            controller = new MainFormController();
            LocalizationService = ServiceLocator.GetInstance<ILocalizationService>();
            settingsService = ServiceLocator.GetInstance<ISettingsService>();
            LocalizationService.LanguageChanged += LanguageChanged;
            Localize();
            ToogleControls();
            SetStatusMessage();

            settings = settingsService.LoadSettings();
            SetGlobalPaletteMode();
            SetLanguage();

            controller.UpdateOnStartup(settings);
        }
        public Settings LoadSettings()
        {
            Settings settings;

            try
            {
                Deserializer deserializer = new Deserializer();
                settings = deserializer.Deserialize<Settings>(path);
            }
            catch (Exception exception)
            {
                var message = exception.Message;
                settings = new Settings();
            }

            return settings;
        }
        public bool SaveSettings(Settings settings)
        {
            bool wasSaved;
            Serializer serializer = new Serializer();

            try
            {
                serializer.Serialize(settings, path);
                wasSaved = true;
            }
            catch (Exception exception)
            {
                var message = exception.Message;
                wasSaved = false;
            }

            return wasSaved;
        }