Beispiel #1
0
 /// <summary>
 /// Method to display customize DialogBox with options Yes/No.
 /// </summary>
 /// <param name="box">Contain information about MessageBox (e.g. title, message field)</param>
 public static void AssignYesNoMessage(DialogBox box)
 {
     box.YesNoMessageEvent += (object sender, EventArgs args) =>
     {
         YesNoMessageBox messageBox = new YesNoMessageBox();
         messageBox.Message    = box.Field;
         messageBox.Title      = box.Title;
         messageBox.Completed += (object YesNosender, EventArgs completedArgs) =>
         {
             box.YesNoResponse = (YesNosender as YesNoMessageBox).Response;
             if (box.YesNoAnswerCompleted != null)
             {
                 box.YesNoAnswerCompleted(sender, args);
             }
         };
         messageBox.Show();
     };
 }
 /// <summary>
 /// Method to display customize DialogBox with options Yes/No.
 /// </summary>
 /// <param name="box">Contain information about MessageBox (e.g. title, message field)</param>
 public static void AssignYesNoMessage(DialogBox box)
 {
     box.YesNoMessageEvent += (object sender, EventArgs args) =>
     {
         YesNoMessageBox messageBox = new YesNoMessageBox();
         messageBox.Message = box.Field;
         messageBox.Title = box.Title;
         messageBox.Completed += (object YesNosender, EventArgs completedArgs) =>
         {
             box.YesNoResponse = (YesNosender as YesNoMessageBox).Response;
             if (box.YesNoAnswerCompleted != null)
             {
                 box.YesNoAnswerCompleted(sender, args);
             }
         };
         messageBox.Show();
     };
 }