internal DiscussionBox( CustomFontForm parent, SingleDiscussionAccessor accessor, IGitCommandService git, User currentUser, ProjectKey projectKey, Discussion discussion, User mergeRequestAuthor, int diffContextDepth, ColorScheme colorScheme, Action <DiscussionBox> preContentChange, Action <DiscussionBox, bool> onContentChanged, Action <Control> onControlGotFocus) { Parent = parent; Discussion = discussion; _accessor = accessor; _editor = accessor.GetDiscussionEditor(); _mergeRequestAuthor = mergeRequestAuthor; _currentUser = currentUser; _imagePath = StringUtils.GetHostWithPrefix(projectKey.HostName) + "/" + projectKey.ProjectName; _diffContextDepth = new ContextDepth(0, diffContextDepth); _tooltipContextDepth = new ContextDepth(5, 5); if (git != null) { _panelContextMaker = new EnhancedContextMaker(git); _tooltipContextMaker = new CombinedContextMaker(git); } _colorScheme = colorScheme; _preContentChange = preContentChange; _onContentChanged = onContentChanged; _onControlGotFocus = onControlGotFocus; _htmlDiffContextToolTip = new HtmlToolTip { AutoPopDelay = 20000, // 20s InitialDelay = 300 }; _htmlDiscussionNoteToolTip = new HtmlToolTip { AutoPopDelay = 20000, // 20s InitialDelay = 300, }; _specialDiscussionNoteMarkdownPipeline = MarkDownUtils.CreatePipeline(Program.ServiceManager.GetJiraServiceUrl()); onCreate(); }
public static CustomUI BuildCustomUI() { Dialog fontDialog = new CustomFontForm().ToWDialog(); XElement xml = fontDialog.ToXElement(); var customUI = new CustomUI(); SetDefaultTextStyles(customUI); customUI.CustomDialogs.Add(fontDialog); customUI.On(NativeDialogs.ExitDialog, Buttons.Finish, new CloseDialog() { Order = 9999 }); customUI.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Next, new ShowDialog(fontDialog)); customUI.On(fontDialog, Buttons.Back, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(fontDialog, Buttons.Next, new ShowDialog(NativeDialogs.InstallDirDlg)); customUI.On(fontDialog, Buttons.Cancel, new CloseDialog("Exit")); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(fontDialog)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUI.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUI.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); return(customUI); }