Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
Only pop balloon for min2tray on first EVER min
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholastay committed Nov 18, 2017
1 parent b7f7a3c commit e453fcf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
3 changes: 3 additions & 0 deletions NexDirect/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
<setting name="bloodcatCookies" serializeAs="String">
<value />
</setting>
<setting name="firstMinimizeToTray" serializeAs="String">
<value>True</value>
</setting>
</NexDirect.Properties.Settings>
</userSettings>
</configuration>
5 changes: 2 additions & 3 deletions NexDirect/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public partial class MainWindow : Window
public ObservableCollection<BeatmapSet> BeatmapsCollection = new ObservableCollection<BeatmapSet>(); // ObservableCollection: will send updates to other objects when updated (will update the datagrid binding)

public string osuSongsFolder => Path.Combine(SettingManager.Get("osuFolder"), "Songs");
public static bool firstTrayMinimize = true;

private Control[] dynamicElements;
private bool startupHide = false;
Expand Down Expand Up @@ -519,10 +518,10 @@ private void stateChangeHandle()
{
Hide();

if (firstTrayMinimize)
if (SettingManager.Get("firstMinimizeToTray"))
{
TrayManager.Icon.ShowBalloonTip(1500, "NexDirect", "NexDirect has been minimized to the tray. Double click the icon in the tray to restore.", System.Windows.Forms.ToolTipIcon.Info);
firstTrayMinimize = false;
SettingManager.Set("firstMinimizeToTray", false);
}
}
}
Expand Down
14 changes: 13 additions & 1 deletion NexDirect/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions NexDirect/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@
<Setting Name="bloodcatCookies" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="firstMinimizeToTray" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

0 comments on commit e453fcf

Please sign in to comment.