Example #1
0
 public SettingWindow(AutorunSettings autoSetting)
 {
     settings = autoSetting;
     InitializeComponent();
     CollectDefaultSettings();
     DisplaySetting();
 }
Example #2
0
        public static bool CreateBatchFile(string xmlFileName, AutorunSettings settings)
        {
            bool created = false;

            try
            {
                string batchFile = System.IO.Path.GetDirectoryName(xmlFileName) + "\\" + System.IO.Path.GetFileName(xmlFileName).Replace(".xml", ".bat");
                using (StreamWriter writer = File.CreateText(batchFile))
                {
                    writer.WriteLineAsync("echo %TIME%");
                    writer.WriteLineAsync("\"" + settings.SolibriSetup.ExeFile + "\" \"" + xmlFileName + "\"");
                    writer.WriteLineAsync("echo %TIME%");
                    //writer.WriteLineAsync("pause");
                    writer.Close();
                }
                if (File.Exists(batchFile))
                {
                    created = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed to create batch file.\n" + ex.Message, "Save Batch File", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
            return(created);
        }
        public BatchOptionWindow(AutorunSettings aSetting, string optionFile)
        {
            settings        = aSetting;
            batchOptionFile = optionFile;

            StoreOriginalSettings();
            InitializeComponent();
        }
 private void menuOptions_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingWindow settingWindow = new SettingWindow(settings);
         settingWindow.Owner = this;
         if (settingWindow.ShowDialog() == true)
         {
             settings = settingWindow.Settings;
         }
     }
     catch (Exception ex)
     {
         string message = ex.Message;
     }
 }
 private void buttonSetting_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SettingWindow settingWindow = new SettingWindow(settings);
         settingWindow.Owner = this;
         if (settingWindow.ShowDialog() == true)
         {
             settings = settingWindow.Settings;
             for (int i = processUnits.Count - 1; i > -1; i--)
             {
                 bool applied = ApplySettings(i);
             }
         }
     }
     catch (Exception ex)
     {
         string message = ex.Message;
     }
 }
Example #6
0
 public SettingWindow(AutorunSettings autoSetting, string optionFile)
 {
     settings        = autoSetting;
     batchOptionFile = optionFile;
     InitializeComponent();
 }
        public SettingWindow(AutorunSettings autoSetting)
        {
            settings = autoSetting;

            InitializeComponent();
        }