/// <summary> /// Populate the view for the first time. Will throw if there are errors on startup. /// </summary> /// <param name="startPage">The start page to populate.</param> private void PopulateStartPage(IListButtonView startPage) { // Add the buttons into the main window. startPage.AddButton( "Open APSIM File", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.OpenFile.png"), this.OnOpenApsimXFile); startPage.AddButton( "Open an example", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.OpenExample.png"), this.OnExample); startPage.AddButton( "Standard toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), this.OnStandardToolboxClick); startPage.AddButton( "Management toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), this.OnManagementToolboxClick); startPage.AddButton( "Training toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), this.OnTrainingToolboxClick); startPage.AddButton( "Import old .apsim file", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Import.png"), this.OnImport); startPage.AddButton( "Upgrade", new Gtk.Image(null, "ApsimNG.Resources.MenuImages.Upgrade.png"), this.OnUpgrade); startPage.AddButton( "View Cloud Jobs", new Gtk.Image(null, "ApsimNG.Resources.Cloud.png"), this.OnViewCloudJobs); startPage.AddButton( "Help", new Gtk.Image(null, "ApsimNG.Resources.MenuImages.Help.png"), this.OnHelp); #if DEBUG startPage.AddButton( "Convert XML File", new Gtk.Image(null, "ApsimNG.Resources.MenuImages.Upgrade.png"), this.OnShowConverter); #endif // Populate the view's listview. startPage.List.Values = Utility.Configuration.Settings.MruList.ToArray(); this.PopulatePopup(startPage); }
/// <summary>Populate the view for the first time. Will throw if there are errors on startup.</summary> /// <param name="startPage">The start page to populate.</param> private void PopulateStartPage(IListButtonView startPage) { // Add the buttons into the main window. startPage.AddButton("Open APSIM File", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("UserInterface.Resources.Toolboxes.OpenFile.png")), OnOpenApsimXFile); startPage.AddButton("Open an example", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("UserInterface.Resources.Toolboxes.OpenExample.png")), OnExample); startPage.AddButton("Open standard toolbox", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("UserInterface.Resources.Toolboxes.Toolbox.png")), OnStandardToolboxClick); startPage.AddButton("Open management toolbox", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("UserInterface.Resources.Toolboxes.Toolbox.png")), OnManagementToolboxClick); startPage.AddButton("Open training toolbox", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("UserInterface.Resources.Toolboxes.Toolbox.png")), OnTrainingToolboxClick); startPage.AddButton("Import old .apsim file", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("UserInterface.Resources.Toolboxes.Import.png")), OnImport); startPage.AddButton("Upgrade", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("UserInterface.Resources.MenuImages.Upgrade.png")), OnUpgrade); // Populate the view's listview. startPage.List.Values = Utility.Configuration.Settings.MruList.ToArray(); }
/// <summary>Populate the view for the first time. Will throw if there are errors on startup.</summary> /// <param name="startPage">The start page to populate.</param> private void PopulateStartPage(IListButtonView startPage) { // Add the buttons into the main window. startPage.AddButton("Open APSIM File", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.OpenFile.png"), OnOpenApsimXFile); startPage.AddButton("Open an example", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.OpenExample.png"), OnExample); startPage.AddButton("Standard toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), OnStandardToolboxClick); startPage.AddButton("Management toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), OnManagementToolboxClick); startPage.AddButton("Training toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), OnTrainingToolboxClick); startPage.AddButton("Import old .apsim file", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Import.png"), OnImport); startPage.AddButton("Upgrade", new Gtk.Image(null, "ApsimNG.Resources.MenuImages.Upgrade.png"), OnUpgrade); // Populate the view's listview. startPage.List.Values = Utility.Configuration.Settings.MruList.ToArray(); }
/// <summary>Populate the view for the first time. Will throw fif there are errors on startup.</summary> /// <param name="startPage">The start page to populate.</param> private void PopulateStartPage(IListButtonView startPage) { // Add the buttons into the main window. startPage.AddButton("Open APSIM File", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.OpenFile.png"), OnOpenApsimXFile); startPage.AddButton("Open an example", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.OpenExample.png"), OnExample); startPage.AddButton("Open standard toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), OnStandardToolboxClick); startPage.AddButton("Open management toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), OnManagementToolboxClick); startPage.AddButton("Open training toolbox", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Toolbox.png"), OnTrainingToolboxClick); startPage.AddButton("Import old .apsim file", new Gtk.Image(null, "ApsimNG.Resources.Toolboxes.Import.png"), OnImport); startPage.AddButton("Upgrade", new Gtk.Image(null, "ApsimNG.Resources.MenuImages.Upgrade.png"), OnUpgrade); // Populate the view's listview. startPage.List.Values = Utility.Configuration.Settings.MruList.ToArray(); }