Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
53X Again 15!
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor authored and Taiizor committed Apr 12, 2021
1 parent 8e1deb3 commit 036a56f
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 12 deletions.
7 changes: 7 additions & 0 deletions src/Taskbar/Taskbar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
95 changes: 83 additions & 12 deletions src/Taskbar_CR/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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<int, Point> 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<int, Point> Var in Location)
Expand All @@ -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<int, Point> 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<int, Point> Var in Location)
Expand All @@ -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<int, Point> 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<int, Point> 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<int, Point> Var in Location)
Expand Down

0 comments on commit 036a56f

Please sign in to comment.