public MWindow() { try { InitializeComponent(); Closing += new CancelEventHandler(MWindow_Closing); worker.DoWork += new DoWorkEventHandler(worker_DoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); dt.Interval = TimeSpan.FromSeconds(1); dt.Tick += new EventHandler(dt_Tick); foldingManager = FoldingManager.Install(textEditor.TextArea); foldingStrategy = new XmlFoldingStrategy(); textEditor.TextChanged += new EventHandler(textEditor_TextChanged); if (App.StartUpCommand != "" && App.StartUpCommand != null) { openFile(App.StartUpCommand); } KeyGesture renderKeyGesture = new KeyGesture(Key.F5); KeyBinding renderCmdKeybinding = new KeyBinding(Commands.Render, renderKeyGesture); this.InputBindings.Add(renderCmdKeybinding); status.Text = "Ready!"; } catch (Exception e) { MessageBox.Show(e.Message); } }
public void AddKeyBinding(ICommand command, object param, Key key, ModifierKeys modifierKeys = ModifierKeys.None) { Contract.Requires(command != null); var binding = new KeyBinding(key, modifierKeys); m_keyBindings.Add(binding, new CommandParamPair(command, param)); }
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); }
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); }
public void RegisterBinding(KeyBinding binding) { if(binding!=null) { _surface.InputBindings.Add(binding); _bindings.Add(binding); } }
public PadWindow() { InitializeComponent(); KeyGesture F5Key = new KeyGesture(Key.F5, ModifierKeys.None); KeyBinding F5CmdKeybinding = new KeyBinding(RunRoutedCommand, F5Key); this.InputBindings.Add(F5CmdKeybinding); }
public void DeregisterBinding(KeyBinding binding) { if(_bindings.Contains(binding)) { _surface.InputBindings.Remove(binding); _bindings.Remove(binding); } }
public MainWindow() { InitializeComponent(); this.Loaded += MainWindow_Loaded; try { DbUtil.prepareTables(); loadSettings(); } catch(Exception e) { MessageBox.Show("Fail to init database:"+e.Message); Environment.Exit(-1); } this.DataContext = this; OpenNewEditorCommand = new OpenEditorCommand(()=>{ QuickLancherEditor qle = new QuickLancherEditor(); qle.Owner = this; qle.AddedNewQuickCommand += Qle_AddedNewQuickCommand; qle.ShowDialog(); }); KeyBinding OpenCmdKeyBinding = new KeyBinding(OpenNewEditorCommand,Key.N,ModifierKeys.Control); InputBindings.Add(OpenCmdKeyBinding); loadQuickCommandsFromDb(""); commandsList.ItemsSource = quickCommands; }
public void AddKeyBinding(string commandName, Key key, ModifierKeys modifierKeys = ModifierKeys.None) { Contract.Requires(!string.IsNullOrWhiteSpace(commandName)); Contract.Requires(HasCommand(commandName)); var binding = new KeyBinding(key, modifierKeys); m_keyBindings.Add(binding, commandName); }
public void RegisterCommands(IEnumerable<InputBindingCommand> inputBindingCommands) { foreach (var inputBindingCommand in inputBindingCommands) { var binding = new KeyBinding(inputBindingCommand, inputBindingCommand.GestureKey, inputBindingCommand.GestureModifier); _stash.Push(binding); _inputBindings.Add(binding); } }
internal static KeyBinding CreateFrozenKeyBinding(ICommand command, ModifierKeys modifiers, Key key) { KeyBinding kb = new KeyBinding(command, key, modifiers); // Mark KeyBindings as frozen because they're shared between multiple editor instances. // KeyBinding derives from Freezable only in .NET 4, so we have to use this little trick: Freezable f = ((object)kb) as Freezable; if (f != null) f.Freeze(); return kb; }
/// <summary> /// Creates the input gesture. /// </summary> /// <param name="element">The element.</param> /// <param name="key">The key to listen to.</param> /// <param name="modifierKeys">The modifier keys to listen to.</param> /// <param name="execute">The command to execute.</param> /// <param name="canExecute">The command to check if the main command can execute.</param> public static void CreateInputGesture(this UIElement element, Key key, ModifierKeys modifierKeys, ExecutedRoutedEventHandler execute, CanExecuteRoutedEventHandler canExecute) { var command = new RoutedUICommand(); var binding = new CommandBinding(command, execute, canExecute); var gesture = new KeyGesture(key, modifierKeys); var keyBinding = new KeyBinding(command, gesture); element.CommandBindings.Add(binding); element.InputBindings.Add(keyBinding); }
public MainWindow() { InitializeComponent(); RootFrame.NavigationService.Navigate(new Uri("/Pages/MainPage.xaml", UriKind.Relative)); var timestampCommand = new DelegateCommand(OnTimestampKeyBinding); var timestampGesture = new KeyGesture(Key.T, ModifierKeys.Alt); var timestampBinding = new KeyBinding(timestampCommand, timestampGesture); InputBindings.Add(timestampBinding); }
public DatasetImportMappingView(List<Dataset> dataset ) { InitializeComponent(); _dataContext = new DatasetImportMappingViewModel(Token, dataset); DataContext = _dataContext; AddKeyBindings<Dataset>(); KeyBinding saveKeyBinding = new KeyBinding(_dataContext.SaveDatasetCommand, Key.S, ModifierKeys.Control); this.InputBindings.Add(saveKeyBinding); }
private void InitCommands() { CommandBinding cb = new CommandBinding(cmd_Increase, onIncrease); CommandBindings.Add(cb); KeyBinding kb = new KeyBinding(cmd_Increase, new KeyGesture(Key.Up)); this.InputBindings.Add(kb); cb = new CommandBinding(cmd_Decrease, onDecrease); CommandBindings.Add(cb); kb = new KeyBinding(cmd_Decrease, new KeyGesture(Key.Down)); this.InputBindings.Add(kb); }
private void AssignShortcut(TextBox textbox, int row, int column) { var hotKey = new KeyBinding(new RelayCommand(() => textbox.Focus()), new MultiKeyGesture(new List<Key> { (Key)(row + 34), (Key)(column + 34) }, ModifierKeys.Control | ModifierKeys.Shift)); this.InputBindings.Add(hotKey); if (row < 10 && column < 10) { hotKey = new KeyBinding(new RelayCommand(() => textbox.Focus()), new MultiKeyGesture(new List<Key> { (Key)(row + 34), (Key)(column + 34) }, ModifierKeys.Control)); this.InputBindings.Add(hotKey); // following is not working //hotKey = new KeyBinding(new RelayCommand(() => textbox.Focus()), new MultiKeyGesture(new List<Key> { (Key)(row + 34), (Key)(column + 34) }, ModifierKeys.Alt)); //this.InputBindings.Add(hotKey); } }
/// <summary> /// Starts the navigator on the Design surface and add bindings. /// </summary> public void Start() { var tabFocus = new RelayCommand(this.MoveFocusForward, this.CanMoveFocusForward); var shiftTabFocus = new RelayCommand(this.MoveFocusBack, this.CanMoveFocusBack); _tabBinding = new KeyBinding(tabFocus, new KeyGesture(Key.Tab)); _shiftTabBinding = new KeyBinding(shiftTabFocus, new KeyGesture(Key.Tab, ModifierKeys.Shift)); IKeyBindingService kbs = _surface.DesignContext.Services.GetService(typeof(IKeyBindingService)) as IKeyBindingService; if (kbs != null) { kbs.RegisterBinding(_tabBinding); kbs.RegisterBinding(_shiftTabBinding); } }
public CopyWindow() { InitializeComponent(); ExplorerNet.Tools.ViewSettings.ViewLocation.LoadWindowLocation(this); ///////////////////////// CommandBinding cbCopy = new CommandBinding(CopyCommand, ExecutedCopyCommand); this.CommandBindings.Add(cbCopy); KeyGesture kgCopyF5 = new KeyGesture(Key.F5); KeyBinding kbCopyF5 = new KeyBinding(CopyCommand, kgCopyF5); this.InputBindings.Add(kbCopyF5); //////////////////////// CommandBinding cbMove = new CommandBinding(MoveCommand, ExecutedMoveCommand); this.CommandBindings.Add(cbMove); KeyGesture kgMoveF6 = new KeyGesture(Key.F6); KeyBinding kbMoveF6 = new KeyBinding(MoveCommand, kgMoveF6); this.InputBindings.Add(kbMoveF6); //CreateVisualData(); //lvFromCopy.ItemsSource = copyFiles; //cbToCopy.ItemsSource = FilePanelSelector.FilePanels; //cbToCopy.Text = FilePanelSelector.SecondSelected.p; //FilePanel fpFirst = null; //if (FilePanelSelector.FirstSelected != null) //{ // fpFirst = FilePanelSelector.FirstSelected; //} //else //{ // throw new Exception("Not set FilePanelSelector.FirstSelected"); //} //FilePanel fpSecond = null; //if (FilePanelSelector.SecondSelected != null) //{ // fpSecond = FilePanelSelector.SecondSelected; //} //else //{ // throw new Exception("Not set FilePanelSelector.SecondSelected"); //} }
public MainWindow() { InitializeComponent(); TitleConst = "Master Dump " + (Environment.Is64BitProcess ? "(x64) - " : "(x86) - "); exceptionsCounter = new PerformanceCounter(".NET CLR Exceptions", "# of Exceps Thrown", "DumpMiner", true); Title = TitleConst + GetMemoryInfo(); var kb = new KeyBinding(GlobalCommands.LoadDumpCommand, new KeyGesture(Key.O, ModifierKeys.Control)); InputBindings.Add(kb); kb = new KeyBinding(GlobalCommands.DetachCommand, new KeyGesture(Key.F5, ModifierKeys.Shift)); InputBindings.Add(kb); kb = new KeyBinding(GlobalCommands.ShowProccessCommand, new KeyGesture(Key.P, ModifierKeys.Control)); InputBindings.Add(kb); kb = new KeyBinding(DoGcCommand, new KeyGesture(Key.G, ModifierKeys.Control)); InputBindings.Add(kb); timer = new DispatcherTimer(TimeSpan.FromSeconds(5), DispatcherPriority.Normal, OnTimerTick, App.Current.Dispatcher); }
protected override void OnInitialized() { base.OnInitialized(); _menu = new QuickOperationMenu(); _menu.Loaded += OnMenuLoaded; var placement = new RelativePlacement(HorizontalAlignment.Right, VerticalAlignment.Top) {XOffset = 7, YOffset = 3.5}; this.AddAdorners(placement, _menu); var kbs = this.ExtendedItem.Services.GetService(typeof (IKeyBindingService)) as IKeyBindingService; var command = new RelayCommand(delegate { _menu.MainHeader.IsSubmenuOpen = true; _menu.MainHeader.Focus(); }); _keyBinding=new KeyBinding(command, Key.Enter, ModifierKeys.Alt); if (kbs != null) kbs.RegisterBinding(_keyBinding); }
private void SetSubWindowKeyBinding(Window window, Key key, ModifierKeys modifierKey) { EventHandler showWindow = new EventHandler( delegate { try { if (DebugWindow != null) { DebugWindow.Show(); DebugWindow.Activate(); } else if (DebugWindow == null || DebugWindow.IsLoaded == false) { DebugWindow = new FAFramework.GUI.DebugWindow(); DebugWindow.Closed += delegate { try { DebugWindow = null; } catch { } }; DebugWindow.Initialize(Equipment.MainEquipment.Instance.EquipmentManagerInstance); DebugWindow.Show(); if (DebugWindow.IsActive == false) DebugWindow.Activate(); } } catch { } }); RoutedCommandForSubWindow command = new RoutedCommandForSubWindow(); command.OnExecute += showWindow; KeyBinding keyBinding = new KeyBinding(command, key, modifierKey); this.InputBindings.Add(keyBinding); }
private DeleteWindow() { InitializeComponent(); CommandBinding cbDelete = new CommandBinding(DeleteFilesCommand, ExecutedDeleteFilesCommand); this.CommandBindings.Add(cbDelete); KeyGesture kgDel = new KeyGesture(Key.F8); KeyBinding kbDel = new KeyBinding(DeleteFilesCommand, kgDel); this.InputBindings.Add(kbDel); ////////////////////////// CommandBinding cbDeleteToRec = new CommandBinding(DeleteFilesToRecCommand, ExecutedDeleteFilesToRecCommand); this.CommandBindings.Add(cbDeleteToRec); KeyGesture kgDelToRec = new KeyGesture(Key.Delete); KeyBinding kbDelToRec = new KeyBinding(DeleteFilesToRecCommand, kgDelToRec); this.InputBindings.Add(kbDelToRec); }
public void AddKeyBinding(string target, KeyBinding kb) { var commandbinding = BindingOperations.GetBinding(kb, InputBinding.CommandProperty); var parameterbinding = BindingOperations.GetBinding(kb, InputBinding.CommandParameterProperty); var source = "datacontext"; string cb, sb; if (!ConvertBinding(commandbinding, source, out cb)) { Log.Warning("binding has not Command set."); return; } ConvertBinding(parameterbinding, source, out sb); var fkey = KeyInterop.VirtualKeyFromKey(kb.Key); var name = "__key_" + (int)fkey; string js = "new KeyBinding(" + target + ", '" + name + "', " + cb + ", " + sb + ");"; _writer.WriteLine(js); }
public static TriggerBase CreateTrigger(string triggerText) { var triggerDetail = triggerText .Replace("[", string.Empty) .Replace("]", string.Empty) .Replace("Shortcut", string.Empty) .Trim(); var modKeys = ModifierKeys.None; var allKeys = triggerDetail.Split('+'); var key = (Key)Enum.Parse(typeof(Key), allKeys.Last()); foreach (var modifierKey in allKeys.Take(allKeys.Count() - 1)) { modKeys |= (ModifierKeys)Enum.Parse(typeof(ModifierKeys), modifierKey); } var keyBinding = new KeyBinding(new InputBindingTrigger(), key, modKeys); var trigger = new InputBindingTrigger { InputBinding = keyBinding }; return trigger; }
private void AddKeyBoardShortcuts() { //Settings var kb = new KeyBinding(GoToPageCommand, Key.F12, ModifierKeys.None); kb.CommandParameter = @"/View/Pages/Help.xaml"; this.InputBindings.Add(kb); //Help kb = new KeyBinding(GoToPageCommand, Key.F11, ModifierKeys.None); kb.CommandParameter = @"/View/Pages/Settings.xaml"; this.InputBindings.Add(kb); //Home kb = new KeyBinding(GoToPageCommand, Key.H, ModifierKeys.Control); kb.CommandParameter = @"/View/Pages/Main.xaml"; this.InputBindings.Add(kb); //Log kb = new KeyBinding(GoToPageCommand, Key.L, ModifierKeys.Control); kb.CommandParameter = @"/View/Pages/Log.xaml"; this.InputBindings.Add(kb); }
public static void RegisterCommands(IEnumerable<ActionBinding> entriesSupported, int objectID) { if (_inputBindings == null || _entriesAll == null) return; if (_currentVM != objectID) { _currentVM = objectID; DeregisterCommands(); _entriesAll.Where(x => entriesSupported.Any(y => y.Name == x.Name)) .ToList().ForEach(x => { var supportedItem = entriesSupported.First(y => y.Name == x.Name); foreach (var gesture in x.Gestures) { var binding = new KeyBinding(supportedItem.Command, gesture); _stash.Push(binding); _inputBindings.Add(binding); } }); } }
public MainWindow( IAudioService audioService, IDictionaryService dictionaryService, IInputService inputService) { InitializeComponent(); this.audioService = audioService; this.dictionaryService = dictionaryService; this.inputService = inputService; managementWindowRequest = new InteractionRequest<NotificationWithServices>(); //Setup key binding (Alt-C) to open settings var openSettingsKeyBinding = new KeyBinding { Command = new DelegateCommand(RequestManagementWindow), Modifiers = ModifierKeys.Alt, Key = Key.M }; InputBindings.Add(openSettingsKeyBinding); Title = string.Format("OptiKey v{0}", DiagnosticInfo.AssemblyVersion); }
public static void RegisterShortcut(Control control, KeyGesture keyGesture, ICommand command, object commandParameter) { KeyBinding binding = new KeyBinding(command, keyGesture); binding.CommandParameter = commandParameter; KeyBinding bind = control.InputBindings.OfType<KeyBinding>().FirstOrDefault( kb => kb.Command == command && kb.CommandParameter == commandParameter && kb.Key == keyGesture.Key && kb.Modifiers == keyGesture.Modifiers); if (bind != null) control.InputBindings.Remove(bind); control.InputBindings.Add(binding); }
//private void undoImage_MouseDown(object sender, MouseButtonEventArgs e) { // //int count = boardCanvas.Children.Count; // //if (count >= 1) // //{ // // boardCanvas.Children.RemoveAt(count - 1); // // boardCanvas.Children.RemoveAt(count - 2); // //} //} private void deleteImage_MouseDown(object sender, MouseButtonEventArgs e) { KeyBinding k = new KeyBinding(); k.Key = Key.Delete; }
public MainWindow() { InitializeComponent(); // 设置快捷键 KeyBinding forwBind = new System.Windows.Input.KeyBinding(); forwBind.Command = new ForwCommand(); forwBind.CommandParameter = ar; forwBind.Key = System.Windows.Input.Key.Right; this.InputBindings.Add(forwBind); KeyBinding backBind = new System.Windows.Input.KeyBinding(); backBind.Command = new BackCommand(); backBind.CommandParameter = ar; backBind.Key = System.Windows.Input.Key.Left; this.InputBindings.Add(backBind); this.Loaded += (k, k2) => { MessageBox.Show("向右旋转请按右方向键,向左旋转请按左方向键。"); }; }
private static void OnKeyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { KeyBinding keyBinding = (KeyBinding)d; keyBinding.SynchronizeGestureFromProperties((Key)(e.NewValue), keyBinding.Modifiers); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 20 "..\..\..\..\UserControls\TextEditorControl.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveUp_Handler); #line default #line hidden return; case 2: #line 24 "..\..\..\..\UserControls\TextEditorControl.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.MoveDown_Handler); #line default #line hidden return; case 3: #line 28 "..\..\..\..\UserControls\TextEditorControl.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Duplicate_Handler); #line default #line hidden return; case 4: #line 32 "..\..\..\..\UserControls\TextEditorControl.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Duplicate_Handler); #line default #line hidden return; case 5: this.CutBinding = ((System.Windows.Input.KeyBinding)(target)); return; case 6: this.lineNumbersScroller = ((System.Windows.Controls.ScrollViewer)(target)); return; case 7: this.lineNumersListBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.richTextBox = ((System.Windows.Controls.RichTextBox)(target)); #line 80 "..\..\..\..\UserControls\TextEditorControl.xaml" this.richTextBox.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.OnPreviewKeyDown); #line default #line hidden #line 80 "..\..\..\..\UserControls\TextEditorControl.xaml" this.richTextBox.KeyUp += new System.Windows.Input.KeyEventHandler(this.OnKeyUp); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 20 "..\..\MainWindow.xaml" ((FlatBase.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 20 "..\..\MainWindow.xaml" ((FlatBase.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed); #line default #line hidden return; case 2: this.saveBinding = ((System.Windows.Input.KeyBinding)(target)); return; case 3: this.exportBinding = ((System.Windows.Input.KeyBinding)(target)); return; case 4: #line 33 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 5: #line 34 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_1); #line default #line hidden return; case 6: #line 35 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_2); #line default #line hidden return; case 7: #line 37 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_3); #line default #line hidden return; case 8: #line 40 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Classes); #line default #line hidden return; case 9: #line 41 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Labels); #line default #line hidden return; case 10: #line 42 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_4); #line default #line hidden return; case 11: this.tabMain = ((System.Windows.Controls.TabControl)(target)); return; case 12: this.Alerts = ((MaterialDesignThemes.Wpf.Snackbar)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Window = ((Braces.UI.WPF.MainWindow)(target)); return; case 2: #line 14 "..\..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.SaveCanExecute); #line default #line hidden #line 15 "..\..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.BtnSave_Click); #line default #line hidden return; case 3: #line 19 "..\..\..\MainWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.BtnOpen_Click); #line default #line hidden return; case 4: this.SaveKeyBinding = ((System.Windows.Input.KeyBinding)(target)); return; case 5: this.OpenKeyBinding = ((System.Windows.Input.KeyBinding)(target)); return; case 6: this.TopMenuBar = ((System.Windows.Controls.Menu)(target)); return; case 7: this.OpenBtn = ((System.Windows.Controls.MenuItem)(target)); return; case 8: this.SaveBtn = ((System.Windows.Controls.MenuItem)(target)); return; case 9: this.pnlSideNav = ((System.Windows.Controls.StackPanel)(target)); return; case 10: this.BtnSideNavExplorer = ((System.Windows.Controls.Button)(target)); #line 68 "..\..\..\MainWindow.xaml" this.BtnSideNavExplorer.Click += new System.Windows.RoutedEventHandler(this.BtnSideNavExplorer_Click); #line default #line hidden return; case 11: this.BtnSideNavSearch = ((System.Windows.Controls.Button)(target)); #line 69 "..\..\..\MainWindow.xaml" this.BtnSideNavSearch.Click += new System.Windows.RoutedEventHandler(this.BtnSideNavSearch_Click); #line default #line hidden return; case 12: this.contentGrid = ((System.Windows.Controls.Grid)(target)); return; case 13: this.explorerPanel = ((System.Windows.Controls.Grid)(target)); return; case 14: this.searchPanel = ((System.Windows.Controls.Grid)(target)); return; case 15: this.textEditor1 = ((Braces.UI.WPF.UserControls.TextEditorControl)(target)); return; case 16: this.textEditor2 = ((Braces.UI.WPF.UserControls.TextEditorControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MainWindow1 = ((WebKidzPlus.MainWindow)(target)); return; case 2: this.Close_File = ((System.Windows.Input.KeyBinding)(target)); return; case 3: this.Close_All = ((System.Windows.Input.KeyBinding)(target)); return; case 4: this.Save_File = ((System.Windows.Input.KeyBinding)(target)); return; case 5: this.Save_All_File = ((System.Windows.Input.KeyBinding)(target)); return; case 6: this.Save_Project = ((System.Windows.Input.KeyBinding)(target)); return; case 7: this.Import_File = ((System.Windows.Input.KeyBinding)(target)); return; case 8: this.Close_Project = ((System.Windows.Input.KeyBinding)(target)); return; case 9: this.Open_Project = ((System.Windows.Input.KeyBinding)(target)); return; case 10: this.Copy = ((System.Windows.Input.KeyBinding)(target)); return; case 11: this.Cut = ((System.Windows.Input.KeyBinding)(target)); return; case 12: this.Paste = ((System.Windows.Input.KeyBinding)(target)); return; case 13: this.Undo = ((System.Windows.Input.KeyBinding)(target)); return; case 14: this.Redo = ((System.Windows.Input.KeyBinding)(target)); return; case 15: this.HeaderMenu = ((System.Windows.Controls.Menu)(target)); return; case 16: this.Menu_File = ((System.Windows.Controls.MenuItem)(target)); return; case 17: this.Menu_File_NewPoject = ((System.Windows.Controls.MenuItem)(target)); #line 39 "..\..\MainWindow.xaml" this.Menu_File_NewPoject.Click += new System.Windows.RoutedEventHandler(this.NewProject); #line default #line hidden return; case 18: this.Menu_File_OpenPoject = ((System.Windows.Controls.MenuItem)(target)); #line 48 "..\..\MainWindow.xaml" this.Menu_File_OpenPoject.Click += new System.Windows.RoutedEventHandler(this.OpenProject); #line default #line hidden return; case 19: this.Menu_File_SavePoject = ((System.Windows.Controls.MenuItem)(target)); #line 57 "..\..\MainWindow.xaml" this.Menu_File_SavePoject.Click += new System.Windows.RoutedEventHandler(this.SaveProject); #line default #line hidden return; case 20: this.Menu_File_ClosePoject = ((System.Windows.Controls.MenuItem)(target)); #line 60 "..\..\MainWindow.xaml" this.Menu_File_ClosePoject.Click += new System.Windows.RoutedEventHandler(this.CloseProject); #line default #line hidden return; case 21: this.Menu_File_SaveFile = ((System.Windows.Controls.MenuItem)(target)); #line 62 "..\..\MainWindow.xaml" this.Menu_File_SaveFile.Click += new System.Windows.RoutedEventHandler(this.SaveFile); #line default #line hidden return; case 22: this.Menu_File_SaveAll = ((System.Windows.Controls.MenuItem)(target)); #line 71 "..\..\MainWindow.xaml" this.Menu_File_SaveAll.Click += new System.Windows.RoutedEventHandler(this.SaveAll); #line default #line hidden return; case 23: this.Menu_File_CloseFile = ((System.Windows.Controls.MenuItem)(target)); #line 80 "..\..\MainWindow.xaml" this.Menu_File_CloseFile.Click += new System.Windows.RoutedEventHandler(this.CloseFile); #line default #line hidden return; case 24: this.Menu_File_CloseAll = ((System.Windows.Controls.MenuItem)(target)); #line 81 "..\..\MainWindow.xaml" this.Menu_File_CloseAll.Click += new System.Windows.RoutedEventHandler(this.CloseAll); #line default #line hidden return; case 25: this.Menu_File_Exit = ((System.Windows.Controls.MenuItem)(target)); #line 83 "..\..\MainWindow.xaml" this.Menu_File_Exit.Click += new System.Windows.RoutedEventHandler(this.ExitApp); #line default #line hidden return; case 26: this.Edit = ((System.Windows.Controls.MenuItem)(target)); return; case 27: this.Edit_Undo = ((System.Windows.Controls.MenuItem)(target)); return; case 28: this.Edit_Redo = ((System.Windows.Controls.MenuItem)(target)); return; case 29: this.Edit_Cut = ((System.Windows.Controls.MenuItem)(target)); return; case 30: this.Edit_Copy = ((System.Windows.Controls.MenuItem)(target)); return; case 31: this.Edit_Paste = ((System.Windows.Controls.MenuItem)(target)); return; case 32: this.Menu_Help = ((System.Windows.Controls.MenuItem)(target)); return; case 33: this.Menu_File_About = ((System.Windows.Controls.MenuItem)(target)); return; case 34: this.ProjectList = ((WebKidzPlus.DirectoryListing)(target)); return; case 35: this.tabControl = ((System.Windows.Controls.TabControl)(target)); return; case 36: this.GridSpliterControl1 = ((System.Windows.Controls.GridSplitter)(target)); return; case 37: this.OverlayBackgroud = ((System.Windows.Shapes.Rectangle)(target)); return; case 38: this.Overlay = ((System.Windows.Shapes.Rectangle)(target)); return; case 39: this.OverlayText = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }