Пример #1
0
 public void RegisterTaskPanes(Register register)
 {
     myAddinTaskPane = register(() =>
     {
         var button = new System.Windows.Controls.Button
         {
             Content = "Insert Quote"
         };
         button.Click += InsertQuote;
         var host      = new WpfPanelHost
         {
             Child = new UserControl
             {
                 Content = new StackPanel
                 {
                     Children =
                     {
                         button
                     }
                 }
             }
         };
         return(host);
     }, "Quotes!");
     myAddinTaskPane.Visible         = true;
     myAddinTaskPane.VisibleChanged += TaskPaneVisibleChanged;
     TaskPaneVisibleChanged(this, EventArgs.Empty);
 }
 public void RegisterSelf(Register register)
 {
     contentTaskPane = register(() => new WpfPanelHost
     {
         Child = this
     }, "GitHub for Outlook", false);
 }
 public void RegisterSelf(Register register)
 {
     contentTaskPane = register(() => new WpfPanelHost
     {
         Child = this
     }, "GitHub for Outlook", false);
 }
Пример #4
0
 public void RegisterTaskPanes(Register register)
 {
     wikipediaResultsTaskPane = register(
         () => new WpfPanelHost
     {
         Child = new WikipediaResultsView            //This is a WPF User control
         {
             DataContext = wikipediaResultsViewModel //Viewmodel for the user control
         }
     }, "Wikipedia Results", PanelShown);
     wikipediaResultsTaskPane.VisibleChanged += TaskPaneVisibleChanged;
 }
Пример #5
0
 public void RegisterTaskPanes(Register register)
 {
     wikipediaResultsTaskPane = register(
         () => new WpfPanelHost
         {
             Child = new WikipediaResultsView //This is a WPF User control
             {
                 DataContext = wikipediaResultsViewModel //Viewmodel for the user control
             }
         }, "Wikipedia Results", PanelShown);
     wikipediaResultsTaskPane.VisibleChanged += TaskPaneVisibleChanged;
 }
Пример #6
0
 public void RegisterTaskPanes(Register register)
 {
     myAddinTaskPane = register(
         () => new WpfPanelHost
     {
         Child = new WikipediaResultsView            //This is a WPF User control
         {
             DataContext = wikipediaResultsViewModel //Viewmodel for the user control
         }
     }, "Wikipedia Results");
     myAddinTaskPane.Visible         = true;
     myAddinTaskPane.VisibleChanged += TaskPaneVisibleChanged;
     TaskPaneVisibleChanged(this, EventArgs.Empty);
 }
Пример #7
0
 public void RegisterTaskPanes(Register register)
 {
     myAddinTaskPane = register(() =>
         {
             var button = new System.Windows.Controls.Button
             {
                 Content = "Insert Quote"
             };
             button.Click += InsertQuote;
             var host = new WpfPanelHost
             {
                 Child = new UserControl
                 {
                     Content = new StackPanel
                     {
                         Children =
                         {
                             button
                         }
                     }
                 }
             };
             return host;
         }, "Quotes!");
     myAddinTaskPane.Visible = true;
     myAddinTaskPane.VisibleChanged += TaskPaneVisibleChanged;
     TaskPaneVisibleChanged(this, EventArgs.Empty);
 }
Пример #8
0
 public void RegisterTaskPanes(Register register)
 {
     myAddinTaskPane = register(
         () => new WpfPanelHost
         {
             Child = new WikipediaResultsView //This is a WPF User control
             {
                 DataContext = wikipediaResultsViewModel //Viewmodel for the user control
             }
         }, "Wikipedia Results");
     myAddinTaskPane.Visible = true;
     myAddinTaskPane.VisibleChanged += TaskPaneVisibleChanged;
     TaskPaneVisibleChanged(this, EventArgs.Empty);
 }
Пример #9
0
        public void RegisterTaskPanes(Register register)
        {
            settingsTaskPane = register(() => new WpfPanelHost
            {
                Child = new SettingsControl
                {
                    DataContext = settingsViewModel
                }
            }, "GitHub Settings", initallyVisible:false);
            settingsViewModel.Init(settingsTaskPane);

            createIssueTaskPane = register(() => new WpfPanelHost
            {
                Child = new CreateIssueControl
                {
                    DataContext = createIssuesViewModel
                }
            }, "Create Issue", initallyVisible: false);
            createIssuesViewModel.Init(createIssueTaskPane);
        }
Пример #10
0
 public void Init(ICustomTaskPaneWrapper settingsTaskPane)
 {
     taskPane = settingsTaskPane;
 }
Пример #11
0
 public void Init(ICustomTaskPaneWrapper createIssueTaskPane)
 {
     taskPane = createIssueTaskPane;
 }
Пример #12
0
 public void RegisterTaskPanes(Register register)
 {
     githubTaskPane = register(() => new WpfPanelHost
     {
         Child = new GithubTaskPanel
         {
             DataContext = this
         }
     }, "Github");
     githubTaskPane.Visible = IsGithubTask;
     PanelShown = IsGithubTask;
     githubTaskPane.VisibleChanged += GithubTaskPaneVisibleChanged;
     GithubTaskPaneVisibleChanged(this, EventArgs.Empty);
 }