void AddFileToolBar(ToolBarTray tray, int band, int index) { ToolBar toolbar = new ToolBar(); toolbar.Band = band; toolbar.BandIndex = index; tray.ToolBars.Add(toolbar); RoutedUICommand[] comm = { ApplicationCommands.New, ApplicationCommands.Open, ApplicationCommands.Save }; string[] strImages = { "NewDocumentHS.png", "OpenHS.png", "SaveHS.png" }; for (int i = 0; i < 3; i++) { Button btn = new Button(); btn.Command = comm[i]; toolbar.Items.Add(btn); string fileName = Path.Combine(Directory.GetCurrentDirectory(), strImages[i]); Image img = new Image(); img.Source = new BitmapImage(new Uri(fileName)); img.Stretch = Stretch.None; btn.Content = img; ToolTip tip = new ToolTip(); tip.Content = comm[i].Text; btn.ToolTip = tip; } CommandBindings.Add(new CommandBinding(ApplicationCommands.New, OnNew)); CommandBindings.Add(new CommandBinding(ApplicationCommands.Open, OnOpen)); CommandBindings.Add(new CommandBinding(ApplicationCommands.Save, OnSave)); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.toolbar = ((System.Windows.Controls.ToolBarTray)(target)); return; case 2: this.BoldButton = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 3: this.ItalicButton = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 4: this.UnderlineButton = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 5: this.fontList = ((System.Windows.Controls.ComboBox)(target)); return; case 6: this.fontSize = ((System.Windows.Controls.ComboBox)(target)); return; } this._contentLoaded = true; }
private void ChangeToolBar(object sender, RoutedEventArgs e) { spanel2.Children.Clear(); tbartray = new ToolBarTray(); tbar = new ToolBar(); btn = new Button(); btn.Content = "File"; tbar.Items.Add(btn); btn1 = new Button(); btn1.Content = "Edit"; tbar.Items.Add(btn1); tbar1 = new ToolBar(); btn2 = new Button(); btn2.Content = "Format"; tbar1.Items.Add(btn2); btn3 = new Button(); btn3.Content = "View"; tbar1.Items.Add(btn3); btn4 = new Button(); btn4.Content = "Help"; tbar1.Items.Add(btn4); tbartray.ToolBars.Add(tbar); tbartray.ToolBars.Add(tbar1); spanel2.Children.Add(tbartray); txt = new TextBlock(); txt.TextWrapping = System.Windows.TextWrapping.WrapWithOverflow; txt.Text = "ToolBars are containers for a group of commands or controls. Usually tool bars are placed inside tool bar trays to manage their layout. The example shows two tool bars inside a tool bar tray."; spanel2.Children.Add(txt); }
public FormatRichText() { Title = "Format Rich Text"; // Create DockPanel as content of window. DockPanel dock = new DockPanel(); Content = dock; // Create ToolBarTray docked at top of client area. ToolBarTray tray = new ToolBarTray(); dock.Children.Add(tray); DockPanel.SetDock(tray, Dock.Top); // Create RichTextBox. txtbox = new RichTextBox(); txtbox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; // Call methods in other files. AddFileToolBar(tray, 0, 0); AddEditToolBar(tray, 1, 0); AddCharToolBar(tray, 2, 0); AddParaToolBar(tray, 2, 1); AddStatusBar(dock); // Fill rest of client area with RichTextBox and give it focus. dock.Children.Add(txtbox); txtbox.Focus(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 2: this.DockingManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 3: this._layoutRoot = ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)); return; case 4: this.AMLDocumentTree = ((Aml.Toolkit.View.AMLTreeView)(target)); return; case 5: this.DocumentPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 6: this.Floating = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorableFloatingWindow)(target)); return; case 7: this.FloatingPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 8: this.LeftTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 9: this.RightTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 10: this.TopTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 11: this.BottomTabSide = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 12: this.statusLabel = ((System.Windows.Controls.TextBlock)(target)); return; case 13: this.LayoutTransformSlider = ((System.Windows.Controls.Slider)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Constructor</summary> /// <param name="toolBarTray">ToolBarTray</param> /// <param name="toolbarModels">Collection of menus</param> public ToolBarTrayBinder(ToolBarTray toolBarTray, ObservableCollection<IMenu> toolbarModels) { m_toolBarTray = toolBarTray; foreach (var toolbarModel in toolbarModels) AddToolBar(toolbarModel); toolbarModels.CollectionChanged += CollectionCollectionChanged; }
// Token: 0x06005858 RID: 22616 RVA: 0x00187504 File Offset: 0x00185704 private static void OnThumbDragDelta(object sender, DragDeltaEventArgs e) { ToolBarTray toolBarTray = (ToolBarTray)sender; if (toolBarTray.IsLocked) { return; } toolBarTray.ProcessThumbDragDelta(e); }
// Token: 0x06005811 RID: 22545 RVA: 0x0018668C File Offset: 0x0018488C private static object CoerceOrientation(DependencyObject d, object value) { ToolBarTray toolBarTray = ((ToolBar)d).ToolBarTray; if (toolBarTray == null) { return(value); } return(toolBarTray.Orientation); }
public MenuController(Menu menu, ToolBarTray toolBarTray) { _menu = menu; _toolBarTray = toolBarTray; _menuItems = new List<MingMenuItemAndHandler>(); _contextMenuItems = new List<object>(); _contextMenuKeyProviders = new List<ITreeViewContextMenuClient>(); _menuClients = new List<IMingMenuClient>(); _pluginTabDocumentItems = new Dictionary<string, IList<string>>(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ProgrammableToolbarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; } this._contentLoaded = true; }
public void Attach(IRegion region, DependencyObject regionHost) { if(region == null) throw new ArgumentNullException("region"); if(regionHost == null) throw new ArgumentNullException("regionHost"); if(!(regionHost is ToolBarTray)) throw new InvalidOperationException("SynchronizeToolbars can be executed only on toolbar tray"); _control = (ToolBarTray) regionHost; _region = region; _region.Views.CollectionChanged += ViewsCollectionChanged; }
//------------------------------------------------------------------- // // Private Methods // //------------------------------------------------------------------- #region Private Methods // Event handler to listen to thumb events. private static void OnThumbDragDelta(object sender, DragDeltaEventArgs e) { ToolBarTray toolBarTray = (ToolBarTray)sender; // Don't move toolbars if IsLocked == true if (toolBarTray.IsLocked) { return; } toolBarTray.ProcessThumbDragDelta(e); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ContainerGrid = ((System.Windows.Controls.Grid)(target)); return; case 2: this.toolbarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 3: this.toolBar = ((System.Windows.Controls.ToolBar)(target)); return; case 4: this.BtnAdd = ((System.Windows.Controls.Button)(target)); #line 24 "..\..\NSGridView.xaml" this.BtnAdd.Click += new System.Windows.RoutedEventHandler(this.BtnAdd_Click); #line default #line hidden return; case 5: this.BtnRemove = ((System.Windows.Controls.Button)(target)); #line 27 "..\..\NSGridView.xaml" this.BtnRemove.Click += new System.Windows.RoutedEventHandler(this.BtnRemove_Click); #line default #line hidden return; case 6: this.BtnRefresh = ((System.Windows.Controls.Button)(target)); #line 30 "..\..\NSGridView.xaml" this.BtnRefresh.Click += new System.Windows.RoutedEventHandler(this.BtnRefresh_Click); #line default #line hidden return; case 7: this.dgGrid = ((Telerik.Windows.Controls.RadGridView)(target)); return; } this._contentLoaded = true; }
void AddEditToolBar(ToolBarTray tray, int band, int index) { // Create Toolbar. ToolBar toolbar = new ToolBar(); toolbar.Band = band; toolbar.BandIndex = index; tray.ToolBars.Add(toolbar); RoutedUICommand[] comm = { ApplicationCommands.Cut, ApplicationCommands.Copy, ApplicationCommands.Paste, ApplicationCommands.Delete, ApplicationCommands.Undo, ApplicationCommands.Redo }; string[] strImages = { "CutHS.png", "CopyHS.png", "PasteHS.png", "DeleteHS.png", "Edit_UndoHS.png", "Edit_RedoHS.png" }; for (int i = 0; i < 6; i++) { if (i == 4) toolbar.Items.Add(new Separator()); Button btn = new Button(); btn.Command = comm[i]; toolbar.Items.Add(btn); Image img = new Image(); img.Source = new BitmapImage( new Uri("pack://application:,,/Images/" + strImages[i])); img.Stretch = Stretch.None; btn.Content = img; ToolTip tip = new ToolTip(); tip.Content = comm[i].Text; btn.ToolTip = tip; } CommandBindings.Add(new CommandBinding(ApplicationCommands.Cut)); CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy)); CommandBindings.Add(new CommandBinding(ApplicationCommands.Paste)); CommandBindings.Add(new CommandBinding( ApplicationCommands.Delete, OnDelete, CanDelete)); CommandBindings.Add(new CommandBinding(ApplicationCommands.Undo)); CommandBindings.Add(new CommandBinding(ApplicationCommands.Redo)); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.toolbarOperate = ((Ai.Hong.Controls.FlattenFileOperatePanel)(target)); return; case 2: this.toolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 3: this.btnOpen = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 4: this.btnSave = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 5: this.btnSaveAs = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 6: this.btnSaveAll = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 7: this.btnClose = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 8: this.btnCloseAll = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 9: this.btnUndo = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 10: this.btnImport = ((Ai.Hong.Controls.VectorImageButton)(target)); return; case 11: this.btnExport = ((Ai.Hong.Controls.VectorImageButton)(target)); return; } this._contentLoaded = true; }
void AddParaToolBar(ToolBarTray tray, int band, int index) { ToolBar toolbar = new ToolBar(); toolbar.Band = band; toolbar.BandIndex = index; tray.ToolBars.Add(toolbar); toolbar.Items.Add(btnAlignment[0] = CreateButton(TextAlignment.Left, "Align Left", 0, 4)); toolbar.Items.Add(btnAlignment[1] = CreateButton(TextAlignment.Center, "Center", 2, 2)); toolbar.Items.Add(btnAlignment[2] = CreateButton(TextAlignment.Right, "Align Right", 4, 0)); toolbar.Items.Add(btnAlignment[3] = CreateButton(TextAlignment.Justify, "Justify", 0, 0)); txtbox.SelectionChanged += TextBoxOnSelectionChanged2; }
void AddFileToolBar(ToolBarTray tray, int band, int index) { // Create the ToolBar. ToolBar toolbar = new ToolBar(); toolbar.Band = band; toolbar.BandIndex = index; tray.ToolBars.Add(toolbar); RoutedUICommand[] comm = { ApplicationCommands.New, ApplicationCommands.Open, ApplicationCommands.Save }; string[] strImages = { "NewDocumentHS.png", "openHS.png", "saveHS.png" }; // Create buttons for the ToolBar. for (int i = 0; i < 3; i++) { Button btn = new Button(); btn.Command = comm[i]; toolbar.Items.Add(btn); Image img = new Image(); img.Source = new BitmapImage( new Uri("pack://application:,,/Images/" + strImages[i])); img.Stretch = Stretch.None; btn.Content = img; ToolTip tip = new ToolTip(); tip.Content = comm[i].Text; btn.ToolTip = tip; } // Add the command bindings. CommandBindings.Add( new CommandBinding(ApplicationCommands.New, OnNew)); CommandBindings.Add( new CommandBinding(ApplicationCommands.Open, OnOpen)); CommandBindings.Add( new CommandBinding(ApplicationCommands.Save, OnSave)); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.grdBookList = ((System.Windows.Controls.Grid)(target)); return; case 2: this.toolbarBookList = ((System.Windows.Controls.ToolBarTray)(target)); return; case 3: this.cmbSearchType = ((System.Windows.Controls.ComboBox)(target)); return; case 4: this.txtSearch = ((System.Windows.Controls.TextBox)(target)); #line 39 "..\..\BookListView.xaml" this.txtSearch.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtSearch_TextChanged); #line default #line hidden return; case 5: this.btnAddNew = ((System.Windows.Controls.Button)(target)); return; case 6: this.btnRemove = ((System.Windows.Controls.Button)(target)); return; case 7: this.btnSave = ((System.Windows.Controls.Button)(target)); return; case 8: this.dgBookList = ((System.Windows.Controls.DataGrid)(target)); return; } this._contentLoaded = true; }
public MoveTheToolbar() { Title = "Move the Toolbar"; // Create DockPanel as content of window. DockPanel dock = new DockPanel(); Content = dock; // Create ToolBarTray at top and left of window. ToolBarTray trayTop = new ToolBarTray(); dock.Children.Add(trayTop); DockPanel.SetDock(trayTop, Dock.Top); ToolBarTray trayLeft = new ToolBarTray(); trayLeft.Orientation = Orientation.Vertical; dock.Children.Add(trayLeft); DockPanel.SetDock(trayLeft, Dock.Left); // Create TextBox to fill rest of client area. TextBox txtbox = new TextBox(); dock.Children.Add(txtbox); // Create six Toolbars... for (int i = 0; i < 6; i++) { ToolBar toolbar = new ToolBar(); toolbar.Header = "Toolbar " + (i + 1); if (i < 3) trayTop.ToolBars.Add(toolbar); else trayLeft.ToolBars.Add(toolbar); // ... with six buttons each. for (int j = 0; j < 6; j++) { Button btn = new Button(); btn.FontSize = 16; btn.Content = (char)('A' + j); toolbar.Items.Add(btn); } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.toolBar = ((System.Windows.Controls.ToolBarTray)(target)); return; case 2: this.gridCameraImage = ((System.Windows.Controls.Grid)(target)); return; case 3: this.ImageTop = ((System.Windows.Controls.Image)(target)); return; case 4: this.CanvasDrawTop = ((System.Windows.Controls.Canvas)(target)); return; case 5: this.gridCameraImageSide = ((System.Windows.Controls.Grid)(target)); return; case 6: this.ImageSide = ((System.Windows.Controls.Image)(target)); return; case 7: this.CanvasDraw = ((System.Windows.Controls.Canvas)(target)); return; case 8: this.txtPopupMessage = ((System.Windows.Controls.TextBlock)(target)); return; case 9: this.BusyBar = ((Xceed.Wpf.Toolkit.BusyIndicator)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.CRMToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); #line 10 "..\..\EditMenuUserControl.xaml" this.CRMToolBarTray.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new System.Windows.RoutedEventHandler(this.CRMToolBarTray_Click)); #line default #line hidden return; case 2: this.CRMToolBar = ((System.Windows.Controls.ToolBar)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\..\MainWindow.xaml" ((OptionTrader.MainWindow)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.Window_MouseEnter); #line default #line hidden #line 5 "..\..\..\MainWindow.xaml" ((OptionTrader.MainWindow)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.Window_MouseLeave); #line default #line hidden #line 5 "..\..\..\MainWindow.xaml" ((OptionTrader.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.ToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 3: this.BestBidBook = ((OptionTrader.OrderBookTable)(target)); return; case 4: this.BestAskBook = ((OptionTrader.OrderBookTable)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ProgrammableToolbarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 2: #line 16 "..\..\..\..\Adapters\DemoImageViewer\DemoImageViewer.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Image_Click); #line default #line hidden return; case 3: this.imageDisplay = ((System.Windows.Controls.Image)(target)); return; } this._contentLoaded = true; }
public FormatRichText() { Title = "Format Rich Text"; DockPanel dock = new DockPanel(); Content = dock; ToolBarTray tray = new ToolBarTray(); dock.Children.Add(tray); DockPanel.SetDock(tray, Dock.Top); txtbox = new RichTextBox(); txtbox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; AddFileToolBar(tray, 0, 0); AddEditToolBar(tray, 1, 0); AddCharToolBar(tray, 2, 0); AddParaToolBar(tray, 2, 1); AddStatusBar(dock); dock.Children.Add(txtbox); txtbox.Focus(); }
public ToolBarCollection(ToolBarTray parent) { _parent = parent; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 23 "..\..\Editor.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanUndo); #line default #line hidden #line 24 "..\..\Editor.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_ExecutedUndo); #line default #line hidden return; case 2: #line 26 "..\..\Editor.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanRedo); #line default #line hidden #line 27 "..\..\Editor.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_ExecutedRedo); #line default #line hidden return; case 3: this.mnTest = ((System.Windows.Controls.MenuItem)(target)); #line 34 "..\..\Editor.xaml" this.mnTest.Click += new System.Windows.RoutedEventHandler(this.mnTest_Click); #line default #line hidden return; case 4: this.mnSetting = ((System.Windows.Controls.MenuItem)(target)); #line 35 "..\..\Editor.xaml" this.mnSetting.Click += new System.Windows.RoutedEventHandler(this.mnSetting_Click); #line default #line hidden return; case 5: this.mnExit = ((System.Windows.Controls.MenuItem)(target)); #line 37 "..\..\Editor.xaml" this.mnExit.Click += new System.Windows.RoutedEventHandler(this.mnExit_Click); #line default #line hidden return; case 6: this.mnDeleteText = ((System.Windows.Controls.MenuItem)(target)); #line 43 "..\..\Editor.xaml" this.mnDeleteText.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 7: this.mnDeleteNotes = ((System.Windows.Controls.MenuItem)(target)); #line 44 "..\..\Editor.xaml" this.mnDeleteNotes.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 8: this.mnDeleteShapes = ((System.Windows.Controls.MenuItem)(target)); #line 45 "..\..\Editor.xaml" this.mnDeleteShapes.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 9: this.mnDeleteAll = ((System.Windows.Controls.MenuItem)(target)); #line 46 "..\..\Editor.xaml" this.mnDeleteAll.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 10: this.mnPanel = ((System.Windows.Controls.MenuItem)(target)); #line 50 "..\..\Editor.xaml" this.mnPanel.Click += new System.Windows.RoutedEventHandler(this.mnPanel_Click); #line default #line hidden return; case 11: this.mnAbout = ((System.Windows.Controls.MenuItem)(target)); #line 54 "..\..\Editor.xaml" this.mnAbout.Click += new System.Windows.RoutedEventHandler(this.mnAbout_Click); #line default #line hidden return; case 12: this.sbCoord = ((System.Windows.Controls.TextBlock)(target)); return; case 13: this.sbTool = ((System.Windows.Controls.TextBlock)(target)); return; case 14: this.tbtTop = ((System.Windows.Controls.ToolBarTray)(target)); return; case 15: this.tbBoards = ((System.Windows.Controls.ToolBar)(target)); return; case 16: this.btPlay = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 69 "..\..\Editor.xaml" this.btPlay.Click += new System.Windows.RoutedEventHandler(this.btPlay_Click); #line default #line hidden return; case 17: this.btNewBoard = ((System.Windows.Controls.Button)(target)); #line 74 "..\..\Editor.xaml" this.btNewBoard.Click += new System.Windows.RoutedEventHandler(this.btBoard_Click); #line default #line hidden return; case 18: this.btFirstBoard = ((System.Windows.Controls.Button)(target)); #line 79 "..\..\Editor.xaml" this.btFirstBoard.Click += new System.Windows.RoutedEventHandler(this.btBoard_Click); #line default #line hidden return; case 19: this.btPrevBoard = ((System.Windows.Controls.Button)(target)); #line 83 "..\..\Editor.xaml" this.btPrevBoard.Click += new System.Windows.RoutedEventHandler(this.btBoard_Click); #line default #line hidden return; case 20: this.tbCurrentBoard = ((System.Windows.Controls.TextBlock)(target)); return; case 21: this.btNextBoard = ((System.Windows.Controls.Button)(target)); #line 92 "..\..\Editor.xaml" this.btNextBoard.Click += new System.Windows.RoutedEventHandler(this.btBoard_Click); #line default #line hidden return; case 22: this.btLastBoard = ((System.Windows.Controls.Button)(target)); #line 96 "..\..\Editor.xaml" this.btLastBoard.Click += new System.Windows.RoutedEventHandler(this.btBoard_Click); #line default #line hidden return; case 23: this.btUndo = ((System.Windows.Controls.Button)(target)); return; case 24: this.btRedo = ((System.Windows.Controls.Button)(target)); return; case 25: this.tbShapeSetting = ((System.Windows.Controls.ToolBar)(target)); return; case 26: this.cbStrokeColor = ((BoardControls.BrushComboBox)(target)); #line 112 "..\..\Editor.xaml" this.cbStrokeColor.ColorChanged += new System.Windows.RoutedEventHandler(this.cbStrokeColor_ColorChanged); #line default #line hidden #line 113 "..\..\Editor.xaml" this.cbStrokeColor.GotFocus += new System.Windows.RoutedEventHandler(this.cbSetting_GotFocus); #line default #line hidden return; case 27: this.cbFillColor = ((BoardControls.BrushComboBox)(target)); #line 116 "..\..\Editor.xaml" this.cbFillColor.ColorChanged += new System.Windows.RoutedEventHandler(this.cbFillColor_ColorChanged); #line default #line hidden #line 117 "..\..\Editor.xaml" this.cbFillColor.GotFocus += new System.Windows.RoutedEventHandler(this.cbSetting_GotFocus); #line default #line hidden return; case 28: this.cbThickness = ((BoardControls.ThicknessComboBox)(target)); #line 120 "..\..\Editor.xaml" this.cbThickness.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbThickness_SelectionChanged); #line default #line hidden return; case 29: this.cbDash = ((BoardControls.DashComboBox)(target)); #line 123 "..\..\Editor.xaml" this.cbDash.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbDash_SelectionChanged); #line default #line hidden return; case 30: this.tbFontSetting = ((System.Windows.Controls.ToolBar)(target)); return; case 31: this.cbFontFamaly = ((BoardControls.FontComboBox)(target)); #line 129 "..\..\Editor.xaml" this.cbFontFamaly.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbFont_SelectionChanged); #line default #line hidden #line 130 "..\..\Editor.xaml" this.cbFontFamaly.GotFocus += new System.Windows.RoutedEventHandler(this.cbSetting_GotFocus); #line default #line hidden return; case 32: this.cbFontSize = ((System.Windows.Controls.ComboBox)(target)); #line 134 "..\..\Editor.xaml" this.cbFontSize.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbFont_SelectionChanged); #line default #line hidden #line 135 "..\..\Editor.xaml" this.cbFontSize.GotFocus += new System.Windows.RoutedEventHandler(this.cbSetting_GotFocus); #line default #line hidden return; case 33: this.spRight = ((System.Windows.Controls.Grid)(target)); return; case 34: this.lbShapes = ((System.Windows.Controls.ListBox)(target)); #line 186 "..\..\Editor.xaml" this.lbShapes.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.lbShapes_SelectionChanged); #line default #line hidden #line 187 "..\..\Editor.xaml" this.lbShapes.KeyDown += new System.Windows.Input.KeyEventHandler(this.lbShapes_KeyDown); #line default #line hidden #line 188 "..\..\Editor.xaml" this.lbShapes.GotFocus += new System.Windows.RoutedEventHandler(this.lbShapes_GotFocus); #line default #line hidden return; case 35: this.lbBoards = ((System.Windows.Controls.ListBox)(target)); #line 193 "..\..\Editor.xaml" this.lbBoards.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.lbBoards_SelectionChanged); #line default #line hidden #line 194 "..\..\Editor.xaml" this.lbBoards.KeyDown += new System.Windows.Input.KeyEventHandler(this.lbBoards_KeyDown); #line default #line hidden return; case 36: this.tbtLeft = ((System.Windows.Controls.ToolBarTray)(target)); return; case 37: this.tbInput = ((System.Windows.Controls.ToolBar)(target)); return; case 38: this.rbType = ((System.Windows.Controls.RadioButton)(target)); #line 202 "..\..\Editor.xaml" this.rbType.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 39: this.rbInk = ((System.Windows.Controls.RadioButton)(target)); #line 208 "..\..\Editor.xaml" this.rbInk.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 40: this.rbPen = ((System.Windows.Controls.RadioButton)(target)); #line 215 "..\..\Editor.xaml" this.rbPen.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 41: this.rbLine = ((System.Windows.Controls.RadioButton)(target)); #line 221 "..\..\Editor.xaml" this.rbLine.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 42: this.rbRect = ((System.Windows.Controls.RadioButton)(target)); #line 227 "..\..\Editor.xaml" this.rbRect.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 43: this.rbRoundRect = ((System.Windows.Controls.RadioButton)(target)); #line 233 "..\..\Editor.xaml" this.rbRoundRect.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 44: this.rbEllipse = ((System.Windows.Controls.RadioButton)(target)); #line 239 "..\..\Editor.xaml" this.rbEllipse.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 45: this.rbLabel = ((System.Windows.Controls.RadioButton)(target)); #line 245 "..\..\Editor.xaml" this.rbLabel.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 46: this.tbEdit = ((System.Windows.Controls.ToolBar)(target)); return; case 47: this.rbSelect = ((System.Windows.Controls.RadioButton)(target)); #line 253 "..\..\Editor.xaml" this.rbSelect.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 48: this.rbErase = ((System.Windows.Controls.RadioButton)(target)); #line 259 "..\..\Editor.xaml" this.rbErase.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 49: this.rbRemove = ((System.Windows.Controls.RadioButton)(target)); #line 265 "..\..\Editor.xaml" this.rbRemove.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 50: this.btDeleteText = ((System.Windows.Controls.Button)(target)); #line 269 "..\..\Editor.xaml" this.btDeleteText.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 51: this.btDeleteNotes = ((System.Windows.Controls.Button)(target)); #line 272 "..\..\Editor.xaml" this.btDeleteNotes.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 52: this.btDeleteShapes = ((System.Windows.Controls.Button)(target)); #line 275 "..\..\Editor.xaml" this.btDeleteShapes.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 53: this.btDeleteAll = ((System.Windows.Controls.Button)(target)); #line 278 "..\..\Editor.xaml" this.btDeleteAll.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 54: this.scvBoard = ((System.Windows.Controls.ScrollViewer)(target)); return; case 55: this.inkBoard = ((System.Windows.Controls.InkCanvas)(target)); #line 287 "..\..\Editor.xaml" this.inkBoard.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.inkBoard_MouseDown); #line default #line hidden #line 288 "..\..\Editor.xaml" this.inkBoard.MouseMove += new System.Windows.Input.MouseEventHandler(this.inkBoard_MouseMove); #line default #line hidden #line 289 "..\..\Editor.xaml" this.inkBoard.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.inkBoard_MouseUp); #line default #line hidden #line 290 "..\..\Editor.xaml" this.inkBoard.MouseEnter += new System.Windows.Input.MouseEventHandler(this.inkBoard_MouseEnter); #line default #line hidden #line 291 "..\..\Editor.xaml" this.inkBoard.MouseLeave += new System.Windows.Input.MouseEventHandler(this.inkBoard_MouseLeave); #line default #line hidden #line 292 "..\..\Editor.xaml" this.inkBoard.PreviewKeyUp += new System.Windows.Input.KeyEventHandler(this.inkBoard_PreviewKeyUp); #line default #line hidden #line 293 "..\..\Editor.xaml" this.inkBoard.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.inkBoard_PreviewKeyDown); #line default #line hidden #line 294 "..\..\Editor.xaml" this.inkBoard.SelectionChanged += new System.EventHandler(this.inkBoard_SelectionChanged); #line default #line hidden #line 295 "..\..\Editor.xaml" this.inkBoard.StrokeCollected += new System.Windows.Controls.InkCanvasStrokeCollectedEventHandler(this.inkBoard_StrokeCollected); #line default #line hidden #line 296 "..\..\Editor.xaml" this.inkBoard.StrokeErased += new System.Windows.RoutedEventHandler(this.inkBoard_StrokeErased); #line default #line hidden #line 297 "..\..\Editor.xaml" this.inkBoard.SelectionMoved += new System.EventHandler(this.inkBoard_SelectionMoved); #line default #line hidden #line 298 "..\..\Editor.xaml" this.inkBoard.SelectionResized += new System.EventHandler(this.inkBoard_SelectionResized); #line default #line hidden return; case 56: this.tbBoard = ((BoardControls.BoardTextBox)(target)); #line 312 "..\..\Editor.xaml" this.tbBoard.GotFocus += new System.Windows.RoutedEventHandler(this.tbBoard_GotFocus); #line default #line hidden #line 312 "..\..\Editor.xaml" this.tbBoard.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.tbBoard_TextChanged); #line default #line hidden #line 313 "..\..\Editor.xaml" this.tbBoard.LostFocus += new System.Windows.RoutedEventHandler(this.tbBoard_LostFocus); #line default #line hidden #line 313 "..\..\Editor.xaml" this.tbBoard.SelectionChanged += new System.Windows.RoutedEventHandler(this.tbBoard_SelectionChanged); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.window = ((YGOProDevelop.MainWindow)(target)); #line 22 "..\..\..\View\MainWindow.xaml" this.window.Closing += new System.ComponentModel.CancelEventHandler(this.window_Closing); #line default #line hidden #line 23 "..\..\..\View\MainWindow.xaml" this.window.Loaded += new System.Windows.RoutedEventHandler(this.window_Loaded); #line default #line hidden return; case 2: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 3: this.themesMenu = ((System.Windows.Controls.MenuItem)(target)); #line 96 "..\..\..\View\MainWindow.xaml" this.themesMenu.Click += new System.Windows.RoutedEventHandler(this.themesMenu_Click); #line default #line hidden return; case 4: #line 105 "..\..\..\View\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 5: #line 106 "..\..\..\View\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_1); #line default #line hidden return; case 6: this.toolbarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 7: this.dock = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\..\UserControl\ucTabQry.xaml" ((PRDB_Sqlite.Presentation.UserControl.ucTabQry)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.UserControl_KeyDown); #line default #line hidden return; case 2: this.stpQry = ((System.Windows.Controls.StackPanel)(target)); return; case 3: this.stpTbl = ((System.Windows.Controls.StackPanel)(target)); return; case 4: this.tlbQry = ((System.Windows.Controls.ToolBarTray)(target)); return; case 5: this.btnNewtab = ((System.Windows.Controls.Button)(target)); return; case 6: this.btnOpnQry = ((System.Windows.Controls.Button)(target)); #line 27 "..\..\..\UserControl\ucTabQry.xaml" this.btnOpnQry.Click += new System.Windows.RoutedEventHandler(this.btnOpnQry_Click); #line default #line hidden return; case 7: this.btnSave = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\..\UserControl\ucTabQry.xaml" this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click); #line default #line hidden return; case 8: this.btnFind = ((System.Windows.Controls.Button)(target)); return; case 9: this.btnExec = ((System.Windows.Controls.Button)(target)); return; case 10: this.btnExecCur = ((System.Windows.Controls.Button)(target)); #line 55 "..\..\..\UserControl\ucTabQry.xaml" this.btnExecCur.Click += new System.Windows.RoutedEventHandler(this.btnExecCur_Click); #line default #line hidden return; case 11: this.stpTab = ((System.Windows.Controls.StackPanel)(target)); return; case 12: this.TbQry = ((System.Windows.Controls.TabControl)(target)); return; case 13: this.label_TabTitle = ((System.Windows.Controls.TabItem)(target)); return; case 14: this.rbxQry = ((System.Windows.Controls.RichTextBox)(target)); #line 72 "..\..\..\UserControl\ucTabQry.xaml" this.rbxQry.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.rbxQry_MouseDown); #line default #line hidden #line 73 "..\..\..\UserControl\ucTabQry.xaml" this.rbxQry.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.rbxQry_TextChanged); #line default #line hidden return; case 15: this.btnCon_in = ((System.Windows.Controls.Button)(target)); #line 86 "..\..\..\UserControl\ucTabQry.xaml" this.btnCon_in.Click += new System.Windows.RoutedEventHandler(this.btnCon_in_Click); #line default #line hidden return; case 16: this.btnDis_in = ((System.Windows.Controls.Button)(target)); #line 89 "..\..\..\UserControl\ucTabQry.xaml" this.btnDis_in.Click += new System.Windows.RoutedEventHandler(this.btnDis_in_Click); #line default #line hidden return; case 17: this.btnCon_ig = ((System.Windows.Controls.Button)(target)); #line 94 "..\..\..\UserControl\ucTabQry.xaml" this.btnCon_ig.Click += new System.Windows.RoutedEventHandler(this.btnCon_ig_Click); #line default #line hidden return; case 18: this.btnDis_ig = ((System.Windows.Controls.Button)(target)); #line 97 "..\..\..\UserControl\ucTabQry.xaml" this.btnDis_ig.Click += new System.Windows.RoutedEventHandler(this.btnDis_ig_Click); #line default #line hidden return; case 19: this.btnCon_me = ((System.Windows.Controls.Button)(target)); #line 102 "..\..\..\UserControl\ucTabQry.xaml" this.btnCon_me.Click += new System.Windows.RoutedEventHandler(this.btnCon_me_Click); #line default #line hidden return; case 20: this.btnDis_me = ((System.Windows.Controls.Button)(target)); #line 105 "..\..\..\UserControl\ucTabQry.xaml" this.btnDis_me.Click += new System.Windows.RoutedEventHandler(this.btnDis_me_Click); #line default #line hidden return; case 21: this.btnJoin_in = ((System.Windows.Controls.Button)(target)); #line 113 "..\..\..\UserControl\ucTabQry.xaml" this.btnJoin_in.Click += new System.Windows.RoutedEventHandler(this.btnJoin_in_Click); #line default #line hidden return; case 22: this.btnJoin_ig = ((System.Windows.Controls.Button)(target)); #line 118 "..\..\..\UserControl\ucTabQry.xaml" this.btnJoin_ig.Click += new System.Windows.RoutedEventHandler(this.btnJoin_ig_Click); #line default #line hidden return; case 23: this.btnJoin_me = ((System.Windows.Controls.Button)(target)); #line 123 "..\..\..\UserControl\ucTabQry.xaml" this.btnJoin_me.Click += new System.Windows.RoutedEventHandler(this.btnJoin_me_Click); #line default #line hidden return; case 24: this.btnAnd = ((System.Windows.Controls.Button)(target)); #line 131 "..\..\..\UserControl\ucTabQry.xaml" this.btnAnd.Click += new System.Windows.RoutedEventHandler(this.btnAnd_Click); #line default #line hidden return; case 25: this.btnOr = ((System.Windows.Controls.Button)(target)); #line 136 "..\..\..\UserControl\ucTabQry.xaml" this.btnOr.Click += new System.Windows.RoutedEventHandler(this.btnOr_Click); #line default #line hidden return; case 26: this.btnUnion = ((System.Windows.Controls.Button)(target)); #line 143 "..\..\..\UserControl\ucTabQry.xaml" this.btnUnion.Click += new System.Windows.RoutedEventHandler(this.btnUnion_Click); #line default #line hidden return; case 27: this.btnInter = ((System.Windows.Controls.Button)(target)); #line 148 "..\..\..\UserControl\ucTabQry.xaml" this.btnInter.Click += new System.Windows.RoutedEventHandler(this.btnInter_Click); #line default #line hidden return; case 28: this.btnExcept = ((System.Windows.Controls.Button)(target)); #line 153 "..\..\..\UserControl\ucTabQry.xaml" this.btnExcept.Click += new System.Windows.RoutedEventHandler(this.btnExcept_Click); #line default #line hidden return; case 29: this.stpData = ((System.Windows.Controls.StackPanel)(target)); return; case 30: this.tbDtgAction = ((System.Windows.Controls.ToolBarTray)(target)); return; case 31: this.btnView = ((System.Windows.Controls.Button)(target)); return; case 32: this.btnViewMsg = ((System.Windows.Controls.Button)(target)); #line 169 "..\..\..\UserControl\ucTabQry.xaml" this.btnViewMsg.Click += new System.Windows.RoutedEventHandler(this.btnViewMsg_Click); #line default #line hidden return; case 33: this.txtMessage = ((System.Windows.Controls.TextBox)(target)); return; case 34: this.dtgDataResult = ((System.Windows.Controls.DataGrid)(target)); return; } this._contentLoaded = true; }
private static object CoerceOrientation(DependencyObject d, object value) { ToolBarTray toolBarTray = ((ToolBar)d).ToolBarTray; return((toolBarTray != null) ? toolBarTray.Orientation : value); }
public CommandListWindow() { InitializeComponent(); // Initialize DockPanel myDockPanel.LastChildFill = true; // Define the child content myTextBlock1 BorderMenu.Height = 25; BorderMenu.Background = Brushes.SkyBlue; BorderMenu.BorderThickness = new Thickness(1); DockPanel.SetDock(BorderMenu, Dock.Top); // Add barcode tray menu items ToolBarTray tbtToolBarTray = new ToolBarTray(); ToolBar tbToolBar = new ToolBar(); // Add task buttons Button btnPrintCommandList = new Button() { Content = "列印", Background = Brushes.White, Name = "btnPrint" }; btnPrintCommandList.Click += btnPrintCommandList_Click; tbToolBar.Items.Add(btnPrintCommandList); DockPanel.SetDock(tbtToolBarTray, Dock.Left); tbToolBar.Background = Brushes.Orange; tbtToolBarTray.ToolBars.Add(tbToolBar); BorderMenu.Child = tbtToolBarTray; // Loading Barcode Image (image/textblock --> stackpanel --> border ===> DockPanel ===> Window) // create image element //////////////////////////////////////////// Image iPrint1 = new Image(); iPrint1.Width = 180; BitmapImage biPrint1 = new BitmapImage(); biPrint1.BeginInit(); biPrint1.UriSource = new Uri(@"c:\888.gif"); biPrint1.DecodePixelWidth = 400; biPrint1.EndInit(); iPrint1.Source = biPrint1; TextBlock tb1 = new TextBlock(); tb1.Text = "查尋"; tb1.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp1 = new StackPanel(); sp1.Children.Add(iPrint1); sp1.Children.Add(tb1); sp1.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent1 = new Border(); bContent1.Height = 200; bContent1.Background = Brushes.White; bContent1.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent1, Dock.Top); bContent1.Child = sp1; //////////////////////////////////////////// Image iPrint2 = new Image(); iPrint2.Width = 180; BitmapImage biPrint2 = new BitmapImage(); biPrint2.BeginInit(); biPrint2.UriSource = new Uri(@"c:\888.gif"); biPrint2.DecodePixelWidth = 400; biPrint2.EndInit(); iPrint2.Source = biPrint2; TextBlock tb2 = new TextBlock(); tb2.Text = "確認"; tb2.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp2 = new StackPanel(); sp2.Children.Add(iPrint2); sp2.Children.Add(tb2); sp2.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent2 = new Border(); bContent2.Height = 200; bContent2.Background = Brushes.White; bContent2.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent2, Dock.Top); bContent2.Child = sp2; //////////////////////////////////////////// Image iPrint3 = new Image(); iPrint3.Width = 180; BitmapImage biPrint3 = new BitmapImage(); biPrint3.BeginInit(); biPrint3.UriSource = new Uri(@"c:\888.gif"); biPrint3.DecodePixelWidth = 400; biPrint3.EndInit(); iPrint3.Source = biPrint3; TextBlock tb3 = new TextBlock(); tb3.Text = "重置"; tb3.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp3 = new StackPanel(); sp3.Children.Add(iPrint3); sp3.Children.Add(tb3); sp3.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent3 = new Border(); bContent3.Height = 200; bContent3.Background = Brushes.White; bContent3.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent3, Dock.Top); bContent3.Child = sp3; //////////////////////////////////////////// Image iPrint4 = new Image(); iPrint4.Width = 180; BitmapImage biPrint4 = new BitmapImage(); biPrint4.BeginInit(); biPrint4.UriSource = new Uri(@"c:\888.gif"); biPrint4.DecodePixelWidth = 400; biPrint4.EndInit(); iPrint4.Source = biPrint4; TextBlock tb4 = new TextBlock(); tb4.Text = "解除關聯"; tb4.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp4 = new StackPanel(); sp4.Children.Add(iPrint4); sp4.Children.Add(tb4); sp4.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent4 = new Border(); bContent4.Height = 200; bContent4.Background = Brushes.White; bContent4.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent4, Dock.Top); bContent4.Child = sp4; // put all barcode images into a StackPanel StackPanel spCommands = new StackPanel(); /* spCommands.Children.Add(bContent1); spCommands.Children.Add(bContent2); spCommands.Children.Add(bContent3); spCommands.Children.Add(bContent4);*/ BorderMainBody.Background = Brushes.White; BorderMainBody.BorderBrush = Brushes.Black; BorderMainBody.BorderThickness = new Thickness(2); //BorderMainBody.CornerRadius = new CornerRadius(45); BorderMainBody.Padding = new Thickness(1); //BorderMainBody.Child = spCommands; // load all barcode images to a canvas double maxX = bContent1.Width; double maxY = bContent1.Height; Canvas.SetTop(bContent1, maxY * 0 + 15); Canvas.SetTop(bContent2, maxY * 1 + 15); Canvas.SetTop(bContent3, maxY * 2 + 15); Canvas.SetTop(bContent4, maxY * 3 + 15); canvasCommands.Children.Add(bContent1); canvasCommands.Children.Add(bContent2); canvasCommands.Children.Add(bContent3); canvasCommands.Children.Add(bContent4); BorderMainBody.Child = canvasCommands; // Add child elements to the DockPanel Children collection myDockPanel.Children.Add(BorderMenu); myDockPanel.Children.Add(BorderMainBody); // Add the parent Canvas as the Content of the Window Object //this.Content = myDockPanel; this.Content = myDockPanel; this.Width = 400 ; this.Height = 820; this.Background = Brushes.White; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.window = ((Gait.MainWindow)(target)); #line 4 "..\..\..\MainWindow.xaml" this.window.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.window_MouseWheel); #line default #line hidden return; case 2: this.menu1 = ((System.Windows.Controls.Menu)(target)); return; case 3: #line 8 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.FileOpen_Click); #line default #line hidden return; case 4: #line 13 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Save_Click); #line default #line hidden return; case 5: #line 18 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveOne_Click); #line default #line hidden return; case 6: #line 23 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveAll_Click); #line default #line hidden return; case 7: #line 28 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Exit_Click); #line default #line hidden return; case 8: #line 35 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.PlayMenu_Click); #line default #line hidden return; case 9: #line 40 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Pause_Click); #line default #line hidden return; case 10: #line 45 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Stop_Click); #line default #line hidden return; case 11: #line 50 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Pre_Click); #line default #line hidden return; case 12: #line 55 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Right_Click); #line default #line hidden return; case 13: #line 60 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Goto_Click); #line default #line hidden return; case 14: #line 67 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Pressure_Click); #line default #line hidden return; case 15: #line 72 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Area_Click); #line default #line hidden return; case 16: #line 77 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MaxPressure_Click); #line default #line hidden return; case 17: #line 91 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Help_Clicked); #line default #line hidden return; case 18: #line 96 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.About_Click); #line default #line hidden return; case 19: this.toolBarTray1 = ((System.Windows.Controls.ToolBarTray)(target)); return; case 20: #line 105 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.FileOpen_Click); #line default #line hidden return; case 21: #line 108 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Save_Click); #line default #line hidden return; case 22: #line 111 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveOne_Click); #line default #line hidden return; case 23: #line 114 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveAll_Click); #line default #line hidden return; case 24: #line 117 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Exit_Click); #line default #line hidden return; case 25: #line 122 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Play_Click); #line default #line hidden return; case 26: this.playButton = ((System.Windows.Controls.Image)(target)); return; case 27: #line 125 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Stop_Click); #line default #line hidden return; case 28: #line 128 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Pre_Click); #line default #line hidden return; case 29: #line 131 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Right_Click); #line default #line hidden return; case 30: #line 134 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Goto_Click); #line default #line hidden return; case 31: this.button1 = ((System.Windows.Controls.Button)(target)); #line 139 "..\..\..\MainWindow.xaml" this.button1.Click += new System.Windows.RoutedEventHandler(this.Pressure_Click); #line default #line hidden return; case 32: this.button2 = ((System.Windows.Controls.Button)(target)); #line 142 "..\..\..\MainWindow.xaml" this.button2.Click += new System.Windows.RoutedEventHandler(this.Area_Click); #line default #line hidden return; case 33: this.button3 = ((System.Windows.Controls.Button)(target)); #line 145 "..\..\..\MainWindow.xaml" this.button3.Click += new System.Windows.RoutedEventHandler(this.MaxPressure_Click); #line default #line hidden return; case 34: #line 150 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.SelectRegion_Click); #line default #line hidden return; case 35: #line 153 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.LeftRight_Clicked); #line default #line hidden return; case 36: #line 156 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.UpDown_Clicked); #line default #line hidden return; case 37: #line 161 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Setting_Clicked); #line default #line hidden return; case 38: #line 164 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Help_Clicked); #line default #line hidden return; case 39: #line 167 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.About_Click); #line default #line hidden return; case 40: this.label1 = ((System.Windows.Controls.Label)(target)); return; case 41: this.scrollViewer1 = ((System.Windows.Controls.ScrollViewer)(target)); return; case 42: this.canvas1 = ((System.Windows.Controls.Canvas)(target)); #line 174 "..\..\..\MainWindow.xaml" this.canvas1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.StateChange); #line default #line hidden return; case 43: this.canvas2 = ((System.Windows.Controls.Canvas)(target)); return; case 44: this.label2 = ((System.Windows.Controls.Label)(target)); return; case 45: this.label3 = ((System.Windows.Controls.Label)(target)); return; case 46: this.scrollViewer2 = ((System.Windows.Controls.ScrollViewer)(target)); return; case 47: this.canvas3 = ((System.Windows.Controls.Canvas)(target)); return; case 48: this.scrollViewer3 = ((System.Windows.Controls.ScrollViewer)(target)); return; case 49: this.canvas4 = ((System.Windows.Controls.Canvas)(target)); return; case 50: this.image1 = ((System.Windows.Controls.Image)(target)); return; case 51: this.label4 = ((System.Windows.Controls.Label)(target)); return; case 52: this.label5 = ((System.Windows.Controls.Label)(target)); return; case 53: this.label6 = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\MainWindow.xaml" ((PasswordManager.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 7 "..\..\MainWindow.xaml" ((PasswordManager.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden #line 12 "..\..\MainWindow.xaml" ((PasswordManager.MainWindow)(target)).MouseMove += new System.Windows.Input.MouseEventHandler(this.Window_MouseMove); #line default #line hidden return; case 2: #line 24 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 24 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 3: #line 25 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 25 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 4: #line 26 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 26 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 5: #line 27 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 27 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 6: #line 28 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 28 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 7: #line 29 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 29 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 8: #line 30 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 30 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 9: #line 31 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 31 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 10: #line 32 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 32 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 11: #line 33 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 33 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 12: #line 34 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 34 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 13: #line 35 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 35 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 14: #line 36 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 36 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 15: #line 37 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 37 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 16: #line 38 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 38 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 17: #line 39 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 39 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 18: #line 40 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 40 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 19: #line 41 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 41 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 20: #line 42 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 42 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 21: #line 43 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 43 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 22: #line 44 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 44 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 23: #line 45 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Command_CanExecute); #line default #line hidden #line 45 "..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Executed); #line default #line hidden return; case 24: this.gridLock = ((System.Windows.Controls.Grid)(target)); return; case 25: #line 49 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonVerifyPassword_Click); #line default #line hidden return; case 26: this.gridMain = ((System.Windows.Controls.Grid)(target)); return; case 27: this.grid = ((System.Windows.Controls.Grid)(target)); return; case 28: this.menuItemShowLoginColumn = ((System.Windows.Controls.MenuItem)(target)); return; case 29: this.menuItemShowPasswordColumn = ((System.Windows.Controls.MenuItem)(target)); return; case 30: this.menuItemShowToolbar = ((System.Windows.Controls.MenuItem)(target)); return; case 31: this.toolbarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 32: this.buttonToggleShow = ((System.Windows.Controls.Button)(target)); return; case 33: this.imageToggleShow = ((System.Windows.Controls.Image)(target)); return; case 34: this.textBoxFilter = ((System.Windows.Controls.TextBox)(target)); #line 179 "..\..\MainWindow.xaml" this.textBoxFilter.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBoxFilter_TextChanged); #line default #line hidden return; case 35: this.textBlockStatus = ((System.Windows.Controls.TextBlock)(target)); return; case 36: this.listView = ((System.Windows.Controls.ListView)(target)); #line 190 "..\..\MainWindow.xaml" this.listView.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ListView_MouseDoubleClick); #line default #line hidden #line 190 "..\..\MainWindow.xaml" this.listView.ContextMenuOpening += new System.Windows.Controls.ContextMenuEventHandler(this.ListView_ContextMenuOpening); #line default #line hidden #line 190 "..\..\MainWindow.xaml" this.listView.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListView_SelectionChanged); #line default #line hidden return; case 37: this.gridViewColumnLogin = ((System.Windows.Controls.GridViewColumn)(target)); return; case 38: this.gridViewColumnPassword = ((System.Windows.Controls.GridViewColumn)(target)); return; case 39: this.listViewToggleShowPassword = ((System.Windows.Controls.MenuItem)(target)); return; } this._contentLoaded = true; }
public MainWindow() { InitializeComponent(); // Initialize DockPanel DockPanel myDockPanel = new DockPanel(); myDockPanel.LastChildFill = true; // Define the child content myTextBlock1 Border BorderMenu = new Border(); BorderMenu.Height = 25; BorderMenu.Background = Brushes.SkyBlue; BorderMenu.BorderThickness = new Thickness(1); DockPanel.SetDock(BorderMenu, Dock.Top); // Add barcode tray menu items ToolBarTray tbtToolBarTray = new ToolBarTray(); ToolBar tbToolBar = new ToolBar(); // Add task buttons Button btnPrinterSetup = new Button() { Content = "列表機設定", Background = Brushes.White, Name = "btnPrinterSetting" }; btnPrinterSetup.Click += btnPrinterSetup_click; tbToolBar.Items.Add(btnPrinterSetup); Button btnPrintCommand = new Button() { Content = "列印指令", Background = Brushes.White, Name = "btnPrintCommand" }; btnPrintCommand.Click += btnPrintCommand_click; tbToolBar.Items.Add(btnPrintCommand); Button btnPreOperation = new Button() { Content = "前置作業", Background = Brushes.White, Name = "btnPreOperation" }; btnPreOperation.Click += btnPreOperation_click; tbToolBar.Items.Add(btnPreOperation); Button btnPcbaCopy = new Button() { Content = "列印PCB條碼", Background = Brushes.White, Name = "btnPcbaCopy" }; btnPcbaCopy.Click += btnPcbaCopy_click; tbToolBar.Items.Add(btnPcbaCopy); //Button btnAssociation = new Button() { Content = "序號關聯", Background = Brushes.White, Name = "btnAssociation" }; //btnAssociation.Click += btnAssociation_click; //tbToolBar.Items.Add(btnAssociation); Button btnPackaging = new Button() { Content = "列印包裝條碼", Background = Brushes.White, Name = "btnPackaging" }; btnPackaging.Click += btnPackaging_click; tbToolBar.Items.Add(btnPackaging); DockPanel.SetDock(tbtToolBarTray, Dock.Left); tbToolBar.Background = Brushes.Orange; tbtToolBarTray.ToolBars.Add(tbToolBar); BorderMenu.Child = tbtToolBarTray; Border BorderMainBody = new Border(); BorderMainBody.Background = Brushes.White; BorderMainBody.BorderBrush = Brushes.Black; BorderMainBody.BorderThickness = new Thickness(2); //BorderMainBody.CornerRadius = new CornerRadius(45); BorderMainBody.Padding = new Thickness(1); // Add child elements to the DockPanel Children collection myDockPanel.Children.Add(BorderMenu); // myDockPanel.Children.Add(myBorder2); myDockPanel.Children.Add(BorderMainBody); // Add the parent Canvas as the Content of the Window Object this.Content = myDockPanel; //Utils.OKBeep(); Utils.ErrorBeep(); //Utils.ErrorBeep(); }
void AddCharToolBar(ToolBarTray tray, int band, int index) { ToolBar toolbar = new ToolBar(); toolbar.Band = band; toolbar.BandIndex = index; tray.ToolBars.Add(toolbar); comboFamily = new ComboBox(); comboFamily.Width = 144; comboFamily.ItemsSource = Fonts.SystemFontFamilies; comboFamily.SelectedItem = txtbox.FontFamily; comboFamily.SelectionChanged += FamilyComboOnSelection; toolbar.Items.Add(comboFamily); ToolTip tip = new ToolTip(); tip.Content = "Font Family"; comboFamily.ToolTip = tip; comboSize = new ComboBox(); comboSize.Width = 48; comboSize.IsEditable = true; comboSize.Text = (0.75 * txtbox.FontSize).ToString(); comboSize.ItemsSource = new double [] { 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72 }; comboSize.SelectionChanged += SizeComboOnSelection; comboSize.GotKeyboardFocus += SizeComboOnGotFocus; comboSize.LostKeyboardFocus += SizeComboOnLostFocus; comboSize.PreviewKeyDown += SizeComboOnKeyDown; toolbar.Items.Add(comboSize); tip = new ToolTip(); tip.Content = "Font Size"; comboSize.ToolTip = tip; btnBold = new ToggleButton(); btnBold.Checked += BoldButtonOnChecked; btnBold.Unchecked += BoldButtonOnChecked; toolbar.Items.Add(btnBold); string fileName = Path.Combine(Directory.GetCurrentDirectory(), "BoldHS.png"); Image img = new Image(); img.Source = new BitmapImage(new Uri(fileName)); img.Stretch = Stretch.None; btnBold.Content = img; tip = new ToolTip(); tip.Content = "Bold"; btnBold.ToolTip = tip; btnItalic = new ToggleButton(); btnItalic.Checked += ItalicButtonOnChecked; btnItalic.Unchecked += ItalicButtonOnChecked; toolbar.Items.Add(btnItalic); fileName = Path.Combine(Directory.GetCurrentDirectory(), "ItalicHS.png"); img = new Image(); img.Stretch = Stretch.None; btnItalic.Content = img; tip = new ToolTip(); tip.Content = "Italic"; btnItalic.ToolTip = tip; toolbar.Items.Add(new Separator()); Menu menu = new Menu(); toolbar.Items.Add(menu); MenuItem item = new MenuItem(); menu.Items.Add(item); fileName = Path.Combine(Directory.GetCurrentDirectory(), "ColorHS.png"); img = new Image(); img.Source = new BitmapImage(new Uri(fileName)); img.Stretch = Stretch.None; item.Header = img; clrboxBackground = new ColorGridBox(); clrboxBackground.SelectionChanged += BackgroundOnSelectionChanged; item.Items.Add(clrboxBackground); tip = new ToolTip(); tip.Content = "Background Color"; item.ToolTip = tip; item = new MenuItem(); menu.Items.Add(item); fileName = Path.Combine(Directory.GetCurrentDirectory(), "Color_FontHS.png"); img = new Image(); img.Source = new BitmapImage(new Uri(fileName)); img.Stretch = Stretch.None; item.Header = img; clrboxForeground = new ColorGridBox(); clrboxForeground.SelectionChanged += ForegroundOnSelectionChanged; item.Items.Add(clrboxForeground); tip = new ToolTip(); tip.Content = "Foreground Color"; item.ToolTip = tip; txtbox.SelectionChanged += TextBoxOnSelectionChanged; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ucModules = ((VMukti.Presentation.Controls.CtlBuddies)(target)); return; case 2: this.grdMain = ((System.Windows.Controls.Grid)(target)); return; case 3: this.colDef1 = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 4: this.rowDef1 = ((System.Windows.Controls.RowDefinition)(target)); return; case 5: this.rowDef2 = ((System.Windows.Controls.RowDefinition)(target)); return; case 6: this.rowDef3 = ((System.Windows.Controls.RowDefinition)(target)); return; case 7: this.rowDef4 = ((System.Windows.Controls.RowDefinition)(target)); return; case 8: this.brdMainGlass1 = ((System.Windows.Controls.Border)(target)); return; case 9: this.cnvMain = ((System.Windows.Controls.Canvas)(target)); return; case 10: this.tblkTitle = ((System.Windows.Controls.TextBlock)(target)); return; case 11: this.btnClose = ((System.Windows.Controls.Button)(target)); return; case 12: this.btnFloting1 = ((System.Windows.Controls.Button)(target)); return; case 13: this.cnvImage = ((System.Windows.Controls.Canvas)(target)); return; case 14: this.cnvFind = ((System.Windows.Controls.Canvas)(target)); return; case 15: this.txtAddBuddies = ((System.Windows.Controls.TextBox)(target)); return; case 16: this.btnFind = ((System.Windows.Controls.Button)(target)); return; case 17: this.btnAdd = ((System.Windows.Controls.Button)(target)); return; case 18: this.tbtWidgets = ((System.Windows.Controls.ToolBarTray)(target)); return; case 19: this.tbWidgets = ((System.Windows.Controls.ToolBar)(target)); return; case 20: this.spContent = ((System.Windows.Controls.StackPanel)(target)); return; case 21: this.objExpConBuddies = ((VMukti.Presentation.Controls.CtlExpanderContent)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControlScaleXY = ((System.Windows.Media.ScaleTransform)(target)); return; case 2: this.UserControlXY = ((System.Windows.Media.TranslateTransform)(target)); return; case 3: this.controlBorder = ((System.Windows.Controls.Border)(target)); return; case 4: this.Grid0 = ((System.Windows.Controls.Grid)(target)); return; case 5: this.Grid1 = ((System.Windows.Controls.Grid)(target)); return; case 6: this.spGates = ((GatesWpf.GateSelector)(target)); return; case 7: this.gateCanvas = ((GatesWpf.GateCanvas)(target)); return; case 8: this.spZoom = ((System.Windows.Controls.StackPanel)(target)); return; case 9: this.slZoom = ((System.Windows.Controls.Slider)(target)); #line 59 "..\..\DiagramRepresentation.xaml" this.slZoom.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.slZoom_ValueChanged); #line default #line hidden return; case 10: this.btnActualSize = ((System.Windows.Controls.Button)(target)); #line 62 "..\..\DiagramRepresentation.xaml" this.btnActualSize.Click += new System.Windows.RoutedEventHandler(this.btnActualSize_Click); #line default #line hidden return; case 11: this.btnFitToScreen = ((System.Windows.Controls.Button)(target)); #line 65 "..\..\DiagramRepresentation.xaml" this.btnFitToScreen.Click += new System.Windows.RoutedEventHandler(this.btnFitToScreen_Click); #line default #line hidden return; case 12: this.spSpeed = ((System.Windows.Controls.StackPanel)(target)); return; case 13: this.slSpeed = ((System.Windows.Controls.Slider)(target)); return; case 14: this.myToolbarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 15: this.tbFile = ((System.Windows.Controls.ToolBar)(target)); return; case 16: this.btnSave = ((System.Windows.Controls.Button)(target)); return; case 17: this.tbEdit = ((System.Windows.Controls.ToolBar)(target)); return; case 18: this.btnCut = ((System.Windows.Controls.Button)(target)); #line 93 "..\..\DiagramRepresentation.xaml" this.btnCut.Click += new System.Windows.RoutedEventHandler(this.btnCut_Click); #line default #line hidden return; case 19: this.btnCopy = ((System.Windows.Controls.Button)(target)); #line 96 "..\..\DiagramRepresentation.xaml" this.btnCopy.Click += new System.Windows.RoutedEventHandler(this.btnCopy_Click); #line default #line hidden return; case 20: this.btnCopyAsImage = ((System.Windows.Controls.Button)(target)); #line 99 "..\..\DiagramRepresentation.xaml" this.btnCopyAsImage.Click += new System.Windows.RoutedEventHandler(this.btnCopyAsImage_Click); #line default #line hidden return; case 21: this.btnPaste = ((System.Windows.Controls.Button)(target)); #line 102 "..\..\DiagramRepresentation.xaml" this.btnPaste.Click += new System.Windows.RoutedEventHandler(this.btnPaste_Click); #line default #line hidden return; case 22: this.btnFlatten = ((System.Windows.Controls.Button)(target)); #line 105 "..\..\DiagramRepresentation.xaml" this.btnFlatten.Click += new System.Windows.RoutedEventHandler(this.btnFlatten_Click); #line default #line hidden return; case 23: this.btnAlignTopLeft = ((System.Windows.Controls.Button)(target)); #line 108 "..\..\DiagramRepresentation.xaml" this.btnAlignTopLeft.Click += new System.Windows.RoutedEventHandler(this.btnAlignTopLeft_Click); #line default #line hidden return; case 24: this.btnShowHideToolbars = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 111 "..\..\DiagramRepresentation.xaml" this.btnShowHideToolbars.Checked += new System.Windows.RoutedEventHandler(this.btnShowHideToolbars_Checked); #line default #line hidden #line 111 "..\..\DiagramRepresentation.xaml" this.btnShowHideToolbars.Unchecked += new System.Windows.RoutedEventHandler(this.btnShowHideToolbars_Unchecked); #line default #line hidden return; case 25: this.tbPrinting = ((System.Windows.Controls.ToolBar)(target)); return; case 26: this.btnPrint = ((System.Windows.Controls.Button)(target)); #line 117 "..\..\DiagramRepresentation.xaml" this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.btnPrint_Click); #line default #line hidden return; case 27: this.btnSaveAsImage = ((System.Windows.Controls.Button)(target)); #line 121 "..\..\DiagramRepresentation.xaml" this.btnSaveAsImage.Click += new System.Windows.RoutedEventHandler(this.btnSaveAsImage_Click); #line default #line hidden return; case 28: this.btnChart = ((System.Windows.Controls.Button)(target)); #line 125 "..\..\DiagramRepresentation.xaml" this.btnChart.Click += new System.Windows.RoutedEventHandler(this.btnChart_Click); #line default #line hidden return; case 29: this.tbUndo = ((System.Windows.Controls.ToolBar)(target)); return; case 30: this.btnUndo = ((System.Windows.Controls.Button)(target)); #line 141 "..\..\DiagramRepresentation.xaml" this.btnUndo.Click += new System.Windows.RoutedEventHandler(this.btnUndo_Click); #line default #line hidden return; case 31: this.btnRedo = ((System.Windows.Controls.Button)(target)); #line 144 "..\..\DiagramRepresentation.xaml" this.btnRedo.Click += new System.Windows.RoutedEventHandler(this.btnRedo_Click); #line default #line hidden return; case 32: this.tbIC = ((System.Windows.Controls.ToolBar)(target)); return; case 33: #line 150 "..\..\DiagramRepresentation.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnCreateIC_Click); #line default #line hidden return; case 34: #line 153 "..\..\DiagramRepresentation.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnImportIC_Click); #line default #line hidden return; case 35: this.spAppInfo = ((System.Windows.Controls.StackPanel)(target)); return; case 36: this.lblAppTitle = ((System.Windows.Controls.TextBlock)(target)); return; case 37: this.lblAppVersion = ((System.Windows.Controls.TextBlock)(target)); return; case 38: this.lblAppCopyright = ((System.Windows.Controls.TextBlock)(target)); return; case 39: this.lblLink = ((System.Windows.Controls.TextBlock)(target)); return; case 40: #line 164 "..\..\DiagramRepresentation.xaml" ((System.Windows.Documents.Hyperlink)(target)).RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.Hyperlink_RequestNavigate); #line default #line hidden return; case 41: this.lblInfoLine = ((System.Windows.Controls.TextBlock)(target)); return; case 42: this.adornerLayer = ((System.Windows.Controls.Canvas)(target)); return; case 43: this.controlRegion = ((System.Windows.Controls.StackPanel)(target)); return; case 44: this.btnCancel = ((System.Windows.Controls.Button)(target)); return; case 45: this.btnTransform = ((System.Windows.Controls.Button)(target)); return; case 46: this.btnScale = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
// Allow the tool window to create the toolbar tray. Set its style and // add it to the grid. public void SetTray(ToolBarTray tray) { tray.Style = FindResource("ToolBarTrayStyle") as Style; grid.Children.Add(tray); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 4 "..\..\MainWindow.xaml" ((Paint.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden #line 4 "..\..\MainWindow.xaml" ((Paint.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.DrawingGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.mnuMain = ((System.Windows.Controls.Menu)(target)); return; case 4: this.mnuNew = ((System.Windows.Controls.MenuItem)(target)); #line 8 "..\..\MainWindow.xaml" this.mnuNew.Click += new System.Windows.RoutedEventHandler(this.mnuNew_Click); #line default #line hidden return; case 5: this.mnuSave = ((System.Windows.Controls.MenuItem)(target)); #line 9 "..\..\MainWindow.xaml" this.mnuSave.Click += new System.Windows.RoutedEventHandler(this.mnuSave_Click); #line default #line hidden return; case 6: this.mnuExit = ((System.Windows.Controls.MenuItem)(target)); #line 10 "..\..\MainWindow.xaml" this.mnuExit.Click += new System.Windows.RoutedEventHandler(this.mnuExit_Click); #line default #line hidden return; case 7: this.mnuView = ((System.Windows.Controls.MenuItem)(target)); return; case 8: this.mnuToolBox = ((System.Windows.Controls.MenuItem)(target)); #line 13 "..\..\MainWindow.xaml" this.mnuToolBox.Click += new System.Windows.RoutedEventHandler(this.mnuToolBox_Click); #line default #line hidden return; case 9: this.mnuStatusBar = ((System.Windows.Controls.MenuItem)(target)); #line 14 "..\..\MainWindow.xaml" this.mnuStatusBar.Click += new System.Windows.RoutedEventHandler(this.mnuStatusBar_Click); #line default #line hidden return; case 10: this.mnuImage = ((System.Windows.Controls.MenuItem)(target)); return; case 11: this.mnuFlipV = ((System.Windows.Controls.MenuItem)(target)); #line 18 "..\..\MainWindow.xaml" this.mnuFlipV.Click += new System.Windows.RoutedEventHandler(this.mnuFlipV_Click); #line default #line hidden return; case 12: this.mnuFlipH = ((System.Windows.Controls.MenuItem)(target)); #line 19 "..\..\MainWindow.xaml" this.mnuFlipH.Click += new System.Windows.RoutedEventHandler(this.mnuFlipH_Click); #line default #line hidden return; case 13: this.mnuRotate90 = ((System.Windows.Controls.MenuItem)(target)); #line 20 "..\..\MainWindow.xaml" this.mnuRotate90.Click += new System.Windows.RoutedEventHandler(this.mnuRotate90_Click); #line default #line hidden return; case 14: this.mnuStretch = ((System.Windows.Controls.MenuItem)(target)); #line 21 "..\..\MainWindow.xaml" this.mnuStretch.Click += new System.Windows.RoutedEventHandler(this.mnuStretch_Click); #line default #line hidden return; case 15: this.mnuSkew = ((System.Windows.Controls.MenuItem)(target)); #line 22 "..\..\MainWindow.xaml" this.mnuSkew.Click += new System.Windows.RoutedEventHandler(this.mnuSkew_Click); #line default #line hidden return; case 16: this.toolBox = ((System.Windows.Controls.ToolBarTray)(target)); return; case 17: this.ToolBar = ((System.Windows.Controls.ToolBar)(target)); return; case 18: this.btnPointer = ((System.Windows.Controls.Button)(target)); #line 42 "..\..\MainWindow.xaml" this.btnPointer.Click += new System.Windows.RoutedEventHandler(this.btnPointer_Click); #line default #line hidden return; case 19: this.btnSelect = ((System.Windows.Controls.Button)(target)); #line 47 "..\..\MainWindow.xaml" this.btnSelect.Click += new System.Windows.RoutedEventHandler(this.btnSelect_Click); #line default #line hidden return; case 20: this.btnBrush = ((System.Windows.Controls.Button)(target)); #line 52 "..\..\MainWindow.xaml" this.btnBrush.Click += new System.Windows.RoutedEventHandler(this.btnBrush_Click); #line default #line hidden return; case 21: this.btnPencil = ((System.Windows.Controls.Button)(target)); #line 57 "..\..\MainWindow.xaml" this.btnPencil.Click += new System.Windows.RoutedEventHandler(this.btnPencil_Click); #line default #line hidden return; case 22: this.btnSquare = ((System.Windows.Controls.Button)(target)); #line 62 "..\..\MainWindow.xaml" this.btnSquare.Click += new System.Windows.RoutedEventHandler(this.btnSquare_Click); #line default #line hidden return; case 23: this.btnEllipse = ((System.Windows.Controls.Button)(target)); #line 67 "..\..\MainWindow.xaml" this.btnEllipse.Click += new System.Windows.RoutedEventHandler(this.btnEllipse_Click); #line default #line hidden return; case 24: this.btnLine = ((System.Windows.Controls.Button)(target)); #line 72 "..\..\MainWindow.xaml" this.btnLine.Click += new System.Windows.RoutedEventHandler(this.btnLine_Click); #line default #line hidden return; case 25: this.btnBezier = ((System.Windows.Controls.Button)(target)); #line 77 "..\..\MainWindow.xaml" this.btnBezier.Click += new System.Windows.RoutedEventHandler(this.btnBezier_Click); #line default #line hidden return; case 26: this.btnPolygon = ((System.Windows.Controls.Button)(target)); #line 82 "..\..\MainWindow.xaml" this.btnPolygon.Click += new System.Windows.RoutedEventHandler(this.btnPolygon_Click); #line default #line hidden return; case 27: this.btnText = ((System.Windows.Controls.Button)(target)); #line 87 "..\..\MainWindow.xaml" this.btnText.Click += new System.Windows.RoutedEventHandler(this.btnText_Click); #line default #line hidden return; case 28: this.btnErase = ((System.Windows.Controls.Button)(target)); #line 92 "..\..\MainWindow.xaml" this.btnErase.Click += new System.Windows.RoutedEventHandler(this.btnEraser_Click); #line default #line hidden return; case 29: this.ToolSizeExpander = ((System.Windows.Controls.ComboBox)(target)); return; case 30: this.size2Ellipse = ((System.Windows.Controls.Grid)(target)); #line 98 "..\..\MainWindow.xaml" this.size2Ellipse.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.size2Ellipse_MouseLeftButtonDown); #line default #line hidden return; case 31: this.size5Ellipse = ((System.Windows.Controls.Grid)(target)); #line 101 "..\..\MainWindow.xaml" this.size5Ellipse.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.size5Ellipse_MouseLeftButtonDown); #line default #line hidden return; case 32: this.size7Ellipse = ((System.Windows.Controls.Grid)(target)); #line 104 "..\..\MainWindow.xaml" this.size7Ellipse.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.size7Ellipse_MouseLeftButtonDown); #line default #line hidden return; case 33: this.size10Ellipse = ((System.Windows.Controls.Grid)(target)); #line 107 "..\..\MainWindow.xaml" this.size10Ellipse.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.size10Ellipse_MouseLeftButtonDown); #line default #line hidden return; case 34: this.size15Ellipse = ((System.Windows.Controls.Grid)(target)); #line 110 "..\..\MainWindow.xaml" this.size15Ellipse.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.size15Ellipse_MouseLeftButtonDown); #line default #line hidden return; case 35: this.size20Ellipse = ((System.Windows.Controls.Grid)(target)); #line 113 "..\..\MainWindow.xaml" this.size20Ellipse.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.size20Ellipse_MouseLeftButtonDown); #line default #line hidden return; case 36: this.TextSizeChooser = ((System.Windows.Controls.ComboBox)(target)); #line 126 "..\..\MainWindow.xaml" this.TextSizeChooser.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TextSizeChooser_SelectionChanged); #line default #line hidden return; case 37: this.TextFontChooser = ((System.Windows.Controls.ComboBox)(target)); return; case 38: this.btnBold = ((System.Windows.Controls.Button)(target)); #line 142 "..\..\MainWindow.xaml" this.btnBold.Click += new System.Windows.RoutedEventHandler(this.btnBold_Click); #line default #line hidden return; case 39: this.btnItalic = ((System.Windows.Controls.Button)(target)); #line 143 "..\..\MainWindow.xaml" this.btnItalic.Click += new System.Windows.RoutedEventHandler(this.btnItalic_Click); #line default #line hidden return; case 40: this.btnUnderline = ((System.Windows.Controls.Button)(target)); #line 144 "..\..\MainWindow.xaml" this.btnUnderline.Click += new System.Windows.RoutedEventHandler(this.btnUnderline_Click); #line default #line hidden return; case 41: this.fillCheckBox = ((System.Windows.Controls.CheckBox)(target)); #line 158 "..\..\MainWindow.xaml" this.fillCheckBox.Checked += new System.Windows.RoutedEventHandler(this.fillCheckBox_Checked); #line default #line hidden #line 158 "..\..\MainWindow.xaml" this.fillCheckBox.Unchecked += new System.Windows.RoutedEventHandler(this.fillCheckBox_Checked); #line default #line hidden return; case 42: this.btnToolColor = ((System.Windows.Controls.Button)(target)); #line 159 "..\..\MainWindow.xaml" this.btnToolColor.Click += new System.Windows.RoutedEventHandler(this.btnToolColor_Click); #line default #line hidden return; case 43: this.ToolColor = ((System.Windows.Shapes.Rectangle)(target)); return; case 44: this.btnFillColor = ((System.Windows.Controls.Button)(target)); #line 162 "..\..\MainWindow.xaml" this.btnFillColor.Click += new System.Windows.RoutedEventHandler(this.btnFillColor_LeftClick); #line default #line hidden return; case 45: this.FillColor = ((System.Windows.Shapes.Rectangle)(target)); return; case 46: this.btnTextColor = ((System.Windows.Controls.Button)(target)); #line 165 "..\..\MainWindow.xaml" this.btnTextColor.Click += new System.Windows.RoutedEventHandler(this.btnTextColor_Click); #line default #line hidden return; case 47: this.TextColor = ((System.Windows.Controls.TextBlock)(target)); return; case 48: this.ColorRectangle = ((System.Windows.Shapes.Rectangle)(target)); #line 169 "..\..\MainWindow.xaml" this.ColorRectangle.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ColorChooser_MouseLeftButtonDown); #line default #line hidden #line 169 "..\..\MainWindow.xaml" this.ColorRectangle.MouseMove += new System.Windows.Input.MouseEventHandler(this.ColorRectangle_MouseMove); #line default #line hidden return; case 49: this.ColorGrad = ((System.Windows.Media.LinearGradientBrush)(target)); return; case 50: this.DrawingCanvas = ((System.Windows.Controls.Canvas)(target)); #line 187 "..\..\MainWindow.xaml" this.DrawingCanvas.MouseMove += new System.Windows.Input.MouseEventHandler(this.Canvas_RectMouseMove); #line default #line hidden #line 187 "..\..\MainWindow.xaml" this.DrawingCanvas.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Canvas_RectClick); #line default #line hidden return; case 51: this.InputBox = ((System.Windows.Controls.Grid)(target)); return; case 52: this.InputTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 53: this.YesButton = ((System.Windows.Controls.Button)(target)); #line 198 "..\..\MainWindow.xaml" this.YesButton.Click += new System.Windows.RoutedEventHandler(this.SubmitButton_Click); #line default #line hidden return; case 54: this.NoButton = ((System.Windows.Controls.Button)(target)); #line 199 "..\..\MainWindow.xaml" this.NoButton.Click += new System.Windows.RoutedEventHandler(this.CancelButton_Click); #line default #line hidden return; case 55: this.statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target)); return; case 56: this.lblCursorPosition = ((System.Windows.Controls.TextBlock)(target)); return; case 57: this.lblCurrentTool = ((System.Windows.Controls.TextBlock)(target)); return; case 58: this.lblCurrentColor = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainGrid = ((System.Windows.Controls.Grid)(target)); return; case 2: this.TopMenu = ((System.Windows.Controls.Menu)(target)); return; case 3: this.menuNew = ((System.Windows.Controls.MenuItem)(target)); return; case 4: this.menuNewGrid = ((System.Windows.Controls.MenuItem)(target)); #line 16 "..\..\..\MainWindow.xaml" this.menuNewGrid.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 5: this.menuNewBlank = ((System.Windows.Controls.MenuItem)(target)); #line 17 "..\..\..\MainWindow.xaml" this.menuNewBlank.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 6: this.menuNewImageBkgnd = ((System.Windows.Controls.MenuItem)(target)); #line 18 "..\..\..\MainWindow.xaml" this.menuNewImageBkgnd.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 7: this.menuSave = ((System.Windows.Controls.MenuItem)(target)); #line 22 "..\..\..\MainWindow.xaml" this.menuSave.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 8: this.menuSaveAs = ((System.Windows.Controls.MenuItem)(target)); #line 24 "..\..\..\MainWindow.xaml" this.menuSaveAs.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 9: this.menuLoad = ((System.Windows.Controls.MenuItem)(target)); #line 26 "..\..\..\MainWindow.xaml" this.menuLoad.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 10: this.menuQuit = ((System.Windows.Controls.MenuItem)(target)); #line 28 "..\..\..\MainWindow.xaml" this.menuQuit.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 11: this.itemToolbar = ((System.Windows.Controls.ToolBarTray)(target)); return; case 12: this.NewFileTB = ((System.Windows.Controls.Button)(target)); #line 36 "..\..\..\MainWindow.xaml" this.NewFileTB.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 13: this.SaveFileTB = ((System.Windows.Controls.Button)(target)); #line 39 "..\..\..\MainWindow.xaml" this.SaveFileTB.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 14: this.BlackPen = ((System.Windows.Controls.Button)(target)); #line 42 "..\..\..\MainWindow.xaml" this.BlackPen.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 15: this.pointErase = ((System.Windows.Controls.MenuItem)(target)); #line 49 "..\..\..\MainWindow.xaml" this.pointErase.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 16: this.strokeErase = ((System.Windows.Controls.MenuItem)(target)); #line 54 "..\..\..\MainWindow.xaml" this.strokeErase.Click += new System.Windows.RoutedEventHandler(this.menuOptionClick); #line default #line hidden return; case 17: this.LassonTB = ((System.Windows.Controls.Button)(target)); #line 61 "..\..\..\MainWindow.xaml" this.LassonTB.Click += new System.Windows.RoutedEventHandler(this.lassoButton_Click); #line default #line hidden return; case 18: this.mainDrawingCanvas = ((System.Windows.Controls.InkCanvas)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.toolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 2: this.toolBar1 = ((System.Windows.Controls.ToolBar)(target)); return; case 3: this.boldButton = ((System.Windows.Controls.Button)(target)); #line 12 "..\..\MainWindow.xaml" this.boldButton.Click += new System.Windows.RoutedEventHandler(this.boldButton_Click); #line default #line hidden return; case 4: this.italicButton = ((System.Windows.Controls.Button)(target)); #line 15 "..\..\MainWindow.xaml" this.italicButton.Click += new System.Windows.RoutedEventHandler(this.italicButton_Click); #line default #line hidden return; case 5: this.underlineButton = ((System.Windows.Controls.Button)(target)); #line 18 "..\..\MainWindow.xaml" this.underlineButton.Click += new System.Windows.RoutedEventHandler(this.underlineButton_Click); #line default #line hidden return; case 6: this.clearButton = ((System.Windows.Controls.Button)(target)); #line 21 "..\..\MainWindow.xaml" this.clearButton.Click += new System.Windows.RoutedEventHandler(this.clearButton_Click); #line default #line hidden return; case 7: this.toolBar2 = ((System.Windows.Controls.ToolBar)(target)); return; case 8: this.fontSizeComboBox = ((System.Windows.Controls.ComboBox)(target)); #line 27 "..\..\MainWindow.xaml" this.fontSizeComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.fontSizeComboBox_SelectionChanged); #line default #line hidden return; case 9: this.toolBar3 = ((System.Windows.Controls.ToolBar)(target)); return; case 10: this.colorComboBox = ((System.Windows.Controls.ComboBox)(target)); #line 47 "..\..\MainWindow.xaml" this.colorComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.colorComboBox_SelectionChanged); #line default #line hidden return; case 11: this.startTexBox = ((System.Windows.Controls.TextBox)(target)); #line 94 "..\..\MainWindow.xaml" this.startTexBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.startTexBox_TextChanged); #line default #line hidden return; case 12: this.endTexBox = ((System.Windows.Controls.TextBox)(target)); #line 96 "..\..\MainWindow.xaml" this.endTexBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.endTexBox_TextChanged); #line default #line hidden return; case 13: this.richTextBox = ((System.Windows.Controls.RichTextBox)(target)); return; case 14: this.paragraph = ((System.Windows.Documents.Paragraph)(target)); return; case 15: this.textRun = ((System.Windows.Documents.Run)(target)); return; } this._contentLoaded = true; }
private void DisplayCommands() { myDockPanel.LastChildFill = true; string currentDir = String.Copy(Environment.CurrentDirectory); // Define the child content myTextBlock1 BorderMenu.Height = 25; BorderMenu.Background = Brushes.SkyBlue; BorderMenu.BorderThickness = new Thickness(1); DockPanel.SetDock(BorderMenu, Dock.Top); // Add barcode tray menu items ToolBarTray tbtToolBarTray = new ToolBarTray(); ToolBar tbToolBar = new ToolBar(); // Add task buttons Button btnPrintCommandList = new Button() { Content = "列印", Background = Brushes.White, Name = "btnPrint" }; btnPrintCommandList.Click += btnPrintCommandList_Click; tbToolBar.Items.Add(btnPrintCommandList); DockPanel.SetDock(tbtToolBarTray, Dock.Left); tbToolBar.Background = Brushes.Orange; tbtToolBarTray.ToolBars.Add(tbToolBar); BorderMenu.Child = tbtToolBarTray; // Loading Barcode Image (image/textblock --> stackpanel --> border ===> DockPanel ===> Window) // create image element //////////////////////////////////////////// Image iPrint1 = new Image(); iPrint1.Width = 180; BitmapImage biPrint1 = new BitmapImage(); biPrint1.BeginInit(); //biPrint1.UriSource = new Uri(@"c:\Sigknow0001.jpg", UriKind.RelativeOrAbsolute); biPrint1.UriSource = new Uri(currentDir + "\\Sigknow0001.jpg", UriKind.RelativeOrAbsolute); biPrint1.DecodePixelWidth = 400; biPrint1.DecodePixelHeight = 100; //iPrint1.Height = 100; biPrint1.EndInit(); iPrint1.Source = biPrint1; TextBlock tb1 = new TextBlock(); tb1.Text = "建立關係 (Associate)"; tb1.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp1 = new StackPanel(); sp1.Children.Add(iPrint1); sp1.Children.Add(tb1); sp1.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent1 = new Border(); bContent1.Height = 99; bContent1.Background = Brushes.White; bContent1.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent1, Dock.Top); bContent1.Child = sp1; //////////////////////////////////////////// Image iPrint2 = new Image(); iPrint2.Width = 180; BitmapImage biPrint2 = new BitmapImage(); biPrint2.BeginInit(); biPrint2.UriSource = new Uri(currentDir + "\\Sigknow0002.jpg", UriKind.RelativeOrAbsolute); biPrint2.DecodePixelWidth = 400; biPrint2.DecodePixelHeight = 100; biPrint2.EndInit(); iPrint2.Source = biPrint2; TextBlock tb2 = new TextBlock(); tb2.Text = "解除關係 (Disassociate)"; tb2.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp2 = new StackPanel(); sp2.Children.Add(iPrint2); sp2.Children.Add(tb2); sp2.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent2 = new Border(); bContent2.Height = 99; bContent2.Background = Brushes.White; bContent2.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent2, Dock.Top); bContent2.Child = sp2; //////////////////////////////////////////// Image iPrint3 = new Image(); iPrint3.Width = 180; BitmapImage biPrint3 = new BitmapImage(); biPrint3.BeginInit(); biPrint3.UriSource = new Uri(currentDir + "\\Sigknow0003.jpg", UriKind.RelativeOrAbsolute); biPrint3.DecodePixelWidth = 400; biPrint3.DecodePixelHeight = 100; biPrint3.EndInit(); iPrint3.Source = biPrint3; TextBlock tb3 = new TextBlock(); tb3.Text = "查詢關係 (Query)"; tb3.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp3 = new StackPanel(); sp3.Children.Add(iPrint3); sp3.Children.Add(tb3); sp3.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent3 = new Border(); bContent3.Height = 99; bContent3.Background = Brushes.White; bContent3.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent3, Dock.Top); bContent3.Child = sp3; //////////////////////////////////////////// Image iPrint4 = new Image(); iPrint4.Width = 180; BitmapImage biPrint4 = new BitmapImage(); biPrint4.BeginInit(); biPrint4.UriSource = new Uri(currentDir + "\\Sigknow0004.jpg", UriKind.RelativeOrAbsolute); biPrint4.DecodePixelWidth = 400; biPrint4.DecodePixelHeight = 100; biPrint4.EndInit(); iPrint4.Source = biPrint4; TextBlock tb4 = new TextBlock(); tb4.Text = "清除 (Reset)"; tb4.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp4 = new StackPanel(); sp4.Children.Add(iPrint4); sp4.Children.Add(tb4); sp4.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent4 = new Border(); bContent4.Height = 99; bContent4.Background = Brushes.White; bContent4.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent4, Dock.Top); bContent4.Child = sp4; //////////////////////////////////////////// Image iPrint5 = new Image(); iPrint5.Width = 180; BitmapImage biPrint5 = new BitmapImage(); biPrint5.BeginInit(); biPrint5.UriSource = new Uri(currentDir + "\\Sigknow0005.jpg", UriKind.RelativeOrAbsolute); biPrint5.DecodePixelWidth = 400; biPrint5.DecodePixelHeight = 100; biPrint5.EndInit(); iPrint5.Source = biPrint5; TextBlock tb5 = new TextBlock(); tb5.Text = " OK "; tb5.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp5 = new StackPanel(); sp5.Children.Add(iPrint5); sp5.Children.Add(tb5); sp5.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent5 = new Border(); bContent5.Height = 99; bContent5.Background = Brushes.White; bContent5.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent5, Dock.Top); bContent5.Child = sp5; //////////////////////////////////////////// Image iPrint6 = new Image(); iPrint6.Width = 180; BitmapImage biPrint6 = new BitmapImage(); biPrint6.BeginInit(); biPrint6.UriSource = new Uri(currentDir + "\\Sigknow0006.jpg", UriKind.RelativeOrAbsolute); biPrint6.DecodePixelWidth = 400; biPrint6.DecodePixelHeight = 100; biPrint6.EndInit(); iPrint6.Source = biPrint6; TextBlock tb6 = new TextBlock(); tb6.Text = " NG "; tb6.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; StackPanel sp6 = new StackPanel(); sp6.Children.Add(iPrint6); sp6.Children.Add(tb6); sp6.Orientation = System.Windows.Controls.Orientation.Vertical; Border bContent6 = new Border(); bContent6.Height = 99; bContent6.Background = Brushes.White; bContent6.BorderThickness = new Thickness(1); DockPanel.SetDock(bContent6, Dock.Top); bContent6.Child = sp6; // put all barcode images into a StackPanel StackPanel spCommands = new StackPanel(); BorderMainBody.Background = Brushes.White; BorderMainBody.BorderBrush = Brushes.Black; BorderMainBody.BorderThickness = new Thickness(2); //BorderMainBody.CornerRadius = new CornerRadius(45); BorderMainBody.Padding = new Thickness(1); //BorderMainBody.Child = spCommands; // load all barcode images to a canvas double maxX = bContent1.Width; double maxY = bContent1.Height; Canvas.SetTop(bContent1, maxY * 0 + 15); Canvas.SetTop(bContent2, maxY * 1 + 15); Canvas.SetTop(bContent5, maxY * 2 + 15); Canvas.SetTop(bContent6, maxY * 3 + 15); //Canvas.SetTop(bContent3, maxY * 4 + 15); //Canvas.SetTop(bContent4, maxY * 5 + 15); canvasCommands.Children.Add(bContent1); canvasCommands.Children.Add(bContent2); canvasCommands.Children.Add(bContent5); canvasCommands.Children.Add(bContent6); //canvasCommands.Children.Add(bContent3); //canvasCommands.Children.Add(bContent4); BorderMainBody.Child = canvasCommands; // Add child elements to the DockPanel Children collection myDockPanel.Children.Add(BorderMenu); myDockPanel.Children.Add(BorderMainBody); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.toolbarOperate = ((Ai.Hong.Controls.FileOperatePanel)(target)); return; case 2: this.toolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 3: this.btnOpen = ((System.Windows.Controls.Button)(target)); #line 56 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnOpen.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 4: this.btnSave = ((System.Windows.Controls.Button)(target)); #line 59 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnSave.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 5: this.btnSaveAs = ((System.Windows.Controls.Button)(target)); #line 62 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnSaveAs.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 6: this.btnSaveAll = ((System.Windows.Controls.Button)(target)); #line 65 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnSaveAll.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 7: this.btnClose = ((System.Windows.Controls.Button)(target)); #line 68 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnClose.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 8: this.btnCloseAll = ((System.Windows.Controls.Button)(target)); #line 71 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnCloseAll.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 9: this.btnUndo = ((System.Windows.Controls.Button)(target)); #line 74 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnUndo.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 10: this.btnImport = ((System.Windows.Controls.Button)(target)); #line 77 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnImport.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 11: this.btnExport = ((System.Windows.Controls.Button)(target)); #line 80 "..\..\..\Controls\FileOperatePanel - 复制.xaml" this.btnExport.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 16 "..\..\..\..\View\Windows\MainWindow.xaml" ((GraphicEditor.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden #line 19 "..\..\..\..\View\Windows\MainWindow.xaml" ((GraphicEditor.MainWindow)(target)).PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.MainWindow_OnPreviewMouseDown); #line default #line hidden return; case 2: this.ChildrenContent = ((System.Windows.Controls.Grid)(target)); return; case 3: this.openFileMenuItem = ((System.Windows.Controls.MenuItem)(target)); return; case 4: this.openImageMenuItem = ((System.Windows.Controls.MenuItem)(target)); return; case 5: this.openGEFileMenuItem = ((System.Windows.Controls.MenuItem)(target)); return; case 6: this.saveFileMenuItem = ((System.Windows.Controls.MenuItem)(target)); return; case 7: this.saveAsImage = ((System.Windows.Controls.MenuItem)(target)); return; case 8: this.saveAsGEFile = ((System.Windows.Controls.MenuItem)(target)); return; case 9: this.imageProperties = ((System.Windows.Controls.MenuItem)(target)); return; case 10: this.overviewMenuItem = ((System.Windows.Controls.MenuItem)(target)); return; case 11: this.layersMenuItem = ((System.Windows.Controls.MenuItem)(target)); return; case 12: this.colorPickerMenuItem = ((System.Windows.Controls.MenuItem)(target)); return; case 13: this.GraphicToolPropertiesUserControl = ((GraphicEditor.View.UserControls.GraphicToolPropertiesUserControl)(target)); return; case 14: this.ToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 15: this.statusBar = ((GraphicEditor.View.UserControls.StatusBar)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mnTest = ((System.Windows.Controls.MenuItem)(target)); #line 12 "..\..\MainWindow.xaml" this.mnTest.Click += new System.Windows.RoutedEventHandler(this.mnTest_Click); #line default #line hidden return; case 2: this.mnSetting = ((System.Windows.Controls.MenuItem)(target)); #line 13 "..\..\MainWindow.xaml" this.mnSetting.Click += new System.Windows.RoutedEventHandler(this.mnSetting_Click); #line default #line hidden return; case 3: this.mnExit = ((System.Windows.Controls.MenuItem)(target)); #line 15 "..\..\MainWindow.xaml" this.mnExit.Click += new System.Windows.RoutedEventHandler(this.mnExit_Click); #line default #line hidden return; case 4: this.mnPanel = ((System.Windows.Controls.MenuItem)(target)); #line 19 "..\..\MainWindow.xaml" this.mnPanel.Click += new System.Windows.RoutedEventHandler(this.mnPanel_Click); #line default #line hidden return; case 5: this.sbCoord = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.sbTool = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.tbtTop = ((System.Windows.Controls.ToolBarTray)(target)); return; case 8: this.tbBoards = ((System.Windows.Controls.ToolBar)(target)); return; case 9: this.btNewBoard = ((System.Windows.Controls.Button)(target)); #line 36 "..\..\MainWindow.xaml" this.btNewBoard.Click += new System.Windows.RoutedEventHandler(this.btNewBoard_Click); #line default #line hidden return; case 10: this.btFirstBoard = ((System.Windows.Controls.Button)(target)); return; case 11: this.btPrevBoard = ((System.Windows.Controls.Button)(target)); return; case 12: this.tbCurrentBoard = ((System.Windows.Controls.TextBlock)(target)); return; case 13: this.btNextBoard = ((System.Windows.Controls.Button)(target)); return; case 14: this.btLastBoard = ((System.Windows.Controls.Button)(target)); return; case 15: this.tbShapeSetting = ((System.Windows.Controls.ToolBar)(target)); return; case 16: this.cbStrokeColor = ((BoardEditor.BrushComboBox)(target)); return; case 17: this.cbFillColor = ((BoardEditor.BrushComboBox)(target)); return; case 18: this.cbThickness = ((BoardEditor.ThicknessComboBox)(target)); return; case 19: this.cbDash = ((BoardEditor.DashComboBox)(target)); return; case 20: this.tbFontSetting = ((System.Windows.Controls.ToolBar)(target)); return; case 21: this.cbFontFamaly = ((BoardEditor.FontComboBox)(target)); return; case 22: this.cbFontSize = ((System.Windows.Controls.ComboBox)(target)); #line 78 "..\..\MainWindow.xaml" this.cbFontSize.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbFont_SelectionChanged); #line default #line hidden #line 79 "..\..\MainWindow.xaml" this.cbFontSize.GotFocus += new System.Windows.RoutedEventHandler(this.cbSetting_GotFocus); #line default #line hidden return; case 23: this.spRight = ((System.Windows.Controls.Grid)(target)); return; case 24: this.lbShapes = ((System.Windows.Controls.ListBox)(target)); #line 126 "..\..\MainWindow.xaml" this.lbShapes.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.lbShapes_SelectionChanged); #line default #line hidden #line 127 "..\..\MainWindow.xaml" this.lbShapes.KeyDown += new System.Windows.Input.KeyEventHandler(this.lbShapes_KeyDown); #line default #line hidden #line 128 "..\..\MainWindow.xaml" this.lbShapes.GotFocus += new System.Windows.RoutedEventHandler(this.lbShapes_GotFocus); #line default #line hidden return; case 25: this.lbBoards = ((System.Windows.Controls.ListBox)(target)); return; case 26: this.tbtLeft = ((System.Windows.Controls.ToolBarTray)(target)); return; case 27: this.tbInput = ((System.Windows.Controls.ToolBar)(target)); return; case 28: this.rbType = ((System.Windows.Controls.RadioButton)(target)); #line 139 "..\..\MainWindow.xaml" this.rbType.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 29: this.rbInk = ((System.Windows.Controls.RadioButton)(target)); #line 145 "..\..\MainWindow.xaml" this.rbInk.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 30: this.rbPen = ((System.Windows.Controls.RadioButton)(target)); #line 152 "..\..\MainWindow.xaml" this.rbPen.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 31: this.rbLine = ((System.Windows.Controls.RadioButton)(target)); #line 158 "..\..\MainWindow.xaml" this.rbLine.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 32: this.rbRect = ((System.Windows.Controls.RadioButton)(target)); #line 164 "..\..\MainWindow.xaml" this.rbRect.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 33: this.rbRoundRect = ((System.Windows.Controls.RadioButton)(target)); #line 170 "..\..\MainWindow.xaml" this.rbRoundRect.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 34: this.rbEllipse = ((System.Windows.Controls.RadioButton)(target)); #line 176 "..\..\MainWindow.xaml" this.rbEllipse.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 35: this.rbLabel = ((System.Windows.Controls.RadioButton)(target)); #line 182 "..\..\MainWindow.xaml" this.rbLabel.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 36: this.tbEdit = ((System.Windows.Controls.ToolBar)(target)); return; case 37: this.rbSelect = ((System.Windows.Controls.RadioButton)(target)); #line 190 "..\..\MainWindow.xaml" this.rbSelect.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 38: this.rbErase = ((System.Windows.Controls.RadioButton)(target)); #line 196 "..\..\MainWindow.xaml" this.rbErase.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 39: this.rbRemove = ((System.Windows.Controls.RadioButton)(target)); #line 202 "..\..\MainWindow.xaml" this.rbRemove.Checked += new System.Windows.RoutedEventHandler(this.RadioButton_Checked); #line default #line hidden return; case 40: this.btDeleteText = ((System.Windows.Controls.Button)(target)); #line 206 "..\..\MainWindow.xaml" this.btDeleteText.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 41: this.btDeleteNotes = ((System.Windows.Controls.Button)(target)); #line 209 "..\..\MainWindow.xaml" this.btDeleteNotes.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 42: this.btDeleteShapes = ((System.Windows.Controls.Button)(target)); #line 212 "..\..\MainWindow.xaml" this.btDeleteShapes.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 43: this.btDeleteAll = ((System.Windows.Controls.Button)(target)); #line 215 "..\..\MainWindow.xaml" this.btDeleteAll.Click += new System.Windows.RoutedEventHandler(this.btDelete_Click); #line default #line hidden return; case 44: this.inkBoard = ((System.Windows.Controls.InkCanvas)(target)); #line 221 "..\..\MainWindow.xaml" this.inkBoard.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.inkBoard_MouseDown); #line default #line hidden #line 222 "..\..\MainWindow.xaml" this.inkBoard.MouseMove += new System.Windows.Input.MouseEventHandler(this.inkBoard_MouseMove); #line default #line hidden #line 223 "..\..\MainWindow.xaml" this.inkBoard.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.inkBoard_MouseUp); #line default #line hidden #line 224 "..\..\MainWindow.xaml" this.inkBoard.MouseEnter += new System.Windows.Input.MouseEventHandler(this.inkBoard_MouseEnter); #line default #line hidden #line 225 "..\..\MainWindow.xaml" this.inkBoard.MouseLeave += new System.Windows.Input.MouseEventHandler(this.inkBoard_MouseLeave); #line default #line hidden #line 226 "..\..\MainWindow.xaml" this.inkBoard.SelectionChanged += new System.EventHandler(this.inkBoard_SelectionChanged); #line default #line hidden #line 227 "..\..\MainWindow.xaml" this.inkBoard.PreviewKeyUp += new System.Windows.Input.KeyEventHandler(this.inkBoard_PreviewKeyUp); #line default #line hidden return; case 45: this.tbBoard = ((BoardEditor.BoardTextBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.txtencrypted = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.txtdecrypted = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.ToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 4: this.Toolbar = ((System.Windows.Controls.ToolBar)(target)); return; case 5: this.btncopytoClipboard = ((System.Windows.Controls.Button)(target)); #line 42 "..\..\MainWindow.xaml" this.btncopytoClipboard.Click += new System.Windows.RoutedEventHandler(this.btncopytoClipboard_Click); #line default #line hidden return; case 6: this.btncopytoclipboard2 = ((System.Windows.Controls.Button)(target)); #line 68 "..\..\MainWindow.xaml" this.btncopytoclipboard2.Click += new System.Windows.RoutedEventHandler(this.btncopytoclipboard2_Click); #line default #line hidden return; case 7: this.btnclear2 = ((System.Windows.Controls.Button)(target)); #line 94 "..\..\MainWindow.xaml" this.btnclear2.Click += new System.Windows.RoutedEventHandler(this.btnclear_Click); #line default #line hidden return; case 8: this.btndec = ((System.Windows.Controls.Button)(target)); #line 120 "..\..\MainWindow.xaml" this.btndec.Click += new System.Windows.RoutedEventHandler(this.btndecrypt_Click); #line default #line hidden return; case 9: this.btnenc = ((System.Windows.Controls.Button)(target)); #line 143 "..\..\MainWindow.xaml" this.btnenc.Click += new System.Windows.RoutedEventHandler(this.btnencrypt_Click); #line default #line hidden return; case 10: this.btnsk = ((System.Windows.Controls.Button)(target)); #line 166 "..\..\MainWindow.xaml" this.btnsk.Click += new System.Windows.RoutedEventHandler(this.btnsk_Click); #line default #line hidden return; case 11: this.btnpk = ((System.Windows.Controls.Button)(target)); #line 167 "..\..\MainWindow.xaml" this.btnpk.Click += new System.Windows.RoutedEventHandler(this.btnpk_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.gridView1 = ((System.Windows.Controls.Grid)(target)); return; case 2: this.searchBox = ((Xceed.Wpf.Toolkit.WatermarkTextBox)(target)); return; case 3: this.mailsBoxPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 4: this.treeViewMailBox = ((System.Windows.Controls.TreeView)(target)); return; case 5: this.menu = ((System.Windows.Controls.Menu)(target)); return; case 6: this.newMessageMenu = ((System.Windows.Controls.MenuItem)(target)); #line 134 "..\..\MainWindow.xaml" this.newMessageMenu.Click += new System.Windows.RoutedEventHandler(this.NewMessage); #line default #line hidden return; case 7: this.importMenu = ((System.Windows.Controls.MenuItem)(target)); #line 143 "..\..\MainWindow.xaml" this.importMenu.Click += new System.Windows.RoutedEventHandler(this.ImportFile); #line default #line hidden return; case 8: this.exportMenu = ((System.Windows.Controls.MenuItem)(target)); #line 152 "..\..\MainWindow.xaml" this.exportMenu.Click += new System.Windows.RoutedEventHandler(this.ExportFile); #line default #line hidden return; case 9: this.exitMenu = ((System.Windows.Controls.MenuItem)(target)); #line 161 "..\..\MainWindow.xaml" this.exitMenu.Click += new System.Windows.RoutedEventHandler(this.ExitApplication); #line default #line hidden return; case 10: this.mailsListXAML = ((HCI__Post_Service.MailsList)(target)); return; case 11: this.buttonTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 12: this.bBack = ((System.Windows.Controls.Button)(target)); #line 192 "..\..\MainWindow.xaml" this.bBack.Click += new System.Windows.RoutedEventHandler(this.BackButtonClick); #line default #line hidden return; case 13: this.buttonReply = ((System.Windows.Controls.Button)(target)); #line 195 "..\..\MainWindow.xaml" this.buttonReply.Click += new System.Windows.RoutedEventHandler(this.ReplyMessage); #line default #line hidden return; case 14: this.bReply = ((System.Windows.Controls.Image)(target)); return; case 15: this.buttonReplyAll = ((System.Windows.Controls.Button)(target)); #line 202 "..\..\MainWindow.xaml" this.buttonReplyAll.Click += new System.Windows.RoutedEventHandler(this.ReplyToAllMessage); #line default #line hidden return; case 16: this.bReplyAll = ((System.Windows.Controls.Image)(target)); return; case 17: this.buttonForward = ((System.Windows.Controls.Button)(target)); #line 209 "..\..\MainWindow.xaml" this.buttonForward.Click += new System.Windows.RoutedEventHandler(this.ForwardMessage); #line default #line hidden return; case 18: this.bForward = ((System.Windows.Controls.Image)(target)); return; case 19: this.buttonStar = ((System.Windows.Controls.Button)(target)); #line 216 "..\..\MainWindow.xaml" this.buttonStar.Click += new System.Windows.RoutedEventHandler(this.StarMessage); #line default #line hidden return; case 20: this.bStar = ((System.Windows.Controls.Image)(target)); return; case 21: this.buttonNewMessage = ((System.Windows.Controls.Button)(target)); #line 223 "..\..\MainWindow.xaml" this.buttonNewMessage.Click += new System.Windows.RoutedEventHandler(this.NewMessage); #line default #line hidden return; case 22: this.bNewMessage = ((System.Windows.Controls.Image)(target)); return; case 23: this.buttonDelete = ((System.Windows.Controls.Button)(target)); #line 230 "..\..\MainWindow.xaml" this.buttonDelete.Click += new System.Windows.RoutedEventHandler(this.ButtonDeleteClick); #line default #line hidden return; case 24: this.bDelete = ((System.Windows.Controls.Image)(target)); return; case 25: this.displayedMail = ((HCI__Post_Service.UserControlFolder.ShowEmailMainWindowControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\MainWindow.xaml" ((_1760327.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.startButton1 = ((System.Windows.Controls.Button)(target)); #line 26 "..\..\MainWindow.xaml" this.startButton1.Click += new System.Windows.RoutedEventHandler(this.StartButton_Click); #line default #line hidden return; case 3: this.skip1 = ((System.Windows.Controls.RadioButton)(target)); #line 32 "..\..\MainWindow.xaml" this.skip1.Checked += new System.Windows.RoutedEventHandler(this.Skip_Checked); #line default #line hidden return; case 4: this.addSuffixes1 = ((System.Windows.Controls.RadioButton)(target)); #line 33 "..\..\MainWindow.xaml" this.addSuffixes1.Checked += new System.Windows.RoutedEventHandler(this.AddSuffixes_Checked); #line default #line hidden return; case 5: this.presetComboBox = ((System.Windows.Controls.ComboBox)(target)); #line 44 "..\..\MainWindow.xaml" this.presetComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.PresetComboBox_SelectionChanged); #line default #line hidden return; case 6: this.methodMenuOpenButton = ((System.Windows.Controls.Button)(target)); #line 55 "..\..\MainWindow.xaml" this.methodMenuOpenButton.Click += new System.Windows.RoutedEventHandler(this.MethodMenuOpenButton_Click); #line default #line hidden return; case 7: this.methodMenuSaveButton = ((System.Windows.Controls.Button)(target)); #line 58 "..\..\MainWindow.xaml" this.methodMenuSaveButton.Click += new System.Windows.RoutedEventHandler(this.MethodMenuSaveButton_Click); #line default #line hidden return; case 8: this.methodToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 9: this.methodMenu = ((System.Windows.Controls.Menu)(target)); return; case 10: this.addMethodMenu = ((System.Windows.Controls.MenuItem)(target)); return; case 12: this.clearMethodMenuButton = ((System.Windows.Controls.Button)(target)); #line 103 "..\..\MainWindow.xaml" this.clearMethodMenuButton.Click += new System.Windows.RoutedEventHandler(this.ClearMethodMenuButton_Click); #line default #line hidden return; case 13: this.methodMenuTopButton = ((System.Windows.Controls.Button)(target)); #line 109 "..\..\MainWindow.xaml" this.methodMenuTopButton.Click += new System.Windows.RoutedEventHandler(this.MethodMenuTopButton_Click); #line default #line hidden return; case 14: this.methodMenuUpButton = ((System.Windows.Controls.Button)(target)); #line 112 "..\..\MainWindow.xaml" this.methodMenuUpButton.Click += new System.Windows.RoutedEventHandler(this.MethodMenuUpButton_Click); #line default #line hidden return; case 15: this.methodMenuDownButton = ((System.Windows.Controls.Button)(target)); #line 115 "..\..\MainWindow.xaml" this.methodMenuDownButton.Click += new System.Windows.RoutedEventHandler(this.MethodMenuDownButton_Click); #line default #line hidden return; case 16: this.methodMenuBotButton = ((System.Windows.Controls.Button)(target)); #line 118 "..\..\MainWindow.xaml" this.methodMenuBotButton.Click += new System.Windows.RoutedEventHandler(this.MethodMenuBotButton_Click); #line default #line hidden return; case 17: this.methodListBox = ((System.Windows.Controls.ListBox)(target)); return; case 21: this.Tab = ((System.Windows.Controls.TabControl)(target)); #line 194 "..\..\MainWindow.xaml" this.Tab.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Tab_SelectionChanged); #line default #line hidden return; case 22: this.fileToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 23: this.fileAddButton = ((System.Windows.Controls.Button)(target)); #line 203 "..\..\MainWindow.xaml" this.fileAddButton.Click += new System.Windows.RoutedEventHandler(this.FileAddButton_Click); #line default #line hidden return; case 24: this.fileMenuTopButton = ((System.Windows.Controls.Button)(target)); #line 209 "..\..\MainWindow.xaml" this.fileMenuTopButton.Click += new System.Windows.RoutedEventHandler(this.FileMenuTopButton_Click); #line default #line hidden return; case 25: this.fileMenuUpButton = ((System.Windows.Controls.Button)(target)); #line 212 "..\..\MainWindow.xaml" this.fileMenuUpButton.Click += new System.Windows.RoutedEventHandler(this.FileMenuUpButton_Click); #line default #line hidden return; case 26: this.fileMenuDownButton = ((System.Windows.Controls.Button)(target)); #line 215 "..\..\MainWindow.xaml" this.fileMenuDownButton.Click += new System.Windows.RoutedEventHandler(this.FileMenuDownButton_Click); #line default #line hidden return; case 27: this.fileMenuBotButton = ((System.Windows.Controls.Button)(target)); #line 218 "..\..\MainWindow.xaml" this.fileMenuBotButton.Click += new System.Windows.RoutedEventHandler(this.FileMenuBotButton_Click); #line default #line hidden return; case 28: this.fileDeleteButton = ((System.Windows.Controls.Button)(target)); #line 221 "..\..\MainWindow.xaml" this.fileDeleteButton.Click += new System.Windows.RoutedEventHandler(this.FileDeleteButton_Click); #line default #line hidden return; case 29: this.filesListView = ((System.Windows.Controls.ListView)(target)); return; case 30: this.folderToolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 31: this.folderAddButton = ((System.Windows.Controls.Button)(target)); #line 281 "..\..\MainWindow.xaml" this.folderAddButton.Click += new System.Windows.RoutedEventHandler(this.FolderAddButton_Click); #line default #line hidden return; case 32: this.folderMenuTopButton = ((System.Windows.Controls.Button)(target)); #line 287 "..\..\MainWindow.xaml" this.folderMenuTopButton.Click += new System.Windows.RoutedEventHandler(this.FolderMenuTopButton_Click); #line default #line hidden return; case 33: this.folderMenuUpButton = ((System.Windows.Controls.Button)(target)); #line 290 "..\..\MainWindow.xaml" this.folderMenuUpButton.Click += new System.Windows.RoutedEventHandler(this.FolderMenuUpButton_Click); #line default #line hidden return; case 34: this.folderMenuDownButton = ((System.Windows.Controls.Button)(target)); #line 293 "..\..\MainWindow.xaml" this.folderMenuDownButton.Click += new System.Windows.RoutedEventHandler(this.FolderMenuDownButton_Click); #line default #line hidden return; case 35: this.folderMenuBotButton = ((System.Windows.Controls.Button)(target)); #line 296 "..\..\MainWindow.xaml" this.folderMenuBotButton.Click += new System.Windows.RoutedEventHandler(this.FolderMenuBotButton_Click); #line default #line hidden return; case 36: this.folderDeleteButton = ((System.Windows.Controls.Button)(target)); #line 299 "..\..\MainWindow.xaml" this.folderDeleteButton.Click += new System.Windows.RoutedEventHandler(this.FolderDeleteButton_Click); #line default #line hidden return; case 37: this.folderListView = ((System.Windows.Controls.ListView)(target)); return; } this._contentLoaded = true; }
private void InitializeComponent(Configuration cfg) { this.Width = 1024; this.Height = 768; Button btnNew = NewImageButton(ApplicationCommands.New, "New", "New(Ctrl-N)", "New_16x16.png"); Button btnOpen = NewImageButton(ApplicationCommands.Open, "Open", "Open(Ctrl-O)", "Open_16x16.png"); Button btnSave = NewImageButton(ApplicationCommands.Save, "Save", "Save(Ctrl-S)", "Save_16x16.png"); Button btnExecute = NewImageButton(ExecuteCommand, "Execute", "Execute(F5)", "Next_16x16.png"); DockPanel dockPanel = new DockPanel(); this.Content = dockPanel; //Tool bar ToolBarTray tray = new ToolBarTray(); tray.SetValue(DockPanel.DockProperty, Dock.Top); dockPanel.Children.Add(tray); ToolBar toolBar; tray.ToolBars.Add(toolBar = new ToolBar()); toolBar.Items.Add(btnNew); toolBar.Items.Add(btnOpen); toolBar.Items.Add(btnSave); tray.ToolBars.Add(toolBar = new ToolBar()); toolBar.Items.Add(btnExecute); //status bar StatusBar statusBar = new StatusBar { Height = 20 }; statusBar.Items.Add(new StatusBarItem { Content = lblMessage, HorizontalAlignment = HorizontalAlignment.Left }); statusBar.Items.Add(new StatusBarItem { Content = lblCursorPosition, HorizontalAlignment = HorizontalAlignment.Right }); statusBar.Items.Add(new StatusBarItem { Content = lblRowCount, HorizontalAlignment = HorizontalAlignment.Right }); statusBar.SetValue(DockPanel.DockProperty, Dock.Bottom); dockPanel.Children.Add(statusBar); #region editor and results Grid grid = new Grid(); grid.RowDefinitions.Add(new RowDefinition()); grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(5) }); grid.RowDefinitions.Add(new RowDefinition()); dockPanel.Children.Add(grid); textBox.Foreground = cfg.GetSolidBrush("gui.sql.editor.Foreground", Colors.Black); textBox.Background = cfg.GetSolidBrush("gui.sql.editor.Background", Colors.White); //Paragraph space Style style = new Style { TargetType = typeof(Paragraph) }; style.Setters.Add(new Setter { Property = Block.MarginProperty, Value = new Thickness(0) }); textBox.Resources.Add(typeof(Paragraph), style); GridSplitter splitter = new GridSplitter { Height = 5, HorizontalAlignment = HorizontalAlignment.Stretch }; tabControl.Foreground = cfg.GetSolidBrush("gui.sql.editor.Foreground", Colors.Black); tabControl.Background = cfg.GetSolidBrush("gui.sql.editor.Background", Colors.White); textBox.SetValue(Grid.RowProperty, 0); splitter.SetValue(Grid.RowProperty, 1); tabControl.SetValue(Grid.RowProperty, 2); grid.Children.Add(textBox); grid.Children.Add(splitter); grid.Children.Add(tabControl); #endregion CommandBinding binding; RoutedUICommand[] commands = new RoutedUICommand[] { ApplicationCommands.New, ApplicationCommands.Open, ApplicationCommands.Save, ExecuteCommand }; foreach (var cmd in commands) { binding = new CommandBinding(cmd); binding.Executed += commandExecute; binding.CanExecute += commandCanExecute; this.CommandBindings.Add(binding); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Jobs = ((System.Windows.Controls.MenuItem)(target)); return; case 2: this.Markit = ((System.Windows.Controls.MenuItem)(target)); return; case 3: this.SuperD = ((System.Windows.Controls.MenuItem)(target)); return; case 4: this.BBG = ((System.Windows.Controls.MenuItem)(target)); return; case 5: this.NetBroker = ((System.Windows.Controls.MenuItem)(target)); return; case 6: this.Entitlements = ((System.Windows.Controls.MenuItem)(target)); return; case 7: this.TileVertically = ((System.Windows.Controls.MenuItem)(target)); return; case 8: this.TileHorizontal = ((System.Windows.Controls.MenuItem)(target)); return; case 9: this.Cascade = ((System.Windows.Controls.MenuItem)(target)); return; case 10: this.jobsToolbar = ((System.Windows.Controls.ToolBarTray)(target)); return; case 11: this.tsNbSelection = ((System.Windows.Controls.ComboBox)(target)); return; case 12: #line 51 "..\..\Window1.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CollapseGroups); #line default #line hidden return; case 13: #line 52 "..\..\Window1.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ExpandGroups); #line default #line hidden return; case 14: #line 63 "..\..\Window1.xaml" ((System.Windows.Controls.TabControl)(target)).SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TabControl_SelectionChanged_1); #line default #line hidden return; case 15: this.ServerDataGrid = ((Xceed.Wpf.DataGrid.DataGridControl)(target)); return; case 16: this.JobDataGrid = ((Xceed.Wpf.DataGrid.DataGridControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\..\MainWindow.xaml" ((CoreTest.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.grd1 = ((System.Windows.Controls.Grid)(target)); return; case 3: this.label1 = ((System.Windows.Controls.Label)(target)); return; case 4: this.label2 = ((System.Windows.Controls.Label)(target)); return; case 5: this.cvs1 = ((System.Windows.Controls.Border)(target)); return; case 6: this.toolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 7: this.btngrind1 = ((HMIControl.HMIButton)(target)); return; case 8: this.btngrind2 = ((HMIControl.HMIButton)(target)); return; case 9: this.cvs3 = ((System.Windows.Controls.ToolBarTray)(target)); return; case 10: this.btnRT = ((HMIControl.HMIButton)(target)); return; case 11: this.btnTrend = ((HMIControl.HMIButton)(target)); return; case 12: this.btnTag = ((HMIControl.HMIButton)(target)); return; case 13: this.hMIButton2 = ((HMIControl.HMIButton)(target)); return; case 14: this.hMIButton7 = ((HMIControl.HMIButton)(target)); #line 117 "..\..\..\MainWindow.xaml" this.hMIButton7.Click += new System.Windows.RoutedEventHandler(this.hMIButton7_Click); #line default #line hidden return; case 15: this.statusbar = ((System.Windows.Controls.Canvas)(target)); return; case 16: this.txtuser = ((HMIControl.HMILable)(target)); return; case 17: this.txttime = ((HMIControl.HMILable)(target)); return; case 18: this.btnStart = ((System.Windows.Controls.Button)(target)); #line 123 "..\..\..\MainWindow.xaml" this.btnStart.Click += new System.Windows.RoutedEventHandler(this.btnStart_Click); #line default #line hidden return; case 19: this.cvsAlarm = ((System.Windows.Controls.Canvas)(target)); return; case 20: this.txtAlarm = ((System.Windows.Controls.TextBlock)(target)); return; case 21: this.p1_lamp1 = ((System.Windows.Shapes.Ellipse)(target)); return; } this._contentLoaded = true; }
private static void AdjustStyle(ToolBarTray tray, Brush background) { foreach (var tb in tray.ToolBars) { AdjustStyle(tb, background); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MyGrid = ((System.Windows.Controls.Grid)(target)); return; case 2: this.Menu_graphics_editor = ((System.Windows.Controls.Menu)(target)); return; case 3: #line 21 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_ClickNew); #line default #line hidden return; case 4: #line 26 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_ClickOpen); #line default #line hidden return; case 5: #line 31 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_ClickSave); #line default #line hidden return; case 6: #line 36 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_ClickSavaAs); #line default #line hidden return; case 7: #line 44 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_ClickAbout); #line default #line hidden return; case 8: #line 52 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_ClickExit); #line default #line hidden return; case 9: this.checkBox_StrokeThickness_0 = ((System.Windows.Controls.CheckBox)(target)); return; case 10: this.checkBox_StrokeThickness_1 = ((System.Windows.Controls.CheckBox)(target)); return; case 11: this.checkBox_StrokeThickness_2 = ((System.Windows.Controls.CheckBox)(target)); return; case 12: this.checkBox_StrokeThickness_3 = ((System.Windows.Controls.CheckBox)(target)); return; case 13: this.checkBox_StrokeThickness_4 = ((System.Windows.Controls.CheckBox)(target)); return; case 14: this.checkBox_StrokeThickness_5 = ((System.Windows.Controls.CheckBox)(target)); return; case 15: this.canvas = ((System.Windows.Controls.Canvas)(target)); #line 132 "..\..\MainWindow.xaml" this.canvas.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Canvas_Click); #line default #line hidden return; case 16: this.ToolBarTray_for_buttons_and_checkbox = ((System.Windows.Controls.ToolBarTray)(target)); return; case 17: #line 170 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Draw_line); #line default #line hidden return; case 18: #line 175 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Draw_rectangle); #line default #line hidden return; case 19: #line 180 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Draw_elipse); #line default #line hidden return; case 20: this.checkBox_erase = ((System.Windows.Controls.CheckBox)(target)); return; case 21: this.Slider_erase = ((System.Windows.Controls.Slider)(target)); return; case 22: #line 206 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Clear_canvas); #line default #line hidden return; case 23: #line 219 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Zoom_Enlargement); #line default #line hidden return; case 24: #line 224 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Zoom_Decrease); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 38 "..\..\..\..\PageCollection\PageControl\DirectMenu.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonMenu_Click); #line default #line hidden return; case 2: #line 43 "..\..\..\..\PageCollection\PageControl\DirectMenu.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonMenu_Click); #line default #line hidden return; case 3: #line 48 "..\..\..\..\PageCollection\PageControl\DirectMenu.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonMenu_Click); #line default #line hidden return; case 4: this.calendar1 = ((Microsoft.Windows.Controls.Calendar)(target)); return; case 5: this.toolBarTray1 = ((System.Windows.Controls.ToolBarTray)(target)); return; case 6: this.toolBar1 = ((System.Windows.Controls.ToolBar)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this._FileMenu = ((System.Windows.Controls.MenuItem)(target)); return; case 2: this._NewProjectMenu = ((System.Windows.Controls.MenuItem)(target)); #line 14 "..\..\MainWindow.xaml" this._NewProjectMenu.Click += new System.Windows.RoutedEventHandler(this.ItmMenuNew_Click); #line default #line hidden return; case 3: this._OpenProjectMenu = ((System.Windows.Controls.MenuItem)(target)); #line 15 "..\..\MainWindow.xaml" this._OpenProjectMenu.Click += new System.Windows.RoutedEventHandler(this.ItmMenuOpen_Click); #line default #line hidden return; case 4: this._SaveAsMenu = ((System.Windows.Controls.MenuItem)(target)); #line 16 "..\..\MainWindow.xaml" this._SaveAsMenu.Click += new System.Windows.RoutedEventHandler(this.ItmMenuSaveAs_Click); #line default #line hidden return; case 5: this._ExitMenu = ((System.Windows.Controls.MenuItem)(target)); #line 18 "..\..\MainWindow.xaml" this._ExitMenu.Click += new System.Windows.RoutedEventHandler(this.ItmMenuExit_Click); #line default #line hidden return; case 6: this._EditMenu = ((System.Windows.Controls.MenuItem)(target)); return; case 7: this._CutMenu = ((System.Windows.Controls.MenuItem)(target)); #line 21 "..\..\MainWindow.xaml" this._CutMenu.Click += new System.Windows.RoutedEventHandler(this.Cut_Click); #line default #line hidden return; case 8: this._CopyMenu = ((System.Windows.Controls.MenuItem)(target)); #line 22 "..\..\MainWindow.xaml" this._CopyMenu.Click += new System.Windows.RoutedEventHandler(this.Copy_Click); #line default #line hidden return; case 9: this._PasteMenu = ((System.Windows.Controls.MenuItem)(target)); #line 23 "..\..\MainWindow.xaml" this._PasteMenu.Click += new System.Windows.RoutedEventHandler(this.Paste_Click); #line default #line hidden return; case 10: this._DeleteAllMenu = ((System.Windows.Controls.MenuItem)(target)); #line 24 "..\..\MainWindow.xaml" this._DeleteAllMenu.Click += new System.Windows.RoutedEventHandler(this.DeleteAll_Click); #line default #line hidden return; case 11: this._HelpMenu = ((System.Windows.Controls.MenuItem)(target)); return; case 12: this._AboutMenu = ((System.Windows.Controls.MenuItem)(target)); #line 27 "..\..\MainWindow.xaml" this._AboutMenu.Click += new System.Windows.RoutedEventHandler(this.About_Click); #line default #line hidden return; case 13: #line 29 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RU_Click); #line default #line hidden return; case 14: #line 30 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.EN_Click); #line default #line hidden return; case 15: this.MainMenu2 = ((System.Windows.Controls.ToolBarTray)(target)); return; case 16: #line 35 "..\..\MainWindow.xaml" ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.Bold_Click); #line default #line hidden return; case 17: #line 37 "..\..\MainWindow.xaml" ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.Italic_Click); #line default #line hidden return; case 18: #line 39 "..\..\MainWindow.xaml" ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.UnderLine_Click); #line default #line hidden return; case 19: this._FontsMenu = ((System.Windows.Controls.Label)(target)); return; case 20: this.FontSelect = ((System.Windows.Controls.ComboBox)(target)); return; case 21: this._SizeMenu = ((System.Windows.Controls.Label)(target)); return; case 22: this.FontSize = ((System.Windows.Controls.ComboBox)(target)); return; case 23: #line 44 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmSizeFont_Selected8); #line default #line hidden return; case 24: #line 45 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmSizeFont_Selected10); #line default #line hidden return; case 25: #line 46 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmSizeFont_Selected12); #line default #line hidden return; case 26: #line 47 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmSizeFont_Selected14); #line default #line hidden return; case 27: #line 48 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmSizeFont_Selected16); #line default #line hidden return; case 28: #line 49 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmSizeFont_Selected18); #line default #line hidden return; case 29: #line 50 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmSizeFont_Selected36); #line default #line hidden return; case 30: this._ColorMenu = ((System.Windows.Controls.Label)(target)); return; case 31: this.FontColor = ((System.Windows.Controls.ComboBox)(target)); return; case 32: #line 54 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontBlack_Selected); #line default #line hidden return; case 33: #line 55 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontRed_Selected); #line default #line hidden return; case 34: #line 56 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontOrange_Selected); #line default #line hidden return; case 35: #line 57 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontYellow_Selected); #line default #line hidden return; case 36: #line 58 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontGreen_Selected); #line default #line hidden return; case 37: #line 59 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontBlue_Selected); #line default #line hidden return; case 38: #line 60 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontViolet_Selected); #line default #line hidden return; case 39: #line 61 "..\..\MainWindow.xaml" ((System.Windows.Controls.ComboBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ItmColorFontWhite_Selected); #line default #line hidden return; case 40: this.rtbEditor = ((System.Windows.Controls.RichTextBox)(target)); #line 63 "..\..\MainWindow.xaml" this.rtbEditor.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.Text_Checked); #line default #line hidden return; case 41: this.StausBarBottom = ((System.Windows.Controls.ToolBarTray)(target)); return; case 42: this.StatusBarTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.expressionUserControl = ((LogicPad2.Expression.UserControl1)(target)); return; case 2: this.UserControlScaleXY = ((System.Windows.Media.ScaleTransform)(target)); return; case 3: this.UserControlXY = ((System.Windows.Media.TranslateTransform)(target)); return; case 4: this.controlBorder = ((System.Windows.Controls.Border)(target)); return; case 5: this.Grid0 = ((System.Windows.Controls.Grid)(target)); return; case 6: this.alternatesTray = ((System.Windows.Controls.ToolBarTray)(target)); return; case 7: this.alternatesMenu = ((System.Windows.Controls.ToolBar)(target)); return; case 8: this.GCScroller = ((System.Windows.Controls.ScrollViewer)(target)); #line 38 "..\..\UserControl1.xaml" this.GCScroller.LayoutUpdated += new System.EventHandler(this.GCScroller_LayoutUpdated); #line default #line hidden return; case 9: this.underlay = ((starPadSDK.WPFHelp.ContainerVisualHost)(target)); return; case 10: this.inqCanvas = ((starPadSDK.Inq.InqCanvas)(target)); return; case 11: this.controlRegion = ((System.Windows.Controls.StackPanel)(target)); return; case 12: this.btnSave = ((System.Windows.Controls.Button)(target)); return; case 13: this.btnCancel = ((System.Windows.Controls.Button)(target)); return; case 14: this.btnTransform = ((System.Windows.Controls.Button)(target)); return; case 15: this.btnScale = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }