private void buttonAddRow_Click(object sender, EventArgs e)
 {
     // add values
     dataForm.AddRow(new string[] { "10", "20" });
     // show a modal second form, so that the first can not be selected while the second is open!
     dataForm.ShowDialog(this);
 }
 private void button1_Click(object sender, EventArgs e)
 {
     using (DataForm dataForm = new DataForm())
     {
         dataForm.WindowState = FormWindowState.Maximized;
         dataForm.ShowDialog();
     }
 }
示例#3
0
        private void AllDataBtn_Click(object sender, EventArgs e)
        {
            DataForm df = new DataForm()
            {
                Text = this.AllDataBtn.Text
            };

            df.ShowDialog();
        }
示例#4
0
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            PhysicalBridge = new PhysicalBridge(commandData);

            DataForm dataForm = new DataForm();

            PhysicalBridge.DataForm = dataForm;
            dataForm.PhysicalBridge = PhysicalBridge;
            dataForm.ShowDialog();

            return(Result.Succeeded);
        }
示例#5
0
        /// <summary>
        /// Compare enemy stat button click
        /// </summary>
        private void btnData_Click(object sender, EventArgs e)
        {
            if (!HasData)
            {
                return;
            }

            // Get the stat to compare
            StatType stat  = StatType.None;
            string   title = (sender as Button).Tag.ToString();

            if (sender == btnPhysicalResistance)
            {
                stat = StatType.PhysicalResistance;
            }
            else if (sender == btnRadiationResistance)
            {
                stat = StatType.RadiationResistance;
            }
            else if (sender == btnFireResistance)
            {
                stat = StatType.FireResistance;
            }
            else if (sender == btnGravityResistance)
            {
                stat = StatType.GravityResistance;
            }
            else if (sender == btnWaterResistance)
            {
                stat = StatType.WaterResistance;
            }
            else if (sender == btnEnergyResistance)
            {
                stat = StatType.EnergyResistance;
            }
            else if (sender == btnElectricResistance)
            {
                stat = StatType.ElectricResistance;
            }
            else if (sender == btnHolyResistance)
            {
                stat = StatType.HolyResistance;
            }
            else if (sender == btnDeathResistance)
            {
                stat = StatType.DeathResistance;
            }
            else if (sender == btnBiologicalResistance)
            {
                stat = StatType.BiologicalResistance;
            }
            else if (sender == btnPsychicResistance)
            {
                stat = StatType.PsychicResistance;
            }
            else if (sender == btnMechanicalResistance)
            {
                stat = StatType.MechanicalResistance;
            }
            else if (sender == btnLightResistance)
            {
                stat = StatType.LightResistance;
            }
            else if (sender == btnDestroyResistance)
            {
                stat = StatType.DestroyResistance;
            }

            if (stat == StatType.None)
            {
                return;
            }

            // Display data comparison form
            using (DataForm form = new DataForm(title, MainForm.RomData.Characters, cbCharacters.SelectedItem.ToString(), stat))
            {
                form.ShowDialog();
            }
        }
示例#6
0
        /// <summary>
        /// Compare enemy stat button click
        /// </summary>
        private void btnData_Click(object sender, EventArgs e)
        {
            if (!HasData)
            {
                return;
            }

            // Get the stat to compare
            StatType stat  = StatType.None;
            string   title = (sender as Button).Tag.ToString();

            if (sender == btnHP)
            {
                stat = StatType.HP;
            }
            else if (sender == btnEXP)
            {
                stat = StatType.Exp;
            }
            else if (sender == btnMeseta)
            {
                stat = StatType.Meseta;
            }
            else if (sender == btnAttack)
            {
                stat = StatType.Attack;
            }
            else if (sender == btnDefense)
            {
                stat = StatType.Defense;
            }
            else if (sender == btnStrength)
            {
                stat = StatType.Strength;
            }
            else if (sender == btnMental)
            {
                stat = StatType.Mental;
            }
            else if (sender == btnAgility)
            {
                stat = StatType.Agility;
            }
            else if (sender == btnDexterity)
            {
                stat = StatType.Dexterity;
            }
            else if (sender == btnMagicDefense)
            {
                stat = StatType.MagicDefense;
            }
            else if (sender == btnPhysicalResistance)
            {
                stat = StatType.PhysicalResistance;
            }
            else if (sender == btnRadiationResistance)
            {
                stat = StatType.RadiationResistance;
            }
            else if (sender == btnFireResistance)
            {
                stat = StatType.FireResistance;
            }
            else if (sender == btnGravityResistance)
            {
                stat = StatType.GravityResistance;
            }
            else if (sender == btnWaterResistance)
            {
                stat = StatType.WaterResistance;
            }
            else if (sender == btnEnergyResistance)
            {
                stat = StatType.EnergyResistance;
            }
            else if (sender == btnElectricResistance)
            {
                stat = StatType.ElectricResistance;
            }
            else if (sender == btnHolyResistance)
            {
                stat = StatType.HolyResistance;
            }
            else if (sender == btnDeathResistance)
            {
                stat = StatType.DeathResistance;
            }
            else if (sender == btnBiologicalResistance)
            {
                stat = StatType.BiologicalResistance;
            }
            else if (sender == btnPsychicResistance)
            {
                stat = StatType.PsychicResistance;
            }
            else if (sender == btnMechanicalResistance)
            {
                stat = StatType.MechanicalResistance;
            }
            else if (sender == btnLightResistance)
            {
                stat = StatType.LightResistance;
            }
            else if (sender == btnDestroyResistance)
            {
                stat = StatType.DestroyResistance;
            }
            else if (sender == btnResistanceScore)
            {
                stat = StatType.ResistanceGrade;
            }

            if (stat == StatType.None)
            {
                return;
            }

            using (DataForm form = new DataForm(title, MainForm.RomData.Enemies, cbEnemies.SelectedItem.ToString(), stat))
            {
                form.ShowDialog();
            }
        }