c# - Another Messagebox -


i want customize message box. have created own messagebox. because basic message box, can not customize font (bold, color,..etc)

the problem how can value if user clicks yes botton ?

 public partial class xtraform_message : devexpress.xtraeditors.xtraform     {         public xtraform_message()         {             initializecomponent();         }          public xtraform_message(string clostlist, string chauffeur)             : this()         {             labelcontrol_trans.text = clostlist;             labelcontrol_chauffeur.text = chauffeur;         }          private void simplebutton_oui_click(object sender, eventargs e)         {                ??????         }          private void simplebutton_non_click(object sender, eventargs e)         {             this.close();         } 

and call this:

  xtraform_message lemessage = new xtraform_message(closlistlib, chauffeurlib);                         lemessage.show(); 

if user click yes { ...... }

you have use dialogresult:

 public partial class xtraform_message : devexpress.xtraeditors.xtraform {     public xtraform_message()     {         initializecomponent();     }      public xtraform_message(string clostlist, string chauffeur)         : this()     {         labelcontrol_trans.text = clostlist;         labelcontrol_chauffeur.text = chauffeur;     }      private void simplebutton_oui_click(object sender, eventargs e)     {         dialogresult = dialogresult.yes;         this.close();     }      private void simplebutton_non_click(object sender, eventargs e)     {         dialogresult = dialogresult.no;         this.close();     } 

and call this:

   xtraform_message lemessage = new xtraform_message(closlistlib, chauffeurlib);    if(lemessage.showdialog() == dialogresult.yes)          { ...... } 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -