void btnSave_Click(object sender, MouseButtonEventArgs e)
        {
            TournamentRules rules = new TournamentRules();
            rules.SleepClause = chkSleepClause.Checked;
            rules.AccuracyClause = chkAccuracyClause.Checked;
            rules.SpeciesClause = chkSpeciesClause.Checked;
            rules.FreezeClause = chkFreezeClause.Checked;
            rules.OHKOClause = chkOHKOClause.Checked;
            rules.SelfKOClause = chkSelfKOClause.Checked;

            Network.Messenger.SendSaveTournamentRules(rules);

            Menus.MenuSwitcher.CloseAllMenus();
        }
        public mnuTournamentRulesEditor(string name, TournamentRules rules)
            : base(name)
        {
            this.rules = rules;

            base.Size = new Size(315, 360);
            base.MenuDirection = Enums.MenuDirection.Vertical;
            base.Location = new Point(10, 40);

            lblEditRules = new Label("lblEditRules");
            lblEditRules.AutoSize = true;
            lblEditRules.Font = FontManager.LoadFont("PMU", 48);
            lblEditRules.Text = "Edit Rules";
            lblEditRules.ForeColor = Color.WhiteSmoke;
            lblEditRules.Location = new Point(20, 0);

            chkSleepClause = new CheckBox("chkSleepClause");
            chkSleepClause.Location = new Point(15, 48);
            chkSleepClause.Size = new System.Drawing.Size(200, 32);
            chkSleepClause.BackColor = Color.Transparent;
            chkSleepClause.Font = FontManager.LoadFont("PMU", 32);
            chkSleepClause.ForeColor = Color.WhiteSmoke;
            chkSleepClause.Text = "Sleep Clause";
            chkSleepClause.Checked = rules.SleepClause;

            chkAccuracyClause = new CheckBox("chkAccuracyClause");
            chkAccuracyClause.Location = new Point(15, 80);
            chkAccuracyClause.Size = new System.Drawing.Size(200, 32);
            chkAccuracyClause.BackColor = Color.Transparent;
            chkAccuracyClause.Font = FontManager.LoadFont("PMU", 32);
            chkAccuracyClause.ForeColor = Color.WhiteSmoke;
            chkAccuracyClause.Text = "Accuracy Clause";
            chkAccuracyClause.Checked = rules.AccuracyClause;

            chkSpeciesClause = new CheckBox("chkSpeciesClause");
            chkSpeciesClause.Location = new Point(15, 112);
            chkSpeciesClause.Size = new System.Drawing.Size(200, 32);
            chkSpeciesClause.BackColor = Color.Transparent;
            chkSpeciesClause.Font = FontManager.LoadFont("PMU", 32);
            chkSleepClause.ForeColor = Color.WhiteSmoke;
            chkSpeciesClause.Text = "Species Clause";
            chkSpeciesClause.Checked = rules.SpeciesClause;

            chkFreezeClause = new CheckBox("chkFreezeClause");
            chkFreezeClause.Location = new Point(15, 144);
            chkFreezeClause.Size = new System.Drawing.Size(200, 32);
            chkFreezeClause.BackColor = Color.Transparent;
            chkFreezeClause.Font = FontManager.LoadFont("PMU", 32);
            chkFreezeClause.ForeColor = Color.WhiteSmoke;
            chkFreezeClause.Text = "Freeze Clause";
            chkFreezeClause.Checked = rules.FreezeClause;

            chkOHKOClause = new CheckBox("chkOHKOClause");
            chkOHKOClause.Location = new Point(15, 176);
            chkOHKOClause.Size = new System.Drawing.Size(200, 32);
            chkOHKOClause.BackColor = Color.Transparent;
            chkOHKOClause.Font = FontManager.LoadFont("PMU", 32);
            chkOHKOClause.ForeColor = Color.WhiteSmoke;
            chkOHKOClause.Text = "OHKO Clause";
            chkOHKOClause.Checked = rules.OHKOClause;

            chkSelfKOClause = new CheckBox("chkSelfKOClause");
            chkSelfKOClause.Location = new Point(15, 208);
            chkSelfKOClause.Size = new System.Drawing.Size(200, 32);
            chkSelfKOClause.BackColor = Color.Transparent;
            chkSelfKOClause.Font = FontManager.LoadFont("PMU", 32);
            chkSelfKOClause.ForeColor = Color.WhiteSmoke;
            chkSelfKOClause.Text = "Self-KO Clause";
            chkSelfKOClause.Checked = rules.SelfKOClause;

            btnSave = new Button("btnSave");
            btnSave.Location = new Point(15, 245);
            btnSave.Size = new Size(100, 15);
            btnSave.Text = "Save";
            btnSave.Click += new EventHandler<MouseButtonEventArgs>(btnSave_Click);

            this.AddWidget(chkSleepClause);
            this.AddWidget(chkAccuracyClause);
            this.AddWidget(chkSpeciesClause);
            this.AddWidget(chkFreezeClause);
            this.AddWidget(chkOHKOClause);
            this.AddWidget(chkSelfKOClause);
            this.AddWidget(btnSave);
            this.AddWidget(lblEditRules);
        }
        public mnuTournamentRulesViewer(string name, TournamentRules rules)
            : base(name)
        {
            this.rules = rules;

            base.Size = new Size(315, 360);
            base.MenuDirection = Enums.MenuDirection.Vertical;
            base.Location = new Point(10, 40);

            lblViewRules = new Label("lblViewRules");
            lblViewRules.AutoSize = true;
            lblViewRules.Font = FontManager.LoadFont("PMU", 48);
            lblViewRules.Text = "View Rules";
            lblViewRules.ForeColor = Color.WhiteSmoke;
            lblViewRules.Location = new Point(20, 0);

            lblSleepClause = new Label("lblSleepClause");
            lblSleepClause.Location = new Point(15, 48);
            lblSleepClause.Size = new System.Drawing.Size(200, 32);
            lblSleepClause.BackColor = Color.Transparent;
            lblSleepClause.Font = FontManager.LoadFont("PMU", 32);
            lblSleepClause.ForeColor = Color.WhiteSmoke;
            lblSleepClause.Text = "Sleep Clause: " + (rules.SleepClause ? "Yes" : "No");

            lblAccuracyClause = new Label("lblAccuracyClause");
            lblAccuracyClause.Location = new Point(15, 80);
            lblAccuracyClause.Size = new System.Drawing.Size(200, 32);
            lblAccuracyClause.BackColor = Color.Transparent;
            lblAccuracyClause.Font = FontManager.LoadFont("PMU", 32);
            lblAccuracyClause.ForeColor = Color.WhiteSmoke;
            lblAccuracyClause.Text = "Accuracy Clause: " + (rules.AccuracyClause ? "Yes" : "No");

            lblSpeciesClause = new Label("lblSpeciesClause");
            lblSpeciesClause.Location = new Point(15, 112);
            lblSpeciesClause.Size = new System.Drawing.Size(200, 32);
            lblSpeciesClause.BackColor = Color.Transparent;
            lblSpeciesClause.Font = FontManager.LoadFont("PMU", 32);
            lblSpeciesClause.ForeColor = Color.WhiteSmoke;
            lblSpeciesClause.Text = "Species Clause: " + (rules.SpeciesClause ? "Yes" : "No");

            lblFreezeClause = new Label("lblFreezeClause");
            lblFreezeClause.Location = new Point(15, 144);
            lblFreezeClause.Size = new System.Drawing.Size(200, 32);
            lblFreezeClause.BackColor = Color.Transparent;
            lblFreezeClause.Font = FontManager.LoadFont("PMU", 32);
            lblFreezeClause.ForeColor = Color.WhiteSmoke;
            lblFreezeClause.Text = "Freeze Clause: " + (rules.FreezeClause ? "Yes" : "No");

            lblOHKOClause = new Label("lblOHKOClause");
            lblOHKOClause.Location = new Point(15, 176);
            lblOHKOClause.Size = new System.Drawing.Size(200, 32);
            lblOHKOClause.BackColor = Color.Transparent;
            lblOHKOClause.Font = FontManager.LoadFont("PMU", 32);
            lblOHKOClause.ForeColor = Color.WhiteSmoke;
            lblOHKOClause.Text = "OHKO Clause: " + (rules.OHKOClause ? "Yes" : "No");

            lblSelfKOClause = new Label("lblSelfKOClause");
            lblSelfKOClause.Location = new Point(15, 208);
            lblSelfKOClause.Size = new System.Drawing.Size(200, 32);
            lblSelfKOClause.BackColor = Color.Transparent;
            lblSelfKOClause.Font = FontManager.LoadFont("PMU", 32);
            lblSelfKOClause.ForeColor = Color.WhiteSmoke;
            lblSelfKOClause.Text = "Self-KO Clause: " + (rules.SelfKOClause ? "Yes" : "No");

            this.AddWidget(lblSleepClause);
            this.AddWidget(lblAccuracyClause);
            this.AddWidget(lblSpeciesClause);
            this.AddWidget(lblFreezeClause);
            this.AddWidget(lblOHKOClause);
            this.AddWidget(lblSelfKOClause);
            this.AddWidget(lblViewRules);
        }