private void dCookie()
 {
     try
     {
         while (isWorking)
         {
             Thread.Sleep(500);
             Invoke(new Action(() =>
             {
                 try
                 {
                     string cookie = wcChoose.Source.AbsoluteUri.Substring(
                         wcChoose.Source.AbsoluteUri.IndexOf("?q=" +
                                                             ""));
                     if (cookie != "")
                     {
                         string curDir = Directory.GetCurrentDirectory();
                         if (cookie == "?q=1")
                         {
                             TheoryForm f = new TheoryForm();
                             f.Show();
                             Visible = false;
                         }
                         if (cookie == "?q=2")
                         {
                             string path = String.Format(@"{0}\Tests\Лёгкий тест.json", curDir);
                             TestForm f  = new TestForm("Лёгкий тест", path);
                             f.Show();
                             Visible = false;
                         }
                         if (cookie == "?q=3")
                         {
                             string path = String.Format(@"{0}\Tests\Сложный тест.json", curDir);
                             TestForm f  = new TestForm("Сложный тест", path);
                             f.Show();
                             Visible = false;
                         }
                         if (cookie == "?q=4")
                         {
                             string path = String.Format(@"{0}\Tests\Технический тест.json", curDir);
                             TestForm f  = new TestForm("Технический тест", path);
                             f.Show();
                             Visible = false;
                         }
                         if (cookie == "?q=5")
                         {
                             FormDiagram f = new FormDiagram();
                             f.Show();
                             Visible = false;
                         }
                         isWorking = false;
                     }
                 }
                 catch { }
             }));
         }
     }
     catch
     {}
 }
Exemple #2
0
        private void buttonDrawHistogram_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild is FormChild)
            {
                FormChild activeChild = ActiveMdiChild as FormChild;

                FormDiagram fDiag =
                    new FormDiagram(DataProc.Diagram.KindOfDiagram.Histogram,
                                    activeChild.DataAsRow);
                fDiag.Size = new Size(400, 300);

                fDiag.Show();
            }
        }
Exemple #3
0
        private void buttonDrawEmpFn_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild is FormChild)
            {
                FormChild activeChild = ActiveMdiChild as FormChild;

                double[] means =
                    StatisticsProcessor.EmpVals(activeChild.DataAsRow);

                FormDiagram fDiag =
                    new FormDiagram(DataProc.Diagram.KindOfDiagram.LeftArrows,
                                    means);
                fDiag.Size = new Size(400, 300);

                fDiag.Show();
            }
        }
Exemple #4
0
        private void buttonDrawSorted_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild is FormChild)
            {
                FormChild activeChild = ActiveMdiChild as FormChild;

                double[] sortedData = activeChild.DataAsRow;
                Array.Sort <double>(sortedData);

                FormDiagram fDiag =
                    new FormDiagram(DataProc.Diagram.KindOfDiagram.Polygon,
                                    sortedData);
                fDiag.Size = new Size(400, 300);

                fDiag.Show();
            }
        }