/// <summary>Constructor</summary> public MainView(ViewBase owner = null) : base(owner) { numberOfButtons = 0; if ((uint)Environment.OSVersion.Platform <= 3) { Gtk.Rc.Parse(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), ".gtkrc")); } Builder builder = BuilderFromResource("ApsimNG.Resources.Glade.MainView.glade"); window1 = (Window)builder.GetObject("window1"); progressBar = (ProgressBar)builder.GetObject("progressBar"); StatusWindow = (TextView)builder.GetObject("StatusWindow"); stopButton = (Button)builder.GetObject("stopButton"); notebook1 = (Notebook)builder.GetObject("notebook1"); notebook2 = (Notebook)builder.GetObject("notebook2"); vbox1 = (VBox)builder.GetObject("vbox1"); vbox2 = (VBox)builder.GetObject("vbox2"); hpaned1 = (HPaned)builder.GetObject("hpaned1"); hbox1 = (HBox)builder.GetObject("hbox1"); _mainWidget = window1; window1.Icon = new Gdk.Pixbuf(null, "ApsimNG.Resources.apsim logo32.png"); listButtonView1 = new ListButtonView(this); listButtonView1.ButtonsAreToolbar = true; vbox1.PackEnd(listButtonView1.MainWidget, true, true, 0); listButtonView2 = new ListButtonView(this); listButtonView2.ButtonsAreToolbar = true; vbox2.PackEnd(listButtonView2.MainWidget, true, true, 0); hpaned1.PositionSet = true; hpaned1.Child2.Hide(); hpaned1.Child2.NoShowAll = true; notebook1.SetMenuLabel(vbox1, new Label(indexTabText)); notebook2.SetMenuLabel(vbox2, new Label(indexTabText)); hbox1.HeightRequest = 20; TextTag tag = new TextTag("error"); tag.Foreground = "red"; StatusWindow.Buffer.TagTable.Add(tag); tag = new TextTag("warning"); tag.Foreground = "brown"; StatusWindow.Buffer.TagTable.Add(tag); tag = new TextTag("normal"); tag.Foreground = "blue"; StatusWindow.ModifyBase(StateType.Normal, new Gdk.Color(0xff, 0xff, 0xf0)); StatusWindow.Visible = false; stopButton.Image = new Gtk.Image(new Gdk.Pixbuf(null, "ApsimNG.Resources.MenuImages.Delete.png", 12, 12)); stopButton.ImagePosition = PositionType.Right; stopButton.Image.Visible = true; stopButton.Clicked += OnStopClicked; window1.DeleteEvent += OnClosing; //window1.ShowAll(); if (APSIM.Shared.Utilities.ProcessUtilities.CurrentOS.IsMac) { InitMac(); } }
/// <summary>Constructor</summary> public MainView(ViewBase owner = null) : base(owner) { Gtk.Rc.Parse(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), ".gtkrc")); Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.MainView.glade", "window1"); gxml.Autoconnect(this); _mainWidget = window1; window1.Icon = new Gdk.Pixbuf(null, "ApsimNG.Resources.apsim logo32.png"); listButtonView1 = new ListButtonView(this); listButtonView1.ButtonsAreToolbar = true; vbox1.PackEnd(listButtonView1.MainWidget, true, true, 0); listButtonView2 = new ListButtonView(this); listButtonView2.ButtonsAreToolbar = true; vbox2.PackEnd(listButtonView2.MainWidget, true, true, 0); hpaned1.PositionSet = true; hpaned1.Child2.Hide(); hpaned1.Child2.NoShowAll = true; notebook1.SetMenuLabel(vbox1, new Label(indexTabText)); notebook2.SetMenuLabel(vbox2, new Label(indexTabText)); hbox1.HeightRequest = 20; TextTag tag = new TextTag("error"); tag.Foreground = "red"; StatusWindow.Buffer.TagTable.Add(tag); tag = new TextTag("warning"); tag.Foreground = "brown"; StatusWindow.Buffer.TagTable.Add(tag); tag = new TextTag("normal"); tag.Foreground = "blue"; StatusWindow.ModifyBase(StateType.Normal, new Gdk.Color(0xff, 0xff, 0xf0)); StatusWindow.Visible = false; stopButton.Image = new Gtk.Image(new Gdk.Pixbuf(null, "ApsimNG.Resources.MenuImages.Delete.png", 12, 12)); stopButton.ImagePosition = PositionType.Right; stopButton.Image.Visible = true; stopButton.Clicked += OnStopClicked; window1.DeleteEvent += OnClosing; //window1.ShowAll(); if (APSIM.Shared.Utilities.ProcessUtilities.CurrentOS.IsMac) { InitMac(); } }
/// <summary>Constructor</summary> public MainView(ViewBase owner = null) : base(owner) { Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.MainView.glade", "window1"); gxml.Autoconnect(this); _mainWidget = window1; window1.Icon = new Gdk.Pixbuf(null, "ApsimNG.Resources.apsim logo32.png"); listButtonView1 = new ListButtonView(this); listButtonView1.ButtonsAreToolbar = true; vbox1.PackEnd(listButtonView1.MainWidget, true, true, 0); listButtonView2 = new ListButtonView(this); listButtonView2.ButtonsAreToolbar = true; vbox2.PackEnd(listButtonView2.MainWidget, true, true, 0); hpaned1.PositionSet = true; hpaned1.Child2.Hide(); hpaned1.Child2.NoShowAll = true; notebook1.SetMenuLabel(vbox1, new Label(indexTabText)); notebook2.SetMenuLabel(vbox2, new Label(indexTabText)); hbox1.HeightRequest = 20; TextTag tag = new TextTag("error"); tag.Foreground = "red"; StatusWindow.Buffer.TagTable.Add(tag); tag = new TextTag("warning"); tag.Foreground = "brown"; StatusWindow.Buffer.TagTable.Add(tag); tag = new TextTag("normal"); tag.Foreground = "blue"; StatusWindow.ModifyBase(StateType.Normal, new Gdk.Color(0xff, 0xff, 0xf0)); StatusWindow.Visible = false; window1.DeleteEvent += OnClosing; //window1.ShowAll(); }