public CreateGistFileViewModel(GistViewModel parent, IGistClientService gistClientService, IAsyncOperationStatusManager asyncOperationStatusManager, IErrorHandler errorHandler) : base(parent, gistClientService, asyncOperationStatusManager, errorHandler)
 {
     FileNameChangedCommand = new AsyncCommand <string>(CreateGistFileAsync, asyncOperationStatusManager, errorHandler)
     {
         ExecutionInfo = "Creating gist file"
     };
 }
Пример #2
0
 public GistFileViewModel(GistFileModel file, GistViewModel parent, IGistClientService gistClientService, IAsyncOperationStatusManager commandStatusManager, IErrorHandler errorHandler) : this(parent, gistClientService, commandStatusManager, errorHandler)
 {
     this.GistFile         = file;
     fileName              = file.Name;
     History               = new ObservableRangeCollection <GistHistoryEntryViewModel>();
     Url                   = file.Url;
     DeleteGistFileCommand = new AsyncRelayCommand(DeleteGistFileAsync, commandStatusManager, errorHandler)
     {
         ExecutionInfo = "Deleting file from gist"
     };
     CopyGistFileUrlCommand = new RelayCommand(CopyGistFileUrl, errorHandler);
 }
Пример #3
0
 public GistFileViewModel(GistViewModel parent, IGistClientService gistClientService, IAsyncOperationStatusManager commandStatusManager, IErrorHandler errorHandler) : this(gistClientService, commandStatusManager, errorHandler)
 {
     ParentGist = parent;
 }
Пример #4
0
 public CreateGistFileInnerViewModel(GistViewModel parent, IGistClientService gistClientService, IAsyncOperationStatusManager commandStatusManager, IErrorHandler errorHandler) : base(parent, gistClientService, commandStatusManager, errorHandler)
 {
     FileNameChangedCommand = null;
 }
 private void InitCreate(string content, GistViewModel gistVm) =>
 gistVm.Files.Add(new CreateGistFileViewModel(gistVm, gistClientService, AsyncOperationStatusManager, ErrorHandler)
 {
     IsInEditMode = true, Content = content, IsSelected = true
 });