public MainWindow(string[] args) : base(Gtk.WindowType.Toplevel) { // Execute Gtk# visual designer generated code (MonoDevelop http://monodevelop.com/ ) // Obviously, Visual Studio doesn't have a Gtk# designer, you'll have to code all UI stuff by yourself. // Compiling existing generated UI code within Visual Studio does work however. Build (); this.Icon = MainClass.AppIcon; int iconWidth = Config.IconWidth; int iconHeight = Config.IconHeight; dataView3DModelGtk = new DataView3DModelGtk (this.data, iconWidth, iconHeight); dataView3DGtk = new DataView3DGtk (dataView3DModelGtk, treeview3D); dataView3DGtk.Activated += delegate(object sender, ActionEventArgs e) { var table3D = (Tables.Denso.Table3D)e.Tag; if (table3D != null) { this.Show3D (table3D); } }; dataView2DModelGtk = new DataView2DModelGtk (this.data, iconWidth, iconHeight); dataView2DGtk = new DataView2DGtk (dataView2DModelGtk, treeview2D); dataView2DGtk.Activated += delegate(object sender, ActionEventArgs e) { var table2D = (Tables.Denso.Table2D)e.Tag; if (table2D != null) { this.Show2D (table2D); } }; plot2D = new Plot2D (plotSurface); var plotWidget = new Florence.GtkSharp.PlotWidget (); plotWidget.InteractivePlotSurface2D = plotSurface; // default: true, otherwise causes flickering //plotWidget.DoubleBuffered = false; this.hpaned2D.Add2 (plotWidget); //global::Gtk.Paned.PanedChild pc = ((global::Gtk.Paned.PanedChild)(this.hpaned2D [plotWidget])); // to resize both panes proportionally when parent (main window) resizes //pc.Resize = false; //pc.Shrink = false; this.hpaned2D.ShowAll (); this.notebook1.Page = DefaultNotebookPageShown; OnNotebook1SwitchPage (null, null); // program arguments: first argument is ROM path to auto-load if (args != null && args.Length > 0 && !string.IsNullOrEmpty (args [0])) { OpenRom (args [0]); } }
public MainWindow(string[] args) : base(Gtk.WindowType.Toplevel) { // Execute Gtk# visual designer generated code (MonoDevelop http://monodevelop.com/ ) // Obviously, Visual Studio doesn't have a Gtk# designer, you'll have to code all UI stuff by yourself. // Compiling existing generated UI code within Visual Studio does work however. Build (); this.Icon = MainClass.AppIcon; dataView3DModelGtk = new DataView3DModelGtk (this.data); dataView3DGtk = new DataView3DGtk (dataView3DModelGtk, treeview3D); dataView3DGtk.Activated += delegate(object sender, ActionEventArgs e) { Table3D table3D = (Table3D)e.Tag; if (table3D != null) { this.Show3D (table3D); } }; dataView2DModelGtk = new DataView2DModelGtk (this.data); dataView2DGtk = new DataView2DGtk (dataView2DModelGtk, treeview2D); dataView2DGtk.Activated += delegate(object sender, ActionEventArgs e) { Table2D table2D = (Table2D)e.Tag; if (table2D != null) { this.Show2D (table2D); } }; plot2D = new Plot2D (plotSurface); this.vpaned2D.Add2 (plotSurface); global::Gtk.Paned.PanedChild pc = ((global::Gtk.Paned.PanedChild)(this.vpaned2D[plotSurface])); // to resize both panes proportionally when parent (main window) resizes pc.Resize = false; // pc.Shrink = false; this.vpaned2D.ShowAll (); this.notebook1.Page = 1; if (Config.IconsOnByDefault) { iconsAction.Active = true; dataView2DGtk.ShowIcons = true; dataView3DGtk.ShowIcons = true; } // program arguments: first argument is ROM path to auto-load if (args != null && args.Length > 0 && !string.IsNullOrEmpty (args[0])) { OpenRom (args[0]); } }