internal BranchesTab( WorkspaceInfo wkInfo, IWorkspaceWindow workspaceWindow, IViewSwitcher viewSwitcher, IMergeViewLauncher mergeViewLauncher, IUpdateReport updateReport, NewIncomingChangesUpdater developerNewIncomingChangesUpdater, EditorWindow parentWindow) { mWkInfo = wkInfo; mParentWindow = parentWindow; mProgressControls = new ProgressControlsForViews(); mProgressControls = new ProgressControlsForViews(); BuildComponents( wkInfo, workspaceWindow, viewSwitcher, mergeViewLauncher, updateReport, developerNewIncomingChangesUpdater, parentWindow); ((IRefreshableView)this).Refresh(); }
public UpdateDialog(IUpdateReport info) : this() { if (info.IsUpToDate) { if (NeedsLocalizing()) { Text = Resx.UpdateDialog_Text; Localize(new string[] { "currentLabel", "versionLabel", "lastpdatedLabel", "releaseNotesLink", "okButton=word_OK" }); } updatePanel.Visible = false; Height = readyPanel.Height + okButton.Height + Padding.Top + Padding.Bottom * 2; AcceptButton = okButton; CancelButton = okButton; versionBox.Text = info.InstalledVersion; lastUpdatedBox.Text = FormatDate(info.InstalledDate); url = info.InstalledUrl; } else { if (NeedsLocalizing()) { Text = Resx.UpdateDialog_Text; Localize(new string[] { "upIntroLabel", "upVersionLabel", "upDescriptionLabel", "upReleaseDateLabel", "upReleaseNotesLink", "upCurrentVersionLabel", "upLastUpdatedLabel", "upOKButton", "cancelButton=word_Cancel" }); } readyPanel.Visible = false; updatePanel.Top = readyPanel.Top; Height = updatePanel.Height + upOKButton.Height + Padding.Top + Padding.Bottom * 2; AcceptButton = upOKButton; CancelButton = cancelButton; upVersionBox.Text = info.UpdateVersion; upDescriptionBox.Text = info.UpdateDescription; upReleaseDateBox.Text = FormatDate(info.UpdateDate); upCurrentVersionBox.Text = info.InstalledVersion; upLastUpdatedBox.Text = FormatDate(info.InstalledDate); url = info.UpdateUrl; } }
void BuildComponents( WorkspaceInfo wkInfo, IWorkspaceWindow workspaceWindow, IViewSwitcher viewSwitcher, IMergeViewLauncher mergeViewLauncher, IUpdateReport updateReport, NewIncomingChangesUpdater developerNewIncomingChangesUpdater, EditorWindow parentWindow) { mSearchField = new SearchField(); mSearchField.downOrUpArrowKeyPressed += SearchField_OnDownOrUpArrowKeyPressed; DateFilter.Type dateFilterType = EnumPopupSetting <DateFilter.Type> .Load( UnityConstants.BRANCHES_DATE_FILTER_SETTING_NAME, DateFilter.Type.LastMonth); mDateFilter = new DateFilter(dateFilterType); BranchesListHeaderState headerState = BranchesListHeaderState.GetDefault(); TreeHeaderSettings.Load(headerState, UnityConstants.BRANCHES_TABLE_SETTINGS_NAME, (int)BranchesListColumn.CreationDate, false); mBranchesListView = new BranchesListView( headerState, BranchesListHeaderState.GetColumnNames(), new BranchesViewMenu(this), sizeChangedAction: OnBranchesListViewSizeChanged); mBranchesListView.Reload(); mBranchOperations = new BranchOperations( wkInfo, workspaceWindow, viewSwitcher, mergeViewLauncher, this, ViewType.BranchesView, mProgressControls, updateReport, new ContinueWithPendingChangesQuestionerBuilder(viewSwitcher, parentWindow), developerNewIncomingChangesUpdater); }