public void AddModel(object sender, EventArgs e) { object model = Apsim.Get(explorerPresenter.ApsimXFile, explorerPresenter.CurrentNodePath); 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) { 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."); } }
public void RunOnCloud(object sender, EventArgs e) { try { object model = explorerPresenter.CurrentNode; explorerPresenter.HideRightHandPanel(); explorerPresenter.ShowInRightHandPanel(model, "ApsimNG.Resources.Glade.RunOnCloudView.glade", new RunOnCloudPresenter()); } catch (Exception err) { explorerPresenter.MainPresenter.ShowError(err); } }
/// <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); } }