Skip to content
Permalink
6464816278
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
44 lines (37 sloc) 1.08 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EnigmaX.Classes
{
public class XMessageBox
{
private string _title = "";
private string _message = "";
private string[] _buttons;
public XMessageBox(string title, string message, string leftButton, string rightButton = "") {
_title = title;
_message = message;
_buttons = new string[] { leftButton, rightButton };
}
public int showMessage() {
XMessageBoxForm window = new XMessageBoxForm(_title, _message, _buttons[0], _buttons[1]);
var dialog = window.ShowDialog();
if (dialog == System.Windows.Forms.DialogResult.OK)
{
if (window.returnValue.Equals("primary"))
{
return 0;
}
else
{
return 1;
}
}
else {
return -1;
}
}
}
}