예제 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.DlgPosts = ((PNotes.NET.WndPosts)(target));

            #line 17 "..\..\WndPosts.xaml"
                this.DlgPosts.Loaded += new System.Windows.RoutedEventHandler(this.DlgPosts_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.grdPosts = ((System.Windows.Controls.ListView)(target));

            #line 19 "..\..\WndPosts.xaml"
                this.grdPosts.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.grdPosts_SelectionChanged);

            #line default
            #line hidden

            #line 19 "..\..\WndPosts.xaml"
                this.grdPosts.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.grdPosts_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 3:
                this.cmdOK = ((System.Windows.Controls.Button)(target));

            #line 32 "..\..\WndPosts.xaml"
                this.cmdOK.Click += new System.Windows.RoutedEventHandler(this.cmdOK_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.cmdCancel = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #2
0
        private void plugin_GotPostsPartial(object sender, GotPostsEventArgs e)
        {
            var plugin = sender as IPostPlugin;

            if (plugin != null && e.Details != null && e.Details.Count > 0)
            {
                _TempTextBox = _Host.ActiveTextBox;
                var dInsPost = new WndPosts(e.Details.OrderByDescending(p => p.PostDate), plugin.Name, _Host.ActiveNoteName);
                dInsPost.PostSelected += dInsPost_PostSelected;
                var showDialog = dInsPost.ShowDialog();
                if (showDialog == null || !showDialog.Value)
                {
                    dInsPost.PostSelected -= dInsPost_PostSelected;
                    _TempTextBox           = null;
                }
            }
            else
            {
                var name = plugin != null ? plugin.Name : "";
                PNMessageBox.Show(
                    PNLang.Instance.GetMessageText("no_posts", "There are no posts available") + @" [" + name + @"]",
                    PNStrings.PROG_NAME);
            }
        }
예제 #3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.DlgPosts = ((PNotes.NET.WndPosts)(target));
     
     #line 17 "..\..\WndPosts.xaml"
     this.DlgPosts.Loaded += new System.Windows.RoutedEventHandler(this.DlgPosts_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.grdPosts = ((System.Windows.Controls.ListView)(target));
     
     #line 19 "..\..\WndPosts.xaml"
     this.grdPosts.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.grdPosts_SelectionChanged);
     
     #line default
     #line hidden
     
     #line 19 "..\..\WndPosts.xaml"
     this.grdPosts.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.grdPosts_MouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 3:
     this.cmdOK = ((System.Windows.Controls.Button)(target));
     
     #line 32 "..\..\WndPosts.xaml"
     this.cmdOK.Click += new System.Windows.RoutedEventHandler(this.cmdOK_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.cmdCancel = ((System.Windows.Controls.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
예제 #4
0
 private void plugin_GotPostsPartial(object sender, GotPostsEventArgs e)
 {
     var plugin = sender as IPostPlugin;
     if (plugin != null && e.Details != null && e.Details.Count > 0)
     {
         _TempTextBox = _Host.ActiveTextBox;
         var dInsPost = new WndPosts(e.Details.OrderByDescending(p => p.PostDate), plugin.Name, _Host.ActiveNoteName);
         dInsPost.PostSelected += dInsPost_PostSelected;
         var showDialog = dInsPost.ShowDialog();
         if (showDialog == null || !showDialog.Value)
         {
             dInsPost.PostSelected -= dInsPost_PostSelected;
             _TempTextBox = null;
         }
     }
     else
     {
         var name = plugin != null ? plugin.Name : "";
         PNMessageBox.Show(
             PNLang.Instance.GetMessageText("no_posts", "There are no posts available") + @" [" + name + @"]",
             PNStrings.PROG_NAME);
     }
 }