Пример #1
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     using (SingleSelectorEditorForm actionSelectorForm = new SingleSelectorEditorForm(SelectorTypes.Actions))
     {
         actionSelectorForm.Text = "Выберите действие";
         if (actionSelectorForm.ShowDialog() == DialogResult.OK)
         {
             return(actionSelectorForm.SelectedId);
         }
     }
     return(value);
 }
Пример #2
0
 private void actionSelectorSpells_Click(object sender, EventArgs e)
 {
     using (SingleSelectorEditorForm actionSelectorForm = new SingleSelectorEditorForm(SelectorTypes.ActionsCustom, Unit.SpellsIds))
     {
         actionSelectorForm.Text = "Выберите заклинание";
         if (actionSelectorForm.ShowDialog() == DialogResult.OK)
         {
             actionSelectorSpells.Set(_repWkr.GetAction(actionSelectorForm.SelectedId));
             SetCurrentAction(actionSelectorForm.SelectedId);
         }
     }
 }
Пример #3
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     using (SingleSelectorEditorForm effectSelectorForm = new SingleSelectorEditorForm(SelectorTypes.Effects))
     {
         effectSelectorForm.Text = "Выберите эффект";
         if (effectSelectorForm.ShowDialog() == DialogResult.OK)
         {
             return(effectSelectorForm.SelectedId);
         }
     }
     return(value);
 }