void AddModifiers() { var staff = stavesListBox.SelectedItem as StaffMetadata; if (staff == null) { return; } var modifiersWindow = new LineModifiersEditorWindow(); modifiersWindow.Owner = this; var result = modifiersWindow.ShowDialog(); if (!result.HasValue || !result.Value) { return; } staff.AddModifiers(modifiersWindow.Modifiers); lineModifiersListBox.SelectedItem = modifiersWindow.Modifiers; lineModifiersListBox.ScrollIntoView(modifiersWindow.Modifiers); lineModifiersListBox.Items.Refresh(); }
void EditModifiers(StaffMetadata staff, SpellLineModifiers modifiers) { var modifiersWindow = new LineModifiersEditorWindow(modifiers); modifiersWindow.Owner = this; var result = modifiersWindow.ShowDialog(); if (!result.HasValue || !result.Value) { return; } staff.ChangeModifiers(modifiers, modifiersWindow.Modifiers); lineModifiersListBox.Items.Refresh(); lineModifiersListBox.SelectedItem = modifiers; lineModifiersListBox.ScrollIntoView(modifiers); }
void AddModifiers() { var staff = stavesListBox.SelectedItem as StaffMetadata; if (staff == null) return; var modifiersWindow = new LineModifiersEditorWindow(); modifiersWindow.Owner = this; var result = modifiersWindow.ShowDialog(); if (!result.HasValue || !result.Value) return; staff.AddModifiers(modifiersWindow.Modifiers); lineModifiersListBox.SelectedItem = modifiersWindow.Modifiers; lineModifiersListBox.ScrollIntoView(modifiersWindow.Modifiers); lineModifiersListBox.Items.Refresh(); }
void EditModifiers(StaffMetadata staff, SpellLineModifiers modifiers) { var modifiersWindow = new LineModifiersEditorWindow(modifiers); modifiersWindow.Owner = this; var result = modifiersWindow.ShowDialog(); if (!result.HasValue || !result.Value) return; staff.ChangeModifiers(modifiers, modifiersWindow.Modifiers); lineModifiersListBox.Items.Refresh(); lineModifiersListBox.SelectedItem = modifiers; lineModifiersListBox.ScrollIntoView(modifiers); }