Exemplo n.º 1
0
 public NewChampForm(MainForm mainForm)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     this.picPath = null;
     this.ep = new ErrorProvider();
 }
Exemplo n.º 2
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     IniFile.ReadIniFile();
     mainForm = new MainForm();
     if (Variable.bLogin)
     {
         Application.ThreadException += (sender, args) => HandleException(args.Exception);
         AppDomain.CurrentDomain.UnhandledException += delegate (object sender, UnhandledExceptionEventArgs args) {
             Exception ex = args.ExceptionObject as Exception;
             if (ex != null)
             {
                 if (mainForm.InvokeRequired)
                 {
                     mainForm.Invoke(new ExceptionDelegate(Program.HandleException), new object[] { ex });
                 }
                 else
                 {
                     HandleException(ex);
                 }
             }
         };
         Application.Run(mainForm);
     }
     else
     {
         Application.Exit();
     }
 }
Exemplo n.º 3
0
 public LoginForm(MainForm mainForm)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     listPlayers.Items.Add("Loading...");
     mainForm.getClient().getAllUsers("L", false);
 }
Exemplo n.º 4
0
 public RegisterForm(MainForm mainForm)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     mainForm.getClient().getAdvisorList();
     ep = new ErrorProvider();
 }
Exemplo n.º 5
0
 public OrderFoodForm(MainForm mf, User p)
 {
     InitializeComponent();
     this.mf = mf;
     svcClient = new ServicesClient();
     loadProducts();
     this.u = p;
 }
Exemplo n.º 6
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (tbUsername.Text.Trim() == "" || tbPassword.Text.Trim() == "")
     {
         MessageBox.Show("Please input your username and password correctly.", "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         Result r = svcClient.UserLogin(tbUsername.Text, tbPassword.Text);
         if (r.success == true)
         {
             MainForm mf = new MainForm(this, r.user);
             tbPassword.Clear();
             tbUsername.Clear();
             mf.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show(r.message, "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Exemplo n.º 7
0
 public HistoryForm(MainForm mainForm)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     mainForm.getClient().getAllGames(true, -1, "H", false);
 }
 public RequestHistory(MainForm mf)
 {
     this.mf = mf;
     InitializeComponent();
 }
 public RegisterToChampForm(MainForm mainForm)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     mainForm.getClient().getAllChampionships(-1, "R", false);
 }
Exemplo n.º 10
0
 public QueriesForm(MainForm mainForm)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     cbDelType.SelectedIndex = 0;
 }
Exemplo n.º 11
0
 public WebSystem(MainForm main)
     : this()
 {
     this._main = main;
 }
Exemplo n.º 12
0
 public OrderHistory(MainForm mf)
 {
     InitializeComponent();
     this.mf = mf;
 }
Exemplo n.º 13
0
 public MyCallBack(MainForm mainForm)
 {
     this.mainForm = mainForm;
 }
 public PrintRequestForm(MainForm mf)
 {
     this.mf = mf;
     InitializeComponent();
 }