/// <summary> /// Event handler for the run on cloud action /// </summary> /// <param name="sender">Sender of the event</param> /// <param name="e">Event arguments</param> public void RunOnCloud(object sender, EventArgs e) { if (Environment.OSVersion.Platform == PlatformID.Win32NT) { object model = Apsim.Get(explorerPresenter.ApsimXFile, explorerPresenter.CurrentNodePath); explorerPresenter.HideRightHandPanel(); explorerPresenter.ShowInRightHandPanel(model, "UserInterface.Views.NewAzureJobView", "UserInterface.Presenters.NewAzureJobPresenter"); } else { explorerPresenter.MainPresenter.ShowError("Microsoft Azure functionality is currently only available under Windows."); } }
/// <summary> /// Cancels submission of a job and hides the right hand panel (which holds the new job view). /// </summary> public void CancelJobSubmission() { if (submissionWorker != null) { submissionWorker.CancelAsync(); } presenter.HideRightHandPanel(); }
public void AddModel(object sender, EventArgs e) { object model = Apsim.Get(explorerPresenter.ApsimXFile, explorerPresenter.CurrentNodePath); explorerPresenter.HideRightHandPanel(); explorerPresenter.ShowInRightHandPanel(model, "UserInterface.Views.ListButtonView", "UserInterface.Presenters.AddModelPresenter"); }
/// <summary> /// Event handler for the run on cloud action /// </summary> /// <param name="sender">Sender of the event</param> /// <param name="e">Event arguments</param> public void RunOnCloud(object sender, EventArgs e) { try { if (Environment.OSVersion.Platform == PlatformID.Win32NT) { object model = explorerPresenter.ApsimXFile.FindByPath(explorerPresenter.CurrentNodePath)?.Value; explorerPresenter.HideRightHandPanel(); explorerPresenter.ShowInRightHandPanel(model, "ApsimNG.Resources.Glade.RunOnCloudView.glade", new RunOnCloudPresenter()); } else { explorerPresenter.MainPresenter.ShowError("Microsoft Azure functionality is currently only available under Windows."); } } catch (Exception err) { explorerPresenter.MainPresenter.ShowError(err); } }
public void EmptyDataStore(object sender, EventArgs e) { try { storage.Writer.Empty(); explorerPresenter.HideRightHandPanel(); explorerPresenter.ShowRightHandPanel(); } catch (Exception err) { explorerPresenter.MainPresenter.ShowError(err); } }
public void EmptyDataStore(object sender, EventArgs e) { explorerPresenter.MainPresenter.ShowWaitCursor(true); explorerPresenter.MainPresenter.ShowMessage("Emptying datastore...", Simulation.MessageType.Information); try { storage.Writer.Empty(); explorerPresenter.HideRightHandPanel(); explorerPresenter.ShowRightHandPanel(); } catch (Exception err) { explorerPresenter.MainPresenter.ShowError(err); } explorerPresenter.MainPresenter.ShowMessage("Empty datastore complete", Simulation.MessageType.Information); explorerPresenter.MainPresenter.ShowWaitCursor(false); }