コード例 #1
0
        public static void ShowVersionHistory()
        {
            if (_VersionHistoryWindow == null || _VersionHistoryWindow.IsDisposed)
            {
                _VersionHistoryWindow = FillTextViewer(_VersionHistoryWindow, "Version History", "VersionHistory.txt");
            }

            if (_VersionHistoryWindow != null)
            {
                _VersionHistoryWindow.Activate();
                _VersionHistoryWindow.Show();
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        public static void ShowLicense()
        {
            if (_LicenseWindow == null || _LicenseWindow.IsDisposed)
            {
                _LicenseWindow = FillTextViewer(_LicenseWindow, "License", "license.txt");
            }

            if (_LicenseWindow != null)
            {
                _LicenseWindow.Activate();
                _LicenseWindow.Show();
            }
        }