예제 #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            base.OnStartup(e);

            RegisterUnity();

            Container.RegisterInstance(ConfigurationManager.ConnectionStrings["ITCDB"].ConnectionString);

            Login lf     = Container.Resolve <Login>();
            bool  result = lf.ShowDialog() ?? false;

            if (result)
            {
                OrdersList ol = Container.Resolve <OrdersList>();
                Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
                Current.MainWindow   = ol;
                ol.Show();
            }
            else
            {
                Current.Shutdown();
            }
        }
예제 #2
0
파일: Menu.cs 프로젝트: anaskret/CarRent
        private void button3_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("Niestety baza wyrzuca bład, z którym nie potrafimy sobie poradzić. i ta sekcja jest nie dostępna");
            this.Hide();
            OrdersList ol = new OrdersList();

            ol.Show();
        }