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
Post a Comment