Example #1
0
        /// <summary>
        /// Shows the About dialog box</summary>
        /// <remarks>Derived classes should copy this method and customize it. For an example
        /// of loading a rich text file that is an embedded resource, see the SimpleDomEditor sample.
        /// It is recommended to display the ATF version number to aid in diagnosing
        /// problems. (Pass in 'true' to AboutDialog's constructor or use AtfVersion.)</remarks>
        protected virtual void ShowHelpAbout()
        {
            var richTextBox = new RichTextBox();
            richTextBox.BorderStyle = BorderStyle.None;
            richTextBox.ReadOnly = true;
            richTextBox.Text = "An application built using the Authoring Tools Framework".Localize();

            string appURL = "https://github.com/SonyWWS/ATF/wiki";
            var dialog = new AboutDialog(
                "About this Application".Localize(), appURL, richTextBox, null, null, true);
            dialog.ShowDialog();
        }
Example #2
0
        /// <summary>
        /// Shows the About dialog box</summary>
        /// <remarks>Derived classes should copy this method and customize it.
        /// It is recommended to display the ATF version number to aid in diagnosing
        /// problems. (Pass in 'true' to AboutDialog's constructor or use AtfVersion.)</remarks>
        protected override void ShowHelpAbout()
        {
            RichTextBox richTextBox = new RichTextBox();
            richTextBox.BorderStyle = BorderStyle.None;
            richTextBox.ReadOnly = true;
            Stream textFileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(
                "TimelineEditorSample.Resources.About.rtf");
            richTextBox.LoadFile(textFileStream, RichTextBoxStreamType.RichText);

            string appURL = "https://github.com/SonyWWS/ATF/wiki";

            AboutDialog dialog = new AboutDialog(
                Localizer.Localize("Timeline Editor Sample"), appURL, richTextBox, null, null, true);
            dialog.ShowDialog();
        }
Example #3
0
        /// <summary>
        /// Shows the About dialog box</summary>
        /// <remarks>Derived classes should copy this method and customize it.
        /// It is recommended to display the ATF version number to aid in diagnosing
        /// problems. (Pass in 'true' to AboutDialog's constructor or use AtfVersion.)</remarks>
        protected override void ShowHelpAbout()
        {
            var richTextBox = new RichTextBox();
            richTextBox.BorderStyle = BorderStyle.None;
            richTextBox.ReadOnly = true;

            string languageCode = CultureInfo.CurrentCulture.TwoLetterISOLanguageName;
            string aboutFilePath;
            if (languageCode == "ja")
                aboutFilePath = "CircuitEditorSample.Resources.ja.About.rtf";
            else
                aboutFilePath = "CircuitEditorSample.Resources.About.rtf";
            
            Stream textFileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(aboutFilePath);
            if (textFileStream != null)
                richTextBox.LoadFile(textFileStream, RichTextBoxStreamType.RichText);

            const string appUrl = "https://github.com/SonyWWS/ATF/wiki";
            var dialog = new AboutDialog(
                "Circuit Editor Sample".Localize(), appUrl, richTextBox, null, null, true);
            dialog.ShowDialog();
        }
Example #4
0
        /// <summary>
        /// Shows the About dialog box</summary>
        protected override void ShowHelpAbout()
        {
            Assembly assem = Assembly.GetAssembly(typeof(LevelEditorApplication));
            string v = "V" + assem.GetName().Version.ToString(3);
            object[] attribs = assem.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
            string copyright = ((AssemblyCopyrightAttribute)attribs[0]).Copyright;
            attribs = assem.GetCustomAttributes(typeof(AssemblyProductAttribute), false);
            string productName = ((AssemblyProductAttribute)attribs[0]).Product;

            string appName = productName + " " + v;

            var credits = new List<string>();
            credits.Add(appName + " by Alan Beckus, Ron Little, Matt Mahony, and Max Elliott. " + copyright);

            RichTextBox richTextBox = new RichTextBox();
            richTextBox.BorderStyle = BorderStyle.None;
            richTextBox.ReadOnly = true;
            richTextBox.Text = appName;

            string appURL = "http://wiki.ship.scea.com/confluence/display/WWSSDKLEVELEDITOR/LevelEditor";
            AboutDialog dialog = new AboutDialog(productName, appURL, richTextBox, null, credits, true);
            dialog.ShowDialog();
        }
Example #5
0
        protected override void ShowHelpAbout()
        {
            try
            {
                var assem = Assembly.GetAssembly(typeof(SledAboutService));
                var version = assem.GetName().Version.ToString();

                var title =
                    SledUtil.TransSub(Resources.Resource.HelpAboutTitleWithVersion, version);

                using (Image image = m_mainForm.Icon.ToBitmap())
                {
                    {
                        //
                        // WWS version
                        //

                        using (var richTextBox = new RichTextBox())
                        {
                            richTextBox.BorderStyle = BorderStyle.None;
                            richTextBox.ReadOnly = true;

                            using (var strm = assem.GetManifestResourceStream(Resources.Resource.HelpAboutAssemblyPath))
                            {
                                if (strm != null)
                                    richTextBox.LoadFile(strm, RichTextBoxStreamType.RichText);

                                using (var dialog =
                                    new AboutDialog(
                                        title,
                                        ApplicationUrl,
                                        richTextBox,
                                        image,
                                        null,
                                        true))
                                {
                                    dialog.ShowDialog(m_mainForm);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SledOutDevice.OutLine(
                    SledMessageType.Error,
                    SledUtil.TransSub(Localization.SledHelpAboutErrorException, ex.Message));
            }
        }