예제 #1
0
        private void btnBrowseRootDir_Click(object sender, EventArgs e)
        {
            string oldRootDir = txtRootFolder.Text;
            string dirNew     = Adapter.GetDirPathUsingFolderBrowser("Configure Root directory...");

            if (!string.IsNullOrEmpty(dirNew))
            {
                Engine.SetRootFolder(dirNew);
                txtRootFolder.Text = Engine.ConfigApp.RootDir;
                FileSystem.MoveDirectory(oldRootDir, txtRootFolder.Text);
                ConfigurePaths();
                Engine.ConfigUI = XMLSettings.Read();
                Loader.MainForm.ZScreen_ConfigGUI();
            }
        }
예제 #2
0
        private void AppSettingsImport()
        {
            OpenFileDialog dlg = new OpenFileDialog
            {
                Filter           = FILTER_XML_FILES,
                InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
            };

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                XMLSettings temp = XMLSettings.Read(dlg.FileName);
                temp.FirstRun   = false;
                Engine.ConfigUI = temp;
                Loader.MainForm.ZScreen_ConfigGUI();
            }
        }
예제 #3
0
 static void SettingsReader_DoWork(object sender, DoWorkEventArgs e)
 {
     Program.Config = XMLSettings.Read(ConfigCoreFilePath);
 }