Example #1
0
        private void LoadSettings()
        {
            try
            {
                using (FileStream stream = new FileStream(SettingsPath, FileMode.Open, FileAccess.Read))
                {
                    XmlSerializer serializer = new XmlSerializer(typeof(XmlSettings));
                    xmlSettings = (XmlSettings)serializer.Deserialize(stream);
                }

                folderBrowserDialog.SelectedPath = xmlSettings.LastPluginDirectory;
            }
            catch (IOException ex)
            {
                ShowErrorMessage(ex.Message);
            }
            catch (UnauthorizedAccessException ex)
            {
                ShowErrorMessage(ex.Message);
            }
        }
Example #2
0
 public Form1()
 {
     InitializeComponent();
     fileNameLabel.Text = string.Empty;
     xmlSettings        = new XmlSettings();
 }