public EMP_ViewProjects(int id, string type) { ID = id; Type = type; controllerObj = new Controller(); InitializeComponent(); if (Type != "Admin") { Add.Hide(); Delete.Hide(); label2.Hide(); label5.Hide(); StatusText.Hide(); Confirm.Hide(); newStatus.Hide(); Company.Hide(); } else { label5.Hide(); Company.Hide(); DataTable C = controllerObj.SelectAllCompanies(); Company.DataSource = C; Company.DisplayMember = "Name"; Company.ValueMember = "CID"; button_ViewProj.Text = "Edit Selected"; } }
public IEnumerator ProcessPLY(string input, string output) { string pinput = Path.GetFullPath(input); string poutput = Path.GetFullPath(output); Debug.Log("converting " + pinput + " into " + poutput); if (File.Exists(input)) { string parameters = " \"" + pinput + "\" -o \"" + poutput + "\" -t " + this.siteData.custom.modelType; StatusText.SetText("Converting " + input + "into octree format and caching"); var stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); var proc = System.Diagnostics.Process.Start(Path.GetFullPath(GameManager.pathToPotreeExecutable), parameters); while (!proc.HasExited) { yield return(null); } // proc.WaitForExit(); // proc.CloseMainWindow(); StatusText.Hide(); stopwatch.Stop(); Debug.Log("Done in " + stopwatch.Elapsed.Seconds + " seconds"); } yield return(null); }
private void endInstallation(string reason, bool failed) { InstallProgress.Value = 100; BetaRadio.Hide(); InstallButton.Hide(); UninstallButton.Hide(); UpdateButton.Hide(); ReinjectButton.Hide(); StatusText.Hide(); StatusLabel.Show(); StatusLabel.Text = operation == "UPDATE" ? "Update " + (failed ? "failed" : "complete") : (operation == "UNINSTALL" ? "Unin" : "In") + "stallation " + (failed ? " failed." : "completed!"); StatusLabel.ForeColor = failed ? Color.Red : Color.Lime; StatusLabel2.Show(); StatusLabel2.Text = reason; StatusCloseButton.Show(); if (platform != "Linux") { OpenFolderButton.Show(); } }
// Wait for the object to load. Adds a layer of abstraction. private IEnumerator WaitForLoad() { // Don't try to load two different elements at once. Could get messy. while (SiteManager.loading) { yield return(null); } // Lock user input so they can't interact while an object is loading. GamepadInput.LockInput(true); SiteManager.loading = true; // Show the loading status. StatusText.Show(); // If there's no specified scene name in the JSON, then we just load the data normally. if (string.IsNullOrEmpty(siteData.sceneName)) { yield return(StartCoroutine(LoadCoroutine())); yield return(StartCoroutine(LoadCustomData())); } // Otherwise, we just load the scene specified in JSON. else { // Variable to keep track if we actually found the scene or not. bool foundScene = false; // Iterate through all existing scenes. for (int i = 0; i < SceneManager.sceneCount; i++) { // Get the scene at specified index. Scene scene = SceneManager.GetSceneAt(i); // Check if the names match. if (scene.name.Equals(siteData.sceneName)) { // If they match, scene was found. Load the scene. foundScene = true; AsyncOperation sceneLoad = SceneManager.LoadSceneAsync(siteData.sceneName); // Load the scene specified in JSON and wait for it to finish loading. while (!sceneLoad.isDone) { yield return(null); } // Break, since we found the scene. break; } } // If we didn't find the scene, log an error and try to load normally... which probably won't work. if (!foundScene) { Debug.LogErrorFormat("Could not find scene name '{0}', which was provided in JSON data file. Ensure this scene exists and is added to build settings."); yield return(StartCoroutine(LoadCoroutine())); } } // Everything is now loaded. loaded = true; // Hide the status text. StatusText.Hide(); // Unlock input and mark scene as not loading anymore. GamepadInput.LockInput(false); SiteManager.loading = false; }