This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-7
lines changed
GitHub.VisualStudio/UI/Views Expand file tree Collapse file tree 2 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 1+ using System ;
12using System . ComponentModel . Composition ;
23using GitHub . Exports ;
34using GitHub . Services ;
5+ using GitHub . UI ;
46using ReactiveUI ;
57
68namespace GitHub . ViewModels
@@ -12,21 +14,32 @@ namespace GitHub.ViewModels
1214 [ PartCreationPolicy ( CreationPolicy . NonShared ) ]
1315 public class NotAGitHubRepositoryViewModel : BaseViewModel , INotAGitHubRepositoryViewModel
1416 {
15- IUIProvider uiProvider ;
16-
1717 /// <summary>
1818 /// Initializes a new instance of the <see cref="NotAGitHubRepositoryViewModel"/> class.
1919 /// </summary>
2020 [ ImportingConstructor ]
21- public NotAGitHubRepositoryViewModel ( IUIProvider uiProvider )
21+ public NotAGitHubRepositoryViewModel ( )
2222 {
23- this . uiProvider = uiProvider ;
2423 Publish = ReactiveCommand . Create ( ) ;
24+ Publish . Subscribe ( _ => OnPublish ( ) ) ;
2525 }
2626
2727 /// <summary>
2828 /// Gets the command executed when the user clicks the "Publish to GitHub" link.
2929 /// </summary>
3030 public IReactiveCommand < object > Publish { get ; }
31+
32+ /// <summary>
33+ /// Gets or sets a value indicating whether the repository publish dialog will be opened
34+ /// with the private option checked.
35+ /// </summary>
36+ public bool PublishPrivate { get ; set ; }
37+
38+ /// <summary>
39+ /// Called when the <see cref="Publish"/> command is executed.
40+ /// </summary>
41+ private void OnPublish ( )
42+ {
43+ }
3144 }
3245}
Original file line number Diff line number Diff line change 4343 HorizontalAlignment =" Center"
4444 Orientation =" Vertical" >
4545
46- <CheckBox Foreground =" {DynamicResource GitHubVsToolWindowText}" Margin =" 10" >Publish as a private repository</CheckBox >
46+ <CheckBox Foreground =" {DynamicResource GitHubVsToolWindowText}"
47+ IsChecked =" {Binding PublishPrivate}"
48+ Margin =" 10" >
49+ Publish as a private repository
50+ </CheckBox >
4751
48- <Button HorizontalAlignment =" Center" Style =" {DynamicResource GitHubVsPrimaryActionButton}" >
49- Publish to GitHub
52+ <Button HorizontalAlignment =" Center" Style =" {DynamicResource GitHubVsPrimaryActionButton}"
53+ Command =" {Binding Publish}" >
54+ Publish to GitHub
5055 </Button >
5156
5257 </StackPanel >
You can’t perform that action at this time.
0 commit comments