Esempio n. 1
0
        public void AddModel(object sender, EventArgs e)
        {
            object model = Apsim.Get(explorerPresenter.ApsimXFile, explorerPresenter.CurrentNodePath);

            explorerPresenter.ShowInRightHandPanel(model,
                                                   "UserInterface.Views.ListButtonView",
                                                   "UserInterface.Presenters.AddModelPresenter");
        }
Esempio n. 2
0
 /// <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.");
     }
 }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
 /// <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);
     }
 }