Пример #1
0
        private void ToolBoxButton_Click(object sender, EventArgs e)
        {
            var buttonTag = ((Button)sender).Tag;

            this.ResetToolButtonBackColors();

            switch (buttonTag)
            {
            case "Pointer":
                SceneryToolSelected?.Invoke(SceneryTool.Pointer, this, e);
                this.pointerToolBoxButton.BackColor = Color.FromKnownColor(KnownColor.ActiveBorder);
                break;
                //case "Plant":
                //    SceneryToolSelected?.Invoke(SceneryTool.Plant, this, e);
                //    this.singlePlantToolBoxButton.BackColor = Color.FromKnownColor(KnownColor.ActiveBorder);
                //    break;
            }
        }
Пример #2
0
 public ToolboxPanel()
 {
     InitializeComponent();
     this.pointerToolBoxButton.BackColor = Color.FromKnownColor(KnownColor.ActiveBorder);
     SceneryToolSelected?.Invoke(SceneryTool.Pointer, this, new EventArgs());
 }