예제 #1
0
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            var serial = Newtonsoft.Json.JsonConvert.SerializeObject(Checked);

            service.UpdateServicesConfig(serial, Key);
            ServerView server = (ServerView)DataContext;

            server.ServicesListView.Items.Refresh();
            server.CheckServerStatus(Key);
            Close();
        }
예제 #2
0
        private void selectServer(object sender, RoutedEventArgs e)
        {
            var selectedItem = serversList.SelectedItem as ServerViewModel;

            if (selectedItem == null)
            {
                return;
            }
            string key     = selectedItem.Key;
            var    server  = new ServerView(Group, key);
            var    clients = (Clients)DataContext;

            clients.Content = server;
            clients.NavigationService.Navigate(server);
        }
예제 #3
0
        public async void checkBox_Checked(object sender, RoutedEventArgs e)
        {
            loop = true;
            var     servers = Group.ServersList;
            Clients clients = (Clients)DataContext;

            foreach (var server in servers)
            {
                string Key = server.IdKey.ToString();
                var    sv  = new ServerView(Group, Key);
                sv.DataContext  = this;
                clients.Content = sv;
                clients.mainFrame.NavigationService.Navigate(sv);
                await Task.Delay(new TimeSpan(0, 0, 10));

                if (!loop)
                {
                    return;
                }
                if (Key == servers.Last().IdKey.ToString())
                {
                }
            }
        }