コード例 #1
0
 public PMASysAlertsUI()
 {
     InitializeComponent();
     InitializeAllPanels();
     ShowPanel(ENUMPanel.PANEL_HOME);
     configManager = PMAConfigManager.GetConfigManagerInstance;
 }
コード例 #2
0
 public void Dispose()
 {
     configManager.Logger.Debug(EnumMethod.START);
     try
     {
         if (connection != null)
         {
             connection.Close();
             connection.Dispose();
             connection = null;
         }
         configManager = null;
     }
     finally
     {
         GC.Collect();
     }
 }
コード例 #3
0
        //-------------------------------------------------------------------------------------------------
        /// <summary>
        /// Runs the disc watch.
        /// </summary>
        private void RunDiscWatch()
        {
            configManager.Logger.Debug(EnumMethod.START);
            PMAConfigManager cm          = configManager;
            List <string>    listMessage = new List <string>();

            if (PMASystemAnalyzer.GenerateDriveSpaceAlert(cm.SystemAnalyzerInfo.ListDrivesToWatch.ToList <string>(),
                                                          cm.SystemAnalyzerInfo.LowDiscAlertAt, out listMessage))
            {
                cm.Message.AddRange(listMessage);
                if (!cm.FlagInfo.FlagedDiscAlert)
                {
                    postAlert = true;
                }
                cm.FlagInfo.FlagedDiscAlert = true;
            }
            else
            {
                cm.FlagInfo.FlagedDiscAlert = false;
            }
            configManager.Logger.Debug(EnumMethod.END);
        }
コード例 #4
0
        //-------------------------------------------------------------------------------------------------
        /// <summary>
        /// Runs the physical memory watch.
        /// </summary>
        private void RunPhysicalMemoryWatch()
        {
            configManager.Logger.Debug(EnumMethod.START);
            PMAConfigManager cm      = configManager;
            string           message = string.Empty;

            if (PMASystemAnalyzer.GeneratePhyMemAlert(cm.SystemAnalyzerInfo.SystemPhysicalMemoryAlertAt, out message))
            {
                cm.Message.Add(message);
                if (!cm.FlagInfo.FlagedPhysicalMemoryAlert)
                {
                    postAlert = true;
                }
                cm.FlagInfo.FlagedPhysicalMemoryAlert = true;
            }
            else
            {
                cm.FlagInfo.FlagedPhysicalMemoryAlert = false;
            }

            configManager.Logger.Debug(EnumMethod.END);
        }