diff --git a/src/Taskbar/Taskbar.cs b/src/Taskbar/Taskbar.cs index bd15e84..dff1d24 100644 --- a/src/Taskbar/Taskbar.cs +++ b/src/Taskbar/Taskbar.cs @@ -98,6 +98,13 @@ public static Point Location(Screen Screen, Enums.EdgeLocationType Edge, int Wid Enums.LocationType.Left => new Point(Screen.Bounds.Width - Screen.WorkingArea.Width + Pixel, (Screen.Bounds.Height / 2) - (Height / 2)), _ => new Point(Pixel, (Screen.Bounds.Height / 2) - (Height / 2)), }, + Enums.EdgeLocationType.RightCenter => LocationType switch + { + Enums.LocationType.Bot => new Point(Screen.WorkingArea.Width - (Width + Pixel), (Screen.Bounds.Height / 2) - (Height / 2) - (Screen.Bounds.Height - Screen.WorkingArea.Height) / 2), + Enums.LocationType.Top => new Point(Screen.WorkingArea.Width - (Width + Pixel), Screen.Bounds.Height - Screen.WorkingArea.Height + (Screen.WorkingArea.Height / 2) - (Height / 2)), + Enums.LocationType.Left => new Point(Screen.WorkingArea.Width - (Width - (Screen.Bounds.Width - Screen.WorkingArea.Width) + Pixel), (Screen.Bounds.Height / 2) - (Height / 2)), + _ => new Point(Screen.WorkingArea.Width - (Width + Pixel), (Screen.Bounds.Height / 2) - (Height / 2)), + }, Enums.EdgeLocationType.CalcCenter => LocationType switch { Enums.LocationType.Bot => new Point((Screen.Bounds.Width / 2) - (Width / 2), (Screen.Bounds.Height / 2) - (Height / 2) - (Screen.Bounds.Height - Screen.WorkingArea.Height) / 2), diff --git a/src/Taskbar_CR/Main.cs b/src/Taskbar_CR/Main.cs index 5600bfa..ee64a05 100644 --- a/src/Taskbar_CR/Main.cs +++ b/src/Taskbar_CR/Main.cs @@ -102,18 +102,25 @@ private void Button12_Click(object sender, EventArgs e) private void Button14_Click(object sender, EventArgs e) { - Location = Simple.SingleLocation(Enums.EdgeLocationType.LeftCenter, Width, Height, 32); - //Location = Simple.SingleLocation(Enums.EdgeLocationType.TopLeft, Width, Height, 32); - //Thread.Sleep(750); - //Location = Simple.SingleLocation(Enums.EdgeLocationType.TopRight, Width, Height, 32); - //Thread.Sleep(750); - //Location = Simple.SingleLocation(Enums.EdgeLocationType.BotLeft, Width, Height, 32); - //Thread.Sleep(750); - //Location = Simple.SingleLocation(Enums.EdgeLocationType.BotRight, Width, Height, 32); - //Thread.Sleep(750); - //Location = Simple.SingleLocation(Enums.EdgeLocationType.CalcCenter, Width, Height); - //Thread.Sleep(750); - //Location = Simple.SingleLocation(Enums.EdgeLocationType.FullCenter, Width, Height); + Location = Simple.SingleLocation(Enums.EdgeLocationType.TopLeft, Width, Height, 32); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.TopCenter, Width, Height, 32); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.TopRight, Width, Height, 32); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.BotLeft, Width, Height, 32); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.BotCenter, Width, Height, 32); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.BotRight, Width, Height, 32); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.LeftCenter, Width, Height); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.RightCenter, Width, Height); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.CalcCenter, Width, Height); + Thread.Sleep(750); + Location = Simple.SingleLocation(Enums.EdgeLocationType.FullCenter, Width, Height); } private void Button15_Click(object sender, EventArgs e) @@ -126,6 +133,14 @@ private void Button15_Click(object sender, EventArgs e) MessageBox.Show("X: " + Var.X + "\nY: " + Var.Y); } + Location = Simple.MultiLocationList(Enums.EdgeLocationType.TopCenter, Width, Height, 32); + + foreach (Point Var in Location) + { + this.Location = Var; + MessageBox.Show("X: " + Var.X + "\nY: " + Var.Y); + } + Location = Simple.MultiLocationList(Enums.EdgeLocationType.TopRight, Width, Height, 32); foreach (Point Var in Location) @@ -142,6 +157,14 @@ private void Button15_Click(object sender, EventArgs e) MessageBox.Show("X: " + Var.X + "\nY: " + Var.Y); } + Location = Simple.MultiLocationList(Enums.EdgeLocationType.BotCenter, Width, Height, 32); + + foreach (Point Var in Location) + { + this.Location = Var; + MessageBox.Show("X: " + Var.X + "\nY: " + Var.Y); + } + Location = Simple.MultiLocationList(Enums.EdgeLocationType.BotRight, Width, Height, 32); foreach (Point Var in Location) @@ -150,6 +173,22 @@ private void Button15_Click(object sender, EventArgs e) MessageBox.Show("X: " + Var.X + "\nY: " + Var.Y); } + Location = Simple.MultiLocationList(Enums.EdgeLocationType.LeftCenter, Width, Height, 32); + + foreach (Point Var in Location) + { + this.Location = Var; + MessageBox.Show("X: " + Var.X + "\nY: " + Var.Y); + } + + Location = Simple.MultiLocationList(Enums.EdgeLocationType.RightCenter, Width, Height, 32); + + foreach (Point Var in Location) + { + this.Location = Var; + MessageBox.Show("X: " + Var.X + "\nY: " + Var.Y); + } + Location = Simple.MultiLocationList(Enums.EdgeLocationType.CalcCenter, Width, Height); foreach (Point Var in Location) @@ -177,6 +216,14 @@ private void Button16_Click(object sender, EventArgs e) MessageBox.Show("Screen " + Var.Key + " =>\n" + "\tX: " + Var.Value.X + "\n\tY: " + Var.Value.Y); } + Location = Simple.MultiLocationDictionary(Enums.EdgeLocationType.TopCenter, Width, Height, 32); + + foreach (KeyValuePair Var in Location) + { + this.Location = Var.Value; + MessageBox.Show("Screen " + Var.Key + " =>\n" + "\tX: " + Var.Value.X + "\n\tY: " + Var.Value.Y); + } + Location = Simple.MultiLocationDictionary(Enums.EdgeLocationType.TopRight, Width, Height, 32); foreach (KeyValuePair Var in Location) @@ -193,6 +240,14 @@ private void Button16_Click(object sender, EventArgs e) MessageBox.Show("Screen " + Var.Key + " =>\n" + "\tX: " + Var.Value.X + "\n\tY: " + Var.Value.Y); } + Location = Simple.MultiLocationDictionary(Enums.EdgeLocationType.BotCenter, Width, Height, 32); + + foreach (KeyValuePair Var in Location) + { + this.Location = Var.Value; + MessageBox.Show("Screen " + Var.Key + " =>\n" + "\tX: " + Var.Value.X + "\n\tY: " + Var.Value.Y); + } + Location = Simple.MultiLocationDictionary(Enums.EdgeLocationType.BotRight, Width, Height, 32); foreach (KeyValuePair Var in Location) @@ -201,6 +256,22 @@ private void Button16_Click(object sender, EventArgs e) MessageBox.Show("Screen " + Var.Key + " =>\n" + "\tX: " + Var.Value.X + "\n\tY: " + Var.Value.Y); } + Location = Simple.MultiLocationDictionary(Enums.EdgeLocationType.LeftCenter, Width, Height); + + foreach (KeyValuePair Var in Location) + { + this.Location = Var.Value; + MessageBox.Show("Screen " + Var.Key + " =>\n" + "\tX: " + Var.Value.X + "\n\tY: " + Var.Value.Y); + } + + Location = Simple.MultiLocationDictionary(Enums.EdgeLocationType.RightCenter, Width, Height); + + foreach (KeyValuePair Var in Location) + { + this.Location = Var.Value; + MessageBox.Show("Screen " + Var.Key + " =>\n" + "\tX: " + Var.Value.X + "\n\tY: " + Var.Value.Y); + } + Location = Simple.MultiLocationDictionary(Enums.EdgeLocationType.CalcCenter, Width, Height); foreach (KeyValuePair Var in Location)