protected Tool(PinballEditControl control) { Editor = control; Label = "Unnamed Tool"; Icon = new Bitmap(1, 1); }
public EditorForm() { InitializeComponent(); PlayFieldEditor = new PinballEditControl(); EditorContainer = new WPFContainer(PlayFieldEditor); playFieldPanel.Controls.Add(EditorContainer); TitleLabel.Font = new Font(FontManager.Courgette, 40); // Set up menu editToolStripMenuItem.DropDownItems.Add(new UndoItem(PlayFieldEditor.History)); editToolStripMenuItem.DropDownItems.Add(new RedoItem(PlayFieldEditor.History)); // Set up left panel populateElementPanel(); populateToolPanel(); // Set up playfield and element inspector PlayFieldEditor.History.Change += () => { elementInspector.Refresh(); machineInspector.Refresh(); }; elementInspector.PropertyValueChanged += onElementPropertyChanged; machineInspector.PropertyValueChanged += onMachinePropertyChanged; machineInspector.SelectedObject = PlayFieldEditor.PinballMachine; // Set up zoom bar zoomBar.Trackbar.Minimum = 5; zoomBar.Trackbar.Maximum = 20; zoomBar.Trackbar.Value = 10; zoomBar.Trackbar.ValueChanged += (sender, e) => { PlayFieldEditor.ScaleFactor = zoomBar.Trackbar.Value / 10f; }; PlayFieldEditor.MouseWheel += onMouseWheel; FileName = null; // PlayFieldEditor //EditorContainer.AllowDrop = true; PlayFieldEditor.AllowDrop = true; EditorContainer.Location = new System.Drawing.Point(3, 3); EditorContainer.TabIndex = 2; PlayFieldEditor.SelectionChanged += new Sketchball.Controls.PinballEditControl.SelectionChangedHandler(this.onSelectionChanged); PlayFieldEditor.Drop += this.onDragDrop; PlayFieldEditor.DragEnter += this.onDragEnter; PlayFieldEditor.DragOver += this.onDragOver; PlayFieldEditor.DragLeave += this.onDragLeave; PlayFieldEditor.QueryContinueDrag += this.onQueryContinueDrag; //PlayFieldEditor.Background = System.Windows.Media.Brushes.White; }
public MultiLineTool(PinballEditControl control) : base(control) { Icon = Properties.Resources.MultiLineTool; Label = "Multi Line tool"; }
/// <summary> /// Instantiates a new circle tool. /// </summary> /// <param name="control">Control where this tool operates on.</param> public CircleTool(PinballEditControl control) : base(control) { Label = "Circle"; Icon = Properties.Resources.circle_outline_512; }