Пример #1
0
 private void Configuration(ScriptViewModel iScript)
 {
     Configuration config = new Configuration();
     XMLParsers parser = new XMLParsers();
     config = UpdateBackConfiguration(iScript.ConfigurationVM);
     if ((0 < config.ListOptionTesting.Count) && (config.ConfigurationName.Contains(".srt")))
     {
         ConfigurationWindow window = new ConfigurationWindow(UploadListOptionToViewModel(config));
         if (true == window.ShowDialog())
         {
             int index = -1;
             foreach (ItemScript script in _scripts)
             {
                 ++index;
                 if (script.IDScript == iScript.IDScript)
                 {
                     script.Configuration = UpdateBackConfiguration(window.Answer as ConfigurationViewModel);
                     Queue queue = new Queue(_scripts);
                     UpdateQueue(queue);
                     SelectedIndex = index;
                     break;
                 }
             }
         }
     }
 }
Пример #2
0
        private void Add(OrgElementViewModel obj)
        {
            ++IDConfiguration;

            Configuration config = new Configuration();
            XMLParsers parser = new XMLParsers();

            config = parser.ParseConfiguration(obj.Name);
            if ((0 < config.ListOptionTesting.Count) && (config.ConfigurationName.Contains(".srt")))
                _scripts.Add(new ItemScript(obj.Name, obj.ID, IDConfiguration) { Configuration = config });
            else
                MessageBox.Show(string.Format("{0} will be support at next versions", obj.Name));

            Queue queue = new Queue(_scripts);
            UpdateQueue(queue);
            SelectedIndex = QueueScripts.Count - 1;
        }