Пример #1
0
        public AboutDialog()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.richCreditsBox.BackColor = SystemColors.Window;

            string textFormat = PdnResources.GetString("AboutDialog.Text.Format");

            this.Text = string.Format(textFormat, PdnInfo.GetBareProductName());

            this.pdnBanner.BannerText = string.Empty;// PdnInfo.GetFriendlyVersionString();
            this.richCreditsBox.LoadFile(PdnResources.GetResourceStream("Files.AboutCredits.rtf"), RichTextBoxStreamType.RichText);
            this.copyrightLabel.Text = PdnInfo.GetCopyrightString();

            this.Icon = PdnInfo.AppIcon;

            this.okButton.Text     = PdnResources.GetString("Form.OkButton.Text");
            this.okButton.Location = new Point((this.ClientSize.Width - this.okButton.Width) / 2, this.okButton.Top);

            this.creditsLabel.Text = PdnResources.GetString("AboutDialog.CreditsLabel.Text");

            Font bannerFont    = this.pdnBanner.BannerFont;
            Font newBannerFont = Utility.CreateFont(bannerFont.Name, 8.0f, bannerFont.Style);

            this.pdnBanner.BannerFont = newBannerFont;
            newBannerFont.Dispose();
            bannerFont.Dispose();

            this.versionLabel.Text = PdnInfo.GetFullAppName();
        }
Пример #2
0
 public PdnFileType()
     : base(PdnInfo.GetBareProductName(),
            FileTypeFlags.SavesWithProgress |
            FileTypeFlags.SupportsCustomHeaders |
            FileTypeFlags.SupportsLayers |
            FileTypeFlags.SupportsLoading |
            FileTypeFlags.SupportsSaving,
            new string[] { ".pdn" })
 {
 }
Пример #3
0
        public static bool OpenUrl(IWin32Window owner, string url)
        {
            bool result = SystemLayer.Shell.LaunchUrl(owner, url);

            if (!result)
            {
                string messageFormat = PdnResources.GetString("LaunchLink.Error.Format");
                string message       = string.Format(messageFormat, url);
                MessageBox.Show(owner, message, PdnInfo.GetBareProductName(), MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            return(result);
        }