public static void ShowVersionHistory() { if (_VersionHistoryWindow == null || _VersionHistoryWindow.IsDisposed) { _VersionHistoryWindow = FillTextViewer(_VersionHistoryWindow, "Version History", "VersionHistory.txt"); } if (_VersionHistoryWindow != null) { _VersionHistoryWindow.Activate(); _VersionHistoryWindow.Show(); } }
private static TextViewer FillTextViewer(TextViewer viewer, string title, string manifestFileName) { string txt = FileSystem.GetTextFromFile(Path.Combine(Application.StartupPath, manifestFileName)); if (txt == string.Empty) { txt = FileSystem.GetText(manifestFileName); } if (txt != string.Empty) { viewer = new TextViewer(string.Format("{0} - {1}", Application.ProductName, title), txt) { Icon = Resources.zss_main }; } return viewer; }
public static void ShowLicense() { if (_LicenseWindow == null || _LicenseWindow.IsDisposed) { _LicenseWindow = FillTextViewer(_LicenseWindow, "License", "license.txt"); } if (_LicenseWindow != null) { _LicenseWindow.Activate(); _LicenseWindow.Show(); } }