void polygon_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(FixtureButton))) { FixtureButton fixtureButton = e.Data.GetData(typeof(FixtureButton)) as FixtureButton; DispatchDrop(fixtureButton.FixtureClass); } else if (e.Data.GetDataPresent(typeof(ShortFixtureLabel))) { var shortFixtureLabel = e.Data.GetData(typeof(ShortFixtureLabel)) as ShortFixtureLabel; DispatchDrop(shortFixtureLabel.FixtureClass); } else if (e.Data.GetDataPresent(typeof(Polygon))) { DispatchDrop((Polygon)e.Data.GetData(typeof(Polygon)), e); } else if (e.Data.GetDataPresent(typeof(List <Polygon>))) { DispatchDrop((List <Polygon>)e.Data.GetData(typeof(List <Polygon>)), e); } }
void InitializeFixtureButtons() { foreach (var fixtureClass in FixtureClasses.Items.Values) { var button = new FixtureButton(); button.FixtureClass = fixtureClass; button.Initialize(); button.PropertyChanged += new PropertyChangedEventHandler(buttonFixture_PropertyChanged); if (fixtureClass.LowFrequency) { panelFixturesLowFrequency.Children.Add(button); } else { panelFixturesHighFrequency.Children.Add(button); } } ButtonMoreFixtures_Click(null, null); ButtonMoreFixtures.Click += new RoutedEventHandler(ButtonMoreFixtures_Click); ButtonUserClassifyFirstCycles.PropertyChanged += new PropertyChangedEventHandler(buttonFixture_PropertyChanged); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ToolBar = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.panelTools = ((System.Windows.Controls.StackPanel)(target)); return; case 3: this.dockMachineClassify = ((System.Windows.Controls.StackPanel)(target)); return; case 4: this.ButtonClassifyFirstCyclesUsingMachineLearning = ((System.Windows.Controls.Button)(target)); return; case 5: this.ButtonClassifyUsingMachineLearning = ((System.Windows.Controls.Button)(target)); return; case 6: this.ButtonClassifyUsingFixtureList = ((System.Windows.Controls.Button)(target)); return; case 7: this.dockClassificationActionMode = ((System.Windows.Controls.StackPanel)(target)); return; case 8: this.ButtonClassificationActionModeSelected = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 9: this.ButtonClassificationActionModeAll = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 10: this.ButtonClassificationActionModeForward = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 11: this.ButtonApprove = ((System.Windows.Controls.Button)(target)); return; case 12: this.ButtonApproveAllPrevious = ((System.Windows.Controls.Button)(target)); return; case 13: this.ButtonApproveInView = ((System.Windows.Controls.Button)(target)); return; case 14: this.dockManualClassificationMode = ((System.Windows.Controls.StackPanel)(target)); return; case 15: this.ButtonManualClassificationModeWithoutAdoption = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 16: this.ButtonManualClassificationModeWithAdoption = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 17: this.ButtonApplyConversionFactor = ((System.Windows.Controls.Button)(target)); return; case 18: this.ButtonRefresh = ((System.Windows.Controls.Button)(target)); return; case 19: this.dockSplitMerge = ((System.Windows.Controls.StackPanel)(target)); return; case 20: this.ButtonSplitHorizontally = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 21: this.ButtonSplitVertically = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 22: this.ButtonMergeAllIntoBase = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 23: this.dockUndo = ((System.Windows.Controls.StackPanel)(target)); return; case 24: this.ButtonUndo = ((System.Windows.Controls.Button)(target)); return; case 25: this.ButtonRedo = ((System.Windows.Controls.Button)(target)); return; case 26: this.dockZoom = ((System.Windows.Controls.StackPanel)(target)); return; case 27: this.dockBookmark = ((System.Windows.Controls.StackPanel)(target)); return; case 28: this.dockBringIntoView = ((System.Windows.Controls.StackPanel)(target)); return; case 29: this.dockFind = ((System.Windows.Controls.StackPanel)(target)); return; case 30: this.dockFindMode = ((System.Windows.Controls.StackPanel)(target)); return; case 31: this.ButtonFindModeAny = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 32: this.ButtonFindModeSelected = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 33: this.ButtonFindModeSimilar = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 34: this.SeparatorRulers = ((System.Windows.Controls.Separator)(target)); return; case 35: this.dockRulers = ((System.Windows.Controls.StackPanel)(target)); return; case 36: this.ButtonSelectionRuler = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 37: this.ButtonClassificationRuler = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 38: this.ButtonApprovalRuler = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 39: this.ButtonFixturesRuler = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 40: this.panelFixtures = ((System.Windows.Controls.StackPanel)(target)); return; case 41: this.separatorPanelFixtures = ((System.Windows.Controls.Separator)(target)); return; case 42: this.panelFixturesHighFrequency = ((System.Windows.Controls.StackPanel)(target)); return; case 43: this.panelFixturesLowFrequency = ((System.Windows.Controls.StackPanel)(target)); return; case 44: this.ButtonMoreFixtures = ((System.Windows.Controls.Button)(target)); return; case 45: this.ImageMoreFixtures = ((System.Windows.Controls.Image)(target)); return; case 46: this.panelFirstCycle = ((System.Windows.Controls.StackPanel)(target)); return; case 47: this.ButtonUserClassifyFirstCycles = ((TraceWizard.TwApp.FixtureButton)(target)); return; } this._contentLoaded = true; }