Various changes, began working on the texture skinning.

This commit is contained in:
Richie Moch 2018-12-22 15:24:55 -06:00
parent 9d9958e18b
commit d94c79dbf5
29 changed files with 218 additions and 122 deletions

View file

@ -8,14 +8,23 @@ using System.Windows.Forms;
namespace ShiftOS.Engine.UI namespace ShiftOS.Engine.UI
{ {
public class ShiftStripRenderer : ToolStripProfessionalRenderer public class ShiftStripRenderer : ToolStripRenderer
{ {
protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e) SolidBrush sb;
protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e)
{ {
using (var b = new SolidBrush(e.Item.BackColor)) if (!e.Item.Selected)
{ {
e.Graphics.FillRectangle(b, new Rectangle(Point.Empty, e.Item.Size)); base.OnRenderButtonBackground(e);
}
else
{
sb = new SolidBrush(Color.FromArgb(64, 64, 64));
Rectangle rectangle = new Rectangle(0, 0, e.Item.Size.Width - 1, e.Item.Size.Height - 1);
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(64,64,64)), rectangle);
e.Graphics.DrawRectangle(new Pen(sb, 1F), rectangle);
} }
} }
} }
} }

View file

@ -32,8 +32,8 @@
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.changeSize = new System.Windows.Forms.Timer(this.components); this.changeSize = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.TextBox();
this.btnOpt2 = new ShiftOS.Engine.UI.ShiftButton();
this.btnOpt1 = new ShiftOS.Engine.UI.ShiftButton(); this.btnOpt1 = new ShiftOS.Engine.UI.ShiftButton();
this.btnOpt2 = new ShiftOS.Engine.UI.ShiftButton();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -64,9 +64,26 @@
this.label1.Size = new System.Drawing.Size(256, 125); this.label1.Size = new System.Drawing.Size(256, 125);
this.label1.TabIndex = 6; this.label1.TabIndex = 6;
// //
// btnOpt1
//
this.btnOpt1.BackColor = System.Drawing.Color.White;
this.btnOpt1.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnOpt1.ForeColor = System.Drawing.Color.Black;
this.btnOpt1.Location = new System.Drawing.Point(105, 163);
this.btnOpt1.Margin = new System.Windows.Forms.Padding(0);
this.btnOpt1.MinimumSize = new System.Drawing.Size(75, 23);
this.btnOpt1.Name = "btnOpt1";
this.btnOpt1.Padding = new System.Windows.Forms.Padding(3);
this.btnOpt1.Size = new System.Drawing.Size(105, 26);
this.btnOpt1.TabIndex = 7;
this.btnOpt1.Text = "shiftButton1";
this.btnOpt1.UseVisualStyleBackColor = false;
//
// btnOpt2 // btnOpt2
// //
this.btnOpt2.BackColor = System.Drawing.SystemColors.Control; this.btnOpt2.BackColor = System.Drawing.Color.White;
this.btnOpt2.FlatAppearance.BorderColor = System.Drawing.Color.Black; this.btnOpt2.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -76,35 +93,18 @@
this.btnOpt2.MinimumSize = new System.Drawing.Size(75, 23); this.btnOpt2.MinimumSize = new System.Drawing.Size(75, 23);
this.btnOpt2.Name = "btnOpt2"; this.btnOpt2.Name = "btnOpt2";
this.btnOpt2.Padding = new System.Windows.Forms.Padding(3); this.btnOpt2.Padding = new System.Windows.Forms.Padding(3);
this.btnOpt2.Size = new System.Drawing.Size(117, 31); this.btnOpt2.Size = new System.Drawing.Size(105, 26);
this.btnOpt2.TabIndex = 5; this.btnOpt2.TabIndex = 8;
this.btnOpt2.Text = "shiftButton2"; this.btnOpt2.Text = "shiftButton2";
this.btnOpt2.UseVisualStyleBackColor = false; this.btnOpt2.UseVisualStyleBackColor = false;
// //
// btnOpt1
//
this.btnOpt1.BackColor = System.Drawing.SystemColors.Control;
this.btnOpt1.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnOpt1.ForeColor = System.Drawing.Color.Black;
this.btnOpt1.Location = new System.Drawing.Point(90, 163);
this.btnOpt1.Margin = new System.Windows.Forms.Padding(0);
this.btnOpt1.MinimumSize = new System.Drawing.Size(75, 23);
this.btnOpt1.Name = "btnOpt1";
this.btnOpt1.Padding = new System.Windows.Forms.Padding(3);
this.btnOpt1.Size = new System.Drawing.Size(117, 31);
this.btnOpt1.TabIndex = 4;
this.btnOpt1.Text = "shiftButton1";
this.btnOpt1.UseVisualStyleBackColor = false;
//
// InfoboxTemplate // InfoboxTemplate
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label1);
this.Controls.Add(this.btnOpt2); this.Controls.Add(this.btnOpt2);
this.Controls.Add(this.btnOpt1); this.Controls.Add(this.btnOpt1);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1); this.Controls.Add(this.pictureBox1);
this.Name = "InfoboxTemplate"; this.Name = "InfoboxTemplate";
this.Size = new System.Drawing.Size(438, 210); this.Size = new System.Drawing.Size(438, 210);
@ -118,8 +118,8 @@
#endregion #endregion
public System.Windows.Forms.PictureBox pictureBox1; public System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Timer changeSize; private System.Windows.Forms.Timer changeSize;
public System.Windows.Forms.TextBox label1;
private UI.ShiftButton btnOpt1; private UI.ShiftButton btnOpt1;
private UI.ShiftButton btnOpt2; private UI.ShiftButton btnOpt2;
public System.Windows.Forms.TextBox label1;
} }
} }

