Exemple #1
0
        private void updateInfos(string key, Disk DISK, CPU CPU, WindowsEvents EVENTS, ULS ULS)
        {
            // bool diskOK = DISK.GetDiskInfo(key);
            //if (!diskOK)
            //    disk.Background = Brushes.OrangeRed;

            //bool cpuOK = CPU.GetPerformanceInfo(key);
            //if (!cpuOK)
            //    cpu.Background = Brushes.OrangeRed;

            bool evOK = EVENTS.GetEventsInfo(key);

            if (!evOK)
            {
                windowsEvents.Background = Brushes.OrangeRed;
            }

            bool ulsOK = ULS.GetULSInfo(key);

            if (!ulsOK)
            {
                uls.Background = Brushes.OrangeRed;
            }

            bool connection = checkConnection(key);

            if (!connection)
            {
                disk.Background          = Brushes.Red;
                cpu.Background           = Brushes.Red;
                windowsEvents.Background = Brushes.Red;
                uls.Background           = Brushes.Red;
            }
        }
Exemple #2
0
        private void windowsEvents_Click(object sender, RoutedEventArgs e)
        {
            WindowsEvents WindowsEvents = new WindowsEvents(Group, windowsEvents.CommandParameter.ToString());

            this.Content = WindowsEvents;
            mainFrame.NavigationService.Navigate(WindowsEvents);
        }
Exemple #3
0
        public void refresh(string key)
        {
            CPU           cpu           = new CPU(Group, key);
            Disk          disk          = new Disk(Group, key);
            WindowsEvents windowsEvents = new WindowsEvents(Group, key);
            ULS           uls           = new ULS(Group, key);

            updateInfos(key, disk, cpu, windowsEvents, uls);
            DispatcherTimer timer = new DispatcherTimer();

            timer.Tick    += (s, args) => updateInfos(key, disk, cpu, windowsEvents, uls);
            timer.Interval = new TimeSpan(0, 0, 10);
            timer.Start();
        }
Exemple #4
0
        private void EventsViewList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var selectedItem = EventsViewList.SelectedItem as EventsViewModel;

            if (selectedItem == null)
            {
                return;
            }
            string key           = selectedItem.ServerKey;
            var    windowsEvents = new WindowsEvents(Group, key);
            var    window        = new Window();

            window.Content = windowsEvents;
            window.ShowDialog();
        }