Exemplo n.º 1
0
        private void uls_Click(object sender, RoutedEventArgs e)
        {
            ULS Uls = new ULS(Group, uls.CommandParameter.ToString());

            this.Content = Uls;
            mainFrame.NavigationService.Navigate(Uls);
        }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
0
        private void ULSView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var selectedItem = ULSViewList.SelectedItem as EventsViewModel;

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

            window.Content = uls;
            window.ShowDialog();
        }
Exemplo n.º 4
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;
            }
        }