Пример #1
0
        public void MainWindow_Closing(object sender, CancelEventArgs e)
        {
            MessageBoxResult R = MessageBoxResult.No;

            if (Bdd2.DoitEtreEnregistre)
            {
                R = MessageBox.Show("Voulez vous enregistrer la base ?", "Info", MessageBoxButton.YesNo);
            }

            if (R == MessageBoxResult.Yes)
            {
                Bdd2.Enregistrer();
            }

            Bdd2.Deconnecter();

            WindowParam.SauverParametre(this);
        }
Пример #2
0
        public MainWindow()
        {
            this.Closing += new CancelEventHandler(MainWindow_Closing);
            this.Loaded  += MainWindow_Loaded;

            InitializeComponent();

            this.AddHandler(OngletSupprimable.TabItemClosed_Event, new RoutedEventHandler(this.SupprimerOnglet));

            xOnglets.SelectionChanged += this.SelectionOnglet;

            if (!Start())
            {
                this.Close();
            }

            WindowParam.AjouterParametre(this);
            WindowParam.RestaurerParametre(this);
        }