Пример #1
0
        private void btnAdmin_Click(object sender, RoutedEventArgs e)
        {
            DlgLogin dlg = new DlgLogin();

            dlg.Owner = Application.Current.MainWindow;
            dlg.ShowDialog();
        }
Пример #2
0
        private void Window_ContentRendered(object sender, EventArgs e)
        {
            DlgLogin dlg = new DlgLogin();

            dlg.Owner = Application.Current.MainWindow;
            dlg.ShowDialog();

            //  DispatcherTimer setup
            dispatcherTimer          = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
            dispatcherTimer.Start();
        }