private void SaveClick(object sender, EventArgs e) { var saveFileDialog = new SaveFileDialog { Filter = Extension }; if (saveFileDialog.ShowDialog() == DialogResult.Cancel) { return; } Serializator.Serialize(order, saveFileDialog.FileName); }
private void OpenClick(object sender, EventArgs e) { var openFileDialog = new OpenFileDialog { Filter = Extension }; if (openFileDialog.ShowDialog() == DialogResult.Cancel) { return; } order = Serializator.Deserialize(openFileDialog.FileName); Updator.UpdatePizzaControls(order.Pizza, pizzaPage.Controls[0].Controls); Updator.UpdateClientControls(order.Client, clientPage.Controls[0].Controls); }