public GumCommands() { GuiCommands = new GuiCommands(); FileCommands = new FileCommands(); Edit = new EditCommands(); WireframeCommands = new WireframeCommands(); }
private void OnPruneClick(object sender, EventArgs e) { var remote = _remoteView.Remote; if (remote != null && !remote.IsDeleted) { GuiCommands.Prune(_remoteView, remote); } }
public bool TryPush() { Verify.State.IsTrue(View != null, "Controller is not attached to a view."); var forceOverwrite = View.ForceOverwrite.Value; var thinPack = View.ThinPack.Value; var sendTags = View.SendTags.Value; var branches = View.References.Value; if (branches.Count == 0) { View.ErrorNotifier.NotifyError(View.References, new UserInputError( Resources.ErrNoBranchesSelected, Resources.ErrYouMustSelectBranchesToPush)); return(false); } GuiCommandStatus status; switch (View.PushTo.Value) { case PushTo.Remote: var remote = View.Remote.Value; if (remote == null) { View.ErrorNotifier.NotifyError(View.Remote, new UserInputError( Resources.ErrInvalidRemoteName, Resources.ErrRemoteNameCannotBeEmpty)); return(false); } status = GuiCommands.Push(View as IWin32Window, remote, branches, forceOverwrite, thinPack, sendTags); break; case PushTo.Url: var url = View.Url.Value; if (string.IsNullOrWhiteSpace(url)) { View.ErrorNotifier.NotifyError(View.Url, new UserInputError( Resources.ErrInvalidUrl, Resources.ErrUrlCannotBeEmpty)); return(false); } status = GuiCommands.Push(View as IWin32Window, Repository, url, branches, forceOverwrite, thinPack, sendTags); break; default: return(false); } return(status == GuiCommandStatus.Completed); }
/// <summary>Perform stash save.</summary> /// <returns>true if stash save succeeded.</returns> public bool Execute() { bool keepIndex = KeepIndex; bool includeUntracked = GitFeatures.StashIncludeUntrackedOption.IsAvailableFor(_repository) && IncludeUntrackedFiles; var message = Message; message = message == null ? string.Empty : message.Trim(); if (GuiCommands.SaveStash(this, Repository.Stash, keepIndex, includeUntracked, message) == GuiCommandStatus.Faulted) { return(false); } return(true); }
public MainWindow() { Current.MainWindow = this; GuiCommands.Init(this); InitializeComponent(); this.Icon = ExolutioResourceNames.GetResourceImageSource(ExolutioResourceNames.ExolutioIcon); DiagramTabManager = new DiagramTabManager(this); ConfigurationManager.LoadConfiguration(); this.Loaded += MainWindow_Loaded; dockManager.Loaded += dockManager_Loaded; Current.RecentFile += OnRecentFile; ExolutioRibbon.FillRecent(ConfigurationManager.Configuration.RecentFiles, ConfigurationManager.Configuration.RecentDirectories); Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException; }
public bool TryClone() { Verify.State.IsTrue(View != null, "Controller is not attached to a view."); var url = View.Url.Value; if (!GitControllerUtility.ValidateUrl(url, View.Url, View.ErrorNotifier)) { return(false); } var path = View.RepositoryPath.Value.Trim(); if (!GitControllerUtility.ValidateAbsolutePath(path, View.RepositoryPath, View.ErrorNotifier)) { return(false); } var remoteName = View.RemoteName.Value; if (!GitControllerUtility.ValidateRemoteName(remoteName, View.RemoteName, View.ErrorNotifier)) { return(false); } url = url.Trim(); bool shallow = View.ShallowClone.Value; int depth = shallow ? View.Depth.Value : -1; string template = View.UseTemplate.Value ? View.TemplatePath.Value.Trim() : null; if (!string.IsNullOrWhiteSpace(template) && !GitControllerUtility.ValidateAbsolutePath(template, View.TemplatePath, View.ErrorNotifier)) { return(false); } bool bare = View.Bare.Value; bool mirror = bare && View.Mirror.Value; bool noCheckout = View.NoCheckout.Value; bool recursive = View.Recursive.Value; var status = GuiCommands.Clone(View as IWin32Window, GitRepositoryProvider.GitAccessor, url, path, template, remoteName, shallow, depth, bare, mirror, recursive, noCheckout); return(status == GuiCommandStatus.Completed); }
public MainPage() { Current.MainWindow = this; GuiCommands.Init(this); InitializeComponent(); InitializeRibbon(); DiagramTabManager = new DiagramTabManager(this); this.Loaded += MainWindow_Loaded; //Current.ActiveDiagramChanged += Current_ActiveDiagramChanged; #if DEBUG #else ServerCommunication.ServerProjectListLoaded += ServerCommunication_ServerProjectListLoaded; ServerCommunication.GetServerProjects(); #endif }
public void Initialize(MainWindow mainWindow) { GuiCommands.Initialize(mainWindow); }