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 {} }
private void buttonDodZap_Click(object sender, EventArgs e) { for(int i=0;i<dataGridViewDane.Rows.Count;i++) { if(dataGridViewDane.Rows[i].Cells[1].Value == null) { dataGridViewDane.Rows[i].Cells[1].Value = ""; } } if (dataGridViewDane.Rows[0].Cells[1].Value.ToString() == "" || dataGridViewDane.Rows[1].Cells[1].Value.ToString() == "" || dataGridViewDane.Rows[3].Cells[1].Value.ToString() == "") { MessageBox.Show("Pola imię, nazwisko i telefon nie mogą być puste", "Brakujące dane pacjenta", MessageBoxButtons.OK); return; } string[] dane = new string[12]; for(int i=0;i<dane.Length;i++) { dane[i] = dataGridViewDane.Rows[i].Cells[1].Value.ToString(); } string tel = dataGridViewDane.Rows[3].Cells[1].Value.ToString(); string znakiNumeru = "0123456789*#"; for(int i=0;i<tel.Length;i++) { int c = tel[i]; bool blednyZnak = true; for(int j=0;j<znakiNumeru.Length;j++) { if(c==znakiNumeru[j]) { blednyZnak = false; break; } } if(blednyZnak) { MessageBox.Show("Numer telefonu może zawierać tylko cyfry i znaki * #.", "Niepoprawny format numeru telefonu", MessageBoxButtons.OK); return; } } //walidacja pomyślna Zeby ZebyPacjenta = new Zeby(); Pacjent pacpac = new Pacjent(dane, ZebyPacjenta); mainForm.pobierzPacjenta(pacpac); FormDiagram formZeb = new FormDiagram(pacpac,mainForm, this, true); this.Enabled = false; }
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(); } }
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(); } }
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(); } }
private void buttonDiagram_Click(object sender, EventArgs e) { FormDiagram formularzZebowy = new FormDiagram(pacjDoPokazania, mainForm, this, !readOnlyMode); }