protected void InitializeComponent() { this.PlotWidget = new PlotWidget(); this.SetSizeRequest(600, 500); this.Add(this.PlotWidget); }
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]); } }
private void InitializeComponent() { quitButton = new Gtk.Button(); nextPlotButton = new Gtk.Button(); prevPlotButton = new Gtk.Button(); printButton = new Gtk.Button(); exampleNumberLabel = new Gtk.Label(); // Create the two display panes for the samples plotWidget = new PlotWidget(); infoBox = new Gtk.TextView(); quitButton.Name = "quitButton"; //quitButton.TabIndex = 14; quitButton.Label = "Close"; quitButton.Clicked += new System.EventHandler(quitButton_Click); nextPlotButton.Name = "nextPlotButton"; //nextPlotButton.TabIndex = 17; nextPlotButton.Label = "Next"; nextPlotButton.Clicked += new System.EventHandler(nextPlotButton_Click); printButton.Name = "printButton"; //printButton.TabIndex = 9; printButton.Label = "Print"; printButton.Clicked += new System.EventHandler(printButton_Click); prevPlotButton.Name = "prevPlotButton"; //prevPlotButton.TabIndex = 15; prevPlotButton.Label = "Prev"; prevPlotButton.Clicked += new System.EventHandler(prevPlotButton_Click); exampleNumberLabel.Name = "exampleNumberLabel"; infoBox.Name = "infoBox"; //infoBox.TabIndex = 18; SetSizeRequest(632, 520); // // Define 11x8 table on which to lay out the plot, test buttons, etc // layout = new Gtk.Table(11, 8, true); layout.BorderWidth = 4; Add(layout); infoFrame = new Frame(); infoFrame.ShadowType = Gtk.ShadowType.In; infoFrame.Add(infoBox); AttachOptions opt = AttachOptions.Expand | AttachOptions.Fill; uint xpad = 2, ypad = 10; layout.Attach(infoFrame, 0, 8, 9, 11); layout.Attach(plotWidget, 0, 8, 0, 8); layout.Attach(quitButton, 3, 4, 8, 9, opt, opt, xpad, ypad); layout.Attach(printButton, 2, 3, 8, 9, opt, opt, xpad, ypad); layout.Attach(prevPlotButton, 0, 1, 8, 9, opt, opt, xpad, ypad); layout.Attach(exampleNumberLabel, 4, 5, 8, 9); layout.Attach(nextPlotButton, 1, 2, 8, 9, opt, opt, xpad, ypad); Name = "PlotSurface Samples"; }
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]); } }
private void InitializeComponent() { // // costWidget // this.costWidget = new PlotWidget(); // // volumeWidget // this.volumeWidget = new PlotWidget(); // // closeButton // this.closeButton = new Gtk.Button("Close"); this.closeButton.Clicked += new System.EventHandler(this.closeButton_Click); // // FinancialDemo // this.SetSizeRequest(630, 450); // // Define a 10x10 table on which to lay out the plots and button // Gtk.Table layout = new Gtk.Table(10, 10, true); layout.BorderWidth = 4; Add(layout); AttachOptions opt = AttachOptions.Expand | AttachOptions.Fill; uint xpad = 2, ypad = 10; layout.Attach(costWidget, 0, 10, 0, 6); layout.Attach(volumeWidget, 0, 10, 6, 9); layout.Attach(closeButton, 1, 2, 9, 10, opt, opt, xpad, ypad); this.Name = "PlotSurface2DDemo"; this.Name = "FinancialDemo"; }