public MainViewContent(string fileName, IWorkbenchWindow workbenchWindow) { codeEditor = new CodeEditor(); textEditor = new TextEditor(); textEditor.FontFamily = new FontFamily("Consolas"); textEditor.TextArea.TextEntering += TextAreaOnTextEntering; textEditor.TextArea.TextEntered += TextAreaOnTextEntered; textEditor.ShowLineNumbers = true; var ctrlSpace = new RoutedCommand(); ctrlSpace.InputGestures.Add(new KeyGesture(Key.Space, ModifierKeys.Control)); var cb = new CommandBinding(ctrlSpace, OnCtrlSpaceCommand); // this.CommandBindings.Add(cb); adapter = new SharpSnippetTextEditorAdapter(textEditor); this.WorkbenchWindow = workbenchWindow; textEditor.TextArea.TextView.Services.AddService(typeof (ITextEditor), adapter); LoadFile(fileName); iconBarManager = new IconBarManager(); textEditor.TextArea.LeftMargins.Insert(0, new IconBarMargin(iconBarManager)); var textMarkerService = new TextMarkerService(textEditor.Document); textEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService); textEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); textEditor.TextArea.TextView.Services.AddService(typeof (ITextMarkerService), textMarkerService); textEditor.TextArea.TextView.Services.AddService(typeof (IBookmarkMargin), iconBarManager); }
public MainWindow() : base(SplashShowing) { Default = this; #region initialize command bindings SDWindow.NewCommand.Text = "New Receipt"; this.NewCommandBinding.Executed += NewReceiptCommand_Executed; this.OptionsCommandBinding.Executed += OptionsCommand_Executed; ReceiptSingularCommandBinding = new CommandBinding(ReceiptSingularCommand, ReceiptSingularCommand_Executed); this.CommandBindings.Add(ReceiptSingularCommandBinding); ReceiptTabularCommandBinding = new CommandBinding(ReceiptTabularCommand, ReceiptTabularCommand_Executed); this.CommandBindings.Add(ReceiptTabularCommandBinding); FeesRegisterCommandBinding = new CommandBinding(FeesRegisterCommand, FeesRegisterCommand_Executed); this.CommandBindings.Add(FeesRegisterCommandBinding); FeesBalancesCommandBinding = new CommandBinding(FeesBalancesCommand, FeesBalancesCommand_Executed); this.CommandBindings.Add(FeesBalancesCommandBinding); #endregion try { InitializeComponent(); } catch (Exception ex) { Errors.displayError("An error occured starting the application", ErrorCode.MainWindowConstructor, ErrorAction.Exit, ex); } }
private void SetF1CommandBinding() { CommandBinding helpBinding = new CommandBinding(ApplicationCommands.Help); helpBinding.CanExecute += CanHelpExecute; helpBinding.Executed += HelpExecuted; CommandBindings.Add(helpBinding); }
public 部門表() { InitializeComponent(); CommandBinding binding = new CommandBinding(ApplicationCommands.ContextMenu); binding.Executed += ContextMenu_Executed; this.CommandBindings.Add(binding); }
public MainWindow() { SOTC_BindingErrorTracer.BindingErrorTraceListener.SetTrace(); this.InitializeComponent(); /* // Insert code required on object creation below this point. KeyBinding ib = new KeyBinding( GlobalCommands.IncrementSectionNumber, new KeyGesture(Key.U, ModifierKeys.Control)); this.InputBindings.Add(ib); */ incrementCenterIndexCommand = new RoutedUICommand("+", "IncrementCenterIndexCommand", typeof(MainWindow)); decrementCenterIndexCommand = new RoutedUICommand("-", "DecrementCenterIndexCommand", typeof(MainWindow)); CommandBinding cb = new CommandBinding(incrementCenterIndexCommand, OnIncrementSectionNumber); this.CommandBindings.Add(cb); cb = new CommandBinding(decrementCenterIndexCommand, OnDecrementSectionNumber); this.CommandBindings.Add(cb); GlobalCommands.IncrementSectionNumber.RegisterCommand(incrementCenterIndexCommand); GlobalCommands.IncrementSectionNumber.RegisterCommand(decrementCenterIndexCommand); //GlobalCommands.IncrementSectionNumber.Execute(null); OnStartup(null); }
public MainWindow(SessionInfo sessionInfo) { this.DataContext = sessionInfo; #region Command bindings //New command binding CommandBinding newCommandBinding = new CommandBinding(InvoiceManagerCommands.New); newCommandBinding.Executed += NewCommand_Executed; newCommandBinding.CanExecute += NewCommand_CanExecute; CommandBindings.Add(newCommandBinding); //Edit command binding CommandBinding editCommandBinding = new CommandBinding(InvoiceManagerCommands.Edit); editCommandBinding.Executed += EditCommand_Executed; editCommandBinding.CanExecute += EditCommand_CanExecute; CommandBindings.Add(editCommandBinding); //Delete command binding CommandBinding deleteCommandBinding = new CommandBinding(InvoiceManagerCommands.Delete); deleteCommandBinding.Executed += DeleteCommand_Executed; deleteCommandBinding.CanExecute += DeleteCommand_CanExecute; CommandBindings.Add(deleteCommandBinding); #endregion InitializeComponent(); App.Current.MainWindow = this; }
public DateInputUC() { InitializeComponent(); toggleCalendarAction = new CommandBinding(ToggleCalendarAction, ToggleCalendar); CommandBindings.Add(toggleCalendarAction); this.AddHandler(Validation.ErrorEvent, new EventHandler<ValidationErrorEventArgs>(ValidationErrorEventHandler)); }
public MessageWindowElement(MessageDailog dm) : base() { var bindinAccept = new CommandBinding(AcceptCommand, OnAccept); this.CommandBindings.Add(bindinAccept); var bindingCancel = new CommandBinding(CancelCommand, OnCancel); this.CommandBindings.Add(bindingCancel); if (dm != null) { Buttons = dm.DialogButton; Title = dm.Title; Content = dm.Caption; if (dm.DialogHeight != 0) this.Height = dm.DialogHeight; if (dm.DialogWidth != 0) this.Height = dm.DialogWidth; if(dm.IsSizeToContent) this.SizeToContent = SizeToContent.WidthAndHeight; } CreateContainer(); }
// ------------------------------- // Window operations // ------------------------------- /// <summary> /// (Constructor) Initializes main window and sets up shortcut keys. /// </summary> public MainWindow() { InitializeComponent(); // Bind "New" command CommandBinding cb = new CommandBinding( commandNew , new_Executed ); KeyGesture kg = new KeyGesture( Key.N , ModifierKeys.Control ); InputBinding ib = new InputBinding( commandNew , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); // Bind "Open" command cb = new CommandBinding( commandOpen , open_Executed ); kg = new KeyGesture( Key.O , ModifierKeys.Control ); ib = new InputBinding( commandOpen , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); // Bind "Save" command cb = new CommandBinding( commandSave , save_Executed ); kg = new KeyGesture( Key.S , ModifierKeys.Control ); ib = new InputBinding( commandSave , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); // Bind "SaveAll" command cb = new CommandBinding( commandSaveAll , saveAll_Executed ); kg = new KeyGesture( Key.S , ModifierKeys.Alt ); ib = new InputBinding( commandSaveAll , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); // Bind "Exit" command cb = new CommandBinding( commandExit , exit_Executed ); kg = new KeyGesture( Key.X , ModifierKeys.Control ); ib = new InputBinding( commandExit , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); // Bind "Delete" command cb = new CommandBinding( commandDelete , deleteBlock_Executed ); kg = new KeyGesture( Key.Delete ); ib = new InputBinding( commandDelete , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); // Bind "Generate Mesh" command cb = new CommandBinding( commandGenerateMesh , generateMesh_Executed ); kg = new KeyGesture( Key.F7 ); ib = new InputBinding( commandGenerateMesh , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); // Bind "Run Analysis" command cb = new CommandBinding( commandRunAnalysis , run_Executed ); kg = new KeyGesture( Key.F5 ); ib = new InputBinding( commandRunAnalysis , kg ); this.CommandBindings.Add( cb ); this.InputBindings.Add( ib ); }
public Image() { EditingMode = InkCanvasEditingMode.Select; Background = Brushes.Transparent; PreviewKeyDown += keyPressed; SelectionMoved += elementsMovedOrResized; SelectionMoving += elementsMovingOrResizing; SelectionChanging += selectingImages; SelectionChanged += selectionChanged; SelectionResizing += elementsMovingOrResizing; SelectionResized += elementsResized; Commands.ReceiveImage.RegisterCommand(new DelegateCommand<IEnumerable<TargettedImage>>(ReceiveImages)); Commands.ReceiveVideo.RegisterCommandToDispatcher<TargettedVideo>(new DelegateCommand<TargettedVideo>(ReceiveVideo)); Commands.ReceiveDirtyImage.RegisterCommand(new DelegateCommand<TargettedDirtyElement>(ReceiveDirtyImage)); Commands.ReceiveDirtyVideo.RegisterCommandToDispatcher<TargettedDirtyElement>(new DelegateCommand<TargettedDirtyElement>(ReceiveDirtyVideo)); Commands.AddImage.RegisterCommandToDispatcher(new DelegateCommand<object>(addImageFromDisk)); Commands.FileUpload.RegisterCommand(new DelegateCommand<object>(uploadFile)); Commands.SetPrivacyOfItems.RegisterCommand(new DelegateCommand<string>(changeSelectedItemsPrivacy)); Commands.ImageDropped.RegisterCommandToDispatcher(new DelegateCommand<ImageDrop>(imagedDropped)); Commands.ReceiveDirtyLiveWindow.RegisterCommand(new DelegateCommand<TargettedDirtyElement>(ReceiveDirtyLiveWindow)); Commands.DugPublicSpace.RegisterCommand(new DelegateCommand<LiveWindowSetup>(DugPublicSpace)); Commands.DeleteSelectedItems.RegisterCommand(new DelegateCommand<object>(deleteSelectedImages)); Commands.MirrorVideo.RegisterCommand(new DelegateCommand<VideoMirror.VideoMirrorInformation>(mirrorVideo)); Commands.VideoMirrorRefreshRectangle.RegisterCommand(new DelegateCommand<string>(mirrorVideoRefresh)); Commands.HideConversationSearchBox.RegisterCommandToDispatcher(new DelegateCommand<object>(hideConversationSearchBox)); Commands.UpdateConversationDetails.RegisterCommandToDispatcher(new DelegateCommand<object>(updateImagePrivacy)); var undoHandler = new CommandBinding(ApplicationCommands.Undo, null, justNo); this.CommandBindings.Add(undoHandler); }
/// <summary> /// Initializes static members of the <see cref="MainWindow"/> class by registering commands. /// </summary> static MainWindow() { var exitBinding = new CommandBinding(exitCommand); CommandManager.RegisterClassCommandBinding(typeof(MainWindow), exitBinding); var aboutBinding = new CommandBinding(aboutCommand); CommandManager.RegisterClassCommandBinding(typeof(MainWindow), aboutBinding); }
public ShowResults(int experimentID, SqlConnection sql) { InitializeComponent(); this.sql = sql; this.experimentID = experimentID; CommandBinding customCommandBinding = new CommandBinding(ReclassifyOK, showReclassifyOK, canShowReclassify); CommandBindings.Add(customCommandBinding); customCommandBinding = new CommandBinding(ReclassifyBug, showReclassifyBug, canShowReclassify); CommandBindings.Add(customCommandBinding); customCommandBinding = new CommandBinding(ReclassifyError, showReclassifyError, canShowReclassify); CommandBindings.Add(customCommandBinding); customCommandBinding = new CommandBinding(ReclassifyTimeout, showReclassifyTimeout, canShowReclassify); CommandBindings.Add(customCommandBinding); customCommandBinding = new CommandBinding(ReclassifyMemout, showReclassifyMemout, canShowReclassify); CommandBindings.Add(customCommandBinding); customCommandBinding = new CommandBinding(CopyFilename, showCopyFilename, canShowCopyFilename); CommandBindings.Add(customCommandBinding); SqlCommand cmd = new SqlCommand("SELECT Timeout, SharedDir FROM Experiments WHERE ID=" + experimentID, sql); SqlDataReader r = cmd.ExecuteReader(); if (!r.Read()) throw new Exception("Error reading from SQL connection"); this.timeout = (string)r["Timeout"]; this.basedir = (string)r["SharedDir"]; r.Close(); Title = "Experiment " + experimentID; txtSharedDir.Text = basedir; updateGrid(radioAll); }
public MainWindow() { InitializeComponent(); FullScreenCommand = new RoutedCommand("FullScreenCommand", typeof(MainWindow)); FullScreenCommandBinding = new CommandBinding(FullScreenCommand, FullScreenCommandHandler); }
//--------------------------------------------------------------------- /// <summary> /// Create standard bindings. /// </summary> private void CreateBindings() { var binding = new CommandBinding(ApplicationCommands.New); binding.Executed += (s, e) => {mainViewModel.NewCommand(s,e);}; binding.CanExecute += (s, e) => { mainViewModel.CanExecuteNew(s,e); }; this.CommandBindings.Add(binding); binding = new CommandBinding(ApplicationCommands.Open); binding.Executed += (s,e)=> { mainViewModel.OpenCommand(s, e); }; binding.CanExecute += (s, e) => { mainViewModel.CanExecuteOpen(s,e); }; this.CommandBindings.Add(binding); binding = new CommandBinding(ApplicationCommands.Save); binding.Executed += (s, e) => { mainViewModel.SaveCommand(s, e); }; binding.CanExecute += (s,e) => { mainViewModel.CanExecuteSave(s,e); }; binding = new CommandBinding(ApplicationCommands.SaveAs); binding.Executed += (s, e) => { mainViewModel.SaveAsCommand(s, e); }; binding.CanExecute += (s, e) => { mainViewModel.CanExecuteSaveAs(s, e); }; binding = new CommandBinding(ApplicationCommands.Find); binding.Executed += (s, e) => { mainViewModel.FindCommand(s, e); }; binding.CanExecute += (s, e) => { mainViewModel.CanExecuteFind(s, e); }; binding = new CommandBinding(ApplicationCommands.Delete); binding.Executed += (s, e) => { mainViewModel.DeleteCommand(s, e); }; binding.CanExecute += (s, e) => { mainViewModel.CanExecuteDelete(s, e); }; binding = new CommandBinding(ApplicationCommands.Help); binding.Executed += (s, e) => { mainViewModel.HelpCommand(s, e); }; binding.CanExecute += (s, e) => { mainViewModel.CanExecuteHelp(s, e); }; this.CommandBindings.Add(binding); }
public LoginViewModel(LoginView view) { try { this.view = view; this.ConfirmPasswordVisible = Visibility.Collapsed; CommandBinding cmdAccept = new CommandBinding( AcceptCommand, (s, e) => Accept(), (s, e) => { e.CanExecute = !String.IsNullOrEmpty(Username) && !String.IsNullOrEmpty(Password); }); CommandBinding cmdCancel = new CommandBinding( CancelCommand, (s, e) => Cancel(), (s, e) => { e.CanExecute = true; }); view.CommandBindings.Add(cmdAccept); view.CommandBindings.Add(cmdCancel); } catch (Exception ex) { ex.ShowMessageBox(); } }
private void createCommandBindings() { CommandBinding bindNew = new CommandBinding(); CommandBinding bindOpen = new CommandBinding(); CommandBinding bindSave = new CommandBinding(); CommandBinding bindExit = new CommandBinding(); bindNew.Command = ApplicationCommands.New; bindNew.Executed += NewGame_Executed; bindNew.CanExecute += NewGame_CanExecute; CommandBindings.Add(bindNew); bindOpen.Command = ApplicationCommands.Open; bindOpen.Executed += OpenFile_Executed; bindOpen.CanExecute += OpenFile_CanExecute; CommandBindings.Add(bindOpen); bindSave.Command = ApplicationCommands.Save; bindSave.Executed += SaveFile_Executed; bindSave.CanExecute += SaveFile_CanExecute; CommandBindings.Add(bindSave); bindExit.Command = CustomCommands.Exit; bindExit.Executed += ExitGame_Executed; bindExit.CanExecute += ExitGame_CanExecute; CommandBindings.Add(bindExit); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\MainWindow.xaml" ((SSP1Application.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.GoToService = ((System.Windows.Input.CommandBinding)(target)); #line 13 "..\..\MainWindow.xaml" this.GoToService.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.GoToService_Executed); #line default #line hidden return; } this._contentLoaded = true; }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var binding = new CommandBinding(Commands.CloseWindow, CloseWindow); CommandManager.RegisterClassCommandBinding(typeof(Window), binding); }
public TablesContextMenu(DatabaseMenuCommandParameters menuCommandParameters, ExplorerToolWindow parent) { var dcmd = new DatabaseMenuCommandsHandler(parent); var createTableCommandBinding = new CommandBinding(DatabaseMenuCommands.DatabaseCommand, dcmd.BuildTable); var createTableMenuItem = new MenuItem { Header = "Build Table (beta)...", Icon = ImageHelper.GetImageFromResource("../resources/AddTable_5632.png"), Command = DatabaseMenuCommands.DatabaseCommand, CommandParameter = menuCommandParameters }; createTableMenuItem.CommandBindings.Add(createTableCommandBinding); Items.Add(createTableMenuItem); Items.Add(new Separator()); var refreshCommandBinding = new CommandBinding(DatabaseMenuCommands.DatabaseCommand, dcmd.RefreshTables); var refreshMenuItem = new MenuItem { Header = "Refresh", Icon = ImageHelper.GetImageFromResource("../resources/refresh.png"), Command = DatabaseMenuCommands.DatabaseCommand, CommandParameter = menuCommandParameters }; refreshMenuItem.CommandBindings.Add(refreshCommandBinding); Items.Add(refreshMenuItem); }
public MainWindow () { InitializeComponent (); StatusBarText = String.Empty; IsHlrOffPushed = false; IsHlrOnPushed = true; IsZoomWinEnabled = true; #region menu operations CommandBinding aBind_New = new CommandBinding (IECommands.New); aBind_New.Executed += NewCommand_Executed; CommandBindings.Add (aBind_New); CommandBinding aBind_Close = new CommandBinding (IECommands.Close); aBind_Close.Executed += CloseCommand_Executed; aBind_Close.CanExecute += CloseCommand_CanExecute; CommandBindings.Add (aBind_Close); CommandBinding aBind_Quit = new CommandBinding (IECommands.Quit); aBind_Quit.Executed += QuitCommand_Executed; CommandBindings.Add (aBind_Quit); CommandBinding aBind_About = new CommandBinding (IECommands.About); aBind_About.Executed += AboutCommand_Executed; CommandBindings.Add (aBind_About); #endregion }
private void BindCommands() { CommandBinding showAddNewCustomerDialog = new CommandBinding(CustomerFormCommands.AddNewCustomer); showAddNewCustomerDialog.Executed += new ExecutedRoutedEventHandler(AddNewCustomer_Executed); this.CommandBindings.Add(showAddNewCustomerDialog); CommandBinding showDelCustomerDialog = new CommandBinding(CustomerFormCommands.DeleteCustomer); showDelCustomerDialog.Executed += new ExecutedRoutedEventHandler(DelCustomer_Executed); this.CommandBindings.Add(showDelCustomerDialog); CommandBinding showViewAllCustomerDialog = new CommandBinding(CustomerFormCommands.ViewAllCustomers); showViewAllCustomerDialog.Executed += new ExecutedRoutedEventHandler(ViewAllCustomers_Executed); this.CommandBindings.Add(showViewAllCustomerDialog); CommandBinding showAddNewContactDialog = new CommandBinding(ContactFormCommands.AddNewContact); showAddNewContactDialog.Executed += new ExecutedRoutedEventHandler(AddNewContact_Executed); this.CommandBindings.Add(showAddNewContactDialog); CommandBinding showDeleteContactDialog = new CommandBinding(ContactFormCommands.DeleteContact); showDeleteContactDialog.Executed += new ExecutedRoutedEventHandler(DelContact_Executed); this.CommandBindings.Add(showDeleteContactDialog); CommandBinding showViewAllContactsDialog = new CommandBinding(ContactFormCommands.ViewAllContacts); showViewAllContactsDialog.Executed += new ExecutedRoutedEventHandler(ViewAllContacts_Executed); this.CommandBindings.Add(showViewAllContactsDialog); }
public CommandsWindow() { InitializeComponent(); CommandBinding b = new CommandBinding(ApplicationCommands.New); b.Executed += BOnExecuted; CommandBindings.Add(b); }
private void SetF1CommandBinding() { CommandBinding helpBinding = new CommandBinding(ApplicationCommands.Help); helpBinding.CanExecute += new CanExecuteRoutedEventHandler(helpBinding_CanExecute); helpBinding.Executed += new ExecutedRoutedEventHandler(helpBinding_Executed); CommandBindings.Add(helpBinding); }
public SettingsControl() { InitializeComponent(); CommandBinding MenuClick = new CommandBinding(SettingsCommands.OpenMenu); MenuClick.Executed += MenuClick_Executed; MenuClick.CanExecute += MenuClick_CanExecute; this.CommandBindings.Add(MenuClick); CommandBinding ApplyClick = new CommandBinding(SettingsCommands.Apply); ApplyClick.Executed += ApplyClick_Executed; ApplyClick.CanExecute += ApplyClick_CanExecute; this.CommandBindings.Add(ApplyClick); CommandBinding ResetClick = new CommandBinding(SettingsCommands.Reset); ResetClick.Executed += ResetClick_Executed; ResetClick.CanExecute += ResetClick_CanExecute; this.CommandBindings.Add(ResetClick); /* CommandBinding CloseClick = new CommandBinding(SettingsCommands.Close); CloseClick.Executed += CloseClick_Executed; CloseClick.CanExecute += CloseClick_CanExecute; this.CommandBindings.Add(CloseClick); */ }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { // Creating the main panel var mainStackPanel = new StackPanel(); AddChild(mainStackPanel); // Button used to invoke the command var commandButton = new Button { Command = ApplicationCommands.Open, Content = "Open (KeyBindings: Ctrl-R, Ctrl-0)" }; mainStackPanel.Children.Add(commandButton); // Creating CommandBinding and attaching an Executed and CanExecute handler var openCmdBinding = new CommandBinding( ApplicationCommands.Open, OpenCmdExecuted, OpenCmdCanExecute); CommandBindings.Add(openCmdBinding); // Creating a KeyBinding between the Open command and Ctrl-R var openCmdKeyBinding = new KeyBinding( ApplicationCommands.Open, Key.R, ModifierKeys.Control); InputBindings.Add(openCmdKeyBinding); }
/// <summary> /// Initializes a new instance of the <see cref="DatasetVertexView"/> class. /// </summary> /// <remarks> /// This constructor is called internally by the WPF system because this class is part of a template /// in the DatasetGraphView. No point in changing this constructor to take external arguments because /// it won't work that way. /// </remarks> internal DatasetVertexView() { InitializeComponent(); // Bind the new dataset command { var cb = new CommandBinding(s_NewDatasetCommand, CommandNewDatasetExecuted, CommandNewDatasetCanExecute); CommandBindings.Add(cb); addChildDatasetButton.Command = s_NewDatasetCommand; } // Bind the delete dataset command { var cb = new CommandBinding(s_RemoveDatasetCommand, CommandDeleteDatasetExecuted, CommandDeleteDatasetCanExecute); CommandBindings.Add(cb); deleteDatasetButton.Command = s_RemoveDatasetCommand; } // Bind the activate / deactivate command { var cb = new CommandBinding( s_ActivateOrDeactivateDatasetCommand, CommandActivateDeactivateDatasetExecuted, CommandActivateDeactivateDatasetCanExecute); CommandBindings.Add(cb); activateOrDeactivateDatasetButton.Command = s_ActivateOrDeactivateDatasetCommand; } // Bind the show detail view command { var cb = new CommandBinding(s_ShowDetailViewCommand, CommandShowDetailViewExecuted, CommandShowDetailViewCanExecute); CommandBindings.Add(cb); showDetailButton.Command = s_ShowDetailViewCommand; } }
public ScopesContextMenu(MenuCommandParameters scopeMenuCommandParameters, ExplorerToolWindow parent) { var dcmd = new ScopesMenuCommandsHandler(parent); if (scopeMenuCommandParameters.MenuItemType == MenuType.Manage) { var dropScopeCommandBinding = new CommandBinding(ScopesMenuCommands.ScopeCommand, dcmd.DropScope); var dropScopeMenuItem = new MenuItem { Header = "Deprovision Scope...", Icon = ImageHelper.GetImageFromResource("../resources/action_Cancel_16xLG.png"), Command = ScopesMenuCommands.ScopeCommand, CommandParameter = scopeMenuCommandParameters, }; dropScopeMenuItem.CommandBindings.Add(dropScopeCommandBinding); Items.Add(dropScopeMenuItem); } else { } }
private void AddCommandBindings() { _openCommandBinding = new CommandBinding( ApplicationCommands.Open, (s, e) => Open(new Uri((string)e.Parameter))); Editor.Window.CommandBindings.Add(_openCommandBinding); }
public page_chat() { InitializeComponent(); RoutedCommand Input_SendMessage = new RoutedCommand(); RoutedCommand Input_Return = new RoutedCommand(); KeyBinding Input_SendMessage_Keybinding = new KeyBinding(Input_SendMessage, new KeyGesture(Key.Enter)); CommandBinding Input_SendMessage_Binding = new CommandBinding(Input_SendMessage, Input_SentMessage_Execute, CmdCanExecute); KeyBinding Input_Return_Keybinding = new KeyBinding(Input_Return, new KeyGesture(Key.Enter, ModifierKeys.Control)); CommandBinding Input_Return_Binding = new CommandBinding(Input_Return, Input_Return_Execute, CmdCanExecute); this.rtf_input.InputBindings.Add(Input_SendMessage_Keybinding); this.rtf_input.CommandBindings.Add(Input_SendMessage_Binding); this.rtf_input.InputBindings.Add(Input_Return_Keybinding); this.rtf_input.CommandBindings.Add(Input_Return_Binding); CommandBinding pasteCmdBinding = new CommandBinding(ApplicationCommands.Paste, OnPaste, OnCanExecutePaste); this.rtf_input.CommandBindings.Add(pasteCmdBinding); try { this.rtf_input.FontSize = Convert.ToDouble(ConfigManager.Instance.GetString("font_size", "12")); this.rtf_input.FontFamily = new FontFamily(ConfigManager.Instance.GetString("font", "Segoe WP")); this.rtf_input.Foreground = (SolidColorBrush)new BrushConverter().ConvertFromString(ConfigManager.Instance.GetString("font_color", "#000000")); } catch { } this.rtf_input.AddHandler(RichTextBox.DragOverEvent, new DragEventHandler(rtf_DragOver), true); this.rtf_input.AddHandler(RichTextBox.DropEvent, new DragEventHandler(rtf_DragDrop), true); }
/// <summary> /// Initializes static members of the <see cref="Wizard" /> class. /// </summary> static Wizard() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Wizard), new FrameworkPropertyMetadata(typeof(Wizard))); IsTabStopProperty.OverrideMetadata(typeof(Wizard), new FrameworkPropertyMetadata(false)); var backBinding = new CommandBinding(WizardCommands.PreviousPage, OnBackCommand, OnBackCommandCanExecute); CommandManager.RegisterClassCommandBinding(typeof(Wizard), backBinding); CommandManager.RegisterClassInputBinding(typeof(Wizard), new KeyBinding(WizardCommands.PreviousPage, Key.Left, ModifierKeys.Alt)); CommandManager.RegisterClassInputBinding(typeof(Wizard), new InputBinding(WizardCommands.PreviousPage, new ExtendedMouseGesture(ExtendedMouseAction.XButton1Click))); var nextBinding = new CommandBinding(WizardCommands.NextPage, OnNextCommand, OnNextCommandCanExecute); CommandManager.RegisterClassCommandBinding(typeof(Wizard), nextBinding); CommandManager.RegisterClassInputBinding(typeof(Wizard), new InputBinding(WizardCommands.NextPage, new ExtendedMouseGesture(ExtendedMouseAction.XButton2Click))); var finishBinding = new CommandBinding(WizardCommands.Finish, OnFinishCommand, OnFinishCommandCanExecute); CommandManager.RegisterClassCommandBinding(typeof(Wizard), finishBinding); var cancelBinding = new CommandBinding(WizardCommands.Cancel, OnCancelCommand, OnCancelCommandCanExecute); CommandManager.RegisterClassCommandBinding(typeof(Wizard), cancelBinding); }
static CageCommands() { CommandFeedClick = new RoutedCommand("CommandFeedClick", typeof(CageCommands)); CommandHealClick = new RoutedCommand("CommandHealClick", typeof(CageCommands)); CommandGrowClick = new RoutedCommand("CommandGrowClick", typeof(CageCommands)); CommandBinding bindingfeed = new CommandBinding(); bindingfeed.Command = CommandFeedClick; bindingfeed.Executed += new ExecutedRoutedEventHandler(CommandFeedClick_Executed); bindingfeed.CanExecute += new CanExecuteRoutedEventHandler(CommandFeedClick_CanExecute); CommandBinding bindingheal = new CommandBinding(); bindingheal.Command = CommandHealClick; bindingheal.Executed += new ExecutedRoutedEventHandler(CommandHealClick_Executed); bindingheal.CanExecute += new CanExecuteRoutedEventHandler(CommandHealClick_CanExecute); CommandBinding bindinggrow = new CommandBinding(); bindinggrow.Command = CommandGrowClick; bindinggrow.Executed += new ExecutedRoutedEventHandler(CommandGrowClick_Executed); bindinggrow.CanExecute += new CanExecuteRoutedEventHandler(CommandGrowClick_CanExecute); CommandManager.RegisterClassCommandBinding(typeof(CageControl), bindingfeed); CommandManager.RegisterClassCommandBinding(typeof(CageControl), bindingheal); CommandManager.RegisterClassCommandBinding(typeof(CageControl), bindinggrow); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\RentalWindow.xaml" ((SkiRental.RentalGUI.RentalWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.Rent = ((System.Windows.Input.CommandBinding)(target)); #line 14 "..\..\RentalWindow.xaml" this.Rent.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Rent_CanExecute); #line default #line hidden #line 14 "..\..\RentalWindow.xaml" this.Rent.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Rent_Executed); #line default #line hidden return; case 3: this.Cancel = ((System.Windows.Input.CommandBinding)(target)); #line 15 "..\..\RentalWindow.xaml" this.Cancel.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Cancel_CanExecute); #line default #line hidden #line 15 "..\..\RentalWindow.xaml" this.Cancel.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Cancel_Executed); #line default #line hidden return; case 4: this.cbRentalPlan = ((System.Windows.Controls.ComboBox)(target)); #line 42 "..\..\RentalWindow.xaml" this.cbRentalPlan.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbRentalPlan_SelectionChanged); #line default #line hidden return; } this._contentLoaded = true; }
private ProxyBinding(System.Windows.Input.CommandBinding parent) { if (parent == null) { return; } Parent = parent; Parent.Executed += OnExecuted; Parent.CanExecute += OnExecute; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MessagesCom = ((System.Windows.Input.CommandBinding)(target)); return; case 2: this.OpenHistory = ((System.Windows.Input.CommandBinding)(target)); return; case 3: this.OpenCustom = ((System.Windows.Input.CommandBinding)(target)); return; case 4: this.Transfer = ((System.Windows.Input.CommandBinding)(target)); return; case 5: this.CloseAccount = ((System.Windows.Input.CommandBinding)(target)); return; case 6: this.Replenish = ((System.Windows.Input.CommandBinding)(target)); return; case 7: this.Repayment = ((System.Windows.Input.CommandBinding)(target)); return; case 8: this.listCustomer = ((System.Windows.Controls.ListView)(target)); return; case 9: this.AccountControlTab = ((System.Windows.Controls.TabControl)(target)); return; } this._contentLoaded = true; }
internal ICommand FindMatch(object targetElement, InputEventArgs inputEventArgs) { for (int i = 0; i < Count; i++) { CommandBinding commandBinding = this[i]; RoutedCommand routedCommand = commandBinding.Command as RoutedCommand; if (routedCommand != null) { InputGestureCollection inputGestures = routedCommand.InputGesturesInternal; if (inputGestures != null) { if (inputGestures.FindMatch(targetElement, inputEventArgs) != null) { return(routedCommand); } } } } return(null); }
/// <summary> /// Adds a command binding to the specified <paramref name="element"/> and returns an observable sequence with two notification channels, /// with the right channel receiving notifications when the <paramref name="command"/> is executed and the left channel /// receiving notifications when the <paramref name="command"/> is queried as to whether it can be executed. /// </summary> /// <param name="command">The <see cref="ICommand"/> from which notifications are received.</param> /// <param name="element">The <see cref="UIElement"/> that queries or executes the specified <paramref name="command"/>.</param> /// <returns>An observable sequence with two notification channels, with the right channel receiving notifications when the <paramref name="command"/> is executed and /// the left channel receiving notifications when the <paramref name="command"/> is queried as to whether it can be executed.</returns> public static IObservable <Either <EventPattern <CanExecuteRoutedEventArgs>, EventPattern <ExecutedRoutedEventArgs> > > AsObservable( this ICommand command, UIElement element) { Contract.Requires(command != null); Contract.Requires(element != null); Contract.Ensures(Contract.Result <IObservable <Either <EventPattern <CanExecuteRoutedEventArgs>, EventPattern <ExecutedRoutedEventArgs> > > >() != null); return(Observable2.CreateEither <EventPattern <CanExecuteRoutedEventArgs>, EventPattern <ExecutedRoutedEventArgs> >( observer => { var binding = new CommandBinding( command, (sender, e) => observer.OnNextRight(new EventPattern <ExecutedRoutedEventArgs>(sender, e)), (sender, e) => observer.OnNextLeft(new EventPattern <CanExecuteRoutedEventArgs>(sender, e))); element.CommandBindings.Add(binding); return () => element.CommandBindings.Remove(binding); })); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.OnNew = ((System.Windows.Input.CommandBinding)(target)); #line 10 "..\..\..\..\WpfApp2_PracticeBInding\MenuWindow.xaml" this.OnNew.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.OnNew_CanExecute); #line default #line hidden #line 10 "..\..\..\..\WpfApp2_PracticeBInding\MenuWindow.xaml" this.OnNew.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OnNew_Executed); #line default #line hidden return; case 2: #line 23 "..\..\..\..\WpfApp2_PracticeBInding\MenuWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnNew_Click); #line default #line hidden return; case 3: #line 30 "..\..\..\..\WpfApp2_PracticeBInding\MenuWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnClose_Click); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// Register class level CommandBindings. /// </summary> /// <param name="type">Owner type</param> /// <param name="commandBinding">CommandBinding to register</param> public static void RegisterClassCommandBinding(Type type, CommandBinding commandBinding) { if (type == null) { throw new ArgumentNullException("type"); } if (commandBinding == null) { throw new ArgumentNullException("commandBinding"); } lock (_classCommandBindings.SyncRoot) { CommandBindingCollection bindings = _classCommandBindings[type] as CommandBindingCollection; if (bindings == null) { bindings = new CommandBindingCollection(); _classCommandBindings[type] = bindings; } bindings.Add(commandBinding); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.AddMonumentCommand = ((System.Windows.Input.CommandBinding)(target)); #line 11 "..\..\MainWindow.xaml" this.AddMonumentCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.AddMonumentCommand_CanExecute); #line default #line hidden #line 11 "..\..\MainWindow.xaml" this.AddMonumentCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.AddMonumentCommand_Executed); #line default #line hidden return; case 2: this.AddTypeCommand = ((System.Windows.Input.CommandBinding)(target)); #line 12 "..\..\MainWindow.xaml" this.AddTypeCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.AddTypeCommand_CanExecute); #line default #line hidden #line 12 "..\..\MainWindow.xaml" this.AddTypeCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.AddTypeCommand_Executed); #line default #line hidden return; case 3: this.AddTagCommand = ((System.Windows.Input.CommandBinding)(target)); #line 13 "..\..\MainWindow.xaml" this.AddTagCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.AddTagCommand_CanExecute); #line default #line hidden #line 13 "..\..\MainWindow.xaml" this.AddTagCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.AddTagCommand_Executed); #line default #line hidden return; case 4: this.EditMonumentCommand = ((System.Windows.Input.CommandBinding)(target)); #line 14 "..\..\MainWindow.xaml" this.EditMonumentCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.EditMonumentCommand_CanExecute); #line default #line hidden #line 14 "..\..\MainWindow.xaml" this.EditMonumentCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.EditMonumentCommand_Executed); #line default #line hidden return; case 5: this.RemoveMonumentCommand = ((System.Windows.Input.CommandBinding)(target)); #line 15 "..\..\MainWindow.xaml" this.RemoveMonumentCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RemoveMonumentCommand_CanExecute); #line default #line hidden #line 15 "..\..\MainWindow.xaml" this.RemoveMonumentCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RemoveMonumentCommand_Executed); #line default #line hidden return; case 6: this.ListTypesCommand = ((System.Windows.Input.CommandBinding)(target)); #line 16 "..\..\MainWindow.xaml" this.ListTypesCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.ListTypesCommand_CanExecute); #line default #line hidden #line 16 "..\..\MainWindow.xaml" this.ListTypesCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.ListTypesCommand_Executed); #line default #line hidden return; case 7: this.ListTagsCommand = ((System.Windows.Input.CommandBinding)(target)); #line 17 "..\..\MainWindow.xaml" this.ListTagsCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.ListTagsCommand_CanExecute); #line default #line hidden #line 17 "..\..\MainWindow.xaml" this.ListTagsCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.ListTagsCommand_Executed); #line default #line hidden return; case 8: this.NextTabCommand = ((System.Windows.Input.CommandBinding)(target)); #line 18 "..\..\MainWindow.xaml" this.NextTabCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.NextTabCommand_CanExecute); #line default #line hidden #line 18 "..\..\MainWindow.xaml" this.NextTabCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.NextTabCommand_Executed); #line default #line hidden return; case 9: this.PreviousTabCommand = ((System.Windows.Input.CommandBinding)(target)); #line 19 "..\..\MainWindow.xaml" this.PreviousTabCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.PreviousTabCommand_CanExecute); #line default #line hidden #line 19 "..\..\MainWindow.xaml" this.PreviousTabCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.PreviousTabCommand_Executed); #line default #line hidden return; case 10: this.Tab1Command = ((System.Windows.Input.CommandBinding)(target)); #line 20 "..\..\MainWindow.xaml" this.Tab1Command.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Tab1Command_CanExecute); #line default #line hidden #line 20 "..\..\MainWindow.xaml" this.Tab1Command.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Tab1Command_Executed); #line default #line hidden return; case 11: this.Tab2Command = ((System.Windows.Input.CommandBinding)(target)); #line 21 "..\..\MainWindow.xaml" this.Tab2Command.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Tab2Command_CanExecute); #line default #line hidden #line 21 "..\..\MainWindow.xaml" this.Tab2Command.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Tab2Command_Executed); #line default #line hidden return; case 12: this.Tab3Command = ((System.Windows.Input.CommandBinding)(target)); #line 22 "..\..\MainWindow.xaml" this.Tab3Command.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Tab3Command_CanExecute); #line default #line hidden #line 22 "..\..\MainWindow.xaml" this.Tab3Command.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Tab3Command_Executed); #line default #line hidden return; case 13: this.Tab4Command = ((System.Windows.Input.CommandBinding)(target)); #line 23 "..\..\MainWindow.xaml" this.Tab4Command.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Tab4Command_CanExecute); #line default #line hidden #line 23 "..\..\MainWindow.xaml" this.Tab4Command.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Tab4Command_Executed); #line default #line hidden return; case 14: this.CheatSheetCommand = ((System.Windows.Input.CommandBinding)(target)); #line 24 "..\..\MainWindow.xaml" this.CheatSheetCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CheatSheetCommand_CanExecute); #line default #line hidden #line 24 "..\..\MainWindow.xaml" this.CheatSheetCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CheatSheetCommand_Executed); #line default #line hidden return; case 15: this.HelpDocumentationCommand = ((System.Windows.Input.CommandBinding)(target)); #line 25 "..\..\MainWindow.xaml" this.HelpDocumentationCommand.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.HelpDocumentationCommand_CanExecute); #line default #line hidden #line 25 "..\..\MainWindow.xaml" this.HelpDocumentationCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.HelpDocumentationCommand_Executed); #line default #line hidden return; case 16: this.MainContent = ((emlekmu.MainContent)(target)); return; } this._contentLoaded = true; }
private void InitializeTextEditor() { #region AssemblyLoader assemblyLoader = new AssemblyLoader(); assemblyLoader.AssembliesLoading += (sender, args) => OnAssembliesLoading(args.Value); assemblyLoader.InternalAssembliesLoaded += (sender, args) => OnInternalAssembliesLoaded(args.Value); assemblyLoader.AssembliesLoaded += (sender, args) => OnAssembliesLoaded(args.Value); assemblyLoader.AssembliesUnloading += (sender, args) => OnAssembliesUnloading(args.Value); assemblyLoader.InternalAssembliesUnloaded += (sender, args) => OnInternalAssembliesUnloaded(args.Value); assemblyLoader.AssembliesUnloaded += (sender, args) => OnAssembliesUnloaded(args.Value); #endregion #region TextMarkerService textMarkerService = new TextMarkerService(TextEditor.Document); TextEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService); TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); TextEditor.TextArea.TextView.Services.AddService(typeof(ITextMarkerService), textMarkerService); #endregion #region ReadOnlySectionProvider TextEditor.TextArea.ReadOnlySectionProvider = new MethodDefinitionReadOnlySectionProvider(this); #endregion #region SearchPanel SearchPanel.Install(TextEditor); #endregion #region CompletionCommand CompletionCommand = new Input.RoutedCommand(); CompletionCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.Space, Input.ModifierKeys.Control)); #endregion #region MoveLinesUpCommand var moveLinesUpCommand = new Input.RoutedCommand(); moveLinesUpCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.Up, Input.ModifierKeys.Alt)); var moveLinesUpCommandBinding = new Input.CommandBinding(moveLinesUpCommand, (sender, args) => ExecuteMoveLinesCommand(MovementDirection.Up)); TextEditor.CommandBindings.Add(moveLinesUpCommandBinding); #endregion #region MoveLinesDownCommand var moveLinesDownCommand = new Input.RoutedCommand(); moveLinesDownCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.Down, Input.ModifierKeys.Alt)); var moveLinesDownCommandBinding = new Input.CommandBinding(moveLinesDownCommand, (sender, args) => ExecuteMoveLinesCommand(MovementDirection.Down)); TextEditor.CommandBindings.Add(moveLinesDownCommandBinding); #endregion #region GoToLineCommand var goToLineCommand = new Input.RoutedCommand(); goToLineCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.G, Input.ModifierKeys.Control)); var goToLineCommandBinding = new Input.CommandBinding(goToLineCommand, (sender, args) => ExecuteGoToLineCommand()); TextEditor.CommandBindings.Add(goToLineCommandBinding); #endregion TextEditorSyntaxHighlighting = DefaultTextEditorSyntaxHighlighting; TextEditorShowLineNumbers = DefaultTextEditorShowLineNumbers; TextEditorShowSpaces = DefaultTextEditorShowSpaces; TextEditorShowTabs = DefaultTextEditorShowTabs; TextEditorConvertTabsToSpaces = DefaultTextEditorConvertTabsToSpaces; TextEditorHighlightCurrentLine = DefaultTextEditorHighlightCurrentLine; TextEditorIndentationSize = DefaultTextEditorIndentationSize; Doc.FileName = DefaultDocumentFileName; TextEditor.FontFamily = new Media.FontFamily(DefaultTextEditorFontFamily); TextEditor.FontSize = DefaultTextEditorFontSize; TextEditor.Options.EnableVirtualSpace = true; TextEditor.TextArea.IndentationStrategy = new CSharpIndentationStrategy(TextEditor.Options); TextEditor.TextChanged += (sender, args) => { foreach (var marker in textMarkerService.TextMarkers) { if (marker == prefixMarker || marker == suffixMarker) { continue; } if (marker.Length != (int)marker.Tag) { marker.Delete(); } else { int caretOffset = TextEditor.CaretOffset; var line = Doc.GetLineByOffset(marker.StartOffset); int lineEndOffset = line.EndOffset; if (caretOffset == lineEndOffset) // special case for markers beyond line length { marker.Delete(); } } } OnTextEditorTextChanged(); }; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 15 "..\..\MainWindow.xaml" ((Write.MainWindow)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.Window_SizeChanged); #line default #line hidden #line 15 "..\..\MainWindow.xaml" ((Write.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 15 "..\..\MainWindow.xaml" ((Write.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.SaveCommand = ((System.Windows.Input.CommandBinding)(target)); #line 29 "..\..\MainWindow.xaml" this.SaveCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SaveCommand_Executed); #line default #line hidden return; case 3: this.SaveAsCommand = ((System.Windows.Input.CommandBinding)(target)); #line 30 "..\..\MainWindow.xaml" this.SaveAsCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SaveAsCommand_Executed); #line default #line hidden return; case 4: this.NewCommand = ((System.Windows.Input.CommandBinding)(target)); #line 31 "..\..\MainWindow.xaml" this.NewCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.NewCommand_Executed); #line default #line hidden return; case 5: this.OpenCommand = ((System.Windows.Input.CommandBinding)(target)); #line 32 "..\..\MainWindow.xaml" this.OpenCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenCommand_Executed); #line default #line hidden return; case 6: this.MinimizeBnt = ((System.Windows.Controls.Grid)(target)); #line 36 "..\..\MainWindow.xaml" this.MinimizeBnt.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MinimizeBnt_MouseEnter); #line default #line hidden #line 36 "..\..\MainWindow.xaml" this.MinimizeBnt.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MinimizeBnt_MouseLeave); #line default #line hidden #line 36 "..\..\MainWindow.xaml" this.MinimizeBnt.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.MinimizeBnt_MouseDown); #line default #line hidden return; case 7: this.RestoreBnt = ((System.Windows.Controls.Grid)(target)); #line 39 "..\..\MainWindow.xaml" this.RestoreBnt.MouseEnter += new System.Windows.Input.MouseEventHandler(this.RestoreBnt_MouseEnter); #line default #line hidden #line 39 "..\..\MainWindow.xaml" this.RestoreBnt.MouseLeave += new System.Windows.Input.MouseEventHandler(this.RestoreBnt_MouseLeave); #line default #line hidden #line 39 "..\..\MainWindow.xaml" this.RestoreBnt.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.RestoreBnt_MouseDown); #line default #line hidden return; case 8: this.MaximizeBnt = ((System.Windows.Controls.Grid)(target)); #line 42 "..\..\MainWindow.xaml" this.MaximizeBnt.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MaximizeBnt_MouseEnter); #line default #line hidden #line 42 "..\..\MainWindow.xaml" this.MaximizeBnt.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MaximizeBnt_MouseLeave); #line default #line hidden #line 42 "..\..\MainWindow.xaml" this.MaximizeBnt.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.MaximizeBnt_MouseDown); #line default #line hidden return; case 9: this.CloseBnt = ((System.Windows.Controls.Grid)(target)); #line 45 "..\..\MainWindow.xaml" this.CloseBnt.MouseEnter += new System.Windows.Input.MouseEventHandler(this.CloseBnt_MouseEnter); #line default #line hidden #line 45 "..\..\MainWindow.xaml" this.CloseBnt.MouseLeave += new System.Windows.Input.MouseEventHandler(this.CloseBnt_MouseLeave); #line default #line hidden #line 45 "..\..\MainWindow.xaml" this.CloseBnt.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.CloseBnt_MouseDown); #line default #line hidden return; case 10: #line 49 "..\..\MainWindow.xaml" ((System.Windows.Shapes.Rectangle)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseDown); #line default #line hidden return; case 11: this.NewFileBnt = ((System.Windows.Controls.MenuItem)(target)); #line 52 "..\..\MainWindow.xaml" this.NewFileBnt.Click += new System.Windows.RoutedEventHandler(this.NewFileBnt_Click); #line default #line hidden return; case 12: this.OpenBnt = ((System.Windows.Controls.MenuItem)(target)); #line 57 "..\..\MainWindow.xaml" this.OpenBnt.Click += new System.Windows.RoutedEventHandler(this.OpenBnt_Click); #line default #line hidden return; case 13: this.SaveBnt = ((System.Windows.Controls.MenuItem)(target)); #line 63 "..\..\MainWindow.xaml" this.SaveBnt.Click += new System.Windows.RoutedEventHandler(this.SaveBnt_Click); #line default #line hidden return; case 14: this.SaveAsBnt = ((System.Windows.Controls.MenuItem)(target)); #line 68 "..\..\MainWindow.xaml" this.SaveAsBnt.Click += new System.Windows.RoutedEventHandler(this.SaveAsBnt_Click); #line default #line hidden return; case 15: this.MIClose = ((System.Windows.Controls.MenuItem)(target)); #line 74 "..\..\MainWindow.xaml" this.MIClose.Click += new System.Windows.RoutedEventHandler(this.MIClose_Click); #line default #line hidden return; case 16: this.SaveButton = ((System.Windows.Controls.Button)(target)); #line 100 "..\..\MainWindow.xaml" this.SaveButton.Click += new System.Windows.RoutedEventHandler(this.SaveButton_Click); #line default #line hidden return; case 17: this.LeftBnt = ((System.Windows.Controls.ListBoxItem)(target)); #line 115 "..\..\MainWindow.xaml" this.LeftBnt.Selected += new System.Windows.RoutedEventHandler(this.LeftBnt_Selected); #line default #line hidden return; case 18: this.CenterBnt = ((System.Windows.Controls.ListBoxItem)(target)); #line 118 "..\..\MainWindow.xaml" this.CenterBnt.Selected += new System.Windows.RoutedEventHandler(this.CenterBnt_Selected); #line default #line hidden return; case 19: this.RightBnt = ((System.Windows.Controls.ListBoxItem)(target)); #line 121 "..\..\MainWindow.xaml" this.RightBnt.Selected += new System.Windows.RoutedEventHandler(this.RightBnt_Selected); #line default #line hidden return; case 20: this.JustifyBnt = ((System.Windows.Controls.ListBoxItem)(target)); #line 124 "..\..\MainWindow.xaml" this.JustifyBnt.Selected += new System.Windows.RoutedEventHandler(this.JustifyBnt_Selected); #line default #line hidden return; case 21: this.BoldBnt = ((System.Windows.Controls.ListBoxItem)(target)); #line 130 "..\..\MainWindow.xaml" this.BoldBnt.Selected += new System.Windows.RoutedEventHandler(this.BoldBnt_Selected); #line default #line hidden #line 130 "..\..\MainWindow.xaml" this.BoldBnt.Unselected += new System.Windows.RoutedEventHandler(this.BoldBnt_Unselected); #line default #line hidden return; case 22: this.ItalicBnt = ((System.Windows.Controls.ListBoxItem)(target)); #line 133 "..\..\MainWindow.xaml" this.ItalicBnt.Selected += new System.Windows.RoutedEventHandler(this.ItalicBnt_Selected); #line default #line hidden #line 133 "..\..\MainWindow.xaml" this.ItalicBnt.Unselected += new System.Windows.RoutedEventHandler(this.ItalicBnt_Unselected); #line default #line hidden return; case 23: this.UnderlineBnt = ((System.Windows.Controls.ListBoxItem)(target)); #line 136 "..\..\MainWindow.xaml" this.UnderlineBnt.Selected += new System.Windows.RoutedEventHandler(this.UnderlineBnt_Selected); #line default #line hidden #line 136 "..\..\MainWindow.xaml" this.UnderlineBnt.Unselected += new System.Windows.RoutedEventHandler(this.UnderlineBnt_Unselected); #line default #line hidden return; case 24: this.FontComboBox = ((System.Windows.Controls.ComboBox)(target)); return; case 25: this.FontFamilyComboBox = ((System.Windows.Controls.ComboBox)(target)); return; case 26: this.SpellCheckBnt = ((System.Windows.Controls.Button)(target)); #line 164 "..\..\MainWindow.xaml" this.SpellCheckBnt.Click += new System.Windows.RoutedEventHandler(this.SpellCheckBnt_Click); #line default #line hidden return; case 27: this.TextZone = ((System.Windows.Controls.RichTextBox)(target)); #line 169 "..\..\MainWindow.xaml" this.TextZone.SelectionChanged += new System.Windows.RoutedEventHandler(this.TextZone_SelectionChanged); #line default #line hidden #line 169 "..\..\MainWindow.xaml" this.TextZone.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextZone_TextChanged); #line default #line hidden return; case 28: this.SaveIndicator = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.cmdOpen = ((System.Windows.Input.CommandBinding)(target)); #line 11 "..\..\MainWindow.xaml" this.cmdOpen.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.cmdOpen_CanExecute); #line default #line hidden #line 11 "..\..\MainWindow.xaml" this.cmdOpen.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.cmdOpen_Executed); #line default #line hidden return; case 2: this.cmdSave = ((System.Windows.Input.CommandBinding)(target)); #line 12 "..\..\MainWindow.xaml" this.cmdSave.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.cmdSave_CanExecute); #line default #line hidden #line 12 "..\..\MainWindow.xaml" this.cmdSave.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.cmdSave_Executed); #line default #line hidden return; case 3: this.cmdSaveAs = ((System.Windows.Input.CommandBinding)(target)); #line 13 "..\..\MainWindow.xaml" this.cmdSaveAs.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.cmdSaveAs_CanExecute); #line default #line hidden #line 13 "..\..\MainWindow.xaml" this.cmdSaveAs.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.cmdSaveAs_Executed); #line default #line hidden return; case 4: this.cmdHelp = ((System.Windows.Input.CommandBinding)(target)); #line 14 "..\..\MainWindow.xaml" this.cmdHelp.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.cmdHelp_CanExecute); #line default #line hidden #line 14 "..\..\MainWindow.xaml" this.cmdHelp.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.cmdHelp_Executed); #line default #line hidden return; case 5: this.cmdNew = ((System.Windows.Input.CommandBinding)(target)); #line 15 "..\..\MainWindow.xaml" this.cmdNew.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.cmdNew_CanExecute); #line default #line hidden #line 15 "..\..\MainWindow.xaml" this.cmdNew.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.cmdNew_Executed); #line default #line hidden return; case 6: this.menuHelp = ((System.Windows.Controls.MenuItem)(target)); return; case 7: this.btnNew = ((System.Windows.Controls.Button)(target)); return; case 8: this.btnLoad = ((System.Windows.Controls.Button)(target)); return; case 9: this.btnSave = ((System.Windows.Controls.Button)(target)); return; case 10: this.btnSaveAs = ((System.Windows.Controls.Button)(target)); return; case 11: this.tabContact = ((System.Windows.Controls.TabControl)(target)); #line 60 "..\..\MainWindow.xaml" this.tabContact.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.tabContact_SelectionChanged); #line default #line hidden return; case 12: this.NbrContacts = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.exit0 = ((System.Windows.Input.CommandBinding)(target)); #line 10 "..\..\MainWindow.xaml" this.exit0.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Exit0_Executed); #line default #line hidden return; case 2: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 3: this.richTextBox1 = ((System.Windows.Controls.TextBox)(target)); #line 30 "..\..\MainWindow.xaml" this.richTextBox1.DragEnter += new System.Windows.DragEventHandler(this.RichTextBox1_DragEnter); #line default #line hidden #line 30 "..\..\MainWindow.xaml" this.richTextBox1.Drop += new System.Windows.DragEventHandler(this.RichTextBox1_Drop); #line default #line hidden #line 30 "..\..\MainWindow.xaml" this.richTextBox1.PreviewDragOver += new System.Windows.DragEventHandler(this.RichTextBox1_PreviewDragOver); #line default #line hidden #line 30 "..\..\MainWindow.xaml" this.richTextBox1.KeyDown += new System.Windows.Input.KeyEventHandler(this.RichTextBox1_KeyDown); #line default #line hidden return; case 4: this.richTextBox2 = ((System.Windows.Controls.TextBox)(target)); #line 31 "..\..\MainWindow.xaml" this.richTextBox2.DragEnter += new System.Windows.DragEventHandler(this.RichTextBox2_DragEnter); #line default #line hidden #line 31 "..\..\MainWindow.xaml" this.richTextBox2.Drop += new System.Windows.DragEventHandler(this.RichTextBox2_Drop); #line default #line hidden #line 31 "..\..\MainWindow.xaml" this.richTextBox2.PreviewDragOver += new System.Windows.DragEventHandler(this.RichTextBox2_PreviewDragOver); #line default #line hidden #line 31 "..\..\MainWindow.xaml" this.richTextBox2.KeyDown += new System.Windows.Input.KeyEventHandler(this.RichTextBox1_KeyDown); #line default #line hidden return; case 5: this.richTextBox3 = ((System.Windows.Controls.TextBox)(target)); #line 32 "..\..\MainWindow.xaml" this.richTextBox3.DragEnter += new System.Windows.DragEventHandler(this.RichTextBox3_DragEnter); #line default #line hidden #line 32 "..\..\MainWindow.xaml" this.richTextBox3.Drop += new System.Windows.DragEventHandler(this.RichTextBox3_Drop); #line default #line hidden #line 32 "..\..\MainWindow.xaml" this.richTextBox3.PreviewDragOver += new System.Windows.DragEventHandler(this.RichTextBox3_PreviewDragOver); #line default #line hidden #line 32 "..\..\MainWindow.xaml" this.richTextBox3.KeyDown += new System.Windows.Input.KeyEventHandler(this.RichTextBox1_KeyDown); #line default #line hidden return; case 6: this.clear = ((System.Windows.Controls.MenuItem)(target)); #line 37 "..\..\MainWindow.xaml" this.clear.Click += new System.Windows.RoutedEventHandler(this.Clear_Click); #line default #line hidden return; case 7: this.exit1 = ((System.Windows.Controls.MenuItem)(target)); return; } this._contentLoaded = true; }
public void Insert(int index, CommandBinding commandBinding) { }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 11 "..\..\..\Views\MainWindow.xaml" ((MyJukeboxWMPDapper.MainWindow)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Move_Window); #line default #line hidden #line 11 "..\..\..\Views\MainWindow.xaml" ((MyJukeboxWMPDapper.MainWindow)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.Window_SizeChanged); #line default #line hidden #line 11 "..\..\..\Views\MainWindow.xaml" ((MyJukeboxWMPDapper.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 11 "..\..\..\Views\MainWindow.xaml" ((MyJukeboxWMPDapper.MainWindow)(target)).KeyUp += new System.Windows.Input.KeyEventHandler(this.Window_KeyUp); #line default #line hidden return; case 2: #line 17 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuDatagridCopyCell_Click); #line default #line hidden return; case 3: #line 19 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuDatagridOpenEditor_Click); #line default #line hidden return; case 4: #line 22 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuDatagridOpenBrowser_Click); #line default #line hidden return; case 5: #line 25 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuPlaylistAdd_Click); #line default #line hidden return; case 6: #line 26 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuPlaylistRename_Click); #line default #line hidden return; case 7: #line 27 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.contextmenuPlaylistRemove_Click); #line default #line hidden return; case 8: #line 31 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Play_CanExecute); #line default #line hidden #line 31 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Play_Executed); #line default #line hidden return; case 9: #line 32 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Pause_CanExecute); #line default #line hidden #line 32 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Pause_Executed); #line default #line hidden return; case 10: #line 33 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Stop_CanExecute); #line default #line hidden #line 33 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Stop_Executed); #line default #line hidden return; case 11: #line 34 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.OpenFolder_CanExecute); #line default #line hidden #line 34 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenFolder_Executed); #line default #line hidden return; case 12: this.CopyDataRow = ((System.Windows.Input.CommandBinding)(target)); #line 36 "..\..\..\Views\MainWindow.xaml" this.CopyDataRow.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CopyDataRowCanExecute); #line default #line hidden #line 37 "..\..\..\Views\MainWindow.xaml" this.CopyDataRow.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CopyDataRowExecuted); #line default #line hidden return; case 13: #line 39 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.PlaybackLoop_CanExecute); #line default #line hidden #line 40 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.PlaybackLoop_Executed); #line default #line hidden return; case 14: #line 42 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.PlaybackShuffle_CanExecute); #line default #line hidden #line 43 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.PlaybackShuffle_Execute); #line default #line hidden return; case 15: this.sbaudio = ((System.Windows.Controls.Primitives.StatusBar)(target)); return; case 16: this.statusGenre = ((System.Windows.Controls.TextBlock)(target)); return; case 17: this.statusCatalog = ((System.Windows.Controls.TextBlock)(target)); return; case 18: this.statusAlbum = ((System.Windows.Controls.TextBlock)(target)); return; case 19: this.statusArtist = ((System.Windows.Controls.TextBlock)(target)); return; case 20: this.sbplaylist = ((System.Windows.Controls.Primitives.StatusBar)(target)); return; case 21: this.textblockPlaylist = ((System.Windows.Controls.TextBlock)(target)); return; case 22: this.sbquery = ((System.Windows.Controls.Primitives.StatusBar)(target)); return; case 23: this.textblockQuery = ((System.Windows.Controls.TextBlock)(target)); return; case 24: this.statusSelected = ((System.Windows.Controls.TextBlock)(target)); return; case 25: this.statusCount = ((System.Windows.Controls.TextBlock)(target)); return; case 26: this.textblockRowSelected = ((System.Windows.Controls.TextBlock)(target)); return; case 27: this.statusDuration = ((System.Windows.Controls.TextBlock)(target)); return; case 28: this.statusProgress = ((System.Windows.Controls.TextBlock)(target)); return; case 29: this.statusVersion = ((System.Windows.Controls.TextBlock)(target)); return; case 30: this.textblockHeader = ((System.Windows.Controls.StackPanel)(target)); return; case 31: this.textblockCurrentSong = ((System.Windows.Controls.TextBlock)(target)); return; case 32: this.buttonMaximize = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 189 "..\..\..\Views\MainWindow.xaml" this.buttonMaximize.Checked += new System.Windows.RoutedEventHandler(this.buttonMaximize_Checked); #line default #line hidden #line 189 "..\..\..\Views\MainWindow.xaml" this.buttonMaximize.Unchecked += new System.Windows.RoutedEventHandler(this.buttonMaximize_Unchecked); #line default #line hidden return; case 33: this.buttonMinimize = ((System.Windows.Controls.Button)(target)); #line 192 "..\..\..\Views\MainWindow.xaml" this.buttonMinimize.Click += new System.Windows.RoutedEventHandler(this.buttonMinimize_Click); #line default #line hidden return; case 34: this.buttonClose = ((System.Windows.Controls.Button)(target)); #line 197 "..\..\..\Views\MainWindow.xaml" this.buttonClose.Click += new System.Windows.RoutedEventHandler(this.buttonClose_Click); #line default #line hidden return; case 35: this.menuMain = ((System.Windows.Controls.Menu)(target)); return; case 36: this.menuExit = ((System.Windows.Controls.MenuItem)(target)); #line 229 "..\..\..\Views\MainWindow.xaml" this.menuExit.Click += new System.Windows.RoutedEventHandler(this.menuExit_Click); #line default #line hidden return; case 37: #line 256 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.menuEditMultiline_Click); #line default #line hidden return; case 38: #line 262 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.menuToolsTest1_Click); #line default #line hidden return; case 39: #line 263 "..\..\..\Views\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.menuToolsTest2_Click); #line default #line hidden return; case 40: this.menuSettings = ((System.Windows.Controls.MenuItem)(target)); return; case 41: this.menuEditRecordLocation = ((System.Windows.Controls.MenuItem)(target)); #line 269 "..\..\..\Views\MainWindow.xaml" this.menuEditRecordLocation.Click += new System.Windows.RoutedEventHandler(this.menuEditRecordLocation_Click); #line default #line hidden return; case 42: this.menuDatabaseCheckPath = ((System.Windows.Controls.MenuItem)(target)); #line 275 "..\..\..\Views\MainWindow.xaml" this.menuDatabaseCheckPath.Click += new System.Windows.RoutedEventHandler(this.menuDatabaseCheckPath_Click); #line default #line hidden return; case 43: this.expanderLeftPanel = ((System.Windows.Controls.Expander)(target)); return; case 44: this.tabcontrol = ((System.Windows.Controls.TabControl)(target)); #line 287 "..\..\..\Views\MainWindow.xaml" this.tabcontrol.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.tabcontrol_SelectionChanged); #line default #line hidden return; case 45: this.tabitemAudio = ((System.Windows.Controls.TabItem)(target)); return; case 46: this.rdgenre = ((System.Windows.Controls.RowDefinition)(target)); return; case 47: this.rdcatalog = ((System.Windows.Controls.RowDefinition)(target)); return; case 48: this.rdalbum = ((System.Windows.Controls.RowDefinition)(target)); return; case 49: this.rdartist = ((System.Windows.Controls.RowDefinition)(target)); return; case 50: this.expanderGenre = ((System.Windows.Controls.Expander)(target)); #line 299 "..\..\..\Views\MainWindow.xaml" this.expanderGenre.Expanded += new System.Windows.RoutedEventHandler(this.expanderGenre_Expanded); #line default #line hidden #line 299 "..\..\..\Views\MainWindow.xaml" this.expanderGenre.Collapsed += new System.Windows.RoutedEventHandler(this.expanderGenre_Collapsed); #line default #line hidden return; case 51: this.listboxGenres = ((System.Windows.Controls.ListBox)(target)); #line 301 "..\..\..\Views\MainWindow.xaml" this.listboxGenres.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxGenres_MouseLeftButtonUp); #line default #line hidden return; case 52: this.expanderCatalog = ((System.Windows.Controls.Expander)(target)); #line 314 "..\..\..\Views\MainWindow.xaml" this.expanderCatalog.Expanded += new System.Windows.RoutedEventHandler(this.expanderCatalog_Expanded); #line default #line hidden #line 314 "..\..\..\Views\MainWindow.xaml" this.expanderCatalog.Collapsed += new System.Windows.RoutedEventHandler(this.expanderCatalog_Collapsed); #line default #line hidden return; case 53: this.listboxCatalogs = ((System.Windows.Controls.ListBox)(target)); #line 316 "..\..\..\Views\MainWindow.xaml" this.listboxCatalogs.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxCatalogs_MouseLeftButtonUp); #line default #line hidden return; case 54: this.expanderAlbum = ((System.Windows.Controls.Expander)(target)); #line 330 "..\..\..\Views\MainWindow.xaml" this.expanderAlbum.Expanded += new System.Windows.RoutedEventHandler(this.expanderAlbum_Expanded); #line default #line hidden #line 330 "..\..\..\Views\MainWindow.xaml" this.expanderAlbum.Collapsed += new System.Windows.RoutedEventHandler(this.expanderAlbum_Collapsed); #line default #line hidden return; case 55: this.listboxAlbums = ((System.Windows.Controls.ListBox)(target)); #line 332 "..\..\..\Views\MainWindow.xaml" this.listboxAlbums.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxAlbums_MouseLeftButtonUp); #line default #line hidden return; case 56: this.expanderArtist = ((System.Windows.Controls.Expander)(target)); #line 346 "..\..\..\Views\MainWindow.xaml" this.expanderArtist.Expanded += new System.Windows.RoutedEventHandler(this.expanderArtist_Expanded); #line default #line hidden #line 346 "..\..\..\Views\MainWindow.xaml" this.expanderArtist.Collapsed += new System.Windows.RoutedEventHandler(this.expanderArtist_Collapsed); #line default #line hidden return; case 57: this.listboxArtists = ((System.Windows.Controls.ListBox)(target)); #line 348 "..\..\..\Views\MainWindow.xaml" this.listboxArtists.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxArtists_MouseLeftButtonUp); #line default #line hidden return; case 58: this.tabitemPlaylist = ((System.Windows.Controls.TabItem)(target)); return; case 59: this.listboxPlaylists = ((System.Windows.Controls.ListBox)(target)); #line 366 "..\..\..\Views\MainWindow.xaml" this.listboxPlaylists.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxPlaylists_MouseLeftButtonUp); #line default #line hidden return; case 60: this.formsHost = ((System.Windows.Forms.Integration.WindowsFormsHost)(target)); return; case 61: this.axWmp = ((AxWMPLib.AxWindowsMediaPlayer)(target)); return; case 62: this.imageArtist = ((System.Windows.Controls.Image)(target)); return; case 63: this.buttonPlay = ((System.Windows.Controls.Button)(target)); return; case 64: this.Playback_Loop = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 65: this.Playback_Shuffle = ((System.Windows.Controls.Primitives.ToggleButton)(target)); return; case 66: this.touglebuttonSpeaker = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 416 "..\..\..\Views\MainWindow.xaml" this.touglebuttonSpeaker.Click += new System.Windows.RoutedEventHandler(this.touglebuttonSpeaker_Click); #line default #line hidden return; case 67: this.progressBarVolume = ((System.Windows.Controls.ProgressBar)(target)); return; case 68: this.sliderVolume = ((System.Windows.Controls.Slider)(target)); #line 426 "..\..\..\Views\MainWindow.xaml" this.sliderVolume.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.sliderVolume_MouseWheel); #line default #line hidden #line 427 "..\..\..\Views\MainWindow.xaml" this.sliderVolume.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderVolume_ValueChanged); #line default #line hidden return; case 69: this.progressBarPosition = ((System.Windows.Controls.ProgressBar)(target)); return; case 70: this.sliderPosition = ((System.Windows.Controls.Slider)(target)); #line 435 "..\..\..\Views\MainWindow.xaml" this.sliderPosition.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.sliderPosition_MouseWheel); #line default #line hidden #line 435 "..\..\..\Views\MainWindow.xaml" this.sliderPosition.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderPosition_ValueChanged); #line default #line hidden #line 436 "..\..\..\Views\MainWindow.xaml" this.sliderPosition.AddHandler(System.Windows.Controls.Primitives.Thumb.DragStartedEvent, new System.Windows.Controls.Primitives.DragStartedEventHandler(this.sliderPosition_DragStarted)); #line default #line hidden #line 437 "..\..\..\Views\MainWindow.xaml" this.sliderPosition.AddHandler(System.Windows.Controls.Primitives.Thumb.DragCompletedEvent, new System.Windows.Controls.Primitives.DragCompletedEventHandler(this.sliderPosition_DragCompleted)); #line default #line hidden return; case 71: this.barQuery = ((System.Windows.Controls.ToolBar)(target)); return; case 72: this.textboxQuery = ((System.Windows.Controls.TextBox)(target)); #line 444 "..\..\..\Views\MainWindow.xaml" this.textboxQuery.KeyDown += new System.Windows.Input.KeyEventHandler(this.textboxQuery_KeyDown); #line default #line hidden return; case 73: this.buttonQueryClear = ((System.Windows.Controls.Button)(target)); #line 450 "..\..\..\Views\MainWindow.xaml" this.buttonQueryClear.Click += new System.Windows.RoutedEventHandler(this.buttonQueryClear_Click); #line default #line hidden return; case 74: this.buttonQuerySearch = ((System.Windows.Controls.Button)(target)); #line 456 "..\..\..\Views\MainWindow.xaml" this.buttonQuerySearch.Click += new System.Windows.RoutedEventHandler(this.buttonQuerySearch_Click); #line default #line hidden return; case 75: this.buttonQuerySave = ((System.Windows.Controls.Button)(target)); #line 462 "..\..\..\Views\MainWindow.xaml" this.buttonQuerySave.Click += new System.Windows.RoutedEventHandler(this.buttonQuerySave_Click); #line default #line hidden return; case 76: this.comboboxStoredQueries = ((System.Windows.Controls.ComboBox)(target)); #line 473 "..\..\..\Views\MainWindow.xaml" this.comboboxStoredQueries.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboboxStoredQueries_SelectionChanged); #line default #line hidden return; case 77: this.buttonQueryDelete = ((System.Windows.Controls.Button)(target)); #line 475 "..\..\..\Views\MainWindow.xaml" this.buttonQueryDelete.Click += new System.Windows.RoutedEventHandler(this.buttonQueryDelete_Click); #line default #line hidden return; case 78: this.datagrid = ((System.Windows.Controls.DataGrid)(target)); #line 485 "..\..\..\Views\MainWindow.xaml" this.datagrid.Sorting += new System.Windows.Controls.DataGridSortingEventHandler(this.datagrid_Sorting); #line default #line hidden #line 486 "..\..\..\Views\MainWindow.xaml" this.datagrid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.datagrid_SelectionChanged); #line default #line hidden #line 486 "..\..\..\Views\MainWindow.xaml" this.datagrid.AddHandler(System.Windows.Controls.ScrollViewer.ScrollChangedEvent, new System.Windows.Controls.ScrollChangedEventHandler(this.datagrid_ScrollChanged)); #line default #line hidden #line 487 "..\..\..\Views\MainWindow.xaml" this.datagrid.PreviewMouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.datagrid_PreviewMouseRightButtonDown); #line default #line hidden 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.gridRowBanner = ((System.Windows.Controls.RowDefinition)(target)); return; case 3: this.gridRowFormContent = ((System.Windows.Controls.RowDefinition)(target)); return; case 4: this.gridBanner = ((System.Windows.Controls.Grid)(target)); return; case 5: this.colIcon = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 6: this.colIDStatus = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 7: this.colLabels = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 8: this.colData = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 9: this.colCreatedOnLabels = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 10: this.colCreatedOn = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 11: this.colPadding = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 12: this.rowTop = ((System.Windows.Controls.RowDefinition)(target)); return; case 13: this.rowBottom = ((System.Windows.Controls.RowDefinition)(target)); return; case 14: this.imgSuperGridBrand = ((System.Windows.Shapes.Rectangle)(target)); return; case 15: this.bdrTemplateBG = ((System.Windows.Controls.Border)(target)); return; case 16: this.imageActivityIcon = ((System.Windows.Controls.Image)(target)); return; case 17: this.textActivityId = ((System.Windows.Controls.TextBlock)(target)); return; case 18: this.CopyIdCommandBinding = ((System.Windows.Input.CommandBinding)(target)); return; case 19: this.textActivityStatus = ((System.Windows.Controls.TextBlock)(target)); return; case 20: this.textParentWorkItem = ((System.Windows.Controls.TextBlock)(target)); return; case 21: #line 92 "..\..\..\Views\CiresonTimerActivityUserControl.xaml" ((System.Windows.Documents.Hyperlink)(target)).Click += new System.Windows.RoutedEventHandler(this.Hyperlink_Click); #line default #line hidden return; case 22: this.textCreatedOnLabel = ((System.Windows.Controls.TextBlock)(target)); return; case 23: this.textCreatedOn = ((System.Windows.Controls.TextBlock)(target)); return; case 24: this.tabControl = ((System.Windows.Controls.TabControl)(target)); return; case 25: this.tabGeneral = ((System.Windows.Controls.TabItem)(target)); return; case 26: this.labelTitle = ((System.Windows.Controls.Label)(target)); return; case 27: this.textTitle = ((System.Windows.Controls.TextBox)(target)); return; case 28: this.labelDescription = ((System.Windows.Controls.Label)(target)); return; case 29: this.textDescription = ((System.Windows.Controls.TextBox)(target)); return; case 30: this.labelTimeChoice = ((System.Windows.Controls.Label)(target)); return; case 31: this.panelTimeControls = ((System.Windows.Controls.StackPanel)(target)); return; case 32: this.bindingGroupTimeFrame = ((System.Windows.Data.BindingGroup)(target)); return; case 33: this.rdbTimeFrameTypeSpecificDateTime = ((System.Windows.Controls.RadioButton)(target)); return; case 34: this.panelTimeFrameSpecificDateTime = ((System.Windows.Controls.StackPanel)(target)); return; case 35: this.lblTimeFrameTypeSpecificDateTime = ((System.Windows.Controls.Label)(target)); return; case 36: this.borderTimeFrameSpecificDateTime = ((System.Windows.Controls.Border)(target)); return; case 37: this.dateScheduledEndDate = ((Xceed.Wpf.Toolkit.DateTimePicker)(target)); return; case 38: this.rdbTimeFrameTypeDuration = ((System.Windows.Controls.RadioButton)(target)); return; case 39: this.panelTimeFrameDuration = ((System.Windows.Controls.StackPanel)(target)); return; case 40: this.lblTimeFrameTypeDuration = ((System.Windows.Controls.Label)(target)); return; case 41: this.txtDurationUnits = ((System.Windows.Controls.TextBox)(target)); return; case 42: this.cbxDurationEnum = ((System.Windows.Controls.ComboBox)(target)); return; case 43: this.lblTimeControlsError = ((System.Windows.Controls.Label)(target)); return; case 44: this.paneltestconfirmation = ((System.Windows.Controls.StackPanel)(target)); return; case 45: this.btnOk = ((System.Windows.Controls.Button)(target)); return; case 46: this.btnCancel = ((System.Windows.Controls.Button)(target)); return; case 47: this.lblisGuiTestMode = ((System.Windows.Controls.Label)(target)); return; case 48: this.tabRelatedItems = ((System.Windows.Controls.TabItem)(target)); return; case 49: this.tabHistory = ((System.Windows.Controls.TabItem)(target)); return; } this._contentLoaded = true; }
/// <summary> /// IndexOf /// </summary> /// <param name="value">item whose index is queried</param> /// <returns></returns> int IList.IndexOf(object value) { CommandBinding commandBinding = value as CommandBinding; return((commandBinding != null) ? this.IndexOf(commandBinding) : -1); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.atrasButton = ((System.Windows.Input.CommandBinding)(target)); #line 315 "..\..\MainWindow.xaml" this.atrasButton.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.atrasButton_Executed); #line default #line hidden return; case 2: this.vaciarButton = ((System.Windows.Input.CommandBinding)(target)); #line 322 "..\..\MainWindow.xaml" this.vaciarButton.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.vaciarButton_Executed); #line default #line hidden #line 323 "..\..\MainWindow.xaml" this.vaciarButton.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.vaciarButton_CanExecute); #line default #line hidden return; case 3: this.actualizarButton = ((System.Windows.Input.CommandBinding)(target)); #line 330 "..\..\MainWindow.xaml" this.actualizarButton.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.actualizarButton_Executed); #line default #line hidden #line 331 "..\..\MainWindow.xaml" this.actualizarButton.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.actualizarButton_CanExecute); #line default #line hidden return; case 4: this.borrarButton = ((System.Windows.Input.CommandBinding)(target)); #line 338 "..\..\MainWindow.xaml" this.borrarButton.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.borrarButton_Executed); #line default #line hidden #line 339 "..\..\MainWindow.xaml" this.borrarButton.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.borrarButton_CanExecute); #line default #line hidden return; case 5: this.buscarButton = ((System.Windows.Input.CommandBinding)(target)); #line 346 "..\..\MainWindow.xaml" this.buscarButton.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.buscarButton_Executed); #line default #line hidden #line 347 "..\..\MainWindow.xaml" this.buscarButton.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.buscarButton_CanExecute); #line default #line hidden return; case 6: this.añadirNuevoButton = ((System.Windows.Input.CommandBinding)(target)); #line 354 "..\..\MainWindow.xaml" this.añadirNuevoButton.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.añadirNuevoButton_Executed); #line default #line hidden #line 355 "..\..\MainWindow.xaml" this.añadirNuevoButton.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.añadirNuevoButton_CanExecute); #line default #line hidden return; case 7: this.buscarPeliculaEnListaButton = ((System.Windows.Input.CommandBinding)(target)); #line 362 "..\..\MainWindow.xaml" this.buscarPeliculaEnListaButton.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.buscarPeliculaEnListaButton_Executed); #line default #line hidden return; case 8: this.pestañasTabControl = ((System.Windows.Controls.TabControl)(target)); return; case 9: this.añadirButton = ((System.Windows.Controls.Button)(target)); #line 382 "..\..\MainWindow.xaml" this.añadirButton.Click += new System.Windows.RoutedEventHandler(this.añadirButton_Click); #line default #line hidden return; case 10: this.gestionarButton = ((System.Windows.Controls.Button)(target)); #line 393 "..\..\MainWindow.xaml" this.gestionarButton.Click += new System.Windows.RoutedEventHandler(this.gestionarButton_Click); #line default #line hidden return; case 11: this.enlaceTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.BuscarButton = ((System.Windows.Controls.Button)(target)); return; case 13: this.tituloNuevaPeliTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 14: this.enlaceNuevaPeliTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 15: this.añoNuevaPeliTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 16: this.generoNuevaPeliComboBox = ((System.Windows.Controls.TextBox)(target)); return; case 17: this.subGenero1NuevaPeliComboBox = ((System.Windows.Controls.TextBox)(target)); return; case 18: this.subGenero2NuevaPeliComboBox = ((System.Windows.Controls.TextBox)(target)); return; case 19: this.VolverAtrasButton = ((System.Windows.Controls.Button)(target)); return; case 20: this.peliculasListBox = ((System.Windows.Controls.ListBox)(target)); return; case 21: this.tituloTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.cartelTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 23: this.añoTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 24: this.idTextBox = ((System.Windows.Controls.TextBox)(target)); return; case 25: this.generoComboBox = ((System.Windows.Controls.ComboBox)(target)); return; case 26: this.subGenero1ComboBox = ((System.Windows.Controls.ComboBox)(target)); return; case 27: this.subGenero2ComboBox = ((System.Windows.Controls.ComboBox)(target)); return; case 28: this.buscarListaButton = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Miner = ((MinerClient.MainWindow)(target)); #line 4 "..\..\MainWindow.xaml" this.Miner.Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.New = ((System.Windows.Input.CommandBinding)(target)); return; case 3: this.MI = ((System.Windows.Controls.MenuItem)(target)); return; case 4: #line 13 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Window_Loaded_easy); #line default #line hidden return; case 5: #line 14 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Window_Loaded_normal); #line default #line hidden return; case 6: #line 15 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Window_Loaded_hard); #line default #line hidden return; case 7: #line 18 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.btnClose_Click); #line default #line hidden return; case 8: this.cnvMain = ((System.Windows.Controls.Canvas)(target)); return; case 9: this.gridPanel = ((System.Windows.Controls.Grid)(target)); return; case 10: this.btnMiner = ((System.Windows.Controls.Button)(target)); #line 32 "..\..\MainWindow.xaml" this.btnMiner.Click += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 11: this.lblTimer = ((System.Windows.Controls.Label)(target)); return; case 12: this.lblFlags = ((System.Windows.Controls.Label)(target)); return; case 13: this.NamePlayer = ((System.Windows.Controls.TextBox)(target)); return; case 14: this.btnEnter = ((System.Windows.Controls.Button)(target)); #line 41 "..\..\MainWindow.xaml" this.btnEnter.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 15: this.ButExi = ((System.Windows.Controls.Button)(target)); #line 42 "..\..\MainWindow.xaml" this.ButExi.Click += new System.Windows.RoutedEventHandler(this.ButExi_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MainWindow.xaml" ((Graphic_editor.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.NewBinding = ((System.Windows.Input.CommandBinding)(target)); #line 11 "..\..\MainWindow.xaml" this.NewBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.NewBinding_OnExecuted); #line default #line hidden return; case 3: this.OpenBinding = ((System.Windows.Input.CommandBinding)(target)); #line 12 "..\..\MainWindow.xaml" this.OpenBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenBinding_OnExecuted); #line default #line hidden return; case 4: this.SaveBinding = ((System.Windows.Input.CommandBinding)(target)); #line 13 "..\..\MainWindow.xaml" this.SaveBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SaveBinding_OnExecuted); #line default #line hidden return; case 5: this.CloseBinding = ((System.Windows.Input.CommandBinding)(target)); #line 14 "..\..\MainWindow.xaml" this.CloseBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CloseBinding_OnExecuted); #line default #line hidden return; case 6: #line 43 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnUndo_Click); #line default #line hidden return; case 7: #line 48 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnRedo_Click); #line default #line hidden return; case 8: this.mProperties = ((System.Windows.Controls.MenuItem)(target)); #line 54 "..\..\MainWindow.xaml" this.mProperties.Click += new System.Windows.RoutedEventHandler(this.MProperties_Click); #line default #line hidden return; case 9: this.mAbout = ((System.Windows.Controls.MenuItem)(target)); #line 60 "..\..\MainWindow.xaml" this.mAbout.Click += new System.Windows.RoutedEventHandler(this.MAbout_Click); #line default #line hidden return; case 10: this.btnUndo = ((System.Windows.Controls.Button)(target)); #line 76 "..\..\MainWindow.xaml" this.btnUndo.Click += new System.Windows.RoutedEventHandler(this.BtnUndo_Click); #line default #line hidden return; case 11: this.btnRedo = ((System.Windows.Controls.Button)(target)); #line 79 "..\..\MainWindow.xaml" this.btnRedo.Click += new System.Windows.RoutedEventHandler(this.BtnRedo_Click); #line default #line hidden return; case 12: this.btnPencil = ((System.Windows.Controls.Button)(target)); #line 84 "..\..\MainWindow.xaml" this.btnPencil.Click += new System.Windows.RoutedEventHandler(this.BtnPencil_Click); #line default #line hidden return; case 13: this.btnBrush = ((System.Windows.Controls.Button)(target)); #line 87 "..\..\MainWindow.xaml" this.btnBrush.Click += new System.Windows.RoutedEventHandler(this.BtnBrush_Click); #line default #line hidden return; case 14: this.btnPipette = ((System.Windows.Controls.Button)(target)); #line 90 "..\..\MainWindow.xaml" this.btnPipette.Click += new System.Windows.RoutedEventHandler(this.BtnPipette_Click); #line default #line hidden return; case 15: this.btnEraser = ((System.Windows.Controls.Button)(target)); #line 93 "..\..\MainWindow.xaml" this.btnEraser.Click += new System.Windows.RoutedEventHandler(this.BtnEraser_Click); #line default #line hidden return; case 16: this.btnLine = ((System.Windows.Controls.Button)(target)); #line 98 "..\..\MainWindow.xaml" this.btnLine.Click += new System.Windows.RoutedEventHandler(this.BtnLine_Click); #line default #line hidden return; case 17: this.btnRectangle = ((System.Windows.Controls.Button)(target)); #line 101 "..\..\MainWindow.xaml" this.btnRectangle.Click += new System.Windows.RoutedEventHandler(this.BtnRectangle_Click); #line default #line hidden return; case 18: this.btnElipse = ((System.Windows.Controls.Button)(target)); #line 104 "..\..\MainWindow.xaml" this.btnElipse.Click += new System.Windows.RoutedEventHandler(this.BtnElipse_Click); #line default #line hidden return; case 19: this.cbFillShape = ((System.Windows.Controls.CheckBox)(target)); return; case 20: this.colorPicker = ((Xceed.Wpf.Toolkit.ColorPicker)(target)); #line 115 "..\..\MainWindow.xaml" this.colorPicker.SelectedColorChanged += new System.Windows.RoutedPropertyChangedEventHandler <System.Nullable <System.Windows.Media.Color> >(this.ColorPicker_SelectedColorChanged); #line default #line hidden return; case 21: this.spThickness = ((System.Windows.Controls.StackPanel)(target)); return; case 22: this.slBrushThickness = ((System.Windows.Controls.Slider)(target)); #line 121 "..\..\MainWindow.xaml" this.slBrushThickness.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.SlBrushThickness_ValueChanged); #line default #line hidden return; case 23: this.tBrushThickness = ((System.Windows.Controls.TextBox)(target)); return; case 24: this.scrViewer = ((System.Windows.Controls.ScrollViewer)(target)); return; case 25: this.cnvPaint = ((System.Windows.Controls.Canvas)(target)); #line 128 "..\..\MainWindow.xaml" this.cnvPaint.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.CnvPaint_MouseLeftButtonDown); #line default #line hidden #line 128 "..\..\MainWindow.xaml" this.cnvPaint.MouseMove += new System.Windows.Input.MouseEventHandler(this.CnvPaint_MouseMove); #line default #line hidden return; } this._contentLoaded = true; }
private static bool ExecuteCommandBinding(object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding) { // Asserting a permission in the case that the command was user initiated // and the command is a secure command. We can do this safely because at // the time the binding was setup, we demanded the permission. ISecureCommand secureCommand = e.Command as ISecureCommand; bool elevate = e.UserInitiated && (secureCommand != null) && (secureCommand.UserInitiatedPermission != null); if (elevate) { secureCommand.UserInitiatedPermission.Assert(); //BlessedAssert } try { commandBinding.OnExecuted(sender, e); } finally { if (elevate) { CodeAccessPermission.RevertAssert(); } } return(e.Handled); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\MainWindow.xaml" ((AVSketch.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 8 "..\..\MainWindow.xaml" ((AVSketch.MainWindow)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.Window_SizeChanged); #line default #line hidden #line 8 "..\..\MainWindow.xaml" ((AVSketch.MainWindow)(target)).TextInput += new System.Windows.Input.TextCompositionEventHandler(this.Window_TextInput); #line default #line hidden #line 8 "..\..\MainWindow.xaml" ((AVSketch.MainWindow)(target)).PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.Window_PreviewKeyDown); #line default #line hidden #line 8 "..\..\MainWindow.xaml" ((AVSketch.MainWindow)(target)).PreviewKeyUp += new System.Windows.Input.KeyEventHandler(this.Window_PreviewKeyUp); #line default #line hidden return; case 2: this.newCommand = ((System.Windows.Input.CommandBinding)(target)); #line 11 "..\..\MainWindow.xaml" this.newCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.NewCommand_Executed); #line default #line hidden return; case 3: this.openCommand = ((System.Windows.Input.CommandBinding)(target)); #line 12 "..\..\MainWindow.xaml" this.openCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenCommand_Executed); #line default #line hidden return; case 4: this.saveCommand = ((System.Windows.Input.CommandBinding)(target)); #line 13 "..\..\MainWindow.xaml" this.saveCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SaveCommand_Executed); #line default #line hidden return; case 5: this.saveAsCommand = ((System.Windows.Input.CommandBinding)(target)); #line 14 "..\..\MainWindow.xaml" this.saveAsCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SaveAsCommand_Executed); #line default #line hidden return; case 6: this.undoCommand = ((System.Windows.Input.CommandBinding)(target)); #line 15 "..\..\MainWindow.xaml" this.undoCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.UndoCommand_Executed); #line default #line hidden return; case 7: this.redoCommand = ((System.Windows.Input.CommandBinding)(target)); #line 16 "..\..\MainWindow.xaml" this.redoCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RedoCommand_Executed); #line default #line hidden return; case 8: this.copyCommand = ((System.Windows.Input.CommandBinding)(target)); #line 17 "..\..\MainWindow.xaml" this.copyCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CopyCommand_Executed); #line default #line hidden return; case 9: this.cutCommand = ((System.Windows.Input.CommandBinding)(target)); #line 18 "..\..\MainWindow.xaml" this.cutCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CutCommand_Executed); #line default #line hidden return; case 10: this.pasteCommand = ((System.Windows.Input.CommandBinding)(target)); #line 19 "..\..\MainWindow.xaml" this.pasteCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.PasteCommand_Executed); #line default #line hidden return; case 11: this.deleteCommand = ((System.Windows.Input.CommandBinding)(target)); #line 20 "..\..\MainWindow.xaml" this.deleteCommand.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.DeleteCommand_Executed); #line default #line hidden return; case 12: this.mainGrid = ((System.Windows.Controls.Grid)(target)); return; case 13: this.pan_selector = ((System.Windows.Controls.Button)(target)); #line 73 "..\..\MainWindow.xaml" this.pan_selector.Click += new System.Windows.RoutedEventHandler(this.Pan_selector_Click); #line default #line hidden return; case 14: this.shape_selector = ((System.Windows.Controls.Button)(target)); #line 74 "..\..\MainWindow.xaml" this.shape_selector.Click += new System.Windows.RoutedEventHandler(this.Shape_selector_Click); #line default #line hidden return; case 15: this.line_selector = ((System.Windows.Controls.Button)(target)); #line 75 "..\..\MainWindow.xaml" this.line_selector.Click += new System.Windows.RoutedEventHandler(this.Line_selector_Click); #line default #line hidden return; case 16: this.text_selector = ((System.Windows.Controls.Button)(target)); #line 76 "..\..\MainWindow.xaml" this.text_selector.Click += new System.Windows.RoutedEventHandler(this.Text_selector_Click); #line default #line hidden return; case 17: this.transform_selector = ((System.Windows.Controls.Button)(target)); #line 77 "..\..\MainWindow.xaml" this.transform_selector.Click += new System.Windows.RoutedEventHandler(this.Transform_selector_Click); #line default #line hidden return; case 18: this.colour_selector = ((System.Windows.Controls.Button)(target)); #line 78 "..\..\MainWindow.xaml" this.colour_selector.Click += new System.Windows.RoutedEventHandler(this.Colour_selector_Click); #line default #line hidden return; case 19: this.imaging_grid = ((System.Windows.Controls.Grid)(target)); return; case 20: this.imageContainer = ((System.Windows.Controls.Image)(target)); #line 85 "..\..\MainWindow.xaml" this.imageContainer.MouseMove += new System.Windows.Input.MouseEventHandler(this.Image_MouseMove); #line default #line hidden #line 85 "..\..\MainWindow.xaml" this.imageContainer.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ImageContainer_MouseLeftButtonDown); #line default #line hidden #line 85 "..\..\MainWindow.xaml" this.imageContainer.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.ImageContainer_MouseLeftButtonUp); #line default #line hidden return; case 21: this.tool_options_container = ((System.Windows.Controls.StackPanel)(target)); return; } this._contentLoaded = true; }
public void Remove(CommandBinding commandBinding) { }
/// <summary> /// IndexOf /// </summary> /// <param name="value"></param> /// <returns></returns> public int IndexOf(CommandBinding value) { return((_innerCBList != null) ? _innerCBList.IndexOf(value) : -1); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.AddToFavouritesCommandBinding = ((System.Windows.Input.CommandBinding)(target)); #line 19 "..\..\..\..\Modules\MainMenu\MainMenuUserControl.xaml" this.AddToFavouritesCommandBinding.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.AddToFavourites_OnCanExecute); #line default #line hidden #line 20 "..\..\..\..\Modules\MainMenu\MainMenuUserControl.xaml" this.AddToFavouritesCommandBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.AddToFavourites_OnExecuted); #line default #line hidden return; case 2: this.RemoveFromFavouritesCommandBinding = ((System.Windows.Input.CommandBinding)(target)); #line 23 "..\..\..\..\Modules\MainMenu\MainMenuUserControl.xaml" this.RemoveFromFavouritesCommandBinding.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.RemoveFromFavourites_OnCanExecute); #line default #line hidden #line 24 "..\..\..\..\Modules\MainMenu\MainMenuUserControl.xaml" this.RemoveFromFavouritesCommandBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RemoveFromFavourites_OnExecuted); #line default #line hidden return; case 3: this.ListMenuColumn = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 4: this.DashboardColumn = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 5: this.FavouritesListView = ((CtrlLib.UserInterface.Controls.Data.Menu.CtrlListMenu)(target)); #line 42 "..\..\..\..\Modules\MainMenu\MainMenuUserControl.xaml" this.FavouritesListView.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.AllMenus_OnMouseDoubleClick); #line default #line hidden return; case 6: this.MenuItemsListView = ((CtrlLib.UserInterface.Controls.Data.Menu.CtrlListMenu)(target)); #line 47 "..\..\..\..\Modules\MainMenu\MainMenuUserControl.xaml" this.MenuItemsListView.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.AllMenus_OnMouseDoubleClick); #line default #line hidden return; case 7: this.ModulesTabControl = ((CtrlLib.UserInterface.Controls.Host.CtrlTabControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 13 "..\..\..\..\Modules\Article\ArticleUserControl.xaml" ((CtrlApplication.Modules.Article.ArticleUserControl)(target)).Loaded += new System.Windows.RoutedEventHandler(this.ArticleUserControl_OnLoaded); #line default #line hidden return; case 2: this.CtrlNewCommandBinding = ((System.Windows.Input.CommandBinding)(target)); #line 17 "..\..\..\..\Modules\Article\ArticleUserControl.xaml" this.CtrlNewCommandBinding.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CtrlNewCommandBinding_OnCanExecute); #line default #line hidden #line 18 "..\..\..\..\Modules\Article\ArticleUserControl.xaml" this.CtrlNewCommandBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CtrlNewCommandBinding_OnExecuted); #line default #line hidden return; case 3: this.CtrlSaveCommandBinding = ((System.Windows.Input.CommandBinding)(target)); #line 21 "..\..\..\..\Modules\Article\ArticleUserControl.xaml" this.CtrlSaveCommandBinding.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CtrlSaveCommandBinding_OnCanExecute); #line default #line hidden #line 22 "..\..\..\..\Modules\Article\ArticleUserControl.xaml" this.CtrlSaveCommandBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CtrlSaveCommandBinding_OnExecuted); #line default #line hidden return; case 4: this.CtrlSearchCommandBinding = ((System.Windows.Input.CommandBinding)(target)); #line 25 "..\..\..\..\Modules\Article\ArticleUserControl.xaml" this.CtrlSearchCommandBinding.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CtrlSearchCommandBinding_OnCanExecute); #line default #line hidden #line 26 "..\..\..\..\Modules\Article\ArticleUserControl.xaml" this.CtrlSearchCommandBinding.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CtrlSearchCommandBinding_OnExecuted); #line default #line hidden return; case 5: this.BaseLayoutGroup = ((CtrlLib.UserInterface.Layout.CtrlLayoutGroup)(target)); return; case 6: this.HeaderGroupBox = ((CtrlLib.UserInterface.Controls.Host.CtrlGroupBox)(target)); return; case 7: this.HeaderLayoutGroup = ((CtrlLib.UserInterface.Layout.CtrlLayoutGroup)(target)); return; case 8: this.ArticleIdTextBox = ((CtrlLib.UserInterface.Controls.Editors.CtrlTextBox)(target)); return; case 9: this.PurchasingGroupBox = ((CtrlLib.UserInterface.Controls.Host.CtrlGroupBox)(target)); return; case 10: this.PurchasingLayoutGroup = ((CtrlLib.UserInterface.Layout.CtrlLayoutGroup)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\ProductBrowser.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.InstallGenerated_CanExecute); #line default #line hidden #line 8 "..\..\ProductBrowser.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.InstallGenerated_Executed); #line default #line hidden return; case 2: this.GvlkInstall = ((System.Windows.Input.CommandBinding)(target)); #line 9 "..\..\ProductBrowser.xaml" this.GvlkInstall.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.GvlkInstall_CanExecute); #line default #line hidden #line 10 "..\..\ProductBrowser.xaml" this.GvlkInstall.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.GvlkInstall_Executed); #line default #line hidden return; case 3: this.TopElement = ((System.Windows.Controls.Grid)(target)); return; case 4: this.GroupBoxProductTree = ((System.Windows.Controls.GroupBox)(target)); return; case 5: this.ProductTree = ((System.Windows.Controls.TreeView)(target)); return; case 7: this.MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 8: this.EpidInput = ((System.Windows.Controls.Grid)(target)); return; case 9: this.TextColumn = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 10: this.PasswordColumn = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 11: this.TextBoxEpidInput = ((System.Windows.Controls.TextBox)(target)); #line 61 "..\..\ProductBrowser.xaml" this.TextBoxEpidInput.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.textBox_EpidInput_TextChanged); #line default #line hidden return; case 12: this.PassWordBoxEpidInput = ((System.Windows.Controls.PasswordBox)(target)); #line 63 "..\..\ProductBrowser.xaml" this.PassWordBoxEpidInput.PasswordChanged += new System.Windows.RoutedEventHandler(this.PassWordBoxEpidInput_PasswordChanged); #line default #line hidden return; case 13: this.CheckBoxHideInput = ((System.Windows.Controls.CheckBox)(target)); #line 64 "..\..\ProductBrowser.xaml" this.CheckBoxHideInput.Click += new System.Windows.RoutedEventHandler(this.CheckBoxHideInput_Click); #line default #line hidden return; case 14: this.TextBlockInputErrors = ((System.Windows.Controls.TextBlock)(target)); return; case 15: this.GroupBoxProductDetail = ((System.Windows.Controls.GroupBox)(target)); return; case 16: this.TextBoxSource = ((System.Windows.Controls.TextBox)(target)); return; case 17: this.TextBoxProductName = ((System.Windows.Controls.TextBox)(target)); return; case 18: this.TextBoxSkuId = ((System.Windows.Controls.TextBox)(target)); return; case 19: this.TextBoxEdition = ((System.Windows.Controls.TextBox)(target)); return; case 20: this.TextBoxLicense = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.TextBoxGvlk = ((System.Windows.Controls.TextBox)(target)); #line 111 "..\..\ProductBrowser.xaml" this.TextBoxGvlk.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.textBox_Gvlk_MouseLeftButtonDown); #line default #line hidden return; case 22: this.GridEpid = ((System.Windows.Controls.Grid)(target)); return; case 23: this.ToolTipKeyId = ((System.Windows.Controls.TextBlock)(target)); return; case 24: this.TextBoxGroupId = ((System.Windows.Controls.TextBox)(target)); return; case 25: this.TextBoxKeyId1 = ((System.Windows.Controls.TextBox)(target)); #line 231 "..\..\ProductBrowser.xaml" this.TextBoxKeyId1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.textBox_KeyId_TextChanged); #line default #line hidden return; case 26: this.TextBoxKeyId2 = ((System.Windows.Controls.TextBox)(target)); #line 232 "..\..\ProductBrowser.xaml" this.TextBoxKeyId2.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.textBox_KeyId_TextChanged); #line default #line hidden return; case 27: this.TextBoxType = ((System.Windows.Controls.TextBox)(target)); return; case 28: this.TextBoxLcid = ((System.Windows.Controls.TextBox)(target)); return; case 29: this.TextBoxDate = ((System.Windows.Controls.TextBox)(target)); return; case 30: #line 253 "..\..\ProductBrowser.xaml" ((System.Windows.Controls.TextBox)(target)).TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBoxEPid_OnTextChanged); #line default #line hidden return; case 31: this.TextBoxPartNumber = ((System.Windows.Controls.TextBox)(target)); return; case 32: this.GenerateButton = ((System.Windows.Controls.Button)(target)); #line 261 "..\..\ProductBrowser.xaml" this.GenerateButton.Click += new System.Windows.RoutedEventHandler(this.GenerateButton_Click); #line default #line hidden return; case 33: this.GroupBoxGenerated = ((System.Windows.Controls.GroupBox)(target)); return; case 34: this.DataGridKeys = ((System.Windows.Controls.DataGrid)(target)); #line 275 "..\..\ProductBrowser.xaml" this.DataGridKeys.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.DataGrid_Keys_MouseLeftButtonDown); #line default #line hidden #line 276 "..\..\ProductBrowser.xaml" this.DataGridKeys.LoadingRow += new System.EventHandler <System.Windows.Controls.DataGridRowEventArgs>(this.DataGrid_LoadingRow); #line default #line hidden return; case 35: this.GroupBoxCsvlk = ((System.Windows.Controls.GroupBox)(target)); return; case 36: this.DataGridCsvlk = ((System.Windows.Controls.DataGrid)(target)); #line 294 "..\..\ProductBrowser.xaml" this.DataGridCsvlk.LoadingRow += new System.EventHandler <System.Windows.Controls.DataGridRowEventArgs>(this.DataGrid_LoadingRow); #line default #line hidden return; case 37: this.GroupBoxKeyRanges = ((System.Windows.Controls.GroupBox)(target)); return; case 38: this.DataGridRanges = ((System.Windows.Controls.DataGrid)(target)); #line 311 "..\..\ProductBrowser.xaml" this.DataGridRanges.LoadingRow += new System.EventHandler <System.Windows.Controls.DataGridRowEventArgs>(this.DataGrid_LoadingRow); #line default #line hidden return; case 39: this.InstallButton = ((System.Windows.Controls.Button)(target)); #line 355 "..\..\ProductBrowser.xaml" this.InstallButton.Click += new System.Windows.RoutedEventHandler(this.Button_Install_Click); #line default #line hidden return; case 40: this.CheckButton = ((System.Windows.Controls.Button)(target)); #line 356 "..\..\ProductBrowser.xaml" this.CheckButton.Click += new System.Windows.RoutedEventHandler(this.Button_Check_Click); #line default #line hidden return; case 41: this.CheckOnlineButton = ((System.Windows.Controls.Button)(target)); #line 357 "..\..\ProductBrowser.xaml" this.CheckOnlineButton.Click += new System.Windows.RoutedEventHandler(this.CheckOnlineButton_OnClick); #line default #line hidden return; case 42: this.StatusPanel = ((System.Windows.Controls.DockPanel)(target)); return; case 43: this.Status = ((System.Windows.Controls.TextBlock)(target)); return; case 44: this.ProgressBar = ((System.Windows.Controls.ProgressBar)(target)); return; } this._contentLoaded = true; }
private static void FindCommandBinding(object sender, RoutedEventArgs e, ICommand command, bool execute) { // Check local command bindings CommandBindingCollection commandBindings = null; DependencyObject senderAsDO = sender as DependencyObject; if (InputElement.IsUIElement(senderAsDO)) { commandBindings = ((UIElement)senderAsDO).CommandBindingsInternal; } else if (InputElement.IsContentElement(senderAsDO)) { commandBindings = ((ContentElement)senderAsDO).CommandBindingsInternal; } else if (InputElement.IsUIElement3D(senderAsDO)) { commandBindings = ((UIElement3D)senderAsDO).CommandBindingsInternal; } if (commandBindings != null) { FindCommandBinding(commandBindings, sender, e, command, execute); } // If no command binding is found, check class command bindings // First find the relevant command bindings, under the lock. // Most of the time there are no such bindings; most of the rest of // the time there is only one. Lazy-allocate with this in mind. Tuple <Type, CommandBinding> tuple = null; // zero or one binding List <Tuple <Type, CommandBinding> > list = null; // more than one lock (_classCommandBindings.SyncRoot) { // Check from the current type to all the base types Type classType = sender.GetType(); while (classType != null) { CommandBindingCollection classCommandBindings = _classCommandBindings[classType] as CommandBindingCollection; if (classCommandBindings != null) { int index = 0; while (true) { CommandBinding commandBinding = classCommandBindings.FindMatch(command, ref index); if (commandBinding != null) { if (tuple == null) { tuple = new Tuple <Type, CommandBinding>(classType, commandBinding); } else { if (list == null) { list = new List <Tuple <Type, CommandBinding> >(); list.Add(tuple); } list.Add(new Tuple <Type, CommandBinding>(classType, commandBinding)); } } else { break; } } } classType = classType.BaseType; } } // execute the bindings. This can call into user code, so it must // be done outside the lock to avoid deadlock. if (list != null) { // more than one binding ExecutedRoutedEventArgs exArgs = execute ? (ExecutedRoutedEventArgs)e : null; CanExecuteRoutedEventArgs canExArgs = execute ? null : (CanExecuteRoutedEventArgs)e; for (int i = 0; i < list.Count; ++i) { // invoke the binding if ((execute && ExecuteCommandBinding(sender, exArgs, list[i].Item2)) || (!execute && CanExecuteCommandBinding(sender, canExArgs, list[i].Item2))) { // if it succeeds, advance past the remaining bindings for this type Type classType = list[i].Item1; while (++i < list.Count && list[i].Item1 == classType) { // no body needed } --i; // back up, so that the outer for-loop advances to the right place } } } else if (tuple != null) { // only one binding if (execute) { ExecuteCommandBinding(sender, (ExecutedRoutedEventArgs)e, tuple.Item2); } else { CanExecuteCommandBinding(sender, (CanExecuteRoutedEventArgs)e, tuple.Item2); } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Command_Create = ((System.Windows.Input.CommandBinding)(target)); #line 64 "..\..\TransferWindow.xaml" this.Command_Create.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Create_Executed); #line default #line hidden return; case 2: this.Command_Open = ((System.Windows.Input.CommandBinding)(target)); #line 65 "..\..\TransferWindow.xaml" this.Command_Open.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Open_Executed); #line default #line hidden return; case 3: this.Command_Save = ((System.Windows.Input.CommandBinding)(target)); #line 66 "..\..\TransferWindow.xaml" this.Command_Save.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Save_Executed); #line default #line hidden return; case 4: this.Command_Load = ((System.Windows.Input.CommandBinding)(target)); #line 67 "..\..\TransferWindow.xaml" this.Command_Load.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Command_Load_Executed); #line default #line hidden return; case 5: this.MainWindowGrid = ((System.Windows.Controls.Grid)(target)); return; case 6: this.Label_DatabaseTo = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.SearchBox_NameTo = ((System.Windows.Controls.TextBox)(target)); #line 93 "..\..\TransferWindow.xaml" this.SearchBox_NameTo.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_FilterTo_TextChanged); #line default #line hidden #line 93 "..\..\TransferWindow.xaml" this.SearchBox_NameTo.IsKeyboardFocusedChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.SearchBox_IsKeyboardFocusedChanged); #line default #line hidden return; case 8: this.SearchBox_CodeTo = ((System.Windows.Controls.TextBox)(target)); #line 95 "..\..\TransferWindow.xaml" this.SearchBox_CodeTo.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_FilterTo_TextChanged); #line default #line hidden #line 95 "..\..\TransferWindow.xaml" this.SearchBox_CodeTo.IsKeyboardFocusedChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.SearchBox_IsKeyboardFocusedChanged); #line default #line hidden return; case 9: this.ListBox_TransTo = ((System.Windows.Controls.ListBox)(target)); #line 97 "..\..\TransferWindow.xaml" this.ListBox_TransTo.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListBox_TransTo_SelectionChanged); #line default #line hidden return; case 10: this.Button_Transfer = ((System.Windows.Controls.Button)(target)); #line 99 "..\..\TransferWindow.xaml" this.Button_Transfer.Click += new System.Windows.RoutedEventHandler(this.Button_Transfer_Click); #line default #line hidden return; case 11: this.Button_TransferAll = ((System.Windows.Controls.Button)(target)); #line 101 "..\..\TransferWindow.xaml" this.Button_TransferAll.Click += new System.Windows.RoutedEventHandler(this.Button_TransferAll_Click); #line default #line hidden return; case 12: this.Button_Cancel = ((System.Windows.Controls.Button)(target)); #line 103 "..\..\TransferWindow.xaml" this.Button_Cancel.Click += new System.Windows.RoutedEventHandler(this.Button_Cancel_Click); #line default #line hidden return; case 13: this.Button_Delete = ((System.Windows.Controls.Button)(target)); #line 105 "..\..\TransferWindow.xaml" this.Button_Delete.Click += new System.Windows.RoutedEventHandler(this.Button_Delete_Click); #line default #line hidden return; case 14: this.CheckBox_SaveZip = ((System.Windows.Controls.CheckBox)(target)); return; case 15: this.Label_DatabaseFrom = ((System.Windows.Controls.TextBlock)(target)); return; case 16: this.SearchBox_NameFrom = ((System.Windows.Controls.TextBox)(target)); #line 111 "..\..\TransferWindow.xaml" this.SearchBox_NameFrom.IsKeyboardFocusedChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.SearchBox_IsKeyboardFocusedChanged); #line default #line hidden #line 111 "..\..\TransferWindow.xaml" this.SearchBox_NameFrom.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_FilterFrom_TextChanged); #line default #line hidden return; case 17: this.SearchBox_CodeFrom = ((System.Windows.Controls.TextBox)(target)); #line 113 "..\..\TransferWindow.xaml" this.SearchBox_CodeFrom.IsKeyboardFocusedChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.SearchBox_IsKeyboardFocusedChanged); #line default #line hidden #line 113 "..\..\TransferWindow.xaml" this.SearchBox_CodeFrom.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_FilterFrom_TextChanged); #line default #line hidden return; case 18: this.ListBox_TransFrom = ((System.Windows.Controls.ListBox)(target)); #line 115 "..\..\TransferWindow.xaml" this.ListBox_TransFrom.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListBox_TransFrom_SelectionChanged); #line default #line hidden return; case 19: this.Image_SelCard = ((System.Windows.Controls.Image)(target)); return; case 20: #line 128 "..\..\TransferWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Transfer_Click); #line default #line hidden return; case 21: #line 129 "..\..\TransferWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_TransferAll_Click); #line default #line hidden return; case 22: #line 130 "..\..\TransferWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Cancel_Click); #line default #line hidden return; case 23: #line 131 "..\..\TransferWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Delete_Click); #line default #line hidden return; case 24: #line 133 "..\..\TransferWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_About_Click); #line default #line hidden return; } this._contentLoaded = true; }
private static bool CanExecuteCommandBinding(object sender, CanExecuteRoutedEventArgs e, CommandBinding commandBinding) { commandBinding.OnCanExecute(sender, e); return(e.CanExecute || e.Handled); }