From 6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Tue, 19 Jul 2016 21:53:26 -0400 Subject: Full ShiftUI conversion The only bugs are that windows don't show in the center of the screen, and Gecko webbrowsers are not serializing properly to be converted to ShiftUI widgets (you can use the ToWidget() extension method to convert a WinForms control to a ShiftUI widget) Also multiple desktop panels are removed due to some odd bug I can't diagnose. Will add them back in the future. Promise. I loved creating GNOME2 skins. --- .../Apps/Shiftnet.Designer.cs | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs') diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs b/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs index 5d20f14..876f57a 100644 --- a/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs @@ -1,4 +1,6 @@ -namespace ShiftOS +using System; + +namespace ShiftOS { partial class Shiftnet { @@ -28,12 +30,12 @@ /// private void InitializeComponent() { - this.pnlcontrols = new System.Windows.Forms.Panel(); - this.btngo = new System.Windows.Forms.Button(); - this.btnhome = new System.Windows.Forms.Button(); - this.txtaddress = new System.Windows.Forms.TextBox(); - this.wbshiftnet = new System.Windows.Forms.WebBrowser(); - this.panel1 = new System.Windows.Forms.Panel(); + this.pnlcontrols = new ShiftUI.Panel(); + this.btngo = new ShiftUI.Button(); + this.btnhome = new ShiftUI.Button(); + this.txtaddress = new ShiftUI.TextBox(); + this.wbshiftnet = new Gecko.GeckoWebBrowser(); + this.panel1 = new ShiftUI.Panel(); this.pnlcontrols.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); @@ -41,10 +43,10 @@ // pnlcontrols // this.pnlcontrols.BackColor = System.Drawing.Color.Gray; - this.pnlcontrols.Controls.Add(this.btngo); - this.pnlcontrols.Controls.Add(this.btnhome); - this.pnlcontrols.Controls.Add(this.txtaddress); - this.pnlcontrols.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlcontrols.Widgets.Add(this.btngo); + this.pnlcontrols.Widgets.Add(this.btnhome); + this.pnlcontrols.Widgets.Add(this.txtaddress); + this.pnlcontrols.Dock = ShiftUI.DockStyle.Top; this.pnlcontrols.Location = new System.Drawing.Point(0, 0); this.pnlcontrols.Name = "pnlcontrols"; this.pnlcontrols.Size = new System.Drawing.Size(792, 42); @@ -52,9 +54,9 @@ // // btngo // - this.btngo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btngo.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btngo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btngo.Anchor = ((ShiftUI.AnchorStyles)((ShiftUI.AnchorStyles.Top | ShiftUI.AnchorStyles.Right))); + this.btngo.DialogResult = ShiftUI.DialogResult.Cancel; + this.btngo.FlatStyle = ShiftUI.FlatStyle.Flat; this.btngo.Font = new System.Drawing.Font("Times New Roman", 8.25F); this.btngo.ForeColor = System.Drawing.Color.White; this.btngo.Location = new System.Drawing.Point(731, 9); @@ -67,8 +69,8 @@ // // btnhome // - this.btnhome.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnhome.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnhome.DialogResult = ShiftUI.DialogResult.Cancel; + this.btnhome.FlatStyle = ShiftUI.FlatStyle.Flat; this.btnhome.Font = new System.Drawing.Font("Times New Roman", 8.25F); this.btnhome.ForeColor = System.Drawing.Color.White; this.btnhome.Location = new System.Drawing.Point(4, 12); @@ -81,9 +83,9 @@ // // txtaddress // - this.txtaddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtaddress.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtaddress.Anchor = ((ShiftUI.AnchorStyles)(((ShiftUI.AnchorStyles.Top | ShiftUI.AnchorStyles.Left) + | ShiftUI.AnchorStyles.Right))); + this.txtaddress.BorderStyle = ShiftUI.BorderStyle.None; this.txtaddress.Font = new System.Drawing.Font("Times New Roman", 13F); this.txtaddress.Location = new System.Drawing.Point(85, 12); this.txtaddress.Name = "txtaddress"; @@ -93,21 +95,19 @@ // // wbshiftnet // - this.wbshiftnet.AllowWebBrowserDrop = false; - this.wbshiftnet.Dock = System.Windows.Forms.DockStyle.Fill; - this.wbshiftnet.IsWebBrowserContextMenuEnabled = false; + this.wbshiftnet.Dock = (System.Windows.Forms.DockStyle)ShiftUI.DockStyle.Fill; this.wbshiftnet.Location = new System.Drawing.Point(0, 42); this.wbshiftnet.MinimumSize = new System.Drawing.Size(20, 20); this.wbshiftnet.Name = "wbshiftnet"; this.wbshiftnet.Size = new System.Drawing.Size(792, 463); this.wbshiftnet.TabIndex = 1; - this.wbshiftnet.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.LinkInterceptor); + this.wbshiftnet.Navigating += new EventHandler(this.LinkInterceptor); // // panel1 // - this.panel1.Controls.Add(this.wbshiftnet); - this.panel1.Controls.Add(this.pnlcontrols); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Widgets.Add(this.wbshiftnet.ToWidget()); + this.panel1.Widgets.Add(this.pnlcontrols); + this.panel1.Dock = ShiftUI.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(792, 505); @@ -117,10 +117,10 @@ // this.AcceptButton = this.btngo; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = ShiftUI.AutoScaleMode.Font; this.CancelButton = this.btnhome; this.ClientSize = new System.Drawing.Size(792, 505); - this.Controls.Add(this.panel1); + this.Widgets.Add(this.panel1); this.Name = "Shiftnet"; this.Text = "MainForm"; this.Load += new System.EventHandler(this.MainForm_Load); @@ -133,12 +133,12 @@ #endregion - private System.Windows.Forms.Panel pnlcontrols; - private System.Windows.Forms.WebBrowser wbshiftnet; - private System.Windows.Forms.Button btngo; - private System.Windows.Forms.Button btnhome; - private System.Windows.Forms.TextBox txtaddress; - private System.Windows.Forms.Panel panel1; + private ShiftUI.Panel pnlcontrols; + private Gecko.GeckoWebBrowser wbshiftnet; + private ShiftUI.Button btngo; + private ShiftUI.Button btnhome; + private ShiftUI.TextBox txtaddress; + private ShiftUI.Panel panel1; } } \ No newline at end of file -- cgit v1.2.3