private void Delete(ScriptViewModel iScript)
 {
     int selectedIndex = SelectedIndex - 1;
     foreach (ItemScript script in _scripts)
     {
         if (script.IDScript == iScript.IDScript)
         {
             _scripts.Remove(script);
             break;
         }
     }
     Queue queue = new Queue(_scripts);
     UpdateQueue(queue);
     SelectedIndex = selectedIndex;
     if (SelectedIndex == -1 && QueueScripts.Count > 0)
         SelectedIndex = 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;
                 }
             }
         }
     }
 }