Exemplo n.º 1
0
        private void StartPage_FormClosed(object sender, FormClosedEventArgs e)
        {
            SerializationHandler handler = new SerializationHandler("D:");

            handler.SerializePostalCodes();
            handler.SerializeProperties();
            handler.SerializeApplicationData();
            Environment.Exit(0);
        }
Exemplo n.º 2
0
        private void buttonExit_Click(object sender, EventArgs e)
        {
            SerializationHandler handler = new SerializationHandler("D:");

            handler.SerializePostalCodes();
            handler.SerializeProperties();
            handler.SerializeApplicationData();

            try
            {
                pageReference.Dispose();
                Environment.Exit(0);
            }
            catch (Exception)
            {
                throw new Exception("...");
            }
        }