/** * @desc Dialog invoker with three custom buttons * @params [Uint32] Type: Selector of one of the custom dialog layouts * @params [string] txtMessage: Dialog message * @params [string] txtTitle: Dialog title * @params [string] Button1: Button text * @params [string] Button2: Button text * @params [string] Button3: Button text * @return [string] Button_id: Return value of selected button */ public string ShowBox(UInt32 Type, string txtMessage, string txtTitle, string Button1, string Button2, string Button3) { newMessageBox = new frm_message_box(); newMessageBox.SetButtonLayout(Type, Button1, Button2, Button3); if (txtTitle == "") newMessageBox.Text = "Message"; else newMessageBox.Text = txtTitle; newMessageBox.label_Message.Text = txtMessage; newMessageBox.ShowDialog(); return Button_id; }
/** * @desc Default dialog invoker * @params [Uint32] Type: Selector of one of the default dialog layouts * @params [string] txtMessage: Dialog message * @params [string] txtTitle: Dialog title * @return [string] Button_id: Return value of selected button */ public string ShowBox(UInt32 Type, string txtMessage, string txtTitle) { // Create message box newMessageBox = new frm_message_box(); // Set layout newMessageBox.SetButtonLayout(Type, "", "", ""); // Set title if (txtTitle == "") newMessageBox.Text = "Message"; else newMessageBox.Text = txtTitle; // Set message newMessageBox.label_Message.Text = txtMessage; // Show dialog newMessageBox.ShowDialog(); // Return result return Button_id; }