diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
| commit | 6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9 (patch) | |
| tree | d7bc4b46c45a552add946666151d44490f3b3caf /source/WindowsFormsApplication1/Apps/Artpad.cs | |
| parent | 9322701aa1eae9596a8586ef19a0fe1d1b3ab66b (diff) | |
| download | shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.gz shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.bz2 shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.zip | |
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.
Diffstat (limited to 'source/WindowsFormsApplication1/Apps/Artpad.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Apps/Artpad.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Artpad.cs b/source/WindowsFormsApplication1/Apps/Artpad.cs index c393ae0..79b2653 100644 --- a/source/WindowsFormsApplication1/Apps/Artpad.cs +++ b/source/WindowsFormsApplication1/Apps/Artpad.cs @@ -6,7 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; using System.Drawing.Text; using System.Drawing.Imaging; using System.Drawing.Drawing2D; @@ -247,7 +247,7 @@ namespace ShiftOS #region Drawing Display // ERROR: Handles clauses are not supported in C# - private void picdrawingdisplay_Paint(object sender, System.Windows.Forms.PaintEventArgs e) + private void picdrawingdisplay_Paint(object sender, ShiftUI.PaintEventArgs e) { e.Graphics.FillRectangle(Brushes.White, 0, 0, canvaswidth * magnificationlevel, canvasheight * magnificationlevel); e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; @@ -353,7 +353,7 @@ namespace ShiftOS // ERROR: Handles clauses are not supported in C# - private void picdrawingdisplay_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) + private void picdrawingdisplay_MouseDown(object sender, ShiftUI.MouseEventArgs e) { undo.undoStack.Push((Image)canvasbitmap.Clone()); undo.redoStack.Clear(); @@ -478,7 +478,7 @@ namespace ShiftOS } // ERROR: Handles clauses are not supported in C# - private void picdrawingdisplay_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) + private void picdrawingdisplay_MouseMove(object sender, ShiftUI.MouseEventArgs e) { Point lastpoint; @@ -621,7 +621,7 @@ namespace ShiftOS // ERROR: Handles clauses are not supported in C# private void colourpallet1_MouseClick(object sender, MouseEventArgs e) { - var s = (Control)sender; + var s = (Widget)sender; if (e.Button == MouseButtons.Left) { drawingcolour = s.BackColor; @@ -1265,7 +1265,7 @@ namespace ShiftOS // ERROR: Handles clauses are not supported in C# private void ChangePencilSize(object sender, EventArgs e) { - var s = (Control)sender; + var s = (Widget)sender; switch (s.Name.ToString()) { case "btnpencilsize1": @@ -1735,13 +1735,13 @@ namespace ShiftOS { panelstoadd = 128; } - flowcolours.Controls.Clear(); + flowcolours.Widgets.Clear(); for(int i = 0; i < panelstoadd; i++) { Panel pnl = new Panel(); pnl.BackColor = Color.Black; pnl.Size = new Size(12, 8); - flowcolours.Controls.Add(pnl); + flowcolours.Widgets.Add(pnl); pnl.Margin = new Padding(1, 0, 0, 1); pnl.MouseClick += new MouseEventHandler(this.colourpallet1_MouseClick); pnl.Show(); |
