/// <summary>
        ///   Saves html report to local config filepath
        /// </summary>
        /// <param name="report">filepath of html report</param>
        /// <returns>file path of saved report</returns>
        public string SaveReport(string report)
        {
            if (string.IsNullOrEmpty(_config.ClientDir) || _active)
            {
                return(null);
            }
            var path = Path.Combine(_config.ClientDir, _config.StormName);

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

            var sFileName = string.Format(@"{8}_{0}_{1:00}{2:00}{3:0000}_{4:00}{5:00}{6:00}_{7}.html",
                                          Fdr.FeederName.Trim(),
                                          _stop.Month, _stop.Day, _stop.Year,
                                          _stop.Hour, _stop.Minute, _stop.Second,
                                          Environment.UserName.Trim(),
                                          _config.getAreaName(Fdr.FeederId));

            var filePath = Path.Combine(path, sFileName);

            SCUtil.SafeDelete(filePath);
            File.Copy(report, filePath);

            return(filePath);
        }
Esempio n. 2
0
        public ShowDamageReportsCommand()
        {
            m_name     = "ShowDamageReportsCommand";
            m_message  = "Show Damage Reports Command";
            m_caption  = "Show Damage Reports Command";
            m_category = "SanteeCooper";
            m_toolTip  = "Show Damage Reports Command";

            var str = SCUtil.GetProfile();

            _profileOK = str == "Damage";
        }
        public StartDamageCommand()
        {
            m_name     = "StartDamageCommand";
            m_message  = "Start Damage Assessment Command";
            m_caption  = "Start Damage Assessment Command";
            m_category = "SanteeCooper";
            m_toolTip  = "Start Damage Assessment Command";

            var str = SCUtil.GetProfile();

            _profileOK = str == "Damage";
        }
Esempio n. 4
0
 private string GetTempHtmlPath()
 {
     _htmlPath = Path.Combine(Path.GetTempPath(), @"DamageReport.html");
     SCUtil.SafeDelete(_htmlPath);
     return(_htmlPath);
 }