예제 #1
0
        private void SaveClick(object sender, EventArgs e)
        {
            var saveFileDialog = new SaveFileDialog {
                Filter = Extension
            };

            if (saveFileDialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            Serializator.Serialize(order, saveFileDialog.FileName);
        }
예제 #2
0
        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);
        }