Exemplo n.º 1
0
        void closeadminWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            try
            {
                if (AppProperties.Is_ClosePermissionWindow == true)
                {
                    m_MainWindow.Close();
                    Application.Current.Shutdown();
                    closeadminWindow = null;

                }
                else
                {
                    closeadminWindow = null;
                }

            }
            catch (Exception ex)
            {
                WPFMessageBoxResult _Result = WPFMessageBox.Show(new CommonUtils().GetStringValue("Exception"), ex.Message, ex.StackTrace, WPFMessageBoxButtons.OK, WPFMessageBoxImage.Error);
                // throw;
            }

        }
Exemplo n.º 2
0
        private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {


            if (AppProperties.Selected_Resource == "English")
            {
                imgBtnExit.Source = new BitmapImage(new Uri(@"/Images/Buttons/Menue/Exit Up.png", UriKind.Relative));
            }
            else
            {
                imgBtnExit.Source = new BitmapImage(new Uri(@"/Images/Buttons/Menue/Exit Arabic Up.png", UriKind.Relative));
            }

            if (closeadminWindow == null)
            {
                closeadminWindow = new CloseAdminPermission(m_MainWindow);
                closeadminWindow.Closing += closeadminWindow_Closing;
                closeadminWindow.Owner = m_MainWindow;
                closeadminWindow.Show();
            }
            /*
            WPFMessageBoxResult __Result = WPFMessageBox.Show(new CommonUtils().GetStringValue("Confirmation"), new CommonUtils().GetStringValue("lblCloseApplicationMessage"), WPFMessageBoxButtons.YesNo, WPFMessageBoxImage.Question);

           // if (MessageBox.Show(lblCloseApplicationMessage.Content.ToString() + "?", lblCloseApplication.Content.ToString(), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
            if(__Result == WPFMessageBoxResult.Yes)
            {
                this.Close();
            }*/
        }