/// <summary> /// Open a dialog for downloading a new weather file /// </summary> public void DownloadWeather() { Model model = Apsim.Get(this.ApsimXFile, this.CurrentNodePath) as Model; if (model != null) { Utility.WeatherDownloadDialog dlg = new Utility.WeatherDownloadDialog(); dlg.ShowFor(model, (view as ExplorerView), this.view.Tree.SelectedNode, this); } }
/// <summary> /// Open a dialog for downloading a new weather file /// </summary> public void DownloadWeather() { Model model = this.ApsimXFile.FindByPath(this.CurrentNodePath)?.Value as Model; if (model != null) { Utility.WeatherDownloadDialog dlg = new Utility.WeatherDownloadDialog(); IModel currentNode = ApsimXFile.FindByPath(CurrentNodePath)?.Value as IModel; dlg.ShowFor(model, (view as ExplorerView), currentNode, this); } }