void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DlgPin = ((PNotes.NET.WndPin)(target)); #line 18 "..\..\WndPin.xaml" this.DlgPin.Loaded += new System.Windows.RoutedEventHandler(this.DlgPin_Loaded); #line default #line hidden return; case 2: this.lblWindows = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.grdWindows = ((System.Windows.Controls.ListView)(target)); #line 27 "..\..\WndPin.xaml" this.grdWindows.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.grdWindows_MouseDoubleClick); #line default #line hidden #line 27 "..\..\WndPin.xaml" this.grdWindows.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.grdWindows_SelectionChanged); #line default #line hidden return; case 4: this.chkUseWildcards = ((System.Windows.Controls.CheckBox)(target)); #line 35 "..\..\WndPin.xaml" this.chkUseWildcards.Checked += new System.Windows.RoutedEventHandler(this.chkUseWildcards_Checked); #line default #line hidden #line 35 "..\..\WndPin.xaml" this.chkUseWildcards.Unchecked += new System.Windows.RoutedEventHandler(this.chkUseWildcards_Unchecked); #line default #line hidden return; case 5: this.txtWildcards = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.cmdOK = ((System.Windows.Controls.Button)(target)); #line 43 "..\..\WndPin.xaml" this.cmdOK.Click += new System.Windows.RoutedEventHandler(this.cmdOK_Click); #line default #line hidden return; case 7: this.cmdCancel = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DlgPin = ((PNotes.NET.WndPin)(target)); #line 18 "..\..\WndPin.xaml" this.DlgPin.Loaded += new System.Windows.RoutedEventHandler(this.DlgPin_Loaded); #line default #line hidden return; case 2: this.lblWindows = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.grdWindows = ((System.Windows.Controls.ListView)(target)); #line 27 "..\..\WndPin.xaml" this.grdWindows.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.grdWindows_MouseDoubleClick); #line default #line hidden #line 27 "..\..\WndPin.xaml" this.grdWindows.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.grdWindows_SelectionChanged); #line default #line hidden return; case 4: this.chkUseWildcards = ((System.Windows.Controls.CheckBox)(target)); #line 35 "..\..\WndPin.xaml" this.chkUseWildcards.Checked += new System.Windows.RoutedEventHandler(this.chkUseWildcards_Checked); #line default #line hidden #line 35 "..\..\WndPin.xaml" this.chkUseWildcards.Unchecked += new System.Windows.RoutedEventHandler(this.chkUseWildcards_Unchecked); #line default #line hidden return; case 5: this.txtWildcards = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.cmdOK = ((System.Windows.Controls.Button)(target)); #line 43 "..\..\WndPin.xaml" this.cmdOK.Click += new System.Windows.RoutedEventHandler(this.cmdOK_Click); #line default #line hidden return; case 7: this.cmdCancel = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
private void actionPinNote() { try { var note = getSelectedNote(); if (note == null) return; var dlgPin = new WndPin(note.Name) { Owner = this }; dlgPin.PinnedWindowChanged += dlgPin_PinnedWindowChanged; var showDialog = dlgPin.ShowDialog(); if (showDialog == null || !showDialog.Value) { dlgPin.PinnedWindowChanged -= dlgPin_PinnedWindowChanged; } } catch (Exception ex) { PNStatic.LogException(ex); } }