Example #1
0
        private void BtnReroll_Click(object sender, EventArgs e)
        {
            Hide();

            var form = new RerolForm();

            form.ZMainForm = this;
            form.Show();
        }
Example #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();
        }