Example #1
0
        /// <summary>
        /// Pulls all changes on the selected project.
        /// </summary>
        public void Pull()
        {
            if (CheckProjects())
            {
                return;
            }

            try
            {
                ClientUI.ShowProgress("Pulling changes...");
                CurrentProject.Pull(x =>
                {
                    ClientUI.SetProgress("Pulling..." + x);
                });
                ClientUI.HideProgress();

                ClientUI.ShowProgress("Pulling done! Loading...");
                CurrentProject.Refresh(delegate
                {
                    UpdateView();
                    ClientUI.HideProgress();
                });
            }
            catch (WarningException ex)
            {
                ClientUI.HideProgress();
                ClientUI.ShowMessage(ex.Message);
            }
            catch (Exception ex)
            {
                ClientUI.HideProgress();
                ClientUI.ShowMessage("Error when pulling, no changes were pulled, message: <br>" + ex.Message, true);
            }
        }