Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

Commit 01fc157

Browse files
committed
Layout redesign
Now using a Google-style two tone grey across the whole app with accents of the blue from before, as well as reorienting the app.
1 parent 46a7a84 commit 01fc157

File tree

8 files changed

+219
-2092
lines changed

8 files changed

+219
-2092
lines changed

Cynobroad/Client.Designer.cs

Lines changed: 98 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cynobroad/Client.cs

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,51 @@ public Client()
4646
InitializeComponent();
4747
}
4848

49+
#region Basic Window Functions
50+
private void Window_ControlBar_MouseDown(object sender, MouseEventArgs e)
51+
{
52+
mouseDown = true;
53+
lastLocation = e.Location;
54+
}
55+
56+
private void Window_ControlBar_MouseUp(object sender, MouseEventArgs e)
57+
{
58+
mouseDown = false;
59+
}
60+
61+
private void Window_ControlBar_MouseMove(object sender, MouseEventArgs e)
62+
{
63+
if (mouseDown)
64+
{
65+
Location = new Point((Location.X - lastLocation.X) + e.X,
66+
(Location.Y - lastLocation.Y) + e.Y);
67+
Update();
68+
}
69+
}
70+
71+
private void Button_MouseEnter(object sender, EventArgs e)
72+
{
73+
Control button = (Control)sender;
74+
button.BackColor = Color.FromArgb(180, 180, 180);
75+
}
76+
77+
private void Button_MouseLeave(object sender, EventArgs e)
78+
{
79+
Control button = (Control)sender;
80+
button.BackColor = Color.FromArgb(150, 150, 150);
81+
}
82+
83+
private void Window_Minimize_Click(object sender, EventArgs e)
84+
{
85+
WindowState = FormWindowState.Minimized;
86+
}
87+
88+
private void Window_Close_Click(object sender, EventArgs e)
89+
{
90+
Close();
91+
}
92+
#endregion
93+
4994
private void Client_Load(object sender, EventArgs e)
5095
{
5196
Hide();
@@ -309,51 +354,6 @@ private void AddConnectedUser(string username)
309354
Update();
310355
}
311356

312-
#region Basic Window Functions
313-
private void Window_ControlBar_MouseDown(object sender, MouseEventArgs e)
314-
{
315-
mouseDown = true;
316-
lastLocation = e.Location;
317-
}
318-
319-
private void Window_ControlBar_MouseUp(object sender, MouseEventArgs e)
320-
{
321-
mouseDown = false;
322-
}
323-
324-
private void Window_ControlBar_MouseMove(object sender, MouseEventArgs e)
325-
{
326-
if (mouseDown)
327-
{
328-
Location = new Point((Location.X - lastLocation.X) + e.X,
329-
(Location.Y - lastLocation.Y) + e.Y);
330-
Update();
331-
}
332-
}
333-
334-
private void Button_MouseEnter(object sender, EventArgs e)
335-
{
336-
Control button = (Control)sender;
337-
button.BackColor = Color.FromArgb(69, 77, 117);
338-
}
339-
340-
private void Button_MouseLeave(object sender, EventArgs e)
341-
{
342-
Control button = (Control)sender;
343-
button.BackColor = Color.FromArgb(52, 57, 83);
344-
}
345-
346-
private void Window_Minimize_Click(object sender, EventArgs e)
347-
{
348-
WindowState = FormWindowState.Minimized;
349-
}
350-
351-
private void Window_Close_Click(object sender, EventArgs e)
352-
{
353-
Close();
354-
}
355-
#endregion
356-
357357
private void Client_FormClosing(object sender, FormClosingEventArgs e)
358358
{
359359
if (isConnected)
@@ -443,28 +443,28 @@ private void StatusChanger_Online_Click(object sender, EventArgs e)
443443
{
444444
CreateAndSendPacket("statchange", "0");
445445
User_NotificationStatus.Text = "Online";
446-
NotificationStatusSlider.Location = new Point(80, 50);
446+
NotificationStatusSlider.Location = new Point(98, 50);
447447
}
448448

449449
private void StatusChanger_Idle_Click(object sender, EventArgs e)
450450
{
451451
CreateAndSendPacket("statchange", "1");
452452
User_NotificationStatus.Text = "Away";
453-
NotificationStatusSlider.Location = new Point(102, 50);
453+
NotificationStatusSlider.Location = new Point(120, 50);
454454
}
455455

456456
private void StatusChanger_DND_Click(object sender, EventArgs e)
457457
{
458458
CreateAndSendPacket("statchange", "2");
459459
User_NotificationStatus.Text = "Busy";
460-
NotificationStatusSlider.Location = new Point(124, 50);
460+
NotificationStatusSlider.Location = new Point(142, 50);
461461
}
462462

463463
private void StatusChanger_Invisible_Click(object sender, EventArgs e)
464464
{
465465
CreateAndSendPacket("statchange", "3");
466466
User_NotificationStatus.Text = "Invisible";
467-
NotificationStatusSlider.Location = new Point(146, 50);
467+
NotificationStatusSlider.Location = new Point(165, 50);
468468
}
469469
}
470470
}

0 commit comments

Comments
 (0)