View file

@ -8,8 +8,10 @@ using ShiftOS.Engine.Properties;
namespace ShiftOS.Engine.WindowManager namespace ShiftOS.Engine.WindowManager
{ {
public partial class InfoboxTemplate : UserControl public partial class InfoboxTemplate : UserControl
{ {
public enum ButtonType public bool isOK = false;
public bool isNo = false;
public enum ButtonType
{ {
YesNo, YesNo,
OkCancel, OkCancel,
@ -48,17 +50,9 @@ namespace ShiftOS.Engine.WindowManager
void btnOpt1_Click(object sender, EventArgs e) void btnOpt1_Click(object sender, EventArgs e)
{ {
switch (btnOpt1.Text) isOK = true;
{ MessageBox.Show("button was clicked");
case "OK": ParentForm?.Close();
btnOpt1.DialogResult = System.Windows.Forms.DialogResult.OK;
ParentForm?.Close();
break;
case "Yes":
btnOpt1.DialogResult = System.Windows.Forms.DialogResult.Yes;
ParentForm?.Close();
break;
}
} }
void btnOpt2_Click(object sender, EventArgs e) void btnOpt2_Click(object sender, EventArgs e)
@ -66,11 +60,11 @@ namespace ShiftOS.Engine.WindowManager
switch (btnOpt2.Text) switch (btnOpt2.Text)
{ {
case "No": case "No":
btnOpt2.DialogResult = System.Windows.Forms.DialogResult.No; isNo = true;
ParentForm?.Close(); ParentForm?.Close();
break; break;
case "Cancel": case "Cancel":
btnOpt2.DialogResult = System.Windows.Forms.DialogResult.Cancel; isNo = true;
break; break;
} }
} }

View file

@ -11,10 +11,20 @@ namespace ShiftOS.Engine.WindowManager
public class skinTextures public class skinTextures
{ {
public skinTextures() public Image LeftTopCornerImage;
{ public Image TitleBarImage;
public Image RightTopCornerImage;
} public Image BtnCloseImage;
public Image BtnMaxImage;
public Image BtnMinImage;
public Image BtnCloseHoverImage;
public Image BtnMaxHoverImage;
public Image BtnMinHoverImage;
public Image LeftSideImage;
public Image RightSideImage;
public Image LeftBottomCornerImage;
public Image BottomSideImage;
public Image RightBottomCornerImage;
} }
} }

View file

@ -1,4 +1,5 @@
namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff using ShiftOS.Engine.UI;
namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
{ {
partial class Shifter partial class Shifter
{ {
@ -30,6 +31,9 @@
{ {
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.shiftButton2 = new ShiftButton();
this.button7 = new System.Windows.Forms.Button();
this.shiftButton1 = new Engine.UI.ShiftButton();
this.button6 = new System.Windows.Forms.Button(); this.button6 = new System.Windows.Forms.Button();
this.btnLoad = new System.Windows.Forms.Button(); this.btnLoad = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button();
@ -40,8 +44,6 @@
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.shiftButton1 = new Engine.UI.ShiftButton();
this.button7 = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
@ -62,6 +64,7 @@
// //
// tabPage1 // tabPage1
// //
this.tabPage1.Controls.Add(this.shiftButton2);
this.tabPage1.Controls.Add(this.button7); this.tabPage1.Controls.Add(this.button7);
this.tabPage1.Controls.Add(this.shiftButton1); this.tabPage1.Controls.Add(this.shiftButton1);
this.tabPage1.Controls.Add(this.button6); this.tabPage1.Controls.Add(this.button6);
@ -80,6 +83,54 @@
this.tabPage1.Text = "Titlebar"; this.tabPage1.Text = "Titlebar";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// shiftButton2
//
this.shiftButton2.BackColor = System.Drawing.Color.White;
this.shiftButton2.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.shiftButton2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.shiftButton2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.shiftButton2.ForeColor = System.Drawing.Color.Black;
this.shiftButton2.Location = new System.Drawing.Point(194, 77);
this.shiftButton2.Margin = new System.Windows.Forms.Padding(0);
this.shiftButton2.MinimumSize = new System.Drawing.Size(75, 23);
this.shiftButton2.Name = "shiftButton2";
this.shiftButton2.Padding = new System.Windows.Forms.Padding(3);
this.shiftButton2.Size = new System.Drawing.Size(121, 27);
this.shiftButton2.TabIndex = 11;
this.shiftButton2.Text = "Test Textures";
this.shiftButton2.UseVisualStyleBackColor = false;
this.shiftButton2.Click += new System.EventHandler(this.shiftButton2_Click);
//
// button7
//
this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button7.Font = new System.Drawing.Font("Lucida Console", 8.25F);
this.button7.Location = new System.Drawing.Point(205, 51);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(100, 23);
this.button7.TabIndex = 10;
this.button7.Text = "NormalBtn";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.shiftButton2_Click);
//
// shiftButton1
//
this.shiftButton1.BackColor = System.Drawing.Color.White;
this.shiftButton1.FlatAppearance.BorderColor = System.Drawing.Color.Gray;
this.shiftButton1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.shiftButton1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.shiftButton1.ForeColor = System.Drawing.Color.Black;
this.shiftButton1.Location = new System.Drawing.Point(205, 25);
this.shiftButton1.Margin = new System.Windows.Forms.Padding(0);
this.shiftButton1.MinimumSize = new System.Drawing.Size(75, 23);
this.shiftButton1.Name = "shiftButton1";
this.shiftButton1.Padding = new System.Windows.Forms.Padding(3);
this.shiftButton1.Size = new System.Drawing.Size(100, 23);
this.shiftButton1.TabIndex = 9;
this.shiftButton1.Text = "ShiftButton";
this.shiftButton1.UseVisualStyleBackColor = false;
this.shiftButton1.Click += new System.EventHandler(this.shiftButton1_Click);
//
// button6 // button6
// //
this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
@ -195,34 +246,6 @@
this.tabPage2.Text = "tabPage2"; this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// shiftButton1
//
this.shiftButton1.BackColor = System.Drawing.Color.White;
this.shiftButton1.FlatAppearance.BorderColor = System.Drawing.Color.Gray;
this.shiftButton1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.shiftButton1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.shiftButton1.ForeColor = System.Drawing.Color.Black;
this.shiftButton1.Location = new System.Drawing.Point(205, 25);
this.shiftButton1.Margin = new System.Windows.Forms.Padding(0);
this.shiftButton1.MinimumSize = new System.Drawing.Size(75, 23);
this.shiftButton1.Name = "shiftButton1";
this.shiftButton1.Padding = new System.Windows.Forms.Padding(3);
this.shiftButton1.Size = new System.Drawing.Size(100, 23);
this.shiftButton1.TabIndex = 9;
this.shiftButton1.Text = "ShiftButton";
this.shiftButton1.UseVisualStyleBackColor = false;
//
// button7
//
this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button7.Font = new System.Drawing.Font("Lucida Console", 8.25F);
this.button7.Location = new System.Drawing.Point(205, 51);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(100, 23);
this.button7.TabIndex = 10;
this.button7.Text = "NormalBtn";
this.button7.UseVisualStyleBackColor = true;
//
// Shifter // Shifter
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -253,5 +276,6 @@
private System.Windows.Forms.Button button6; private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7; private System.Windows.Forms.Button button7;
private Engine.UI.ShiftButton shiftButton1; private Engine.UI.ShiftButton shiftButton1;
private Engine.UI.ShiftButton shiftButton2;
} }
} }

View file

@ -11,7 +11,8 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
{ {
public partial class Shifter : UserControl public partial class Shifter : UserControl
{ {
public int ColorType; //This is a check to see what option was chosen. public static readonly ImageConverter imageConverter = new ImageConverter();
public int ColorType; //This is a check to see what option was chosen.
public Shifter() public Shifter()
{ {
InitializeComponent(); InitializeComponent();
@ -100,11 +101,40 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
window.Invoke(new Action(() => window.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor)); window.Invoke(new Action(() => window.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor));
} }
} }
void ApplyTexturedSkin() //not implemented
{
throw new NotImplementedException("Not implemented.");
/*foreach (var window in ShiftWM.Windows)
{
window.Invoke(new Action(() => window.titleBar.Height = ShiftSkinData.Images.TitleBarImage.Height));
window.Invoke(new Action(() => window.leftTopCorner.Width = ShiftSkinData.Images.LeftTopCornerImage.Width));
window.Invoke(new Action(() => window.rightTopCorner.Width = ShiftSkinData.Images.RightTopCornerImage.Width));
window.Invoke(new Action(() => window.leftSide.Width = ShiftSkinData.Images.LeftSideImage.Width));
window.Invoke(new Action(() => window.rightSide.Width = ShiftSkinData.Images.RightSideImage.Width));
window.Invoke(new Action(() => window.leftBottomCorner.Width = ShiftSkinData.Images.LeftBottomCornerImage.Width));
window.Invoke(new Action(() => window.bottomSide.Width = ShiftSkinData.Images.BottomSideImage.Width));
window.Invoke(new Action(() => window.rightBottomCorner.Width = ShiftSkinData.Images.RightBottomCornerImage.Width));
window.Invoke(new Action(() => window.btnClose.Width = ShiftSkinData.Images.BtnCloseImage.Width));
window.Invoke(new Action(() => window.btnMax.Width = ShiftSkinData.Images.BtnMaxImage.Width));
window.Invoke(new Action(() => window.btnMin.Width = ShiftSkinData.Images.BtnMinImage.Width));
window.Invoke(new Action(() => window.titleBar.BackgroundImage = ShiftSkinData.Images.TitleBarImage));
window.Invoke(new Action(() => window.leftTopCorner.BackgroundImage = ShiftSkinData.Images.LeftTopCornerImage));
window.Invoke(new Action(() => window.rightTopCorner.BackgroundImage = ShiftSkinData.Images.RightTopCornerImage));
window.Invoke(new Action(() => window.leftSide.BackgroundImage = ShiftSkinData.Images.LeftSideImage));
window.Invoke(new Action(() => window.rightSide.BackgroundImage = ShiftSkinData.Images.RightSideImage));
window.Invoke(new Action(() => window.leftBottomCorner.BackgroundImage = ShiftSkinData.Images.LeftBottomCornerImage));
window.Invoke(new Action(() => window.bottomSide.BackgroundImage = ShiftSkinData.Images.BottomSideImage));
window.Invoke(new Action(() => window.rightBottomCorner.BackgroundImage = ShiftSkinData.Images.RightBottomCornerImage));
window.Invoke(new Action(() => window.btnClose.BackgroundImage = ShiftSkinData.Images.BtnCloseImage));
window.Invoke(new Action(() => window.btnMax.BackgroundImage = ShiftSkinData.Images.BtnMaxImage));
window.Invoke(new Action(() => window.btnMin.BackgroundImage = ShiftSkinData.Images.BtnMinImage));
}*/
}
void btnSave_Click(object sender, EventArgs e) void btnSave_Click(object sender, EventArgs e)
{ {
Color[] shiftSkinColors = new Color[14]; Color[] shiftSkinColors = new Color[14];
int i = 0;
shiftSkinColors[0] = ShiftSkinData.Colors.LeftTopCornerColor; shiftSkinColors[0] = ShiftSkinData.Colors.LeftTopCornerColor;
shiftSkinColors[1] = ShiftSkinData.Colors.TitleBarColor; shiftSkinColors[1] = ShiftSkinData.Colors.TitleBarColor;
@ -124,10 +154,11 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
using (var fobj = File.OpenWrite(@"C:\Users\Public\Documents\Skin.whoa")) using (var fobj = File.OpenWrite(@"C:\Users\Public\Documents\Skin.whoa"))
Whoa.Whoa.SerialiseObject(fobj, shiftSkinColors); Whoa.Whoa.SerialiseObject(fobj, shiftSkinColors);
ShiftWM.StartInfoboxSession( InfoboxTemplate shiftWindow = ShiftWM.StartInfoboxSession(
"Saved Skin", "Saved Skin",
"Saved Skin to C:\\Users\\Public\\Documents\\Skin.whoa", "Saved Skin to C:\\Users\\Public\\Documents\\Skin.whoa",
InfoboxTemplate.ButtonType.Ok); InfoboxTemplate.ButtonType.Ok);
} }
private void btnLoad_Click(object sender, EventArgs e) private void btnLoad_Click(object sender, EventArgs e)
@ -170,5 +201,27 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff
Color.FromArgb(15, 29, 160)); Color.FromArgb(15, 29, 160));
ApplySkin(); ApplySkin();
} }
private void shiftButton1_Click(object sender, EventArgs e)
{
MessageBox.Show("This was clicked.");
}
private void shiftButton2_Click(object sender, EventArgs e)
{
}
public static Bitmap LoadImage(byte[] byteArray)
{
var bm = (Bitmap)imageConverter.ConvertFrom(byteArray);
if (bm != null && (bm.HorizontalResolution != (int)bm.HorizontalResolution ||
bm.VerticalResolution != (int)bm.VerticalResolution))
{
bm.SetResolution((int)(bm.HorizontalResolution + 0.5f),
(int)(bm.VerticalResolution + 0.5f));
}
return bm;
}
} }
} }

