// Script DataGrid button actions public void New_Script(object sender, RoutedEventArgs e) { ScriptDialog NewScript = new ScriptDialog(); NewScript.Owner = this; NewScript.Top = this.Top + 150; NewScript.Left = this.Left + 200; NewScript.Title = "New script"; NewScript.ShowDialog(); }
public void Edit_Script(object sender, RoutedEventArgs e) { Script selectedScript = (Script)Script_List.SelectedItem; ScriptDialog EditScript = new ScriptDialog(selectedScript); EditScript.Owner = this; EditScript.Top = this.Top + 150; EditScript.Left = this.Left + 200; EditScript.Title = "Edit script"; EditScript.ShowDialog(); }