Example #1
0
        public void MapTargetAreaGearFishingGroundBatch(MappingBatchForm f)
        {
            List <int> years = new List <int>();

            if (BatchMode)
            {
                if (!CombineYearsInOneMap)
                {
                    foreach (ListViewItem lvi in lvYears.Items)
                    {
                        years.Clear();
                        years.Add(int.Parse(lvi.Text));
                        MapGear(years);
                        f.MappedYears(years);
                    }
                }
                else
                {
                    foreach (ListViewItem lvi in lvYears.Items)
                    {
                        years.Add(int.Parse(lvi.Text));
                    }
                    MapGear(years);
                    f.MappedYears(years);
                }
            }
        }
Example #2
0
        private void OnButtonClick(object sender, EventArgs e)
        {
            switch (((Button)sender).Name)
            {
            case "btnOk":
                Close();
                break;

            case "btnBatch":
                MappingBatchForm f = new MappingBatchForm(this);
                f.ShowDialog(this);
                break;

            case "btnSelect":
                if (txtCondition.Text.Length > 0)
                {
                    foreach (ListViewItem lvi in lvGears.Items)
                    {
                        lvi.Checked = int.Parse(lvi.SubItems[2].Text) >= int.Parse(txtCondition.Text);
                    }
                }
                break;
            }
        }