Exemple #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                Message message = new Message();
                message = JsonConvert.DeserializeObject <Message>(Data.ProjectName);

                foreach (var proj in message.args)
                {
                    SelecterProject.Items.Add(proj);
                }
                SelecterProject.SelectedIndex = 0;
                LabelUserName.Content         = Data.NameUser;
                SelectProj();
                ServerConnect serverConnect = new ServerConnect();
                message = JsonConvert.DeserializeObject <Message>(serverConnect.SendMsg("AddSession", Data.NameUser, "{\"args\":[\"" + Dns.GetHostByName(Dns.GetHostName()).AddressList[0].ToString() + "\"]}"));
                Data.Id = message.args[0];


                message = JsonConvert.DeserializeObject <Message>(serverConnect.SendMsg("CheckNowTests", Data.ServiceSel));
                TestsNow(message);
            }
            catch { }
            finally
            {
                FreeRAM.Free();
            }
        }
Exemple #2
0
        private void ChangeProject(object sender, SelectionChangedEventArgs e)
        {
            Frame.Navigate(new ClearPage());

            /*ComboBox comboBox = (ComboBox)sender;
             * string selectedItem = comboBox.SelectedItem.ToString();
             * Data.ProjectName = selectedItem.ToString();*/
            FreeRAM.Free();
        }
Exemple #3
0
 private void GetSettings(object sender, MouseButtonEventArgs e)
 {
     try
     {
         Settings settings = new Settings();
         settings.mainWindow = this;
         settings.ShowDialog();
     }
     catch { }
     finally
     {
         FreeRAM.Free();
     }
 }
Exemple #4
0
        public void SelectProj()
        {
            try
            {
                Message project = new Message();

                project = JsonConvert.DeserializeObject <Message>(Data.ProjectName);

                Data.ProjectSel = SelecterProject.SelectedItem.ToString();
                Data.ServiceSel = JsonConvert.DeserializeObject <Message>(Data.ServiceName).args[project.args.IndexOf(SelecterProject.SelectedItem.ToString())];
                Data.StendSel   = JsonConvert.DeserializeObject <Message>(Data.Stend).args[project.args.IndexOf(SelecterProject.SelectedItem.ToString())];
            }
            catch { }
            finally
            {
                FreeRAM.Free();
            }
        }
Exemple #5
0
 private void Bugs(object sender, RoutedEventArgs e)
 {
     try
     {
         if (SelecterProject.Text.ToString() != "")
         {
             SelectProj();
             Frame.Navigate(new Bugs());
         }
         else
         {
             MessageBox.Show("Не выбран проект!");
         }
     }
     catch { }
     finally
     {
         FreeRAM.Free();
     }
 }
Exemple #6
0
 private void OperacTest(object sender, RoutedEventArgs e)
 {
     MessageBox.Show("В разработке");
     try
     {
         //MessageBox.Show("Находится в разработке");
         if (SelecterProject.Text.ToString() != "")
         {
             // SelectProj();
             //   Frame.Navigate(new Charts());
         }
         else
         {
             MessageBox.Show("Не выбран проект!");
         }
     }
     catch { }
     finally
     {
         FreeRAM.Free();
     }
 }