public MainWindow()
 {
     InitializeComponent();
     AppFolder        = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + AppFolder;
     installutil_path = Environment.GetFolderPath(Environment.SpecialFolder.Windows) + installutil_path;
     reg = new RegisterEx(Registry.LocalMachine, REGISTERPATH);
     GetDataToUI();
     UpdateServiceStatus();
 }
Beispiel #2
0
 public MainWindow()
 {
     InitializeComponent();
     reg = new RegisterEx(Registry.LocalMachine, Defines.REGISTERPATH);
     foreach (var item in Enum.GetValues(typeof(LogLevel)))
     {
         string strName  = Enum.GetName(typeof(LogLevel), item); //获取名称
         string strVaule = item.ToString();                      //获取值
         _LOG_LEVEL.Items.Add(strName);
     }
     GetDataToUI();
     UpdateServiceStatus();
 }
Beispiel #3
0
        public ServiceMain()
        {
            InitializeComponent();
            if (!EventLog.SourceExists(sourceName))
            {
                EventLog.CreateEventSource(sourceName, "Application");
            }
            _EventLog        = new EventLog();
            _EventLog.Source = sourceName;
            reg = new RegisterEx(Registry.LocalMachine, "SOFTWARE\\SLOONG.COM\\PowerMonitoring");

            WriteLog("PowerMonitioring Initialize.");
        }