상속: System.Windows.Window
예제 #1
0
        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();
        }
예제 #2
0
        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);
        }