Exemple #1
0
 public static void FillStdParams(Dictionary <string, string> pars, bool addUsage)
 {
     pars["VERSION"]    = VersionInfo.VERSION;
     pars["START"]      = UsageStats.ProgramStartedAt.ToString("s");
     pars["EDITION"]    = LicenseTool.EditionText();
     pars["REGEMAIL"]   = LicenseTool.RegEmails();
     pars["REGNAME"]    = LicenseTool.RegisteredToUser();
     pars["INSTMODE"]   = InstallationInfo.Instance.InstallMode.ToString();
     pars["OSVERSION"]  = OSVersion();
     pars["LANGUAGE"]   = Texts.Language;
     pars["INSTID"]     = InstallationInfo.Instance.InstallID;
     pars["EXEID"]      = Framework.ExecuteID;
     pars["ALLOWSTATS"] = Framework.Instance.AllowSendUsageStats() ? "1" : "0";
     if (VersionInfo.IsRelease)
     {
         pars["VERTYPE"] = "release";
     }
     if (VersionInfo.IsBeta)
     {
         pars["VERTYPE"] = "beta";
     }
     pars["BRAND"] = VersionInfo.Brand;
     if (addUsage)
     {
         pars["LICENSES"] = LicenseTool.GetFeedbackLicenseInfo();
         pars["USAGE"]    = UsageStats.GetAndClear();
     }
 }
Exemple #2
0
        public DatAdminInfoDashboardFrame()
        {
            InitializeComponent();

            HtmlGenerator gen = new HtmlGenerator();

            gen.BeginHtml(VersionInfo.ProgramTitle, HtmlGenerator.HtmlObjectViewStyle);
            gen.Heading(VersionInfo.ProgramTitle, 2);
            gen.PropsTableBegin();
            gen.PropTableRow("s_version", VersionInfo.VERSION);
            gen.PropTableRow("s_revision", VersionInfo.SVN_REVISION);
            gen.PropTableRow("s_build_at", VersionInfo.BuildAt.ToString("d"));
            gen.PropTableRow("s_edition", LicenseTool.EditionText());
            //gen.PropTableRow("s_license_valid_to", LicenseTool. Registration.EditionValidTo != null ? Registration.EditionValidTo.Value.ToString() : "");
            gen.PropsTableEnd();
            gen.BeginUl();
            gen.Li(String.Format("<a href='callback://open_newconn_dialog'>{0}</a>", Texts.Get("s_create_connection")));
            gen.Li(String.Format("<a href='callback://licenses'>{0}</a>", Texts.Get("s_licenses")));
            gen.Li(String.Format("<a href='http://datadmin.com'>{0}</a>", Texts.Get("s_datadmin_on_web")));
            gen.Li(String.Format("<a href='callback://support'>{0}</a>", Texts.Get("s_support")));
            gen.EndUl();

            bool showlic = true;

            if (LicenseTool.HidePurchaseLinks() && VersionInfo.HideLicenseInfo)
            {
                showlic = false;
            }
            if (showlic)
            {
                gen.Write(VersionInfo.LicenseInfo);
            }

            gen.EndHtml();
            htmlPanelEx1.Procedures["open_newconn_dialog"] = (Action) delegate() { MainWindow.Instance.CreateNewConnectionDialog(); };
            htmlPanelEx1.Procedures["licenses"]            = (Action) delegate() { AboutForm.RunLicenses(); };
            htmlPanelEx1.Procedures["support"]             = (Action) delegate() { SupportConnector.SupportRequest(); };
            htmlPanelEx1.Text = gen.HtmlText;
        }
        private static void OpenSupportUrl(string path, string addpars)
        {
            string url = String.Format("http://www.datadmin.{0}?name={1}&email={2}&version={3}&osversion={4}&edition={5}",
                                       path, HttpUtility.UrlEncode(LicenseTool.RegisteredToUser1()), HttpUtility.UrlEncode(LicenseTool.RegEmail1()),
                                       HttpUtility.UrlEncode(VersionInfo.VERSION), HttpUtility.UrlEncode(FeedbackTool.OSVersion()), HttpUtility.UrlEncode(LicenseTool.EditionText()));

            if (addpars != null)
            {
                url += addpars;
            }
            System.Diagnostics.Process.Start(url);
        }