private void PodanoButton_Click(object sender, RoutedEventArgs e) { int wybranaFunkcja = RodzajFunkcjiComboBox.SelectedIndex; if (PomiaryBlock.Visibility == Visibility.Hidden) { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".txt"; Nullable <bool> result = dlg.ShowDialog(); string path = null; if (result == true) { path = dlg.FileName; } MessageBox.Show("Wybrano: " + path); double[] x = null; double[] y = null; InputOutput.Odczyt(path, ref x, ref y); if (wybranaFunkcja != 6) { Wyniki w = new Wyniki(wybranaFunkcja, x, y); w.Show(); this.Close(); return; } } int liczbaPomiarow = int.Parse(PomiaryBox.Text); if (wybranaFunkcja != 6) { Dane d = new Dane(liczbaPomiarow, wybranaFunkcja); d.Show(); this.Close(); } else { Dane2 d = new Dane2(liczbaPomiarow, wybranaFunkcja); d.Show(); this.Close(); } }
private void ZapiszPomiaryButton_Click(object sender, RoutedEventArgs e) { InputOutput.ZapiszW("dane" + ".txt", X, Y); MessageBox.Show("Zapisano dane!"); }
private void ZapiszWynikiButton_Click(object sender, RoutedEventArgs e) { InputOutput.Zapisz("wyniki" + ".txt", X, Y, dX, dY, dF, Xsr, Ysr, Fsr, double.Parse(WynikBox.Text)); MessageBox.Show("Zapisano wyniki!"); }