public EditAvisynthProfileWindow(AvisynthSettings avs) { try { InitializeComponent(); this.avs = new AvisynthSettings(avs); textBoxDescription.Text = avs.desc; richTextBoxCommands.AppendText(avs.commands); } catch (Exception ex) { Global.ErrorMsg(ex); } }
private void buttonAviProfileDown_Click(object sender, RoutedEventArgs e) { try { int index = listBoxAvisynthProfiles.SelectedIndex; if (index < settings.avisynthSettings.Count - 1) { AvisynthSettings avs = new AvisynthSettings(settings.avisynthSettings[index]); settings.avisynthSettings.RemoveAt(index); settings.avisynthSettings.Insert(index + 1, avs); UpdateAvisynthProfiles(); listBoxAvisynthProfiles.SelectedIndex = index + 1; } } catch (Exception) { } }
private void buttonAviProfileAdd_Click(object sender, RoutedEventArgs e) { try { AvisynthSettings avs = new AvisynthSettings(); avs.desc = Global.Res("NewAvisynthProfileDesc"); EditAvisynthProfileWindow eapw = new EditAvisynthProfileWindow(avs); eapw.ShowDialog(); if (eapw.DialogResult == true) { settings.avisynthSettings.Add(eapw.avisynthSettings); UpdateAvisynthProfiles(); } } catch (Exception) { } }
public AvisynthSettings(AvisynthSettings orig) { this.desc = orig.desc; this.commands = orig.commands; }