private void Button_Click_Y(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = Environment.CurrentDirectory; openFileDialog.Filter = "Binary|*.bin"; if (openFileDialog.ShowDialog() == true) { _sygY = WriteRead.ReadFromFile(openFileDialog.FileName); } }
private void Button_Click_odtw(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = Environment.CurrentDirectory; openFileDialog.Filter = "Binary|*.bin"; if (openFileDialog.ShowDialog() == true) { SygnalCiagly s = WriteRead.ReadFromFile(openFileDialog.FileName); LineChart lc = new LineChart(); string nazwa = openFileDialog.FileName; nazwa = nazwa.Substring(nazwa.IndexOf(".") + 1); nazwa = nazwa.Substring(0, nazwa.IndexOf("-")); lc.DataContext = s.MakeChart(nazwa); lc.Show(); } }