View file

@ -33,13 +33,13 @@
this.clockPanel = new System.Windows.Forms.Panel(); this.clockPanel = new System.Windows.Forms.Panel();
this.lblClock = new System.Windows.Forms.Label(); this.lblClock = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.applicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.applicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.taskbar.SuspendLayout(); this.taskbar.SuspendLayout();
this.clockPanel.SuspendLayout(); this.clockPanel.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
@ -68,7 +68,7 @@
// //
// lblClock // lblClock
// //
this.lblClock.BackColor = System.Drawing.Color.Transparent; this.lblClock.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.lblClock.Dock = System.Windows.Forms.DockStyle.Fill; this.lblClock.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblClock.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblClock.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblClock.ForeColor = System.Drawing.Color.White; this.lblClock.ForeColor = System.Drawing.Color.White;
@ -88,23 +88,20 @@
this.panel2.Size = new System.Drawing.Size(102, 24); this.panel2.Size = new System.Drawing.Size(102, 24);
this.panel2.TabIndex = 0; this.panel2.TabIndex = 0;
// //
// timer1
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// menuStrip1 // menuStrip1
// //
this.menuStrip1.BackgroundImage = global::ShiftOS.Main.Properties.Resources.pixel; this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.menuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.menuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.menuStrip1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.applicationsToolStripMenuItem}); this.applicationsToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; this.menuStrip1.Size = new System.Drawing.Size(231, 24);
this.menuStrip1.Size = new System.Drawing.Size(93, 24);
this.menuStrip1.TabIndex = 2; this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "Applications"; this.menuStrip1.Text = "Applications";
this.menuStrip1.MenuActivate += new System.EventHandler(this.menuStrip1_MenuActivate);
// //
// applicationsToolStripMenuItem // applicationsToolStripMenuItem
// //
@ -115,37 +112,41 @@
this.fileSkimmerToolStripMenuItem}); this.fileSkimmerToolStripMenuItem});
this.applicationsToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.applicationsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
this.applicationsToolStripMenuItem.Name = "applicationsToolStripMenuItem"; this.applicationsToolStripMenuItem.Name = "applicationsToolStripMenuItem";
this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(85, 20); this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(103, 20);
this.applicationsToolStripMenuItem.Text = "Applications"; this.applicationsToolStripMenuItem.Text = "Applications";
// //
// shifterToolStripMenuItem // shifterToolStripMenuItem
// //
this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem"; this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem";
this.shifterToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.shifterToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
this.shifterToolStripMenuItem.Text = "Shifter"; this.shifterToolStripMenuItem.Text = "Shifter";
this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click); this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click);
// //
// terminalToolStripMenuItem // terminalToolStripMenuItem
// //
this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem"; this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem";
this.terminalToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.terminalToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
this.terminalToolStripMenuItem.Text = "Terminal"; this.terminalToolStripMenuItem.Text = "Terminal";
this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click); this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click);
// //
// textPadToolStripMenuItem // textPadToolStripMenuItem
// //
this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem"; this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem";
this.textPadToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.textPadToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
this.textPadToolStripMenuItem.Text = "TextPad"; this.textPadToolStripMenuItem.Text = "TextPad";
this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click); this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click);
// //
// fileSkimmerToolStripMenuItem // fileSkimmerToolStripMenuItem
// //
this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem"; this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem";
this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(158, 22);
this.fileSkimmerToolStripMenuItem.Text = "File Skimmer"; this.fileSkimmerToolStripMenuItem.Text = "File Skimmer";
this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click); this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click);
// //
// timer1
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// Desktop // Desktop
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View file

