public void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            SlackChannelViewModel model = m_viewModel ?? new SlackChannelViewModel();

            Settings.Default.RecentSlackBotName     = model.BotName;
            Settings.Default.RecentSlackChannel     = model.Channel;
            Settings.Default.RecentSlackPostToSlack = model.PostToSlack;
            Settings.Default.RecentSlackWebhookUrl  = model.WebhookUrl;
            Settings.Default.Save();
        }
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            var context = new BuildsSectionContext {
                Builds = this.Builds
            };

            e.Context = context;
        }
 /// <summary>
 /// Save the current state of the section
 /// </summary>
 /// <param name="sender">The sender object</param>
 /// <param name="e">The event arguments</param>
 public override void SaveContext(object sender, SectionSaveContextEventArgs e)
 {
     base.SaveContext(sender, e);
     if (e != null)
     {
         e.Context = new ShelvesetsContext
         {
             Shelvesets = this.Shelvesets
         };
     }
 }
示例#4
0
        /// <summary>
        /// Save contextual information about the current section state.
        /// </summary>
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            // Save our current so when the user navigates back to the page the content is restored rather than requeried
            ChangesSectionContext context = new ChangesSectionContext {
                Changesets = this.Changesets
            };

            e.Context = context;
        }
        /// <summary>
        /// Save contextual information about the current section state.
        /// </summary>
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            ChangesSectionContext context = new ChangesSectionContext
            {
                Changesets    = Changesets,
                SelectedIndex = View.SelectedIndex
            };

            e.Context = context;
        }
        /// <summary>
        /// Save contextual information about the current section state.
        /// </summary>
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            // Save our current changeset list, selected item, and topmost item
            // so they can be quickly restored when the user navigates back to
            // the page
            ChangesSectionContext context = new ChangesSectionContext();

            context.Changesets    = this.Changesets;
            context.SelectedIndex = this.View.SelectedIndex;

            e.Context = context;
        }
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);
            var context = new RecentChangesetsViewModelContext
            {
                ChangesetIdsText     = ChangesetIdsText,
                Changesets           = Changesets,
                SelectedChangeset    = SelectedChangeset,
                ShowAddByIdChangeset = ShowAddByIdChangeset,
                Title = Title
            };

            e.Context = context;
        }
示例#8
0
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            var context = new TeamMergeContext
            {
                SelectedProjectName = SelectedProjectName,
                Changesets          = Changesets,
                SourceBranch        = SelectedSourceBranch,
                TargetBranch        = SelectedTargetBranch
            };

            e.Context = context;
        }
示例#9
0
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            var view = SectionContent as SettingsSectionView;

            int value;

            if (int.TryParse(view.txtSubjectWidth.Text, out value))
            {
                _settings.SubjectWidth = value;
            }
            if (int.TryParse(view.txtBodyWidth.Text, out value))
            {
                _settings.BodyWidth = value;
            }
            if (int.TryParse(view.txtFontSize.Text, out value))
            {
                _settings.FontSize = value;
            }
            _settings.UseMonospacedFont = view.chkUseMonospacedFont.IsChecked.Value;
            _settings.BlankSecondLine   = view.chkBlankSecondLine.IsChecked.Value;
            _settings.EnableSpellCheck  = view.chkEnableSpellCheck.IsChecked.Value;
        }
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            e.Context = TeamMergeCommandsViewModel.CreateContext();
        }
 public virtual void SaveContext(object sender, SectionSaveContextEventArgs e)
 {
 }
示例#12
0
        /// <summary>
        /// Save contextual information about the current section state.
        /// </summary>
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            // Save our current so when the user navigates back to the page the content is restored rather than requeried
            ChangesSectionContext context = new ChangesSectionContext { Shelvesets = this.Shelvesets };
            e.Context = context;
        }
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);
            var context = new RecentChangesetsViewModelContext
            {
                ChangesetIdsText = ChangesetIdsText,
                Changesets = Changesets,
                SelectedChangeset = SelectedChangeset,
                ShowAddByIdChangeset = ShowAddByIdChangeset,
                Title = Title
            };

            e.Context = context;
        }
示例#14
0
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            var context = new BranchesViewModelContext
            {
                Branches = Branches,
                Changeset = _changeset,
                ErrorMessage = ErrorMessage,
                MergeMode = MergeMode,
                MergeModes = MergeModes,
                MergeOption = MergeOption,
                SelectedBranch = SelectedBranch,
                ShowWorkspaceChooser = ShowWorkspaceChooser,
                Workspace = Workspace,
                Workspaces = Workspaces
            };

            e.Context = context;
        }
 /// <summary>
 /// Save context handler that is called before a section is unloaded.
 /// </summary>
 public virtual void SaveContext(object sender, SectionSaveContextEventArgs e)
 {
 }
示例#16
0
        /// <summary>
        /// Save contextual information about the current section state.
        /// </summary>
        public override void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
            base.SaveContext(sender, e);

            // Save our current so when the user navigates back to the page the content is restored rather than requeried
            TimeRecordsContext context = new TimeRecordsContext { TimeRecords = this.TimeRecords };
            e.Context = context;
        }
 /// <summary>
 /// Save the current state of the section
 /// </summary>
 /// <param name="sender">The sender object</param>
 /// <param name="e">The event arguments</param>
 public override void SaveContext(object sender, SectionSaveContextEventArgs e)
 {
     base.SaveContext(sender, e);
     if (e != null)
     {
         e.Context = new ShelvesetsContext
         {
             Shelvesets = this.Shelvesets
         };
     }
 }
示例#18
0
 void ITeamExplorerSection.SaveContext(object sender, SectionSaveContextEventArgs e)
 {
     Debug.WriteLine($"CsrTeamExplorerSection.SaveContext {sender.GetType().Name} {sender.ToString()}, {e}");
 }
示例#19
0
 public void SaveContext(object sender, SectionSaveContextEventArgs e)
 {
     _sectionContent = new StashInfoChangesSectionUI(e.Context as Stash, _serviceProvider);
 }