Esempio n. 1
0
        private void btnClicks(object sender, RoutedEventArgs e)
        {
            try
            {
                switch (((Control)sender).Name.ToString())
                {
                case nameof(btnRework):
                    frmProduction fpr = new frmProduction {
                        Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner
                    };
                    fpr.Show();
                    Hide();
                    break;

                case nameof(btnRepair):
                    frmRepair rpr = new frmRepair(false)
                    {
                        Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner
                    };
                    rpr.Show();
                    Hide();
                    break;

                case nameof(btnReportViewer):
                    Process.Start(Properties.Settings.Default.DefaultReportManagerLink);
                    break;

                case nameof(btnQCDQE):
                    frmQCDQE fQC = new frmQCDQE {
                        Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner
                    };
                    fQC.Show();
                    Hide();
                    break;

                case nameof(btnSettings):
                    frmSettings fSettings = new frmSettings {
                        Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner
                    };
                    fSettings.Show();
                    Hide();
                    break;

                case nameof(btnTicketLookup):
                    frmGlobalSearch.Instance.Owner = GlobalInstance;
                    frmGlobalSearch.Instance.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                    frmGlobalSearch.Instance.CenterWindow();
                    frmGlobalSearch.Instance.Show();
                    Hide();
                    break;

                case nameof(btnTechFilesForm):
                    frmBoardFileManager alias = new frmBoardFileManager(directDialog: true)
                    {
                        StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
                    };
                    alias.Show();
                    break;

                case nameof(btnFirebaseWindow):
                    wndFireabase fireabase = new wndFireabase();
                    fireabase.Show();
                    break;
                }
            }
            catch (Exception ex)
            {
                csExceptionLogger.csExceptionLogger.Write("MainWindow_btnClicks", ex);
                Show();
            }
        }
 public frmCustomerSearch(frmRepair F) // repair
 {
     InitializeComponent();
     formRepair = F; ///-----------
 }