예제 #1
0
 public int?AskChoice(string question, List <string> choices, List <string> colors, string includeCustomButton)
 {
     return(_engine.Invoke <int?>(() =>
     {
         var dlg = new ChoiceDlg("Choose One", question, choices, colors, includeCustomButton);
         int?result = dlg.GetChoice();
         return dlg.DialogResult.GetValueOrDefault() ? result: (int?)null;
     }));
 }
예제 #2
0
 public int?AskChoice(string question, List <string> choices, List <string> colors, List <string> buttons)
 {
     return(QueueAction <int?>(() =>
     {
         var dlg = new ChoiceDlg("Choose One", question, choices, colors, buttons);
         int?result = dlg.GetChoice();
         return dlg.DialogResult.GetValueOrDefault() ? result : 0;
     }));
 }
예제 #3
0
파일: ScriptApi.cs 프로젝트: TriAdX/OCTGN
 public int?AskChoice(string question, List <string> choices)
 {
     return(_engine.Invoke <int?>(() =>
     {
         var dlg = new ChoiceDlg("Choose One", question, choices);
         int result = dlg.GetChoice();
         if (result == 0)
         {
             return (int?)null;
         }
         else
         {
             return dlg.DialogResult.GetValueOrDefault() ? result - 1: (int?)null;
         }
     }));
 }