@ -13,14 +13,20 @@ namespace ShiftOS.Main.ShiftOS
// testing github because git hates me // testing github because git hates me
public partial class Desktop : Form public partial class Desktop : Form
{ {
Graphics g;
public Desktop() public Desktop()
{ {
InitializeComponent(); InitializeComponent();
foreach (object t in applicationsToolStripMenuItem.DropDownItems)
{
var appList = t as ToolStripItem;
if (t == null) continue;
appList.BackColor = Color.FromArgb(64, 64, 64);
appList.ForeColor = Color.White;
}
timer1.Start(); timer1.Start();
Closed += (sender, args) => { Application.Exit(); }; Closed += (sender, args) => { Application.Exit(); };
var s = new ShiftStripRenderer();
} }
private void shifterToolStripMenuItem_Click(object sender, EventArgs e) private void shifterToolStripMenuItem_Click(object sender, EventArgs e)
@ -57,11 +63,10 @@ namespace ShiftOS.Main.ShiftOS
{ {
lblClock.Text = DateTime.Now.ToString("hh:mm:ss"); lblClock.Text = DateTime.Now.ToString("hh:mm:ss");
} }
private void SetupToolStrip(ToolStripRenderEventArgs e, Graphics g) private void menuStrip1_MenuActivate(object sender, EventArgs e)
{ {
var s = new ShiftStripRenderer(); menuStrip1.BackColor = Color.FromArgb(64, 64, 64);
s.DrawToolStripBackground(e);
} }
} }
} }

