Exemplo n.º 1
0
 private void BtnAddAction_Click(object sender, EventArgs e)
 {
     using (var form = new ActionForm())
     {
         form.MainFForm = this;
         form.ShowDialog();
     }
 }
Exemplo n.º 2
0
        private void BtnSave_Click(object sender, EventArgs e)
        {
            if (Config.No == 0)
            {
                var config = GetConfig();
                // Add
                if (RerolForm != null)
                {
                    RerolForm.AddScript(config);
                }
                else if (ClubShareForm != null)
                {
                    ClubShareForm.AddScript(config);
                }
                else if (ClubForm != null)
                {
                    ClubForm.AddScript(config);
                }
                else if (MainFForm != null)
                {
                    MainFForm.AddScript(config);
                }
                else if (ActionForm != null)
                {
                    ActionForm.AddScript(config);
                }
            }
            else
            {
                var config = GetConfig();

                // Edit
                if (RerolForm != null)
                {
                    RerolForm.UpdateScript(config);
                }
                else if (ClubShareForm != null)
                {
                    ClubShareForm.UpdateScript(config);
                }
                else if (ClubForm != null)
                {
                    ClubForm.UpdateScript(config);
                }
                else if (MainFForm != null)
                {
                    MainFForm.UpdateScript(config);
                }
                else if (ActionForm != null)
                {
                    ActionForm.UpdateScript(config);
                }
            }

            Close();
        }
Exemplo n.º 3
0
        private void BtnEditAction_Click(object sender, EventArgs e)
        {
            var action = GetSelectedAction();

            if (action != null)
            {
                using (var form = new ActionForm())
                {
                    form.MainFForm = this;
                    form.Action    = action;
                    form.ShowDialog();
                }
            }
        }
Exemplo n.º 4
0
        private void BtnSave_Click(object sender, EventArgs e)
        {
            BoostTime = new BoostTime();

            BoostTime.No = int.Parse(txtNo.Text);
            BoostTime.FromTime = new DateTime(dtpDate.Value.Year, dtpDate.Value.Month, dtpDate.Value.Day, dtpFrom.Value.Hour, dtpFrom.Value.Minute, 0);
            BoostTime.ToTime = new DateTime(dtpDate.Value.Year, dtpDate.Value.Month, dtpDate.Value.Day, dtpTo.Value.Hour, dtpTo.Value.Minute, 0);
            
            if (BoostTime.No == 0)
            {
                ActionForm.AddBoostTime(BoostTime);
            }
            else
            {
                ActionForm.UpdateBoostTime(BoostTime);

                Close();
            }
        }