Exemple #1
0
        //
        //When this method is used, it will show the MainUI
        public void ShowForm(UIApplication uiApp)
        {
            //Create a new RequestHandler object
            RequestHandler handler = new RequestHandler(_cachedUiCtrApp);
            //Create a new ExternalEvent object
            ExternalEvent exEvent = ExternalEvent.Create(handler);

            //Set newMainUI to a new instance of MainUI, passing the UIApplication, ExternalEvent, and RequestHandler it will need to use
            newMainUi = new MainUI(uiApp, exEvent, handler);
            //Set the newSPUi to a new instance of SharedParameterUI, which only needs UIApplication. Do not show until needed
            newSPUi = new SharedParametersUI(uiApp);

            CadDriveIsAccessible = GeneralOperations.IsCadDriveAccessible();
            if (CadDriveIsAccessible == false)
            {
                MessageBox.Show("Cannot access the K Drive. Some tools will not be functional.");
            }

            //Generate a new DataTable for collecting data
            appUseDataTable = new DataTable();
            //Prep the appUseDataTable by adding the appropriate columns using the following method
            DatabaseOperations.MakeAppUseDataTable(appUseDataTable);

            //Show the MainUI
            newMainUi.Show();
        }