Ejemplo n.º 1
0
        public void SyncCrewNumber()
        {
            int totalCountCrew = 0;

            foreach (ComboBox derBox in numBoxes)
            {
                int derBoxCount = 0;
                if (derBox.SelectedItem == null)
                {
                    derBoxCount = 0;
                }
                else
                {
                    derBoxCount = Int32.Parse(derBox.SelectedItem.ToString());
                }

                if (derBoxCount > 0)
                {
                    totalCountCrew += derBoxCount;
                }
            }
            ConfigureCrewForm parentForm = (this.Parent as ConfigureCrewForm);

            if (parentForm == null)
            {
                return;
            }
            parentForm.shipCrewMenu1.NumberOfCrew.Text = totalCountCrew.ToString();
        }
Ejemplo n.º 2
0
        private void availableTalentBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            int totalCountCrew = 0;

            foreach (ComboBox derBox in numBoxes)
            {
                int derBoxCount = 0;
                if (derBox.SelectedItem == null)
                {
                    derBoxCount = 0;
                }
                else
                {
                    derBoxCount = Int32.Parse(derBox.SelectedItem.ToString());
                }

                if (derBoxCount > 0)
                {
                    totalCountCrew += derBoxCount;
                }
            }
            ConfigureCrewForm parentForm = (this.Parent as ConfigureCrewForm);

            if (parentForm == null)
            {
                return;
            }
            parentForm.shipCrewMenu1.NumberOfCrew.Text = totalCountCrew.ToString();
        }
Ejemplo n.º 3
0
        private void configureCrewBut_Click(object sender, EventArgs e)
        {
            ConfigureCrewForm formMe  = new ConfigureCrewForm();
            MainForm          theForm = (this.Parent as MainForm);

            formMe.Show();
            formMe.SetPrevForm(theForm);
            formMe.shipCrewMenu1.SetPrevForm(theForm);
            if (theForm.theCrew.Count > 0)
            {
                formMe.CrewUpdateToOld(theForm.theCrew);
            }
        }
Ejemplo n.º 4
0
        private void resetCrewButton_Click(object sender, EventArgs e)
        {
            ConfigureCrewForm theForm = (this.Parent as ConfigureCrewForm);

            theForm.crewInput1.ResetTheCrew();
        }