Skip to content

Commit

Permalink
Renaming methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bellabas committed Jun 7, 2023
1 parent 3b06253 commit 749e3db
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ItIsOn/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public MainWindow()
myNotifyIcon.BalloonTipText = "Click the tray icon to show!";
myNotifyIcon.Text = "It Is ON! App";
myNotifyIcon.Icon = new System.Drawing.Icon("appicon.ico");
myNotifyIcon.Click += new EventHandler(m_notifyIcon_Click);
myNotifyIcon.Click += new EventHandler(MyNotifyIcon_Click);
}

private void ScreensaverAndSleep_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -88,7 +88,7 @@ private void Window_Closing(object sender, CancelEventArgs e)
myNotifyIcon = null;
}

void OnStateChanged(object sender, EventArgs args)
private void OnStateChanged(object sender, EventArgs args)
{
if (WindowState == WindowState.Minimized)
{
Expand All @@ -103,22 +103,22 @@ void OnStateChanged(object sender, EventArgs args)
myStoredWindowState = WindowState;
}
}
void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs args)
private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs args)
{
CheckTrayIcon();
}

void m_notifyIcon_Click(object sender, EventArgs e)
private void MyNotifyIcon_Click(object sender, EventArgs e)
{
Show();
WindowState = myStoredWindowState;
}
void CheckTrayIcon()
private void CheckTrayIcon()
{
ShowTrayIcon(!IsVisible);
}

void ShowTrayIcon(bool show)
private void ShowTrayIcon(bool show)
{
if (myNotifyIcon != null)
{
Expand Down

0 comments on commit 749e3db

Please sign in to comment.