Esempio n. 1
0
        private void RenderThemeThumbnails(TextWriter output)
        {
            BrandingUtilities.IsBranded();
            IDictionary dictionary = new Dictionary <string, string>();
            string      storageId  = base.UserContext.Theme.StorageId;

            for (int i = 0; i < ThemeManager.Themes.Length; i++)
            {
                Theme theme = ThemeManager.Themes[i];
                dictionary.Add(theme.StorageId, theme.DisplayName);
            }
            int value = 40 * (dictionary.Count / 2 + ((dictionary.Count % 2 > 0) ? 1 : 0));

            output.Write("<div id=\"divThemes\" class=\"scroller\" style=\"width:");
            output.Write(value);
            output.Write("px;\">");
            output.Write("<span class=\"ThmPreviews\">");
            int num = 0;

            foreach (object obj in dictionary)
            {
                DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
                if (num == 2)
                {
                    output.Write("</span><span class=\"ThmPreviews\">");
                    num = 0;
                }
                output.Write("<span oV=\"" + dictionaryEntry.Key.ToString() + "\" ");
                output.Write("oP=\"" + ThemeManager.Themes[(int)((UIntPtr)ThemeManager.GetIdFromStorageId(dictionaryEntry.Key.ToString()))].Url + "\" ");
                if (storageId == dictionaryEntry.Key.ToString())
                {
                    output.Write("class=\"selThm\" ");
                }
                output.Write("id=\"ThmPreview\">");
                output.Write("<img tabindex=\"0\" src=\"");
                ThemeManager.RenderThemePreviewUrl(output, (string)dictionaryEntry.Key);
                output.Write("\" alt=\"");
                if (!string.IsNullOrEmpty(dictionaryEntry.Value.ToString()))
                {
                    Utilities.HtmlEncode(dictionaryEntry.Value.ToString(), output);
                }
                output.Write("\" title=\"");
                if (!string.IsNullOrEmpty(dictionaryEntry.Value.ToString()))
                {
                    Utilities.HtmlEncode(dictionaryEntry.Value.ToString(), output);
                }
                output.Write("\">");
                output.Write("</span>");
                num++;
            }
            output.Write("</span></div>");
        }
Esempio n. 2
0
        public AboutDialog()
        {
            InitializeComponent();

            lblVersion.Text     = string.Format("{0} {1}", Resources.Version, TabsterEnvironment.GetVersion().ToString(TabsterVersionFormatFlags.BuildString | TabsterVersionFormatFlags.CommitShort | TabsterVersionFormatFlags.Truncated));
            lblVersion.LinkArea = TabsterEnvironment.GetVersion().Commit != null ? new LinkArea(lblVersion.Text.Length - TabsterEnvironment.GetVersion().Commit.ToShorthandString().Length, TabsterEnvironment.GetVersion().Commit.ToShorthandString().Length) : new LinkArea(0, 0);

            lblCopyright.Text   = BrandingUtilities.GetCopyrightString(Assembly.GetExecutingAssembly());
            txtLicense.Text     = Resources.ApplicationLicense;
            txtFontLicense.Text = MonoUtilities.ReadFileText(new[] { Application.StartupPath, "Resources", "SourceCodePro", "SIL OPEN FONT LICENSE.txt" }.Aggregate(Path.Combine));

            LoadPlugins();
        }
Esempio n. 3
0
        public SplashScreen()
        {
            InitializeComponent();

#if PORTABLE
            lblPortable.Visible = true;
#endif

            if (TabsterEnvironment.SafeMode)
            {
                lblSafeMode.Visible = true;
            }

            RoundBorderForm(this);

            lblProgress.Text = string.Empty;

            lblVersion.Text   = string.Format("v{0}", TabsterEnvironment.GetVersion().ToString(TabsterVersionFormatFlags.Truncated));
            lblBuild.Text     = string.Format("{0} {1}", Resources.Build, TabsterEnvironment.GetVersion().Build);
            lblCopyright.Text = BrandingUtilities.GetCopyrightString(Assembly.GetExecutingAssembly());
            BringToFront();
        }