Example #1
0
        private Settings()
        {
            if (Properties.prtg_server.Default.ServerList != null)
            {
                ServerSettings = Properties.prtg_server.Default.ServerList;
                SelectedServer = Properties.prtg_server.Default.SelectedServer;
                SelectedGroup = Properties.prtg_server.Default.SelectedGroup;
            }
            else
            {
                ServerSettings = new ServerList();
                SelectedServer = -1;
                SelectedGroup = -1;
            }

            ScriptFolder = Properties.prtg_server.Default.ScriptFolder;
            TemplateFolder = Properties.prtg_server.Default.TemplateFolder;

            if (string.IsNullOrEmpty(Properties.prtg_server.Default.DefaultOutPath) 
                || string.IsNullOrWhiteSpace(Properties.prtg_server.Default.DefaultOutPath))
            {
                OutputFolder = Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + "\\";
            }
            else
            {
                OutputFolder = Properties.prtg_server.Default.DefaultOutPath;
            }

            DefaultBillingHeader = Properties.prtg_server.Default.DefaultBillingHeader;
            DefaultBillingFooter = Properties.prtg_server.Default.DefaultBillingFooter;

            FooterText = Properties.prtg_server.Default.FooterText;
            CompanyLogo = Properties.prtg_server.Default.CompanyLogo;
        }
Example #2
0
        private Settings()
        {
            if (Properties.prtg_server.Default.ServerList != null)
            {
                ServerSettings = Properties.prtg_server.Default.ServerList;
                SelectedServer = Properties.prtg_server.Default.SelectedServer;
                SelectedGroup  = Properties.prtg_server.Default.SelectedGroup;
            }
            else
            {
                ServerSettings = new ServerList();
                SelectedServer = -1;
                SelectedGroup  = -1;
            }

            ScriptFolder   = Properties.prtg_server.Default.ScriptFolder;
            TemplateFolder = Properties.prtg_server.Default.TemplateFolder;

            if (string.IsNullOrEmpty(Properties.prtg_server.Default.DefaultOutPath) ||
                string.IsNullOrWhiteSpace(Properties.prtg_server.Default.DefaultOutPath))
            {
                OutputFolder = Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + "\\";
            }
            else
            {
                OutputFolder = Properties.prtg_server.Default.DefaultOutPath;
            }

            DefaultBillingHeader = Properties.prtg_server.Default.DefaultBillingHeader;
            DefaultBillingFooter = Properties.prtg_server.Default.DefaultBillingFooter;

            FooterText  = Properties.prtg_server.Default.FooterText;
            CompanyLogo = Properties.prtg_server.Default.CompanyLogo;
        }