Permalink
Browse files

added "minimize to systray" option

  • Loading branch information...
1 parent 9c92a2b commit 970fae7edc910d7589da0013b82d83eacbd41a6c seuffert committed Nov 22, 2011
View
Oops, something went wrong.
View
@@ -297,6 +297,7 @@ private void initWithRegistryValues()
checkBox_excludeGatewayIPs.Checked = s.REG_SNIFFER_EXCLUDE_GATWAY_IPS;
checkBox_chat_nodeInfoMessagesInChat.Checked = s.REG_CHAT_NODEINFOMESSAGES;
checkBox_forward_all_high_port_broadcast.Checked = s.REG_SNIFFER_FORWARD_ALL_HIGH_PORT_BROADCASTS;
+ checkBox_minimize2systray.Checked = s.REG_MINIMIZE2SYSTRAY;
xbs_chat.message_when_nodes_join_or_leave = s.REG_CHAT_NODEINFOMESSAGES;
if (checkBox_enable_MAC_list.Checked)
@@ -336,6 +337,7 @@ private void saveRegistryValues()
s.REG_SNIFFER_EXCLUDE_GATWAY_IPS = checkBox_excludeGatewayIPs.Checked;
s.REG_CHAT_NODEINFOMESSAGES = checkBox_chat_nodeInfoMessagesInChat.Checked;
s.REG_SNIFFER_FORWARD_ALL_HIGH_PORT_BROADCASTS = checkBox_forward_all_high_port_broadcast.Checked;
+ s.REG_MINIMIZE2SYSTRAY = checkBox_minimize2systray.Checked;
s.Save();
}
@@ -701,11 +703,14 @@ private void checkbox_UPnP_CheckedChanged(object sender, EventArgs e)
private void NotifyIconDoubleClick(Object sender, EventArgs e)
{
this.Visible = (this.Visible) ? false : true;
+ if (this.WindowState == FormWindowState.Minimized)
+ this.WindowState = FormWindowState.Normal;
}
private void Form1_SizeChanged(object sender, EventArgs e)
{
- //if (this.Width!=form1_width) this.Width = form1_width;
+ if (this.WindowState == FormWindowState.Minimized && checkBox_minimize2systray.Checked)
+ this.Visible = false;
}
private void updateMainInfo(List<xbs_node> nodes)
@@ -1695,5 +1700,10 @@ private void listView_clouds_DoubleClick(object sender, EventArgs e)
if (listView_clouds.SelectedItems.Count>0)
join_cloud();
}
+
+ private void checkBox_minimize2systray_CheckedChanged(object sender, EventArgs e)
+ {
+
+ }
}
}
Oops, something went wrong.
@@ -77,5 +77,8 @@
<Setting Name="REG_SNIFFER_FORWARD_ALL_HIGH_PORT_BROADCASTS" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
+ <Setting Name="REG_MINIMIZE2SYSTRAY" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">False</Value>
+ </Setting>
</Settings>
</SettingsFile>
View
@@ -77,6 +77,16 @@
<setting name="REG_CHAT_NODEINFOMESSAGES" serializeAs="String">
<value>False</value>
</setting>
+ <setting name="SettingsUpdateNeeded" serializeAs="String">
+ <value>True</value>
+ </setting>
+ <setting name="REG_SNIFFER_FORWARD_ALL_HIGH_PORT_BROADCASTS"
+ serializeAs="String">
+ <value>False</value>
+ </setting>
+ <setting name="REG_MINIMIZE2SYSTRAY" serializeAs="String">
+ <value>False</value>
+ </setting>
</XBSlink.Properties.Settings>
</userSettings>
</configuration>
View
@@ -84,6 +84,9 @@
serializeAs="String">
<value>False</value>
</setting>
+ <setting name="REG_MINIMIZE2SYSTRAY" serializeAs="String">
+ <value>False</value>
+ </setting>
</XBSlink.Properties.Settings>
</userSettings>
</configuration>

0 comments on commit 970fae7

Please sign in to comment.