コード例 #1
0
        public void Select(Wip.ZoneArea area)
        {
            AreaList.SelectedItem = area;
            CurrentArea           = area;

            DeleteButton.Enabled = area != null;
            RenameButton.Enabled = area != null;

            AreaChanged?.Invoke(this, null);
        }
コード例 #2
0
        private void AddArea_Click(object sender, EventArgs e)
        {
            StringDialog dlg = new StringDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                Wip.ZoneArea area = new Wip.ZoneArea {
                    Name = dlg.String
                };
                ZoneData.Areas.Add(area);
                Context.UnsavedChanges = true;

                AreaList.Items.Add(area);
                Select(area);
            }
        }