private void New_Click(object sender, RoutedEventArgs e) { Serializer serializer = new Serializer(); SaveFileDialog saveFileDialog = new SaveFileDialog(); if (saveFileDialog.ShowDialog() == true) { try { serializer.CreateNewFile(saveFileDialog.FileName); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); } } }
private void Open_Click(object sender, RoutedEventArgs e) { Serializer deserializer = new Serializer(); OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { try { deserializer.DeSerializeObject(openFileDialog.FileName); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); } } }