View file

@ -54,40 +54,40 @@
<ItemGroup> <ItemGroup>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ShiftOS\Apps\FileSkimmer.cs"> <Compile Include="MainGame\Apps\FileSkimmer.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\FileSkimmer.Designer.cs"> <Compile Include="MainGame\Apps\FileSkimmer.Designer.cs">
<DependentUpon>FileSkimmer.cs</DependentUpon> <DependentUpon>FileSkimmer.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\ShifterStuff\SelectColor.cs"> <Compile Include="MainGame\Apps\ShifterStuff\SelectColor.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\ShifterStuff\SelectColor.Designer.cs"> <Compile Include="MainGame\Apps\ShifterStuff\SelectColor.Designer.cs">
<DependentUpon>SelectColor.cs</DependentUpon> <DependentUpon>SelectColor.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\ShifterStuff\Shifter.cs"> <Compile Include="MainGame\Apps\ShifterStuff\Shifter.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\ShifterStuff\Shifter.Designer.cs"> <Compile Include="MainGame\Apps\ShifterStuff\Shifter.Designer.cs">
<DependentUpon>Shifter.cs</DependentUpon> <DependentUpon>Shifter.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\Terminal.cs"> <Compile Include="MainGame\Apps\Terminal.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\Terminal.Designer.cs"> <Compile Include="MainGame\Apps\Terminal.Designer.cs">
<DependentUpon>Terminal.cs</DependentUpon> <DependentUpon>Terminal.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\TextPad.cs"> <Compile Include="MainGame\Apps\TextPad.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="ShiftOS\Apps\TextPad.Designer.cs"> <Compile Include="MainGame\Apps\TextPad.Designer.cs">
<DependentUpon>TextPad.cs</DependentUpon> <DependentUpon>TextPad.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ShiftOS\Desktop.cs"> <Compile Include="MainGame\Desktop.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="ShiftOS\Desktop.Designer.cs"> <Compile Include="MainGame\Desktop.Designer.cs">
<DependentUpon>Desktop.cs</DependentUpon> <DependentUpon>Desktop.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Terminal\Commands\codepoints.cs" /> <Compile Include="Terminal\Commands\codepoints.cs" />
@ -111,22 +111,22 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<EmbeddedResource Include="ShiftOS\Apps\FileSkimmer.resx"> <EmbeddedResource Include="MainGame\Apps\FileSkimmer.resx">
<DependentUpon>FileSkimmer.cs</DependentUpon> <DependentUpon>FileSkimmer.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\SelectColor.resx"> <EmbeddedResource Include="MainGame\Apps\ShifterStuff\SelectColor.resx">
<DependentUpon>SelectColor.cs</DependentUpon> <DependentUpon>SelectColor.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Apps\ShifterStuff\Shifter.resx"> <EmbeddedResource Include="MainGame\Apps\ShifterStuff\Shifter.resx">
<DependentUpon>Shifter.cs</DependentUpon> <DependentUpon>Shifter.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Apps\Terminal.resx"> <EmbeddedResource Include="MainGame\Apps\Terminal.resx">
<DependentUpon>Terminal.cs</DependentUpon> <DependentUpon>Terminal.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Apps\TextPad.resx"> <EmbeddedResource Include="MainGame\Apps\TextPad.resx">
<DependentUpon>TextPad.cs</DependentUpon> <DependentUpon>TextPad.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ShiftOS\Desktop.resx"> <EmbeddedResource Include="MainGame\Desktop.resx">
<DependentUpon>Desktop.cs</DependentUpon> <DependentUpon>Desktop.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="packages.config" /> <None Include="packages.config" />
@ -153,7 +153,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="ShiftOS\Upgrades\" /> <Folder Include="MainGame\Upgrades\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Resources\Apps\Artpad\ArtPadsave.png" /> <Content Include="Resources\Apps\Artpad\ArtPadsave.png" />