Skip to content
This repository was archived by the owner on May 19, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions FloatingGlucose/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<setting name="BackgroundImageLayout" serializeAs="String">
<value>Stretch</value>
</setting>
<setting name="EnableInvertedTrayIcon" serializeAs="String">
<value>False</value>
</setting>
</FloatingGlucose.Properties.Settings>
</userSettings>
<startup>
Expand Down
11 changes: 10 additions & 1 deletion FloatingGlucose/FloatingGlucose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,16 @@ private void FloatingGlucose_Load(object sender, EventArgs e)
// as this messes up the gui a bit
// we avoid this: double foo=7.0; foo.toString() => "7,0" in the nb-NO culture
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");
this.notifyIcon1.Icon = Properties.Resources.noun_335372_cc_v2;

if (Default.EnableInvertedTrayIcon == true)
{
this.notifyIcon1.Icon = Properties.Resources.noun_335372_cc_v2_inverted;
}
else
{
this.notifyIcon1.Icon = Properties.Resources.noun_335372_cc_v2;
}

SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;

this.lblRawDelta.Visible =
Expand Down
1 change: 1 addition & 0 deletions FloatingGlucose/FloatingGlucose.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@
<Content Include="README_attributions.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Resources\noun_335372_cc_v2_inverted.ico" />
<None Include="Resources\noun_335372_cc_v2.ico" />
<None Include="Resources\browse-file.ico" />
<None Include="Resources\alarm.mp3" />
Expand Down
139 changes: 90 additions & 49 deletions FloatingGlucose/FormGlucoseSettings.Designer.cs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions FloatingGlucose/FormGlucoseSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ private void updateFormControlsFromSettings()
this.txtBackColor.Text = Default.BackgroundColorHex;
this.txtBackImage.Text = Default.BackgroundImage;
this.cbImageLayouts.SelectedItem = Default.BackgroundImageLayout;

this.chkEnableInvertedTrayIcon.Checked = Default.EnableInvertedTrayIcon;

//this is the default in the settings file
//override it so it makes sense
if (nsurl == "https://...")
Expand Down Expand Up @@ -249,6 +252,7 @@ private void btnVerifySubmit_Click(object sender, EventArgs e)

Default.BackgroundColorHex = this.txtBackColor.Text;
Default.BackgroundImage = this.txtBackImage.Text;
Default.EnableInvertedTrayIcon = this.chkEnableInvertedTrayIcon.Checked;

//Save plugin type based on the selected fullname
Default.DataSourceFullName = (this.cbDataSource.SelectedItem as DataSourceInfo).FullName;
Expand Down
38 changes: 24 additions & 14 deletions FloatingGlucose/Properties/Resources.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 FloatingGlucose/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,7 @@
<data name="noun_335372_cc_v2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\noun_335372_cc_v2.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="noun_335372_cc_v2_inverted" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\noun_335372_cc_v2_inverted.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
18 changes: 15 additions & 3 deletions FloatingGlucose/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 FloatingGlucose/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@
<Setting Name="BackgroundImageLayout" Type="System.String" Scope="User">
<Value Profile="(Default)">Stretch</Value>
</Setting>
<Setting Name="EnableInvertedTrayIcon" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
Binary file not shown.