From be6c3c757306207adda6873f885781d51d6baecf Mon Sep 17 00:00:00 2001 From: Raphika Date: Thu, 5 Sep 2019 17:10:23 +0200 Subject: [PATCH 1/6] Added Inverted TrayIcon & Gui Refresh interval metric in GUI --- FloatingGlucose/App.config | 3 + FloatingGlucose/FloatingGlucose.cs | 11 +- FloatingGlucose/FloatingGlucose.csproj | 1 + .../FormGlucoseSettings.Designer.cs | 139 ++++++++++++------ FloatingGlucose/FormGlucoseSettings.cs | 4 + .../Properties/Resources.Designer.cs | 44 +++--- FloatingGlucose/Properties/Resources.resx | 3 + .../Properties/Settings.Designer.cs | 22 ++- FloatingGlucose/Properties/Settings.settings | 3 + .../Resources/noun_335372_cc_v2_inverted.ico | Bin 0 -> 67646 bytes 10 files changed, 158 insertions(+), 72 deletions(-) create mode 100644 FloatingGlucose/Resources/noun_335372_cc_v2_inverted.ico diff --git a/FloatingGlucose/App.config b/FloatingGlucose/App.config index 60214f1..f96729a 100644 --- a/FloatingGlucose/App.config +++ b/FloatingGlucose/App.config @@ -77,6 +77,9 @@ Stretch + + False + diff --git a/FloatingGlucose/FloatingGlucose.cs b/FloatingGlucose/FloatingGlucose.cs index 0002450..5b6cbbf 100644 --- a/FloatingGlucose/FloatingGlucose.cs +++ b/FloatingGlucose/FloatingGlucose.cs @@ -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 = diff --git a/FloatingGlucose/FloatingGlucose.csproj b/FloatingGlucose/FloatingGlucose.csproj index 39f7a14..9b11dc1 100644 --- a/FloatingGlucose/FloatingGlucose.csproj +++ b/FloatingGlucose/FloatingGlucose.csproj @@ -234,6 +234,7 @@ Always + diff --git a/FloatingGlucose/FormGlucoseSettings.Designer.cs b/FloatingGlucose/FormGlucoseSettings.Designer.cs index 259d4ae..9462b6f 100644 --- a/FloatingGlucose/FormGlucoseSettings.Designer.cs +++ b/FloatingGlucose/FormGlucoseSettings.Designer.cs @@ -92,6 +92,9 @@ private void InitializeComponent() this.lblVersionInfo = new System.Windows.Forms.Label(); this.lblAck = new System.Windows.Forms.Label(); this.clrBack = new System.Windows.Forms.ColorDialog(); + this.chkEnableInvertedTrayIcon = new System.Windows.Forms.CheckBox(); + this.label20 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.paneUserNamePassword.SuspendLayout(); this.panel2.SuspendLayout(); @@ -125,7 +128,7 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.lblDataSourceLocation); this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBox1.Location = new System.Drawing.Point(18, 11); - this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.groupBox1.Margin = new System.Windows.Forms.Padding(2); this.groupBox1.Name = "groupBox1"; this.groupBox1.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); this.groupBox1.Size = new System.Drawing.Size(630, 194); @@ -141,7 +144,7 @@ private void InitializeComponent() this.paneUserNamePassword.Controls.Add(this.lblPassword); this.paneUserNamePassword.Enabled = false; this.paneUserNamePassword.Location = new System.Drawing.Point(7, 103); - this.paneUserNamePassword.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.paneUserNamePassword.Margin = new System.Windows.Forms.Padding(2); this.paneUserNamePassword.Name = "paneUserNamePassword"; this.paneUserNamePassword.Size = new System.Drawing.Size(619, 89); this.paneUserNamePassword.TabIndex = 14; @@ -151,7 +154,7 @@ private void InitializeComponent() this.txtPassword.Anchor = System.Windows.Forms.AnchorStyles.None; this.txtPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtPassword.Location = new System.Drawing.Point(247, 50); - this.txtPassword.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.txtPassword.Margin = new System.Windows.Forms.Padding(2); this.txtPassword.MaximumSize = new System.Drawing.Size(256, 28); this.txtPassword.MinimumSize = new System.Drawing.Size(218, 20); this.txtPassword.Name = "txtPassword"; @@ -166,7 +169,7 @@ private void InitializeComponent() this.txtUserName.Anchor = System.Windows.Forms.AnchorStyles.None; this.txtUserName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtUserName.Location = new System.Drawing.Point(247, 17); - this.txtUserName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.txtUserName.Margin = new System.Windows.Forms.Padding(2); this.txtUserName.MaximumSize = new System.Drawing.Size(256, 28); this.txtUserName.MinimumSize = new System.Drawing.Size(218, 20); this.txtUserName.Name = "txtUserName"; @@ -201,7 +204,7 @@ private void InitializeComponent() this.txtDataSourceLocation.Anchor = System.Windows.Forms.AnchorStyles.None; this.txtDataSourceLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtDataSourceLocation.Location = new System.Drawing.Point(254, 56); - this.txtDataSourceLocation.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.txtDataSourceLocation.Margin = new System.Windows.Forms.Padding(2); this.txtDataSourceLocation.MaximumSize = new System.Drawing.Size(256, 28); this.txtDataSourceLocation.MinimumSize = new System.Drawing.Size(218, 20); this.txtDataSourceLocation.Name = "txtDataSourceLocation"; @@ -215,7 +218,7 @@ private void InitializeComponent() this.btnBrowse.BackColor = System.Drawing.Color.Transparent; this.btnBrowse.FlatAppearance.BorderSize = 0; this.btnBrowse.Location = new System.Drawing.Point(525, 46); - this.btnBrowse.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnBrowse.Margin = new System.Windows.Forms.Padding(2); this.btnBrowse.Name = "btnBrowse"; this.btnBrowse.Size = new System.Drawing.Size(80, 28); this.btnBrowse.TabIndex = 7; @@ -228,7 +231,7 @@ private void InitializeComponent() this.cbDataSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbDataSource.FormattingEnabled = true; this.cbDataSource.Location = new System.Drawing.Point(254, 21); - this.cbDataSource.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.cbDataSource.Margin = new System.Windows.Forms.Padding(2); this.cbDataSource.Name = "cbDataSource"; this.cbDataSource.Size = new System.Drawing.Size(256, 25); this.cbDataSource.TabIndex = 6; @@ -242,7 +245,7 @@ private void InitializeComponent() this.tblpDataSourceLocations.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tblpDataSourceLocations.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tblpDataSourceLocations.Location = new System.Drawing.Point(341, 49); - this.tblpDataSourceLocations.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tblpDataSourceLocations.Margin = new System.Windows.Forms.Padding(2); this.tblpDataSourceLocations.Name = "tblpDataSourceLocations"; this.tblpDataSourceLocations.RowCount = 1; this.tblpDataSourceLocations.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -264,7 +267,7 @@ private void InitializeComponent() // this.btnUnitsMGDL.AutoSize = true; this.btnUnitsMGDL.Location = new System.Drawing.Point(332, 79); - this.btnUnitsMGDL.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnUnitsMGDL.Margin = new System.Windows.Forms.Padding(2); this.btnUnitsMGDL.Name = "btnUnitsMGDL"; this.btnUnitsMGDL.Size = new System.Drawing.Size(65, 21); this.btnUnitsMGDL.TabIndex = 4; @@ -276,7 +279,7 @@ private void InitializeComponent() this.btnUnitsMMOL.AutoSize = true; this.btnUnitsMMOL.Checked = true; this.btnUnitsMMOL.Location = new System.Drawing.Point(254, 79); - this.btnUnitsMMOL.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnUnitsMMOL.Margin = new System.Windows.Forms.Padding(2); this.btnUnitsMMOL.Name = "btnUnitsMMOL"; this.btnUnitsMMOL.Size = new System.Drawing.Size(71, 21); this.btnUnitsMMOL.TabIndex = 3; @@ -311,7 +314,7 @@ private void InitializeComponent() // this.btnVerifySubmit.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnVerifySubmit.Location = new System.Drawing.Point(9, 511); - this.btnVerifySubmit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnVerifySubmit.Margin = new System.Windows.Forms.Padding(2); this.btnVerifySubmit.Name = "btnVerifySubmit"; this.btnVerifySubmit.Size = new System.Drawing.Size(172, 43); this.btnVerifySubmit.TabIndex = 1; @@ -324,7 +327,7 @@ private void InitializeComponent() this.panel2.Controls.Add(this.grpAlarmSettings); this.panel2.Controls.Add(this.groupBox1); this.panel2.Location = new System.Drawing.Point(4, 5); - this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel2.Margin = new System.Windows.Forms.Padding(2); this.panel2.Name = "panel2"; this.panel2.Padding = new System.Windows.Forms.Padding(38, 8, 38, 8); this.panel2.Size = new System.Drawing.Size(652, 463); @@ -352,7 +355,7 @@ private void InitializeComponent() this.grpAlarmSettings.Controls.Add(this.btnEnableAlarms); this.grpAlarmSettings.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.grpAlarmSettings.Location = new System.Drawing.Point(18, 221); - this.grpAlarmSettings.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.grpAlarmSettings.Margin = new System.Windows.Forms.Padding(2); this.grpAlarmSettings.Name = "grpAlarmSettings"; this.grpAlarmSettings.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); this.grpAlarmSettings.Size = new System.Drawing.Size(630, 232); @@ -364,7 +367,7 @@ private void InitializeComponent() // this.chkEnableSoundAlarms.AutoSize = true; this.chkEnableSoundAlarms.Location = new System.Drawing.Point(328, 33); - this.chkEnableSoundAlarms.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.chkEnableSoundAlarms.Margin = new System.Windows.Forms.Padding(2); this.chkEnableSoundAlarms.Name = "chkEnableSoundAlarms"; this.chkEnableSoundAlarms.Size = new System.Drawing.Size(15, 14); this.chkEnableSoundAlarms.TabIndex = 19; @@ -384,7 +387,7 @@ private void InitializeComponent() // numStaleUrgent // this.numStaleUrgent.Location = new System.Drawing.Point(292, 201); - this.numStaleUrgent.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numStaleUrgent.Margin = new System.Windows.Forms.Padding(2); this.numStaleUrgent.Maximum = new decimal(new int[] { 650, 0, @@ -429,7 +432,7 @@ private void InitializeComponent() // numStaleWarning // this.numStaleWarning.Location = new System.Drawing.Point(292, 173); - this.numStaleWarning.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numStaleWarning.Margin = new System.Windows.Forms.Padding(2); this.numStaleWarning.Maximum = new decimal(new int[] { 650, 0, @@ -480,7 +483,7 @@ private void InitializeComponent() 0, 65536}); this.numUrgentLow.Location = new System.Drawing.Point(292, 145); - this.numUrgentLow.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numUrgentLow.Margin = new System.Windows.Forms.Padding(2); this.numUrgentLow.Maximum = new decimal(new int[] { 650, 0, @@ -504,7 +507,7 @@ private void InitializeComponent() 0, 65536}); this.numLow.Location = new System.Drawing.Point(292, 118); - this.numLow.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numLow.Margin = new System.Windows.Forms.Padding(2); this.numLow.Maximum = new decimal(new int[] { 650, 0, @@ -528,7 +531,7 @@ private void InitializeComponent() 0, 65536}); this.numHigh.Location = new System.Drawing.Point(292, 91); - this.numHigh.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numHigh.Margin = new System.Windows.Forms.Padding(2); this.numHigh.Maximum = new decimal(new int[] { 650, 0, @@ -552,7 +555,7 @@ private void InitializeComponent() 0, 65536}); this.numUrgentHigh.Location = new System.Drawing.Point(292, 64); - this.numUrgentHigh.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numUrgentHigh.Margin = new System.Windows.Forms.Padding(2); this.numUrgentHigh.Maximum = new decimal(new int[] { 650, 0, @@ -616,7 +619,7 @@ private void InitializeComponent() this.btnDisableAlarms.AutoSize = true; this.btnDisableAlarms.Checked = true; this.btnDisableAlarms.Location = new System.Drawing.Point(14, 29); - this.btnDisableAlarms.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnDisableAlarms.Margin = new System.Windows.Forms.Padding(2); this.btnDisableAlarms.Name = "btnDisableAlarms"; this.btnDisableAlarms.Size = new System.Drawing.Size(119, 21); this.btnDisableAlarms.TabIndex = 1; @@ -628,7 +631,7 @@ private void InitializeComponent() // this.btnEnableAlarms.AutoSize = true; this.btnEnableAlarms.Location = new System.Drawing.Point(175, 29); - this.btnEnableAlarms.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnEnableAlarms.Margin = new System.Windows.Forms.Padding(2); this.btnEnableAlarms.Name = "btnEnableAlarms"; this.btnEnableAlarms.Size = new System.Drawing.Size(116, 21); this.btnEnableAlarms.TabIndex = 0; @@ -652,7 +655,7 @@ private void InitializeComponent() this.tabSettings.Controls.Add(this.tabPageBasic); this.tabSettings.Controls.Add(this.tabPageAdvanced); this.tabSettings.Location = new System.Drawing.Point(9, 10); - this.tabSettings.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tabSettings.Margin = new System.Windows.Forms.Padding(2); this.tabSettings.Name = "tabSettings"; this.tabSettings.SelectedIndex = 0; this.tabSettings.Size = new System.Drawing.Size(678, 496); @@ -665,9 +668,9 @@ private void InitializeComponent() this.tabPageBasic.Controls.Add(this.panel2); this.tabPageBasic.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabPageBasic.Location = new System.Drawing.Point(4, 22); - this.tabPageBasic.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tabPageBasic.Margin = new System.Windows.Forms.Padding(2); this.tabPageBasic.Name = "tabPageBasic"; - this.tabPageBasic.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tabPageBasic.Padding = new System.Windows.Forms.Padding(2); this.tabPageBasic.Size = new System.Drawing.Size(670, 470); this.tabPageBasic.TabIndex = 0; this.tabPageBasic.Text = "Basic Settings"; @@ -678,15 +681,18 @@ private void InitializeComponent() this.tabPageAdvanced.Controls.Add(this.groupBox2); this.tabPageAdvanced.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabPageAdvanced.Location = new System.Drawing.Point(4, 22); - this.tabPageAdvanced.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tabPageAdvanced.Margin = new System.Windows.Forms.Padding(2); this.tabPageAdvanced.Name = "tabPageAdvanced"; - this.tabPageAdvanced.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.tabPageAdvanced.Padding = new System.Windows.Forms.Padding(2); this.tabPageAdvanced.Size = new System.Drawing.Size(670, 470); this.tabPageAdvanced.TabIndex = 1; this.tabPageAdvanced.Text = "Advanced Settings"; // // groupBox2 // + this.groupBox2.Controls.Add(this.label21); + this.groupBox2.Controls.Add(this.chkEnableInvertedTrayIcon); + this.groupBox2.Controls.Add(this.label20); this.groupBox2.Controls.Add(this.cbImageLayouts); this.groupBox2.Controls.Add(this.label24); this.groupBox2.Controls.Add(this.btnBrowseBackImage); @@ -709,7 +715,7 @@ private void InitializeComponent() this.groupBox2.Controls.Add(this.label7); this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBox2.Location = new System.Drawing.Point(26, 15); - this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.groupBox2.Margin = new System.Windows.Forms.Padding(2); this.groupBox2.Name = "groupBox2"; this.groupBox2.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); this.groupBox2.Size = new System.Drawing.Size(630, 435); @@ -721,8 +727,8 @@ private void InitializeComponent() // this.cbImageLayouts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbImageLayouts.FormattingEnabled = true; - this.cbImageLayouts.Location = new System.Drawing.Point(289, 282); - this.cbImageLayouts.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.cbImageLayouts.Location = new System.Drawing.Point(289, 285); + this.cbImageLayouts.Margin = new System.Windows.Forms.Padding(2); this.cbImageLayouts.Name = "cbImageLayouts"; this.cbImageLayouts.Size = new System.Drawing.Size(135, 25); this.cbImageLayouts.TabIndex = 25; @@ -731,7 +737,7 @@ private void InitializeComponent() // this.label24.AutoSize = true; this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label24.Location = new System.Drawing.Point(28, 288); + this.label24.Location = new System.Drawing.Point(28, 291); this.label24.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label24.Name = "label24"; this.label24.Size = new System.Drawing.Size(173, 17); @@ -742,8 +748,8 @@ private void InitializeComponent() // this.btnBrowseBackImage.BackColor = System.Drawing.Color.Transparent; this.btnBrowseBackImage.FlatAppearance.BorderSize = 0; - this.btnBrowseBackImage.Location = new System.Drawing.Point(448, 249); - this.btnBrowseBackImage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.btnBrowseBackImage.Location = new System.Drawing.Point(448, 252); + this.btnBrowseBackImage.Margin = new System.Windows.Forms.Padding(2); this.btnBrowseBackImage.Name = "btnBrowseBackImage"; this.btnBrowseBackImage.Size = new System.Drawing.Size(80, 28); this.btnBrowseBackImage.TabIndex = 23; @@ -755,8 +761,8 @@ private void InitializeComponent() // this.txtBackImage.Anchor = System.Windows.Forms.AnchorStyles.None; this.txtBackImage.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtBackImage.Location = new System.Drawing.Point(168, 252); - this.txtBackImage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.txtBackImage.Location = new System.Drawing.Point(168, 255); + this.txtBackImage.Margin = new System.Windows.Forms.Padding(2); this.txtBackImage.MaximumSize = new System.Drawing.Size(256, 28); this.txtBackImage.MinimumSize = new System.Drawing.Size(218, 20); this.txtBackImage.Name = "txtBackImage"; @@ -768,7 +774,7 @@ private void InitializeComponent() // this.label23.AutoSize = true; this.label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label23.Location = new System.Drawing.Point(28, 252); + this.label23.Location = new System.Drawing.Point(28, 255); this.label23.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(126, 17); @@ -777,8 +783,8 @@ private void InitializeComponent() // // txtBackColor // - this.txtBackColor.Location = new System.Drawing.Point(312, 219); - this.txtBackColor.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.txtBackColor.Location = new System.Drawing.Point(312, 222); + this.txtBackColor.Margin = new System.Windows.Forms.Padding(2); this.txtBackColor.Name = "txtBackColor"; this.txtBackColor.ReadOnly = true; this.txtBackColor.Size = new System.Drawing.Size(112, 23); @@ -789,7 +795,7 @@ private void InitializeComponent() // this.label22.AutoSize = true; this.label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label22.Location = new System.Drawing.Point(28, 219); + this.label22.Location = new System.Drawing.Point(28, 222); this.label22.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label22.Name = "label22"; this.label22.Size = new System.Drawing.Size(121, 17); @@ -810,7 +816,7 @@ private void InitializeComponent() // numOpacity // this.numOpacity.Location = new System.Drawing.Point(333, 95); - this.numOpacity.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numOpacity.Margin = new System.Windows.Forms.Padding(2); this.numOpacity.Name = "numOpacity"; this.numOpacity.Size = new System.Drawing.Size(90, 23); this.numOpacity.TabIndex = 17; @@ -834,8 +840,8 @@ private void InitializeComponent() // chkDisableSoundOnWorkstationLock // this.chkDisableSoundOnWorkstationLock.AutoSize = true; - this.chkDisableSoundOnWorkstationLock.Location = new System.Drawing.Point(410, 188); - this.chkDisableSoundOnWorkstationLock.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.chkDisableSoundOnWorkstationLock.Location = new System.Drawing.Point(410, 191); + this.chkDisableSoundOnWorkstationLock.Margin = new System.Windows.Forms.Padding(2); this.chkDisableSoundOnWorkstationLock.Name = "chkDisableSoundOnWorkstationLock"; this.chkDisableSoundOnWorkstationLock.Size = new System.Drawing.Size(15, 14); this.chkDisableSoundOnWorkstationLock.TabIndex = 15; @@ -845,7 +851,7 @@ private void InitializeComponent() // this.label16.AutoSize = true; this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label16.Location = new System.Drawing.Point(28, 188); + this.label16.Location = new System.Drawing.Point(28, 191); this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(353, 17); @@ -856,7 +862,7 @@ private void InitializeComponent() // this.chkEnableRAWGlucose.AutoSize = true; this.chkEnableRAWGlucose.Location = new System.Drawing.Point(410, 162); - this.chkEnableRAWGlucose.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.chkEnableRAWGlucose.Margin = new System.Windows.Forms.Padding(2); this.chkEnableRAWGlucose.Name = "chkEnableRAWGlucose"; this.chkEnableRAWGlucose.Size = new System.Drawing.Size(15, 14); this.chkEnableRAWGlucose.TabIndex = 13; @@ -866,7 +872,7 @@ private void InitializeComponent() // this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.Location = new System.Drawing.Point(28, 160); + this.label10.Location = new System.Drawing.Point(28, 163); this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(240, 17); @@ -882,7 +888,7 @@ private void InitializeComponent() 0, 65536}); this.numScaling.Location = new System.Drawing.Point(333, 66); - this.numScaling.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numScaling.Margin = new System.Windows.Forms.Padding(2); this.numScaling.Name = "numScaling"; this.numScaling.Size = new System.Drawing.Size(90, 23); this.numScaling.TabIndex = 11; @@ -896,7 +902,7 @@ private void InitializeComponent() // this.chkEnableExceptions.AutoSize = true; this.chkEnableExceptions.Location = new System.Drawing.Point(410, 131); - this.chkEnableExceptions.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.chkEnableExceptions.Margin = new System.Windows.Forms.Padding(2); this.chkEnableExceptions.Name = "chkEnableExceptions"; this.chkEnableExceptions.Size = new System.Drawing.Size(15, 14); this.chkEnableExceptions.TabIndex = 10; @@ -927,7 +933,7 @@ private void InitializeComponent() // numRefreshInterval // this.numRefreshInterval.Location = new System.Drawing.Point(333, 37); - this.numRefreshInterval.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.numRefreshInterval.Margin = new System.Windows.Forms.Padding(2); this.numRefreshInterval.Minimum = new decimal(new int[] { 2, 0, @@ -977,6 +983,38 @@ private void InitializeComponent() this.lblAck.TabIndex = 5; this.lblAck.Text = "Acks..."; // + // chkEnableInvertedTrayIcon + // + this.chkEnableInvertedTrayIcon.AutoSize = true; + this.chkEnableInvertedTrayIcon.Location = new System.Drawing.Point(410, 329); + this.chkEnableInvertedTrayIcon.Margin = new System.Windows.Forms.Padding(2); + this.chkEnableInvertedTrayIcon.Name = "chkEnableInvertedTrayIcon"; + this.chkEnableInvertedTrayIcon.Size = new System.Drawing.Size(15, 14); + this.chkEnableInvertedTrayIcon.TabIndex = 27; + this.chkEnableInvertedTrayIcon.UseVisualStyleBackColor = true; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label20.Location = new System.Drawing.Point(28, 329); + this.label20.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(138, 17); + this.label20.TabIndex = 26; + this.label20.Text = "Use inverted try icon"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label21.Location = new System.Drawing.Point(427, 42); + this.label21.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(30, 17); + this.label21.TabIndex = 28; + this.label21.Text = "sec"; + // // FormGlucoseSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -988,7 +1026,7 @@ private void InitializeComponent() this.Controls.Add(this.tabSettings); this.Controls.Add(this.btnVerifySubmit); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "FormGlucoseSettings"; this.Text = "Glucose Settings"; this.Load += new System.EventHandler(this.FormGlucoseSettings_Load); @@ -1084,5 +1122,8 @@ private void InitializeComponent() private System.Windows.Forms.Label label24; public System.Windows.Forms.Label lblUsername; public System.Windows.Forms.Label lblPassword; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.CheckBox chkEnableInvertedTrayIcon; + private System.Windows.Forms.Label label20; } } diff --git a/FloatingGlucose/FormGlucoseSettings.cs b/FloatingGlucose/FormGlucoseSettings.cs index c975c08..0e2d8fb 100644 --- a/FloatingGlucose/FormGlucoseSettings.cs +++ b/FloatingGlucose/FormGlucoseSettings.cs @@ -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://...") @@ -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; diff --git a/FloatingGlucose/Properties/Resources.Designer.cs b/FloatingGlucose/Properties/Resources.Designer.cs index 49abc63..46755f3 100644 --- a/FloatingGlucose/Properties/Resources.Designer.cs +++ b/FloatingGlucose/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace FloatingGlucose.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Looks up a localized resource of type System.Byte[]. + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. /// internal static byte[] alarm { get { @@ -71,7 +71,7 @@ internal static byte[] alarm { } /// - /// Looks up a localized resource of type System.Byte[]. + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. /// internal static byte[] alarm2 { get { @@ -81,7 +81,7 @@ internal static byte[] alarm2 { } /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). /// internal static System.Drawing.Icon browse_file { get { @@ -91,7 +91,7 @@ internal static System.Drawing.Icon browse_file { } /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). /// internal static System.Drawing.Icon noun_335372_cc_v2 { get { @@ -99,5 +99,15 @@ internal static System.Drawing.Icon noun_335372_cc_v2 { return ((System.Drawing.Icon)(obj)); } } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). + /// + internal static System.Drawing.Icon noun_335372_cc_v2_inverted { + get { + object obj = ResourceManager.GetObject("noun_335372_cc_v2_inverted", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } } } diff --git a/FloatingGlucose/Properties/Resources.resx b/FloatingGlucose/Properties/Resources.resx index d9f8ed9..3a70b03 100644 --- a/FloatingGlucose/Properties/Resources.resx +++ b/FloatingGlucose/Properties/Resources.resx @@ -130,4 +130,7 @@ ..\Resources\noun_335372_cc_v2.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\noun_335372_cc_v2_inverted.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/FloatingGlucose/Properties/Settings.Designer.cs b/FloatingGlucose/Properties/Settings.Designer.cs index ffcad4c..29cdfa0 100644 --- a/FloatingGlucose/Properties/Settings.Designer.cs +++ b/FloatingGlucose/Properties/Settings.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -12,7 +12,7 @@ namespace FloatingGlucose.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.0.1.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")] public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -285,5 +285,17 @@ public string BackgroundImageLayout { this["BackgroundImageLayout"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool EnableInvertedTrayIcon { + get { + return ((bool)(this["EnableInvertedTrayIcon"])); + } + set { + this["EnableInvertedTrayIcon"] = value; + } + } } } diff --git a/FloatingGlucose/Properties/Settings.settings b/FloatingGlucose/Properties/Settings.settings index 7e05cb7..0e7f463 100644 --- a/FloatingGlucose/Properties/Settings.settings +++ b/FloatingGlucose/Properties/Settings.settings @@ -68,5 +68,8 @@ Stretch + + False + \ No newline at end of file diff --git a/FloatingGlucose/Resources/noun_335372_cc_v2_inverted.ico b/FloatingGlucose/Resources/noun_335372_cc_v2_inverted.ico new file mode 100644 index 0000000000000000000000000000000000000000..a194ee69bc43c21e796126e9eb1839632047083d GIT binary patch literal 67646 zcmeI5d#oH~8O9eVJ*Bj^2rVFJs~}bo5S3_=x*$q4NW6d=6OqtB#9IvU5+sd#P|;vQ zFhHV4lcF(3ypiw+UI0BoyhMWyr)i$I+fhnbfmoDVSgzb=-7szc zgzUU*S@l7F4uloi`Gb_H7p+@-E`#NR)bTRK6p+ra-(tLIdFWYRC@Xi$+XU>t7=PJi zsjqcuQ88tGxExLaa^wAfIC+Qec`^Bnx6O5Yu7J|EQN;k!@g@-p8I)LJy;8K=ZEn$O_$#^x!UO0?oytX=ohMw_}4Y$ znz)^1Mccto&$(yfFZS=8CxZCX3RnRvUiUIw9@-s4u;B(pR}!ajhqEH!EPvGT4%Nn(Di{9!I$2Fa}X@K;|hH` z0lp4*!DryefkY{3A==Y>pk4wxt{2TaF6QjAq9Ni*?{=tL*Z^no6e^% zgJADtl5f}yx548O!mcQyI{`fte%>drON;m&rMmP@?|1uBpFV1x-y9-V{OTQq7r^}x z(mtCveuC1q$F+Tedzfiw=Jh*@_2|#D;=bzm_5kQQOUL1Bpw#mn{H=mXDDyavyS}F5 zTCR82QBUVY_kiv(=z3D$zYA}J%FdBPtv~ch=U_U&)w*yZoD9c6Y5B+38qhkWdp5(c zAJWL`JepBYvAz&q1iA-t1RRjZm+M4-e?Z&)b)a*LVcG9#=y2;_tpemg=NKP@|G_X# z`|V?^?Y&zk2V3D^!%TeKmaf%Ka|WtY0R3M8_r>`b_J^)3-&|eq$Gc^;*L{55)2q_n zJKkBSuJClAdLTP_bHAGJ2lNb+&Z-Rb{c?fO={Wfz* znQh|lH88B-_-X1%P2(6#&5Qhjww&wTGAed7CIpSU&YVb}(xjBCP=#!meW zsx+mhOuzVwOvC3P@DBJ1B>OmBXKKGtnubMUoUbl1J|8ZHcZ0UmQnvYQoA~_{RB7L# z@nGZi@O?1oJV*P@^I%O@gK;jS$D5$aYkmKkbgX`y4 z0R1)Q^TsNYPn$QuME>YqvkV2u!8;*)y~(7Y_Gi3rDIotshfUdzl1f|@=8m~-+>n-_M2j7O!b_Wft3)d5S&Z_`+1P42Ja#;GbygxB%U-%bW_3kLSU#eiPL1bAJC{&Rm74Mm~;&KfjZr_`|@`FdTiT4<*GHF`JGfuLtNR+iNReCgWkTM)u@{;#pVdUuh=;piIR ztRk^fe;KTfS;6O$y{|;yR)K!6y%uf)jd9Vo`f(_2Oas2Igb=2&J{r%k5p@0kR45cT z^)*)JHuy2z3SWk8a6*ywYSik|A8qq3cns2}agA>&GhX~{hJIt`I!xC#oYyoC=M^Q# zsxeGA_X+5?Ogp~JwyN|+Uvz)=SAF_xj=Spg6PkzOvh@${!umdan1RrR`1%&khk2e)omLU{m}V?Wg&EJSdNgwMVINQJ`40 zZ@dKBsi1Uid0~k5s`5#H&V_qH`%&fo)GA`3-M7Oa#{uQz*YG{K2!f6E!1qeH0v>|h z@Krdp3VlMgNq@9WYP?nxO5cwT8aHk0d~*=fxygADEbr-<)eh)4ERB=)IM1{=C4EO% zJwvqv(x!c_j!nDL6XWmS;M4c`OVYn;H{??L*sR^dgri_9=o(M^eO>447@>W|lD#Ic zIv>MspIn{}y57<;HnFP|2L;`Wx)^kxaz14*?>Ad+cH5C4{2#S9SDr}9ooIdsM~bf*`;$+V zTlx~)Lgh&oNS4)SpK{OoGu3G9O%}^fXX-0|X@4rWQWFZ5+s*E5{Yb88ebV~Vie9Kj zBdl+fnHh&LSDu`Wfc3Srw!zz%;_@_;+bU1Z&fgi8n>~L-Yew>>> Date: Fri, 6 Sep 2019 08:07:34 +0200 Subject: [PATCH 2/6] Translated auto-generated comment Translated auto-generated comment --- FloatingGlucose/Properties/Settings.Designer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FloatingGlucose/Properties/Settings.Designer.cs b/FloatingGlucose/Properties/Settings.Designer.cs index 29cdfa0..c4cd945 100644 --- a/FloatingGlucose/Properties/Settings.Designer.cs +++ b/FloatingGlucose/Properties/Settings.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.42000 +// This code was generated by a tool. +// Runtime version:4.0.30319.42000 // -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. +// Changes to this file can cause incorrect behavior and are lost if +// the code is regenerated. // //------------------------------------------------------------------------------ From f875e211da7f2e1e733a86a2111b25326a65e3a0 Mon Sep 17 00:00:00 2001 From: Raphika <42291781+Raphika@users.noreply.github.com> Date: Fri, 6 Sep 2019 08:10:27 +0200 Subject: [PATCH 3/6] Translated auto-generated comment Translated auto-generated comment --- .../Properties/Resources.Designer.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/FloatingGlucose/Properties/Resources.Designer.cs b/FloatingGlucose/Properties/Resources.Designer.cs index 46755f3..a925db4 100644 --- a/FloatingGlucose/Properties/Resources.Designer.cs +++ b/FloatingGlucose/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.42000 +// This code was generated by a tool. +// Runtime version:4.0.30319.42000 // -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. +// Changes to this file can cause incorrect behavior and are lost if +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace FloatingGlucose.Properties { /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// A highly typed resource class to search for localized strings etc. /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + // This class was automatically generated by StronglyTypedResourceBuilder. + // -class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit the .ResX file and then run ResGen + // with the /str option again, or you can recreate your PC project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// Overwrites the CurrentUICulture property of the current thread for all + /// Resource assignments that use this highly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// Searches for a localized resource of type System.Byte[]. /// internal static byte[] alarm { get { @@ -71,7 +71,7 @@ internal static byte[] alarm { } /// - /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// Searches for a localized resource of type System.Byte[]. /// internal static byte[] alarm2 { get { @@ -81,7 +81,7 @@ internal static byte[] alarm2 { } /// - /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). + /// Searches for a localized resource of type System.Drawing.Icon similar to (icon). /// internal static System.Drawing.Icon browse_file { get { @@ -91,7 +91,7 @@ internal static System.Drawing.Icon browse_file { } /// - /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). + /// Searches for a localized resource of type System.Drawing.Icon similar to (icon). /// internal static System.Drawing.Icon noun_335372_cc_v2 { get { @@ -101,7 +101,7 @@ internal static System.Drawing.Icon noun_335372_cc_v2 { } /// - /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). + /// Searches for a localized resource of type System.Drawing.Icon similar to (icon). /// internal static System.Drawing.Icon noun_335372_cc_v2_inverted { get { From 2b8d46a1b09c462ee725bb5311f84d7cae152b8a Mon Sep 17 00:00:00 2001 From: Rapha <42291781+Tuphal@users.noreply.github.com> Date: Wed, 11 Sep 2019 09:54:19 +0200 Subject: [PATCH 4/6] Background Image usage Settings for usage of Background image or Color at start --- FloatingGlucose/App.config | 194 +- FloatingGlucose/FloatingGlucose.cs | 13 +- .../FormGlucoseSettings.Designer.cs | 2288 +++++++++-------- FloatingGlucose/FormGlucoseSettings.cs | 927 +++---- FloatingGlucose/FormGlucoseSettings.resx | 244 +- 5 files changed, 1874 insertions(+), 1792 deletions(-) diff --git a/FloatingGlucose/App.config b/FloatingGlucose/App.config index f96729a..98665bb 100644 --- a/FloatingGlucose/App.config +++ b/FloatingGlucose/App.config @@ -1,95 +1,101 @@ - - - - -
-
-
- - - - - - 0, 0, 0, 0 - - - - - https://... - - - True - - - 60 - - - 1 - - - True - - - 13 - - - 11 - - - 4.5 - - - 3.8 - - - False - - - mmol - - - 15 - - - 30 - - - True - - - False - - - 85 - - - - - - - - - FF000000 - - - - - - Stretch - - - False - - - - - - - - - - + + + + +
+
+
+ + + + + + 0, 0, 0, 0 + + + + + https://... + + + True + + + 60 + + + 1 + + + True + + + 13 + + + 11 + + + 4.5 + + + 3.8 + + + False + + + mmol + + + 15 + + + 30 + + + True + + + False + + + 85 + + + + + + + + + + + + FF000000 + + + + + + Stretch + + + False + + + False + + + + + + + + + + \ No newline at end of file diff --git a/FloatingGlucose/FloatingGlucose.cs b/FloatingGlucose/FloatingGlucose.cs index 5b6cbbf..71cb3c7 100644 --- a/FloatingGlucose/FloatingGlucose.cs +++ b/FloatingGlucose/FloatingGlucose.cs @@ -543,8 +543,17 @@ private void FloatingGlucose_Load(object sender, EventArgs e) this.BackColor = Color.LightBlue; }*/ - this.BackColor = Default.BackgroundColorHex.FromHexStringToColor(); - this.setBackgroundImage(); + //If Backgroundimage was chosen, use it else use BackgroundColor + if (Default.EnableBackgroundImage == true) + { + this.setBackgroundImage(); + } + else + { + this.BackColor = Default.BackgroundColorHex.FromHexStringToColor(); + } + + AppShared.RegisterSettingsChangedCallback(Settings_Changed_Event); diff --git a/FloatingGlucose/FormGlucoseSettings.Designer.cs b/FloatingGlucose/FormGlucoseSettings.Designer.cs index 9462b6f..4d5c79f 100644 --- a/FloatingGlucose/FormGlucoseSettings.Designer.cs +++ b/FloatingGlucose/FormGlucoseSettings.Designer.cs @@ -1,1129 +1,1159 @@ -namespace FloatingGlucose -{ - partial class FormGlucoseSettings - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.paneUserNamePassword = new System.Windows.Forms.Panel(); - this.txtPassword = new System.Windows.Forms.TextBox(); - this.txtUserName = new System.Windows.Forms.TextBox(); - this.lblUsername = new System.Windows.Forms.Label(); - this.lblPassword = new System.Windows.Forms.Label(); - this.txtDataSourceLocation = new System.Windows.Forms.TextBox(); - this.btnBrowse = new System.Windows.Forms.Button(); - this.cbDataSource = new System.Windows.Forms.ComboBox(); - this.tblpDataSourceLocations = new System.Windows.Forms.TableLayoutPanel(); - this.label19 = new System.Windows.Forms.Label(); - this.btnUnitsMGDL = new System.Windows.Forms.RadioButton(); - this.btnUnitsMMOL = new System.Windows.Forms.RadioButton(); - this.label11 = new System.Windows.Forms.Label(); - this.lblDataSourceLocation = new System.Windows.Forms.Label(); - this.btnVerifySubmit = new System.Windows.Forms.Button(); - this.panel2 = new System.Windows.Forms.Panel(); - this.grpAlarmSettings = new System.Windows.Forms.GroupBox(); - this.chkEnableSoundAlarms = new System.Windows.Forms.CheckBox(); - this.label15 = new System.Windows.Forms.Label(); - this.numStaleUrgent = new System.Windows.Forms.NumericUpDown(); - this.label13 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.numStaleWarning = new System.Windows.Forms.NumericUpDown(); - this.label12 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.numUrgentLow = new System.Windows.Forms.NumericUpDown(); - this.numLow = new System.Windows.Forms.NumericUpDown(); - this.numHigh = new System.Windows.Forms.NumericUpDown(); - this.numUrgentHigh = new System.Windows.Forms.NumericUpDown(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.btnDisableAlarms = new System.Windows.Forms.RadioButton(); - this.btnEnableAlarms = new System.Windows.Forms.RadioButton(); - this.label6 = new System.Windows.Forms.Label(); - this.tabSettings = new System.Windows.Forms.TabControl(); - this.tabPageBasic = new System.Windows.Forms.TabPage(); - this.tabPageAdvanced = new System.Windows.Forms.TabPage(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.cbImageLayouts = new System.Windows.Forms.ComboBox(); - this.label24 = new System.Windows.Forms.Label(); - this.btnBrowseBackImage = new System.Windows.Forms.Button(); - this.txtBackImage = new System.Windows.Forms.TextBox(); - this.label23 = new System.Windows.Forms.Label(); - this.txtBackColor = new System.Windows.Forms.TextBox(); - this.label22 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.numOpacity = new System.Windows.Forms.NumericUpDown(); - this.label17 = new System.Windows.Forms.Label(); - this.chkDisableSoundOnWorkstationLock = new System.Windows.Forms.CheckBox(); - this.label16 = new System.Windows.Forms.Label(); - this.chkEnableRAWGlucose = new System.Windows.Forms.CheckBox(); - this.label10 = new System.Windows.Forms.Label(); - this.numScaling = new System.Windows.Forms.NumericUpDown(); - this.chkEnableExceptions = new System.Windows.Forms.CheckBox(); - this.label9 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.numRefreshInterval = new System.Windows.Forms.NumericUpDown(); - this.label7 = new System.Windows.Forms.Label(); - this.lblVersionInfo = new System.Windows.Forms.Label(); - this.lblAck = new System.Windows.Forms.Label(); - this.clrBack = new System.Windows.Forms.ColorDialog(); - this.chkEnableInvertedTrayIcon = new System.Windows.Forms.CheckBox(); - this.label20 = new System.Windows.Forms.Label(); - this.label21 = new System.Windows.Forms.Label(); - this.groupBox1.SuspendLayout(); - this.paneUserNamePassword.SuspendLayout(); - this.panel2.SuspendLayout(); - this.grpAlarmSettings.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numStaleUrgent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numStaleWarning)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numUrgentLow)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLow)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numHigh)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numUrgentHigh)).BeginInit(); - this.tabSettings.SuspendLayout(); - this.tabPageBasic.SuspendLayout(); - this.tabPageAdvanced.SuspendLayout(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numOpacity)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numScaling)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numRefreshInterval)).BeginInit(); - this.SuspendLayout(); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.paneUserNamePassword); - this.groupBox1.Controls.Add(this.txtDataSourceLocation); - this.groupBox1.Controls.Add(this.btnBrowse); - this.groupBox1.Controls.Add(this.cbDataSource); - this.groupBox1.Controls.Add(this.tblpDataSourceLocations); - this.groupBox1.Controls.Add(this.label19); - this.groupBox1.Controls.Add(this.btnUnitsMGDL); - this.groupBox1.Controls.Add(this.btnUnitsMMOL); - this.groupBox1.Controls.Add(this.label11); - this.groupBox1.Controls.Add(this.lblDataSourceLocation); - this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.groupBox1.Location = new System.Drawing.Point(18, 11); - this.groupBox1.Margin = new System.Windows.Forms.Padding(2); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); - this.groupBox1.Size = new System.Drawing.Size(630, 194); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Nightscout settings"; - // - // paneUserNamePassword - // - this.paneUserNamePassword.Controls.Add(this.txtPassword); - this.paneUserNamePassword.Controls.Add(this.txtUserName); - this.paneUserNamePassword.Controls.Add(this.lblUsername); - this.paneUserNamePassword.Controls.Add(this.lblPassword); - this.paneUserNamePassword.Enabled = false; - this.paneUserNamePassword.Location = new System.Drawing.Point(7, 103); - this.paneUserNamePassword.Margin = new System.Windows.Forms.Padding(2); - this.paneUserNamePassword.Name = "paneUserNamePassword"; - this.paneUserNamePassword.Size = new System.Drawing.Size(619, 89); - this.paneUserNamePassword.TabIndex = 14; - // - // txtPassword - // - this.txtPassword.Anchor = System.Windows.Forms.AnchorStyles.None; - this.txtPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtPassword.Location = new System.Drawing.Point(247, 50); - this.txtPassword.Margin = new System.Windows.Forms.Padding(2); - this.txtPassword.MaximumSize = new System.Drawing.Size(256, 28); - this.txtPassword.MinimumSize = new System.Drawing.Size(218, 20); - this.txtPassword.Name = "txtPassword"; - this.txtPassword.PasswordChar = '*'; - this.txtPassword.Size = new System.Drawing.Size(256, 23); - this.txtPassword.TabIndex = 10; - this.txtPassword.UseSystemPasswordChar = true; - this.txtPassword.WordWrap = false; - // - // txtUserName - // - this.txtUserName.Anchor = System.Windows.Forms.AnchorStyles.None; - this.txtUserName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtUserName.Location = new System.Drawing.Point(247, 17); - this.txtUserName.Margin = new System.Windows.Forms.Padding(2); - this.txtUserName.MaximumSize = new System.Drawing.Size(256, 28); - this.txtUserName.MinimumSize = new System.Drawing.Size(218, 20); - this.txtUserName.Name = "txtUserName"; - this.txtUserName.Size = new System.Drawing.Size(256, 23); - this.txtUserName.TabIndex = 9; - this.txtUserName.WordWrap = false; - // - // lblUsername - // - this.lblUsername.AutoSize = true; - this.lblUsername.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblUsername.Location = new System.Drawing.Point(5, 20); - this.lblUsername.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblUsername.Name = "lblUsername"; - this.lblUsername.Size = new System.Drawing.Size(79, 17); - this.lblUsername.TabIndex = 11; - this.lblUsername.Text = "User Name"; - // - // lblPassword - // - this.lblPassword.AutoSize = true; - this.lblPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblPassword.Location = new System.Drawing.Point(5, 50); - this.lblPassword.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblPassword.Name = "lblPassword"; - this.lblPassword.Size = new System.Drawing.Size(69, 17); - this.lblPassword.TabIndex = 12; - this.lblPassword.Text = "Password"; - // - // txtDataSourceLocation - // - this.txtDataSourceLocation.Anchor = System.Windows.Forms.AnchorStyles.None; - this.txtDataSourceLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtDataSourceLocation.Location = new System.Drawing.Point(254, 56); - this.txtDataSourceLocation.Margin = new System.Windows.Forms.Padding(2); - this.txtDataSourceLocation.MaximumSize = new System.Drawing.Size(256, 28); - this.txtDataSourceLocation.MinimumSize = new System.Drawing.Size(218, 20); - this.txtDataSourceLocation.Name = "txtDataSourceLocation"; - this.txtDataSourceLocation.Size = new System.Drawing.Size(256, 23); - this.txtDataSourceLocation.TabIndex = 0; - this.txtDataSourceLocation.Text = "https://mysite.azurewebsites.net"; - this.txtDataSourceLocation.WordWrap = false; - // - // btnBrowse - // - this.btnBrowse.BackColor = System.Drawing.Color.Transparent; - this.btnBrowse.FlatAppearance.BorderSize = 0; - this.btnBrowse.Location = new System.Drawing.Point(525, 46); - this.btnBrowse.Margin = new System.Windows.Forms.Padding(2); - this.btnBrowse.Name = "btnBrowse"; - this.btnBrowse.Size = new System.Drawing.Size(80, 28); - this.btnBrowse.TabIndex = 7; - this.btnBrowse.Text = "Browse.."; - this.btnBrowse.UseVisualStyleBackColor = false; - this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); - // - // cbDataSource - // - this.cbDataSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbDataSource.FormattingEnabled = true; - this.cbDataSource.Location = new System.Drawing.Point(254, 21); - this.cbDataSource.Margin = new System.Windows.Forms.Padding(2); - this.cbDataSource.Name = "cbDataSource"; - this.cbDataSource.Size = new System.Drawing.Size(256, 25); - this.cbDataSource.TabIndex = 6; - this.cbDataSource.SelectedIndexChanged += new System.EventHandler(this.cbDataSource_SelectedIndexChanged); - // - // tblpDataSourceLocations - // - this.tblpDataSourceLocations.AutoSize = true; - this.tblpDataSourceLocations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.tblpDataSourceLocations.ColumnCount = 2; - this.tblpDataSourceLocations.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tblpDataSourceLocations.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tblpDataSourceLocations.Location = new System.Drawing.Point(341, 49); - this.tblpDataSourceLocations.Margin = new System.Windows.Forms.Padding(2); - this.tblpDataSourceLocations.Name = "tblpDataSourceLocations"; - this.tblpDataSourceLocations.RowCount = 1; - this.tblpDataSourceLocations.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tblpDataSourceLocations.Size = new System.Drawing.Size(0, 0); - this.tblpDataSourceLocations.TabIndex = 8; - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label19.Location = new System.Drawing.Point(10, 28); - this.label19.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(81, 17); - this.label19.TabIndex = 5; - this.label19.Text = "Datasource"; - // - // btnUnitsMGDL - // - this.btnUnitsMGDL.AutoSize = true; - this.btnUnitsMGDL.Location = new System.Drawing.Point(332, 79); - this.btnUnitsMGDL.Margin = new System.Windows.Forms.Padding(2); - this.btnUnitsMGDL.Name = "btnUnitsMGDL"; - this.btnUnitsMGDL.Size = new System.Drawing.Size(65, 21); - this.btnUnitsMGDL.TabIndex = 4; - this.btnUnitsMGDL.Text = "mg/dL"; - this.btnUnitsMGDL.UseVisualStyleBackColor = true; - // - // btnUnitsMMOL - // - this.btnUnitsMMOL.AutoSize = true; - this.btnUnitsMMOL.Checked = true; - this.btnUnitsMMOL.Location = new System.Drawing.Point(254, 79); - this.btnUnitsMMOL.Margin = new System.Windows.Forms.Padding(2); - this.btnUnitsMMOL.Name = "btnUnitsMMOL"; - this.btnUnitsMMOL.Size = new System.Drawing.Size(71, 21); - this.btnUnitsMMOL.TabIndex = 3; - this.btnUnitsMMOL.TabStop = true; - this.btnUnitsMMOL.Text = "mmol/L"; - this.btnUnitsMMOL.UseVisualStyleBackColor = true; - this.btnUnitsMMOL.CheckedChanged += new System.EventHandler(this.GlucoseUnit_Changed); - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label11.Location = new System.Drawing.Point(12, 82); - this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(40, 17); - this.label11.TabIndex = 2; - this.label11.Text = "Units"; - // - // lblDataSourceLocation - // - this.lblDataSourceLocation.AutoSize = true; - this.lblDataSourceLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblDataSourceLocation.Location = new System.Drawing.Point(12, 56); - this.lblDataSourceLocation.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblDataSourceLocation.Name = "lblDataSourceLocation"; - this.lblDataSourceLocation.Size = new System.Drawing.Size(212, 17); - this.lblDataSourceLocation.TabIndex = 1; - this.lblDataSourceLocation.Text = "Your Nightscout installation URL"; - // - // btnVerifySubmit - // - this.btnVerifySubmit.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnVerifySubmit.Location = new System.Drawing.Point(9, 511); - this.btnVerifySubmit.Margin = new System.Windows.Forms.Padding(2); - this.btnVerifySubmit.Name = "btnVerifySubmit"; - this.btnVerifySubmit.Size = new System.Drawing.Size(172, 43); - this.btnVerifySubmit.TabIndex = 1; - this.btnVerifySubmit.Text = "Verify and continue"; - this.btnVerifySubmit.UseVisualStyleBackColor = true; - this.btnVerifySubmit.Click += new System.EventHandler(this.btnVerifySubmit_Click); - // - // panel2 - // - this.panel2.Controls.Add(this.grpAlarmSettings); - this.panel2.Controls.Add(this.groupBox1); - this.panel2.Location = new System.Drawing.Point(4, 5); - this.panel2.Margin = new System.Windows.Forms.Padding(2); - this.panel2.Name = "panel2"; - this.panel2.Padding = new System.Windows.Forms.Padding(38, 8, 38, 8); - this.panel2.Size = new System.Drawing.Size(652, 463); - this.panel2.TabIndex = 1; - // - // grpAlarmSettings - // - this.grpAlarmSettings.Controls.Add(this.chkEnableSoundAlarms); - this.grpAlarmSettings.Controls.Add(this.label15); - this.grpAlarmSettings.Controls.Add(this.numStaleUrgent); - this.grpAlarmSettings.Controls.Add(this.label13); - this.grpAlarmSettings.Controls.Add(this.label14); - this.grpAlarmSettings.Controls.Add(this.numStaleWarning); - this.grpAlarmSettings.Controls.Add(this.label12); - this.grpAlarmSettings.Controls.Add(this.label5); - this.grpAlarmSettings.Controls.Add(this.numUrgentLow); - this.grpAlarmSettings.Controls.Add(this.numLow); - this.grpAlarmSettings.Controls.Add(this.numHigh); - this.grpAlarmSettings.Controls.Add(this.numUrgentHigh); - this.grpAlarmSettings.Controls.Add(this.label4); - this.grpAlarmSettings.Controls.Add(this.label3); - this.grpAlarmSettings.Controls.Add(this.label2); - this.grpAlarmSettings.Controls.Add(this.label1); - this.grpAlarmSettings.Controls.Add(this.btnDisableAlarms); - this.grpAlarmSettings.Controls.Add(this.btnEnableAlarms); - this.grpAlarmSettings.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.grpAlarmSettings.Location = new System.Drawing.Point(18, 221); - this.grpAlarmSettings.Margin = new System.Windows.Forms.Padding(2); - this.grpAlarmSettings.Name = "grpAlarmSettings"; - this.grpAlarmSettings.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); - this.grpAlarmSettings.Size = new System.Drawing.Size(630, 232); - this.grpAlarmSettings.TabIndex = 2; - this.grpAlarmSettings.TabStop = false; - this.grpAlarmSettings.Text = "Alarm settings"; - // - // chkEnableSoundAlarms - // - this.chkEnableSoundAlarms.AutoSize = true; - this.chkEnableSoundAlarms.Location = new System.Drawing.Point(328, 33); - this.chkEnableSoundAlarms.Margin = new System.Windows.Forms.Padding(2); - this.chkEnableSoundAlarms.Name = "chkEnableSoundAlarms"; - this.chkEnableSoundAlarms.Size = new System.Drawing.Size(15, 14); - this.chkEnableSoundAlarms.TabIndex = 19; - this.chkEnableSoundAlarms.UseVisualStyleBackColor = true; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label15.Location = new System.Drawing.Point(346, 31); - this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(141, 17); - this.label15.TabIndex = 18; - this.label15.Text = "Enable sound alarms"; - // - // numStaleUrgent - // - this.numStaleUrgent.Location = new System.Drawing.Point(292, 201); - this.numStaleUrgent.Margin = new System.Windows.Forms.Padding(2); - this.numStaleUrgent.Maximum = new decimal(new int[] { - 650, - 0, - 0, - 0}); - this.numStaleUrgent.Minimum = new decimal(new int[] { - 2, - 0, - 0, - 0}); - this.numStaleUrgent.Name = "numStaleUrgent"; - this.numStaleUrgent.Size = new System.Drawing.Size(90, 23); - this.numStaleUrgent.TabIndex = 17; - this.numStaleUrgent.Value = new decimal(new int[] { - 7, - 0, - 0, - 0}); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.Location = new System.Drawing.Point(387, 179); - this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(57, 17); - this.label13.TabIndex = 16; - this.label13.Text = "minutes"; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label14.Location = new System.Drawing.Point(387, 202); - this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(57, 17); - this.label14.TabIndex = 15; - this.label14.Text = "minutes"; - // - // numStaleWarning - // - this.numStaleWarning.Location = new System.Drawing.Point(292, 173); - this.numStaleWarning.Margin = new System.Windows.Forms.Padding(2); - this.numStaleWarning.Maximum = new decimal(new int[] { - 650, - 0, - 0, - 0}); - this.numStaleWarning.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numStaleWarning.Name = "numStaleWarning"; - this.numStaleWarning.Size = new System.Drawing.Size(90, 23); - this.numStaleWarning.TabIndex = 12; - this.numStaleWarning.Value = new decimal(new int[] { - 3, - 0, - 0, - 0}); - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label12.Location = new System.Drawing.Point(12, 206); - this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(117, 17); - this.label12.TabIndex = 11; - this.label12.Text = "Stale data urgent"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(12, 179); - this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(125, 17); - this.label5.TabIndex = 10; - this.label5.Text = "Stale data warning"; - // - // numUrgentLow - // - this.numUrgentLow.DecimalPlaces = 1; - this.numUrgentLow.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.numUrgentLow.Location = new System.Drawing.Point(292, 145); - this.numUrgentLow.Margin = new System.Windows.Forms.Padding(2); - this.numUrgentLow.Maximum = new decimal(new int[] { - 650, - 0, - 0, - 0}); - this.numUrgentLow.Name = "numUrgentLow"; - this.numUrgentLow.Size = new System.Drawing.Size(90, 23); - this.numUrgentLow.TabIndex = 9; - this.numUrgentLow.Value = new decimal(new int[] { - 4, - 0, - 0, - 0}); - // - // numLow - // - this.numLow.DecimalPlaces = 1; - this.numLow.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.numLow.Location = new System.Drawing.Point(292, 118); - this.numLow.Margin = new System.Windows.Forms.Padding(2); - this.numLow.Maximum = new decimal(new int[] { - 650, - 0, - 0, - 0}); - this.numLow.Name = "numLow"; - this.numLow.Size = new System.Drawing.Size(90, 23); - this.numLow.TabIndex = 8; - this.numLow.Value = new decimal(new int[] { - 45, - 0, - 0, - 65536}); - // - // numHigh - // - this.numHigh.DecimalPlaces = 1; - this.numHigh.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.numHigh.Location = new System.Drawing.Point(292, 91); - this.numHigh.Margin = new System.Windows.Forms.Padding(2); - this.numHigh.Maximum = new decimal(new int[] { - 650, - 0, - 0, - 0}); - this.numHigh.Name = "numHigh"; - this.numHigh.Size = new System.Drawing.Size(90, 23); - this.numHigh.TabIndex = 7; - this.numHigh.Value = new decimal(new int[] { - 11, - 0, - 0, - 0}); - // - // numUrgentHigh - // - this.numUrgentHigh.DecimalPlaces = 1; - this.numUrgentHigh.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.numUrgentHigh.Location = new System.Drawing.Point(292, 64); - this.numUrgentHigh.Margin = new System.Windows.Forms.Padding(2); - this.numUrgentHigh.Maximum = new decimal(new int[] { - 650, - 0, - 0, - 0}); - this.numUrgentHigh.Name = "numUrgentHigh"; - this.numUrgentHigh.Size = new System.Drawing.Size(90, 23); - this.numUrgentHigh.TabIndex = 6; - this.numUrgentHigh.Value = new decimal(new int[] { - 13, - 0, - 0, - 0}); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(12, 150); - this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(114, 17); - this.label4.TabIndex = 5; - this.label4.Text = "Urgent low alarm"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(12, 124); - this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(73, 17); - this.label3.TabIndex = 4; - this.label3.Text = "Low Alarm"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(12, 97); - this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(77, 17); - this.label2.TabIndex = 3; - this.label2.Text = "High Alarm"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(12, 70); - this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(124, 17); - this.label1.TabIndex = 2; - this.label1.Text = "Urgent High Alarm"; - // - // btnDisableAlarms - // - this.btnDisableAlarms.AutoSize = true; - this.btnDisableAlarms.Checked = true; - this.btnDisableAlarms.Location = new System.Drawing.Point(14, 29); - this.btnDisableAlarms.Margin = new System.Windows.Forms.Padding(2); - this.btnDisableAlarms.Name = "btnDisableAlarms"; - this.btnDisableAlarms.Size = new System.Drawing.Size(119, 21); - this.btnDisableAlarms.TabIndex = 1; - this.btnDisableAlarms.TabStop = true; - this.btnDisableAlarms.Text = "Disable alarms"; - this.btnDisableAlarms.UseVisualStyleBackColor = true; - // - // btnEnableAlarms - // - this.btnEnableAlarms.AutoSize = true; - this.btnEnableAlarms.Location = new System.Drawing.Point(175, 29); - this.btnEnableAlarms.Margin = new System.Windows.Forms.Padding(2); - this.btnEnableAlarms.Name = "btnEnableAlarms"; - this.btnEnableAlarms.Size = new System.Drawing.Size(116, 21); - this.btnEnableAlarms.TabIndex = 0; - this.btnEnableAlarms.Text = "Enable alarms"; - this.btnEnableAlarms.UseVisualStyleBackColor = true; - this.btnEnableAlarms.CheckedChanged += new System.EventHandler(this.btnEnableAlarms_CheckedChanged); - // - // label6 - // - this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.Location = new System.Drawing.Point(195, 509); - this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(473, 46); - this.label6.TabIndex = 3; - this.label6.Text = "NB! To show this window again, right click the app or tray icon and choose \"Setti" + - "ngs\"."; - // - // tabSettings - // - this.tabSettings.Controls.Add(this.tabPageBasic); - this.tabSettings.Controls.Add(this.tabPageAdvanced); - this.tabSettings.Location = new System.Drawing.Point(9, 10); - this.tabSettings.Margin = new System.Windows.Forms.Padding(2); - this.tabSettings.Name = "tabSettings"; - this.tabSettings.SelectedIndex = 0; - this.tabSettings.Size = new System.Drawing.Size(678, 496); - this.tabSettings.TabIndex = 0; - this.tabSettings.Text = "30"; - // - // tabPageBasic - // - this.tabPageBasic.BackColor = System.Drawing.SystemColors.Control; - this.tabPageBasic.Controls.Add(this.panel2); - this.tabPageBasic.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabPageBasic.Location = new System.Drawing.Point(4, 22); - this.tabPageBasic.Margin = new System.Windows.Forms.Padding(2); - this.tabPageBasic.Name = "tabPageBasic"; - this.tabPageBasic.Padding = new System.Windows.Forms.Padding(2); - this.tabPageBasic.Size = new System.Drawing.Size(670, 470); - this.tabPageBasic.TabIndex = 0; - this.tabPageBasic.Text = "Basic Settings"; - // - // tabPageAdvanced - // - this.tabPageAdvanced.BackColor = System.Drawing.SystemColors.Control; - this.tabPageAdvanced.Controls.Add(this.groupBox2); - this.tabPageAdvanced.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabPageAdvanced.Location = new System.Drawing.Point(4, 22); - this.tabPageAdvanced.Margin = new System.Windows.Forms.Padding(2); - this.tabPageAdvanced.Name = "tabPageAdvanced"; - this.tabPageAdvanced.Padding = new System.Windows.Forms.Padding(2); - this.tabPageAdvanced.Size = new System.Drawing.Size(670, 470); - this.tabPageAdvanced.TabIndex = 1; - this.tabPageAdvanced.Text = "Advanced Settings"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.label21); - this.groupBox2.Controls.Add(this.chkEnableInvertedTrayIcon); - this.groupBox2.Controls.Add(this.label20); - this.groupBox2.Controls.Add(this.cbImageLayouts); - this.groupBox2.Controls.Add(this.label24); - this.groupBox2.Controls.Add(this.btnBrowseBackImage); - this.groupBox2.Controls.Add(this.txtBackImage); - this.groupBox2.Controls.Add(this.label23); - this.groupBox2.Controls.Add(this.txtBackColor); - this.groupBox2.Controls.Add(this.label22); - this.groupBox2.Controls.Add(this.label18); - this.groupBox2.Controls.Add(this.numOpacity); - this.groupBox2.Controls.Add(this.label17); - this.groupBox2.Controls.Add(this.chkDisableSoundOnWorkstationLock); - this.groupBox2.Controls.Add(this.label16); - this.groupBox2.Controls.Add(this.chkEnableRAWGlucose); - this.groupBox2.Controls.Add(this.label10); - this.groupBox2.Controls.Add(this.numScaling); - this.groupBox2.Controls.Add(this.chkEnableExceptions); - this.groupBox2.Controls.Add(this.label9); - this.groupBox2.Controls.Add(this.label8); - this.groupBox2.Controls.Add(this.numRefreshInterval); - this.groupBox2.Controls.Add(this.label7); - this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.groupBox2.Location = new System.Drawing.Point(26, 15); - this.groupBox2.Margin = new System.Windows.Forms.Padding(2); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); - this.groupBox2.Size = new System.Drawing.Size(630, 435); - this.groupBox2.TabIndex = 1; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Advanced application settings (requires restart)"; - // - // cbImageLayouts - // - this.cbImageLayouts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbImageLayouts.FormattingEnabled = true; - this.cbImageLayouts.Location = new System.Drawing.Point(289, 285); - this.cbImageLayouts.Margin = new System.Windows.Forms.Padding(2); - this.cbImageLayouts.Name = "cbImageLayouts"; - this.cbImageLayouts.Size = new System.Drawing.Size(135, 25); - this.cbImageLayouts.TabIndex = 25; - // - // label24 - // - this.label24.AutoSize = true; - this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label24.Location = new System.Drawing.Point(28, 291); - this.label24.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(173, 17); - this.label24.TabIndex = 24; - this.label24.Text = "Background Image Layout"; - // - // btnBrowseBackImage - // - this.btnBrowseBackImage.BackColor = System.Drawing.Color.Transparent; - this.btnBrowseBackImage.FlatAppearance.BorderSize = 0; - this.btnBrowseBackImage.Location = new System.Drawing.Point(448, 252); - this.btnBrowseBackImage.Margin = new System.Windows.Forms.Padding(2); - this.btnBrowseBackImage.Name = "btnBrowseBackImage"; - this.btnBrowseBackImage.Size = new System.Drawing.Size(80, 28); - this.btnBrowseBackImage.TabIndex = 23; - this.btnBrowseBackImage.Text = "Browse.."; - this.btnBrowseBackImage.UseVisualStyleBackColor = false; - this.btnBrowseBackImage.Click += new System.EventHandler(this.btnBrowseBackImage_Click); - // - // txtBackImage - // - this.txtBackImage.Anchor = System.Windows.Forms.AnchorStyles.None; - this.txtBackImage.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtBackImage.Location = new System.Drawing.Point(168, 255); - this.txtBackImage.Margin = new System.Windows.Forms.Padding(2); - this.txtBackImage.MaximumSize = new System.Drawing.Size(256, 28); - this.txtBackImage.MinimumSize = new System.Drawing.Size(218, 20); - this.txtBackImage.Name = "txtBackImage"; - this.txtBackImage.Size = new System.Drawing.Size(256, 23); - this.txtBackImage.TabIndex = 22; - this.txtBackImage.WordWrap = false; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label23.Location = new System.Drawing.Point(28, 255); - this.label23.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(126, 17); - this.label23.TabIndex = 21; - this.label23.Text = "Background Image"; - // - // txtBackColor - // - this.txtBackColor.Location = new System.Drawing.Point(312, 222); - this.txtBackColor.Margin = new System.Windows.Forms.Padding(2); - this.txtBackColor.Name = "txtBackColor"; - this.txtBackColor.ReadOnly = true; - this.txtBackColor.Size = new System.Drawing.Size(112, 23); - this.txtBackColor.TabIndex = 20; - this.txtBackColor.Click += new System.EventHandler(this.txtBackColor_Click); - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label22.Location = new System.Drawing.Point(28, 222); - this.label22.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(121, 17); - this.label22.TabIndex = 19; - this.label22.Text = "Background Color"; - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label18.Location = new System.Drawing.Point(428, 97); - this.label18.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(20, 17); - this.label18.TabIndex = 18; - this.label18.Text = "%"; - // - // numOpacity - // - this.numOpacity.Location = new System.Drawing.Point(333, 95); - this.numOpacity.Margin = new System.Windows.Forms.Padding(2); - this.numOpacity.Name = "numOpacity"; - this.numOpacity.Size = new System.Drawing.Size(90, 23); - this.numOpacity.TabIndex = 17; - this.numOpacity.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label17.Location = new System.Drawing.Point(28, 101); - this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(81, 17); - this.label17.TabIndex = 16; - this.label17.Text = "GUI opacity"; - // - // chkDisableSoundOnWorkstationLock - // - this.chkDisableSoundOnWorkstationLock.AutoSize = true; - this.chkDisableSoundOnWorkstationLock.Location = new System.Drawing.Point(410, 191); - this.chkDisableSoundOnWorkstationLock.Margin = new System.Windows.Forms.Padding(2); - this.chkDisableSoundOnWorkstationLock.Name = "chkDisableSoundOnWorkstationLock"; - this.chkDisableSoundOnWorkstationLock.Size = new System.Drawing.Size(15, 14); - this.chkDisableSoundOnWorkstationLock.TabIndex = 15; - this.chkDisableSoundOnWorkstationLock.UseVisualStyleBackColor = true; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label16.Location = new System.Drawing.Point(28, 191); - this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(353, 17); - this.label16.TabIndex = 14; - this.label16.Text = "Temporarily disable sounds when workstation is locked"; - // - // chkEnableRAWGlucose - // - this.chkEnableRAWGlucose.AutoSize = true; - this.chkEnableRAWGlucose.Location = new System.Drawing.Point(410, 162); - this.chkEnableRAWGlucose.Margin = new System.Windows.Forms.Padding(2); - this.chkEnableRAWGlucose.Name = "chkEnableRAWGlucose"; - this.chkEnableRAWGlucose.Size = new System.Drawing.Size(15, 14); - this.chkEnableRAWGlucose.TabIndex = 13; - this.chkEnableRAWGlucose.UseVisualStyleBackColor = true; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.Location = new System.Drawing.Point(28, 163); - this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(240, 17); - this.label10.TabIndex = 12; - this.label10.Text = "Enable display of raw glucose values"; - // - // numScaling - // - this.numScaling.DecimalPlaces = 1; - this.numScaling.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.numScaling.Location = new System.Drawing.Point(333, 66); - this.numScaling.Margin = new System.Windows.Forms.Padding(2); - this.numScaling.Name = "numScaling"; - this.numScaling.Size = new System.Drawing.Size(90, 23); - this.numScaling.TabIndex = 11; - this.numScaling.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // chkEnableExceptions - // - this.chkEnableExceptions.AutoSize = true; - this.chkEnableExceptions.Location = new System.Drawing.Point(410, 131); - this.chkEnableExceptions.Margin = new System.Windows.Forms.Padding(2); - this.chkEnableExceptions.Name = "chkEnableExceptions"; - this.chkEnableExceptions.Size = new System.Drawing.Size(15, 14); - this.chkEnableExceptions.TabIndex = 10; - this.chkEnableExceptions.UseVisualStyleBackColor = true; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.Location = new System.Drawing.Point(28, 128); - this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(223, 17); - this.label9.TabIndex = 9; - this.label9.Text = "Enable exception logging to stderr"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label8.Location = new System.Drawing.Point(28, 72); - this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(114, 17); - this.label8.TabIndex = 8; - this.label8.Text = "GUI Scaling ratio"; - // - // numRefreshInterval - // - this.numRefreshInterval.Location = new System.Drawing.Point(333, 37); - this.numRefreshInterval.Margin = new System.Windows.Forms.Padding(2); - this.numRefreshInterval.Minimum = new decimal(new int[] { - 2, - 0, - 0, - 0}); - this.numRefreshInterval.Name = "numRefreshInterval"; - this.numRefreshInterval.Size = new System.Drawing.Size(90, 23); - this.numRefreshInterval.TabIndex = 7; - this.numRefreshInterval.Value = new decimal(new int[] { - 60, - 0, - 0, - 0}); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.Location = new System.Drawing.Point(28, 42); - this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(136, 17); - this.label7.TabIndex = 1; - this.label7.Text = "GUI Refresh interval"; - // - // lblVersionInfo - // - this.lblVersionInfo.AutoSize = true; - this.lblVersionInfo.Enabled = false; - this.lblVersionInfo.ForeColor = System.Drawing.Color.SeaGreen; - this.lblVersionInfo.Location = new System.Drawing.Point(9, 566); - this.lblVersionInfo.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblVersionInfo.Name = "lblVersionInfo"; - this.lblVersionInfo.Size = new System.Drawing.Size(70, 13); - this.lblVersionInfo.TabIndex = 4; - this.lblVersionInfo.Text = "lblVersionInfo"; - // - // lblAck - // - this.lblAck.AutoSize = true; - this.lblAck.Enabled = false; - this.lblAck.ForeColor = System.Drawing.Color.SeaGreen; - this.lblAck.Location = new System.Drawing.Point(10, 586); - this.lblAck.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.lblAck.Name = "lblAck"; - this.lblAck.Size = new System.Drawing.Size(40, 13); - this.lblAck.TabIndex = 5; - this.lblAck.Text = "Acks..."; - // - // chkEnableInvertedTrayIcon - // - this.chkEnableInvertedTrayIcon.AutoSize = true; - this.chkEnableInvertedTrayIcon.Location = new System.Drawing.Point(410, 329); - this.chkEnableInvertedTrayIcon.Margin = new System.Windows.Forms.Padding(2); - this.chkEnableInvertedTrayIcon.Name = "chkEnableInvertedTrayIcon"; - this.chkEnableInvertedTrayIcon.Size = new System.Drawing.Size(15, 14); - this.chkEnableInvertedTrayIcon.TabIndex = 27; - this.chkEnableInvertedTrayIcon.UseVisualStyleBackColor = true; - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label20.Location = new System.Drawing.Point(28, 329); - this.label20.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(138, 17); - this.label20.TabIndex = 26; - this.label20.Text = "Use inverted try icon"; - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label21.Location = new System.Drawing.Point(427, 42); - this.label21.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(30, 17); - this.label21.TabIndex = 28; - this.label21.Text = "sec"; - // - // FormGlucoseSettings - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(725, 607); - this.Controls.Add(this.lblAck); - this.Controls.Add(this.lblVersionInfo); - this.Controls.Add(this.label6); - this.Controls.Add(this.tabSettings); - this.Controls.Add(this.btnVerifySubmit); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Margin = new System.Windows.Forms.Padding(2); - this.Name = "FormGlucoseSettings"; - this.Text = "Glucose Settings"; - this.Load += new System.EventHandler(this.FormGlucoseSettings_Load); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.paneUserNamePassword.ResumeLayout(false); - this.paneUserNamePassword.PerformLayout(); - this.panel2.ResumeLayout(false); - this.grpAlarmSettings.ResumeLayout(false); - this.grpAlarmSettings.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numStaleUrgent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numStaleWarning)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numUrgentLow)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLow)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numHigh)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numUrgentHigh)).EndInit(); - this.tabSettings.ResumeLayout(false); - this.tabPageBasic.ResumeLayout(false); - this.tabPageAdvanced.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numOpacity)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numScaling)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numRefreshInterval)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Button btnVerifySubmit; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.GroupBox grpAlarmSettings; - private System.Windows.Forms.RadioButton btnDisableAlarms; - private System.Windows.Forms.RadioButton btnEnableAlarms; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.NumericUpDown numUrgentLow; - private System.Windows.Forms.NumericUpDown numLow; - private System.Windows.Forms.NumericUpDown numHigh; - private System.Windows.Forms.NumericUpDown numUrgentHigh; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TabControl tabSettings; - private System.Windows.Forms.TabPage tabPageBasic; - private System.Windows.Forms.TabPage tabPageAdvanced; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.NumericUpDown numRefreshInterval; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.CheckBox chkEnableExceptions; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.NumericUpDown numScaling; - private System.Windows.Forms.CheckBox chkEnableRAWGlucose; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.NumericUpDown numStaleUrgent; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.NumericUpDown numStaleWarning; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.CheckBox chkEnableSoundAlarms; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.CheckBox chkDisableSoundOnWorkstationLock; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.NumericUpDown numOpacity; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label lblVersionInfo; - private System.Windows.Forms.ComboBox cbDataSource; - private System.Windows.Forms.Label label19; - public System.Windows.Forms.Label lblDataSourceLocation; - public System.Windows.Forms.TextBox txtDataSourceLocation; - public System.Windows.Forms.RadioButton btnUnitsMGDL; - public System.Windows.Forms.RadioButton btnUnitsMMOL; - private System.Windows.Forms.Button btnBrowse; - private System.Windows.Forms.TableLayoutPanel tblpDataSourceLocations; - public System.Windows.Forms.TextBox txtUserName; - public System.Windows.Forms.TextBox txtPassword; - private System.Windows.Forms.Panel paneUserNamePassword; - private System.Windows.Forms.Label lblAck; - private System.Windows.Forms.TextBox txtBackColor; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.ColorDialog clrBack; - private System.Windows.Forms.Button btnBrowseBackImage; - public System.Windows.Forms.TextBox txtBackImage; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.ComboBox cbImageLayouts; - private System.Windows.Forms.Label label24; - public System.Windows.Forms.Label lblUsername; - public System.Windows.Forms.Label lblPassword; - private System.Windows.Forms.Label label21; - private System.Windows.Forms.CheckBox chkEnableInvertedTrayIcon; - private System.Windows.Forms.Label label20; - } -} +namespace FloatingGlucose +{ + partial class FormGlucoseSettings + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.paneUserNamePassword = new System.Windows.Forms.Panel(); + this.txtPassword = new System.Windows.Forms.TextBox(); + this.txtUserName = new System.Windows.Forms.TextBox(); + this.lblUsername = new System.Windows.Forms.Label(); + this.lblPassword = new System.Windows.Forms.Label(); + this.txtDataSourceLocation = new System.Windows.Forms.TextBox(); + this.btnBrowse = new System.Windows.Forms.Button(); + this.cbDataSource = new System.Windows.Forms.ComboBox(); + this.tblpDataSourceLocations = new System.Windows.Forms.TableLayoutPanel(); + this.label19 = new System.Windows.Forms.Label(); + this.btnUnitsMGDL = new System.Windows.Forms.RadioButton(); + this.btnUnitsMMOL = new System.Windows.Forms.RadioButton(); + this.label11 = new System.Windows.Forms.Label(); + this.lblDataSourceLocation = new System.Windows.Forms.Label(); + this.btnVerifySubmit = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.grpAlarmSettings = new System.Windows.Forms.GroupBox(); + this.chkEnableSoundAlarms = new System.Windows.Forms.CheckBox(); + this.label15 = new System.Windows.Forms.Label(); + this.numStaleUrgent = new System.Windows.Forms.NumericUpDown(); + this.label13 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.numStaleWarning = new System.Windows.Forms.NumericUpDown(); + this.label12 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.numUrgentLow = new System.Windows.Forms.NumericUpDown(); + this.numLow = new System.Windows.Forms.NumericUpDown(); + this.numHigh = new System.Windows.Forms.NumericUpDown(); + this.numUrgentHigh = new System.Windows.Forms.NumericUpDown(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnDisableAlarms = new System.Windows.Forms.RadioButton(); + this.btnEnableAlarms = new System.Windows.Forms.RadioButton(); + this.label6 = new System.Windows.Forms.Label(); + this.tabSettings = new System.Windows.Forms.TabControl(); + this.tabPageBasic = new System.Windows.Forms.TabPage(); + this.tabPageAdvanced = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnBrowseBackColor = new System.Windows.Forms.Button(); + this.radioBtnBackgroundImage = new System.Windows.Forms.RadioButton(); + this.radioBtnBackgroundColor = new System.Windows.Forms.RadioButton(); + this.label25 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.chkEnableInvertedTrayIcon = new System.Windows.Forms.CheckBox(); + this.label20 = new System.Windows.Forms.Label(); + this.cbImageLayouts = new System.Windows.Forms.ComboBox(); + this.label24 = new System.Windows.Forms.Label(); + this.btnBrowseBackImage = new System.Windows.Forms.Button(); + this.txtBackImage = new System.Windows.Forms.TextBox(); + this.txtBackColor = new System.Windows.Forms.TextBox(); + this.label18 = new System.Windows.Forms.Label(); + this.numOpacity = new System.Windows.Forms.NumericUpDown(); + this.label17 = new System.Windows.Forms.Label(); + this.chkDisableSoundOnWorkstationLock = new System.Windows.Forms.CheckBox(); + this.label16 = new System.Windows.Forms.Label(); + this.chkEnableRAWGlucose = new System.Windows.Forms.CheckBox(); + this.label10 = new System.Windows.Forms.Label(); + this.numScaling = new System.Windows.Forms.NumericUpDown(); + this.chkEnableExceptions = new System.Windows.Forms.CheckBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.numRefreshInterval = new System.Windows.Forms.NumericUpDown(); + this.label7 = new System.Windows.Forms.Label(); + this.lblVersionInfo = new System.Windows.Forms.Label(); + this.lblAck = new System.Windows.Forms.Label(); + this.clrBack = new System.Windows.Forms.ColorDialog(); + this.groupBox1.SuspendLayout(); + this.paneUserNamePassword.SuspendLayout(); + this.panel2.SuspendLayout(); + this.grpAlarmSettings.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numStaleUrgent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numStaleWarning)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUrgentLow)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLow)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHigh)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUrgentHigh)).BeginInit(); + this.tabSettings.SuspendLayout(); + this.tabPageBasic.SuspendLayout(); + this.tabPageAdvanced.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numOpacity)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numScaling)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numRefreshInterval)).BeginInit(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.paneUserNamePassword); + this.groupBox1.Controls.Add(this.txtDataSourceLocation); + this.groupBox1.Controls.Add(this.btnBrowse); + this.groupBox1.Controls.Add(this.cbDataSource); + this.groupBox1.Controls.Add(this.tblpDataSourceLocations); + this.groupBox1.Controls.Add(this.label19); + this.groupBox1.Controls.Add(this.btnUnitsMGDL); + this.groupBox1.Controls.Add(this.btnUnitsMMOL); + this.groupBox1.Controls.Add(this.label11); + this.groupBox1.Controls.Add(this.lblDataSourceLocation); + this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.groupBox1.Location = new System.Drawing.Point(18, 11); + this.groupBox1.Margin = new System.Windows.Forms.Padding(2); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); + this.groupBox1.Size = new System.Drawing.Size(630, 194); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Nightscout settings"; + // + // paneUserNamePassword + // + this.paneUserNamePassword.Controls.Add(this.txtPassword); + this.paneUserNamePassword.Controls.Add(this.txtUserName); + this.paneUserNamePassword.Controls.Add(this.lblUsername); + this.paneUserNamePassword.Controls.Add(this.lblPassword); + this.paneUserNamePassword.Enabled = false; + this.paneUserNamePassword.Location = new System.Drawing.Point(7, 103); + this.paneUserNamePassword.Margin = new System.Windows.Forms.Padding(2); + this.paneUserNamePassword.Name = "paneUserNamePassword"; + this.paneUserNamePassword.Size = new System.Drawing.Size(619, 89); + this.paneUserNamePassword.TabIndex = 14; + // + // txtPassword + // + this.txtPassword.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtPassword.Location = new System.Drawing.Point(247, 50); + this.txtPassword.Margin = new System.Windows.Forms.Padding(2); + this.txtPassword.MaximumSize = new System.Drawing.Size(256, 28); + this.txtPassword.MinimumSize = new System.Drawing.Size(218, 20); + this.txtPassword.Name = "txtPassword"; + this.txtPassword.PasswordChar = '*'; + this.txtPassword.Size = new System.Drawing.Size(256, 23); + this.txtPassword.TabIndex = 10; + this.txtPassword.UseSystemPasswordChar = true; + this.txtPassword.WordWrap = false; + // + // txtUserName + // + this.txtUserName.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtUserName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtUserName.Location = new System.Drawing.Point(247, 17); + this.txtUserName.Margin = new System.Windows.Forms.Padding(2); + this.txtUserName.MaximumSize = new System.Drawing.Size(256, 28); + this.txtUserName.MinimumSize = new System.Drawing.Size(218, 20); + this.txtUserName.Name = "txtUserName"; + this.txtUserName.Size = new System.Drawing.Size(256, 23); + this.txtUserName.TabIndex = 9; + this.txtUserName.WordWrap = false; + // + // lblUsername + // + this.lblUsername.AutoSize = true; + this.lblUsername.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblUsername.Location = new System.Drawing.Point(5, 20); + this.lblUsername.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblUsername.Name = "lblUsername"; + this.lblUsername.Size = new System.Drawing.Size(79, 17); + this.lblUsername.TabIndex = 11; + this.lblUsername.Text = "User Name"; + // + // lblPassword + // + this.lblPassword.AutoSize = true; + this.lblPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblPassword.Location = new System.Drawing.Point(5, 50); + this.lblPassword.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblPassword.Name = "lblPassword"; + this.lblPassword.Size = new System.Drawing.Size(69, 17); + this.lblPassword.TabIndex = 12; + this.lblPassword.Text = "Password"; + // + // txtDataSourceLocation + // + this.txtDataSourceLocation.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtDataSourceLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtDataSourceLocation.Location = new System.Drawing.Point(254, 56); + this.txtDataSourceLocation.Margin = new System.Windows.Forms.Padding(2); + this.txtDataSourceLocation.MaximumSize = new System.Drawing.Size(256, 28); + this.txtDataSourceLocation.MinimumSize = new System.Drawing.Size(218, 20); + this.txtDataSourceLocation.Name = "txtDataSourceLocation"; + this.txtDataSourceLocation.Size = new System.Drawing.Size(256, 23); + this.txtDataSourceLocation.TabIndex = 0; + this.txtDataSourceLocation.Text = "https://mysite.azurewebsites.net"; + this.txtDataSourceLocation.WordWrap = false; + // + // btnBrowse + // + this.btnBrowse.BackColor = System.Drawing.Color.Transparent; + this.btnBrowse.FlatAppearance.BorderSize = 0; + this.btnBrowse.Location = new System.Drawing.Point(525, 46); + this.btnBrowse.Margin = new System.Windows.Forms.Padding(2); + this.btnBrowse.Name = "btnBrowse"; + this.btnBrowse.Size = new System.Drawing.Size(80, 28); + this.btnBrowse.TabIndex = 7; + this.btnBrowse.Text = "Browse.."; + this.btnBrowse.UseVisualStyleBackColor = false; + this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); + // + // cbDataSource + // + this.cbDataSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbDataSource.FormattingEnabled = true; + this.cbDataSource.Location = new System.Drawing.Point(254, 21); + this.cbDataSource.Margin = new System.Windows.Forms.Padding(2); + this.cbDataSource.Name = "cbDataSource"; + this.cbDataSource.Size = new System.Drawing.Size(256, 25); + this.cbDataSource.TabIndex = 6; + this.cbDataSource.SelectedIndexChanged += new System.EventHandler(this.cbDataSource_SelectedIndexChanged); + // + // tblpDataSourceLocations + // + this.tblpDataSourceLocations.AutoSize = true; + this.tblpDataSourceLocations.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tblpDataSourceLocations.ColumnCount = 2; + this.tblpDataSourceLocations.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tblpDataSourceLocations.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tblpDataSourceLocations.Location = new System.Drawing.Point(341, 49); + this.tblpDataSourceLocations.Margin = new System.Windows.Forms.Padding(2); + this.tblpDataSourceLocations.Name = "tblpDataSourceLocations"; + this.tblpDataSourceLocations.RowCount = 1; + this.tblpDataSourceLocations.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tblpDataSourceLocations.Size = new System.Drawing.Size(0, 0); + this.tblpDataSourceLocations.TabIndex = 8; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label19.Location = new System.Drawing.Point(10, 28); + this.label19.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(81, 17); + this.label19.TabIndex = 5; + this.label19.Text = "Datasource"; + // + // btnUnitsMGDL + // + this.btnUnitsMGDL.AutoSize = true; + this.btnUnitsMGDL.Location = new System.Drawing.Point(332, 79); + this.btnUnitsMGDL.Margin = new System.Windows.Forms.Padding(2); + this.btnUnitsMGDL.Name = "btnUnitsMGDL"; + this.btnUnitsMGDL.Size = new System.Drawing.Size(65, 21); + this.btnUnitsMGDL.TabIndex = 4; + this.btnUnitsMGDL.Text = "mg/dL"; + this.btnUnitsMGDL.UseVisualStyleBackColor = true; + // + // btnUnitsMMOL + // + this.btnUnitsMMOL.AutoSize = true; + this.btnUnitsMMOL.Checked = true; + this.btnUnitsMMOL.Location = new System.Drawing.Point(254, 79); + this.btnUnitsMMOL.Margin = new System.Windows.Forms.Padding(2); + this.btnUnitsMMOL.Name = "btnUnitsMMOL"; + this.btnUnitsMMOL.Size = new System.Drawing.Size(71, 21); + this.btnUnitsMMOL.TabIndex = 3; + this.btnUnitsMMOL.TabStop = true; + this.btnUnitsMMOL.Text = "mmol/L"; + this.btnUnitsMMOL.UseVisualStyleBackColor = true; + this.btnUnitsMMOL.CheckedChanged += new System.EventHandler(this.GlucoseUnit_Changed); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label11.Location = new System.Drawing.Point(12, 82); + this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(40, 17); + this.label11.TabIndex = 2; + this.label11.Text = "Units"; + // + // lblDataSourceLocation + // + this.lblDataSourceLocation.AutoSize = true; + this.lblDataSourceLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblDataSourceLocation.Location = new System.Drawing.Point(12, 56); + this.lblDataSourceLocation.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblDataSourceLocation.Name = "lblDataSourceLocation"; + this.lblDataSourceLocation.Size = new System.Drawing.Size(212, 17); + this.lblDataSourceLocation.TabIndex = 1; + this.lblDataSourceLocation.Text = "Your Nightscout installation URL"; + // + // btnVerifySubmit + // + this.btnVerifySubmit.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnVerifySubmit.Location = new System.Drawing.Point(9, 511); + this.btnVerifySubmit.Margin = new System.Windows.Forms.Padding(2); + this.btnVerifySubmit.Name = "btnVerifySubmit"; + this.btnVerifySubmit.Size = new System.Drawing.Size(172, 43); + this.btnVerifySubmit.TabIndex = 1; + this.btnVerifySubmit.Text = "Verify and continue"; + this.btnVerifySubmit.UseVisualStyleBackColor = true; + this.btnVerifySubmit.Click += new System.EventHandler(this.btnVerifySubmit_Click); + // + // panel2 + // + this.panel2.Controls.Add(this.grpAlarmSettings); + this.panel2.Controls.Add(this.groupBox1); + this.panel2.Location = new System.Drawing.Point(4, 5); + this.panel2.Margin = new System.Windows.Forms.Padding(2); + this.panel2.Name = "panel2"; + this.panel2.Padding = new System.Windows.Forms.Padding(38, 8, 38, 8); + this.panel2.Size = new System.Drawing.Size(652, 463); + this.panel2.TabIndex = 1; + // + // grpAlarmSettings + // + this.grpAlarmSettings.Controls.Add(this.chkEnableSoundAlarms); + this.grpAlarmSettings.Controls.Add(this.label15); + this.grpAlarmSettings.Controls.Add(this.numStaleUrgent); + this.grpAlarmSettings.Controls.Add(this.label13); + this.grpAlarmSettings.Controls.Add(this.label14); + this.grpAlarmSettings.Controls.Add(this.numStaleWarning); + this.grpAlarmSettings.Controls.Add(this.label12); + this.grpAlarmSettings.Controls.Add(this.label5); + this.grpAlarmSettings.Controls.Add(this.numUrgentLow); + this.grpAlarmSettings.Controls.Add(this.numLow); + this.grpAlarmSettings.Controls.Add(this.numHigh); + this.grpAlarmSettings.Controls.Add(this.numUrgentHigh); + this.grpAlarmSettings.Controls.Add(this.label4); + this.grpAlarmSettings.Controls.Add(this.label3); + this.grpAlarmSettings.Controls.Add(this.label2); + this.grpAlarmSettings.Controls.Add(this.label1); + this.grpAlarmSettings.Controls.Add(this.btnDisableAlarms); + this.grpAlarmSettings.Controls.Add(this.btnEnableAlarms); + this.grpAlarmSettings.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.grpAlarmSettings.Location = new System.Drawing.Point(18, 221); + this.grpAlarmSettings.Margin = new System.Windows.Forms.Padding(2); + this.grpAlarmSettings.Name = "grpAlarmSettings"; + this.grpAlarmSettings.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); + this.grpAlarmSettings.Size = new System.Drawing.Size(630, 232); + this.grpAlarmSettings.TabIndex = 2; + this.grpAlarmSettings.TabStop = false; + this.grpAlarmSettings.Text = "Alarm settings"; + // + // chkEnableSoundAlarms + // + this.chkEnableSoundAlarms.AutoSize = true; + this.chkEnableSoundAlarms.Location = new System.Drawing.Point(328, 33); + this.chkEnableSoundAlarms.Margin = new System.Windows.Forms.Padding(2); + this.chkEnableSoundAlarms.Name = "chkEnableSoundAlarms"; + this.chkEnableSoundAlarms.Size = new System.Drawing.Size(15, 14); + this.chkEnableSoundAlarms.TabIndex = 19; + this.chkEnableSoundAlarms.UseVisualStyleBackColor = true; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label15.Location = new System.Drawing.Point(346, 31); + this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(141, 17); + this.label15.TabIndex = 18; + this.label15.Text = "Enable sound alarms"; + // + // numStaleUrgent + // + this.numStaleUrgent.Location = new System.Drawing.Point(292, 201); + this.numStaleUrgent.Margin = new System.Windows.Forms.Padding(2); + this.numStaleUrgent.Maximum = new decimal(new int[] { + 650, + 0, + 0, + 0}); + this.numStaleUrgent.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.numStaleUrgent.Name = "numStaleUrgent"; + this.numStaleUrgent.Size = new System.Drawing.Size(90, 23); + this.numStaleUrgent.TabIndex = 17; + this.numStaleUrgent.Value = new decimal(new int[] { + 7, + 0, + 0, + 0}); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.Location = new System.Drawing.Point(387, 179); + this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(57, 17); + this.label13.TabIndex = 16; + this.label13.Text = "minutes"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label14.Location = new System.Drawing.Point(387, 202); + this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(57, 17); + this.label14.TabIndex = 15; + this.label14.Text = "minutes"; + // + // numStaleWarning + // + this.numStaleWarning.Location = new System.Drawing.Point(292, 173); + this.numStaleWarning.Margin = new System.Windows.Forms.Padding(2); + this.numStaleWarning.Maximum = new decimal(new int[] { + 650, + 0, + 0, + 0}); + this.numStaleWarning.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numStaleWarning.Name = "numStaleWarning"; + this.numStaleWarning.Size = new System.Drawing.Size(90, 23); + this.numStaleWarning.TabIndex = 12; + this.numStaleWarning.Value = new decimal(new int[] { + 3, + 0, + 0, + 0}); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label12.Location = new System.Drawing.Point(12, 206); + this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(117, 17); + this.label12.TabIndex = 11; + this.label12.Text = "Stale data urgent"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(12, 179); + this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(125, 17); + this.label5.TabIndex = 10; + this.label5.Text = "Stale data warning"; + // + // numUrgentLow + // + this.numUrgentLow.DecimalPlaces = 1; + this.numUrgentLow.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.numUrgentLow.Location = new System.Drawing.Point(292, 145); + this.numUrgentLow.Margin = new System.Windows.Forms.Padding(2); + this.numUrgentLow.Maximum = new decimal(new int[] { + 650, + 0, + 0, + 0}); + this.numUrgentLow.Name = "numUrgentLow"; + this.numUrgentLow.Size = new System.Drawing.Size(90, 23); + this.numUrgentLow.TabIndex = 9; + this.numUrgentLow.Value = new decimal(new int[] { + 4, + 0, + 0, + 0}); + // + // numLow + // + this.numLow.DecimalPlaces = 1; + this.numLow.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.numLow.Location = new System.Drawing.Point(292, 118); + this.numLow.Margin = new System.Windows.Forms.Padding(2); + this.numLow.Maximum = new decimal(new int[] { + 650, + 0, + 0, + 0}); + this.numLow.Name = "numLow"; + this.numLow.Size = new System.Drawing.Size(90, 23); + this.numLow.TabIndex = 8; + this.numLow.Value = new decimal(new int[] { + 45, + 0, + 0, + 65536}); + // + // numHigh + // + this.numHigh.DecimalPlaces = 1; + this.numHigh.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.numHigh.Location = new System.Drawing.Point(292, 91); + this.numHigh.Margin = new System.Windows.Forms.Padding(2); + this.numHigh.Maximum = new decimal(new int[] { + 650, + 0, + 0, + 0}); + this.numHigh.Name = "numHigh"; + this.numHigh.Size = new System.Drawing.Size(90, 23); + this.numHigh.TabIndex = 7; + this.numHigh.Value = new decimal(new int[] { + 11, + 0, + 0, + 0}); + // + // numUrgentHigh + // + this.numUrgentHigh.DecimalPlaces = 1; + this.numUrgentHigh.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.numUrgentHigh.Location = new System.Drawing.Point(292, 64); + this.numUrgentHigh.Margin = new System.Windows.Forms.Padding(2); + this.numUrgentHigh.Maximum = new decimal(new int[] { + 650, + 0, + 0, + 0}); + this.numUrgentHigh.Name = "numUrgentHigh"; + this.numUrgentHigh.Size = new System.Drawing.Size(90, 23); + this.numUrgentHigh.TabIndex = 6; + this.numUrgentHigh.Value = new decimal(new int[] { + 13, + 0, + 0, + 0}); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(12, 150); + this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(114, 17); + this.label4.TabIndex = 5; + this.label4.Text = "Urgent low alarm"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(12, 124); + this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(73, 17); + this.label3.TabIndex = 4; + this.label3.Text = "Low Alarm"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(12, 97); + this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(77, 17); + this.label2.TabIndex = 3; + this.label2.Text = "High Alarm"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(12, 70); + this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(124, 17); + this.label1.TabIndex = 2; + this.label1.Text = "Urgent High Alarm"; + // + // btnDisableAlarms + // + this.btnDisableAlarms.AutoSize = true; + this.btnDisableAlarms.Checked = true; + this.btnDisableAlarms.Location = new System.Drawing.Point(14, 29); + this.btnDisableAlarms.Margin = new System.Windows.Forms.Padding(2); + this.btnDisableAlarms.Name = "btnDisableAlarms"; + this.btnDisableAlarms.Size = new System.Drawing.Size(119, 21); + this.btnDisableAlarms.TabIndex = 1; + this.btnDisableAlarms.TabStop = true; + this.btnDisableAlarms.Text = "Disable alarms"; + this.btnDisableAlarms.UseVisualStyleBackColor = true; + // + // btnEnableAlarms + // + this.btnEnableAlarms.AutoSize = true; + this.btnEnableAlarms.Location = new System.Drawing.Point(175, 29); + this.btnEnableAlarms.Margin = new System.Windows.Forms.Padding(2); + this.btnEnableAlarms.Name = "btnEnableAlarms"; + this.btnEnableAlarms.Size = new System.Drawing.Size(116, 21); + this.btnEnableAlarms.TabIndex = 0; + this.btnEnableAlarms.Text = "Enable alarms"; + this.btnEnableAlarms.UseVisualStyleBackColor = true; + this.btnEnableAlarms.CheckedChanged += new System.EventHandler(this.btnEnableAlarms_CheckedChanged); + // + // label6 + // + this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.Location = new System.Drawing.Point(195, 509); + this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(473, 46); + this.label6.TabIndex = 3; + this.label6.Text = "NB! To show this window again, right click the app or tray icon and choose \"Setti" + + "ngs\"."; + // + // tabSettings + // + this.tabSettings.Controls.Add(this.tabPageBasic); + this.tabSettings.Controls.Add(this.tabPageAdvanced); + this.tabSettings.Location = new System.Drawing.Point(9, 10); + this.tabSettings.Margin = new System.Windows.Forms.Padding(2); + this.tabSettings.Name = "tabSettings"; + this.tabSettings.SelectedIndex = 0; + this.tabSettings.Size = new System.Drawing.Size(678, 496); + this.tabSettings.TabIndex = 0; + this.tabSettings.Text = "30"; + // + // tabPageBasic + // + this.tabPageBasic.BackColor = System.Drawing.SystemColors.Control; + this.tabPageBasic.Controls.Add(this.panel2); + this.tabPageBasic.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabPageBasic.Location = new System.Drawing.Point(4, 22); + this.tabPageBasic.Margin = new System.Windows.Forms.Padding(2); + this.tabPageBasic.Name = "tabPageBasic"; + this.tabPageBasic.Padding = new System.Windows.Forms.Padding(2); + this.tabPageBasic.Size = new System.Drawing.Size(670, 470); + this.tabPageBasic.TabIndex = 0; + this.tabPageBasic.Text = "Basic Settings"; + // + // tabPageAdvanced + // + this.tabPageAdvanced.BackColor = System.Drawing.SystemColors.Control; + this.tabPageAdvanced.Controls.Add(this.groupBox2); + this.tabPageAdvanced.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabPageAdvanced.Location = new System.Drawing.Point(4, 22); + this.tabPageAdvanced.Margin = new System.Windows.Forms.Padding(2); + this.tabPageAdvanced.Name = "tabPageAdvanced"; + this.tabPageAdvanced.Padding = new System.Windows.Forms.Padding(2); + this.tabPageAdvanced.Size = new System.Drawing.Size(670, 470); + this.tabPageAdvanced.TabIndex = 1; + this.tabPageAdvanced.Text = "Advanced Settings"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.btnBrowseBackColor); + this.groupBox2.Controls.Add(this.radioBtnBackgroundImage); + this.groupBox2.Controls.Add(this.radioBtnBackgroundColor); + this.groupBox2.Controls.Add(this.label25); + this.groupBox2.Controls.Add(this.label21); + this.groupBox2.Controls.Add(this.chkEnableInvertedTrayIcon); + this.groupBox2.Controls.Add(this.label20); + this.groupBox2.Controls.Add(this.cbImageLayouts); + this.groupBox2.Controls.Add(this.label24); + this.groupBox2.Controls.Add(this.btnBrowseBackImage); + this.groupBox2.Controls.Add(this.txtBackImage); + this.groupBox2.Controls.Add(this.txtBackColor); + this.groupBox2.Controls.Add(this.label18); + this.groupBox2.Controls.Add(this.numOpacity); + this.groupBox2.Controls.Add(this.label17); + this.groupBox2.Controls.Add(this.chkDisableSoundOnWorkstationLock); + this.groupBox2.Controls.Add(this.label16); + this.groupBox2.Controls.Add(this.chkEnableRAWGlucose); + this.groupBox2.Controls.Add(this.label10); + this.groupBox2.Controls.Add(this.numScaling); + this.groupBox2.Controls.Add(this.chkEnableExceptions); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.label8); + this.groupBox2.Controls.Add(this.numRefreshInterval); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.groupBox2.Location = new System.Drawing.Point(26, 15); + this.groupBox2.Margin = new System.Windows.Forms.Padding(2); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(15, 2, 2, 2); + this.groupBox2.Size = new System.Drawing.Size(630, 435); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Advanced application settings (requires restart)"; + // + // btnBrowseBackColor + // + this.btnBrowseBackColor.BackColor = System.Drawing.Color.Transparent; + this.btnBrowseBackColor.FlatAppearance.BorderSize = 0; + this.btnBrowseBackColor.Location = new System.Drawing.Point(450, 270); + this.btnBrowseBackColor.Margin = new System.Windows.Forms.Padding(2); + this.btnBrowseBackColor.Name = "btnBrowseBackColor"; + this.btnBrowseBackColor.Size = new System.Drawing.Size(31, 28); + this.btnBrowseBackColor.TabIndex = 32; + this.btnBrowseBackColor.Text = "..."; + this.btnBrowseBackColor.UseVisualStyleBackColor = false; + this.btnBrowseBackColor.Click += new System.EventHandler(this.btnBrowseBackColor_Click); + // + // radioBtnBackgroundImage + // + this.radioBtnBackgroundImage.AutoSize = true; + this.radioBtnBackgroundImage.Location = new System.Drawing.Point(52, 302); + this.radioBtnBackgroundImage.Name = "radioBtnBackgroundImage"; + this.radioBtnBackgroundImage.Size = new System.Drawing.Size(144, 21); + this.radioBtnBackgroundImage.TabIndex = 31; + this.radioBtnBackgroundImage.Text = "Background Image"; + this.radioBtnBackgroundImage.UseVisualStyleBackColor = true; + this.radioBtnBackgroundImage.CheckedChanged += new System.EventHandler(this.RadioBtnBackgroundImage_CheckedChanged); + // + // radioBtnBackgroundColor + // + this.radioBtnBackgroundColor.AutoSize = true; + this.radioBtnBackgroundColor.Checked = true; + this.radioBtnBackgroundColor.Location = new System.Drawing.Point(52, 274); + this.radioBtnBackgroundColor.Name = "radioBtnBackgroundColor"; + this.radioBtnBackgroundColor.Size = new System.Drawing.Size(139, 21); + this.radioBtnBackgroundColor.TabIndex = 30; + this.radioBtnBackgroundColor.TabStop = true; + this.radioBtnBackgroundColor.Text = "Background Color"; + this.radioBtnBackgroundColor.UseVisualStyleBackColor = true; + this.radioBtnBackgroundColor.CheckedChanged += new System.EventHandler(this.RadioBtnBackgroundColor_CheckedChanged); + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label25.Location = new System.Drawing.Point(24, 249); + this.label25.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(113, 17); + this.label25.TabIndex = 29; + this.label25.Text = "Set Background:"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label21.Location = new System.Drawing.Point(427, 42); + this.label21.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(30, 17); + this.label21.TabIndex = 28; + this.label21.Text = "sec"; + // + // chkEnableInvertedTrayIcon + // + this.chkEnableInvertedTrayIcon.AutoSize = true; + this.chkEnableInvertedTrayIcon.Location = new System.Drawing.Point(408, 222); + this.chkEnableInvertedTrayIcon.Margin = new System.Windows.Forms.Padding(2); + this.chkEnableInvertedTrayIcon.Name = "chkEnableInvertedTrayIcon"; + this.chkEnableInvertedTrayIcon.Size = new System.Drawing.Size(15, 14); + this.chkEnableInvertedTrayIcon.TabIndex = 27; + this.chkEnableInvertedTrayIcon.UseVisualStyleBackColor = true; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label20.Location = new System.Drawing.Point(28, 220); + this.label20.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(138, 17); + this.label20.TabIndex = 26; + this.label20.Text = "Use inverted try icon"; + // + // cbImageLayouts + // + this.cbImageLayouts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbImageLayouts.FormattingEnabled = true; + this.cbImageLayouts.Location = new System.Drawing.Point(311, 328); + this.cbImageLayouts.Margin = new System.Windows.Forms.Padding(2); + this.cbImageLayouts.Name = "cbImageLayouts"; + this.cbImageLayouts.Size = new System.Drawing.Size(135, 25); + this.cbImageLayouts.TabIndex = 25; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label24.Location = new System.Drawing.Point(70, 334); + this.label24.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(173, 17); + this.label24.TabIndex = 24; + this.label24.Text = "Background Image Layout"; + // + // btnBrowseBackImage + // + this.btnBrowseBackImage.BackColor = System.Drawing.Color.Transparent; + this.btnBrowseBackImage.FlatAppearance.BorderSize = 0; + this.btnBrowseBackImage.Location = new System.Drawing.Point(450, 300); + this.btnBrowseBackImage.Margin = new System.Windows.Forms.Padding(2); + this.btnBrowseBackImage.Name = "btnBrowseBackImage"; + this.btnBrowseBackImage.Size = new System.Drawing.Size(31, 28); + this.btnBrowseBackImage.TabIndex = 23; + this.btnBrowseBackImage.Text = "..."; + this.btnBrowseBackImage.UseVisualStyleBackColor = false; + this.btnBrowseBackImage.Click += new System.EventHandler(this.btnBrowseBackImage_Click); + // + // txtBackImage + // + this.txtBackImage.Anchor = System.Windows.Forms.AnchorStyles.None; + this.txtBackImage.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtBackImage.Location = new System.Drawing.Point(223, 301); + this.txtBackImage.Margin = new System.Windows.Forms.Padding(2); + this.txtBackImage.MaximumSize = new System.Drawing.Size(256, 28); + this.txtBackImage.MinimumSize = new System.Drawing.Size(218, 20); + this.txtBackImage.Name = "txtBackImage"; + this.txtBackImage.Size = new System.Drawing.Size(223, 23); + this.txtBackImage.TabIndex = 22; + this.txtBackImage.WordWrap = false; + // + // txtBackColor + // + this.txtBackColor.Location = new System.Drawing.Point(334, 273); + this.txtBackColor.Margin = new System.Windows.Forms.Padding(2); + this.txtBackColor.Name = "txtBackColor"; + this.txtBackColor.Size = new System.Drawing.Size(112, 23); + this.txtBackColor.TabIndex = 20; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label18.Location = new System.Drawing.Point(428, 97); + this.label18.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(20, 17); + this.label18.TabIndex = 18; + this.label18.Text = "%"; + // + // numOpacity + // + this.numOpacity.Location = new System.Drawing.Point(333, 95); + this.numOpacity.Margin = new System.Windows.Forms.Padding(2); + this.numOpacity.Name = "numOpacity"; + this.numOpacity.Size = new System.Drawing.Size(90, 23); + this.numOpacity.TabIndex = 17; + this.numOpacity.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label17.Location = new System.Drawing.Point(28, 101); + this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(81, 17); + this.label17.TabIndex = 16; + this.label17.Text = "GUI opacity"; + // + // chkDisableSoundOnWorkstationLock + // + this.chkDisableSoundOnWorkstationLock.AutoSize = true; + this.chkDisableSoundOnWorkstationLock.Location = new System.Drawing.Point(408, 191); + this.chkDisableSoundOnWorkstationLock.Margin = new System.Windows.Forms.Padding(2); + this.chkDisableSoundOnWorkstationLock.Name = "chkDisableSoundOnWorkstationLock"; + this.chkDisableSoundOnWorkstationLock.Size = new System.Drawing.Size(15, 14); + this.chkDisableSoundOnWorkstationLock.TabIndex = 15; + this.chkDisableSoundOnWorkstationLock.UseVisualStyleBackColor = true; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label16.Location = new System.Drawing.Point(28, 191); + this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(353, 17); + this.label16.TabIndex = 14; + this.label16.Text = "Temporarily disable sounds when workstation is locked"; + // + // chkEnableRAWGlucose + // + this.chkEnableRAWGlucose.AutoSize = true; + this.chkEnableRAWGlucose.Location = new System.Drawing.Point(408, 162); + this.chkEnableRAWGlucose.Margin = new System.Windows.Forms.Padding(2); + this.chkEnableRAWGlucose.Name = "chkEnableRAWGlucose"; + this.chkEnableRAWGlucose.Size = new System.Drawing.Size(15, 14); + this.chkEnableRAWGlucose.TabIndex = 13; + this.chkEnableRAWGlucose.UseVisualStyleBackColor = true; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label10.Location = new System.Drawing.Point(28, 163); + this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(240, 17); + this.label10.TabIndex = 12; + this.label10.Text = "Enable display of raw glucose values"; + // + // numScaling + // + this.numScaling.DecimalPlaces = 1; + this.numScaling.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.numScaling.Location = new System.Drawing.Point(333, 66); + this.numScaling.Margin = new System.Windows.Forms.Padding(2); + this.numScaling.Name = "numScaling"; + this.numScaling.Size = new System.Drawing.Size(90, 23); + this.numScaling.TabIndex = 11; + this.numScaling.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // chkEnableExceptions + // + this.chkEnableExceptions.AutoSize = true; + this.chkEnableExceptions.Location = new System.Drawing.Point(408, 131); + this.chkEnableExceptions.Margin = new System.Windows.Forms.Padding(2); + this.chkEnableExceptions.Name = "chkEnableExceptions"; + this.chkEnableExceptions.Size = new System.Drawing.Size(15, 14); + this.chkEnableExceptions.TabIndex = 10; + this.chkEnableExceptions.UseVisualStyleBackColor = true; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.Location = new System.Drawing.Point(28, 128); + this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(223, 17); + this.label9.TabIndex = 9; + this.label9.Text = "Enable exception logging to stderr"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(28, 72); + this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(114, 17); + this.label8.TabIndex = 8; + this.label8.Text = "GUI Scaling ratio"; + // + // numRefreshInterval + // + this.numRefreshInterval.Location = new System.Drawing.Point(333, 37); + this.numRefreshInterval.Margin = new System.Windows.Forms.Padding(2); + this.numRefreshInterval.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.numRefreshInterval.Name = "numRefreshInterval"; + this.numRefreshInterval.Size = new System.Drawing.Size(90, 23); + this.numRefreshInterval.TabIndex = 7; + this.numRefreshInterval.Value = new decimal(new int[] { + 60, + 0, + 0, + 0}); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label7.Location = new System.Drawing.Point(28, 42); + this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(136, 17); + this.label7.TabIndex = 1; + this.label7.Text = "GUI Refresh interval"; + // + // lblVersionInfo + // + this.lblVersionInfo.AutoSize = true; + this.lblVersionInfo.Enabled = false; + this.lblVersionInfo.ForeColor = System.Drawing.Color.SeaGreen; + this.lblVersionInfo.Location = new System.Drawing.Point(9, 566); + this.lblVersionInfo.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblVersionInfo.Name = "lblVersionInfo"; + this.lblVersionInfo.Size = new System.Drawing.Size(70, 13); + this.lblVersionInfo.TabIndex = 4; + this.lblVersionInfo.Text = "lblVersionInfo"; + // + // lblAck + // + this.lblAck.AutoSize = true; + this.lblAck.Enabled = false; + this.lblAck.ForeColor = System.Drawing.Color.SeaGreen; + this.lblAck.Location = new System.Drawing.Point(10, 586); + this.lblAck.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblAck.Name = "lblAck"; + this.lblAck.Size = new System.Drawing.Size(40, 13); + this.lblAck.TabIndex = 5; + this.lblAck.Text = "Acks..."; + // + // FormGlucoseSettings + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(725, 607); + this.Controls.Add(this.lblAck); + this.Controls.Add(this.lblVersionInfo); + this.Controls.Add(this.label6); + this.Controls.Add(this.tabSettings); + this.Controls.Add(this.btnVerifySubmit); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "FormGlucoseSettings"; + this.Text = "Glucose Settings"; + this.Load += new System.EventHandler(this.FormGlucoseSettings_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.paneUserNamePassword.ResumeLayout(false); + this.paneUserNamePassword.PerformLayout(); + this.panel2.ResumeLayout(false); + this.grpAlarmSettings.ResumeLayout(false); + this.grpAlarmSettings.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numStaleUrgent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numStaleWarning)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUrgentLow)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLow)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHigh)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUrgentHigh)).EndInit(); + this.tabSettings.ResumeLayout(false); + this.tabPageBasic.ResumeLayout(false); + this.tabPageAdvanced.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numOpacity)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numScaling)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numRefreshInterval)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button btnVerifySubmit; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.GroupBox grpAlarmSettings; + private System.Windows.Forms.RadioButton btnDisableAlarms; + private System.Windows.Forms.RadioButton btnEnableAlarms; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.NumericUpDown numUrgentLow; + private System.Windows.Forms.NumericUpDown numLow; + private System.Windows.Forms.NumericUpDown numHigh; + private System.Windows.Forms.NumericUpDown numUrgentHigh; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TabControl tabSettings; + private System.Windows.Forms.TabPage tabPageBasic; + private System.Windows.Forms.TabPage tabPageAdvanced; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.NumericUpDown numRefreshInterval; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.CheckBox chkEnableExceptions; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.NumericUpDown numScaling; + private System.Windows.Forms.CheckBox chkEnableRAWGlucose; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.NumericUpDown numStaleUrgent; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.NumericUpDown numStaleWarning; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.CheckBox chkEnableSoundAlarms; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.CheckBox chkDisableSoundOnWorkstationLock; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.NumericUpDown numOpacity; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label lblVersionInfo; + private System.Windows.Forms.ComboBox cbDataSource; + private System.Windows.Forms.Label label19; + public System.Windows.Forms.Label lblDataSourceLocation; + public System.Windows.Forms.TextBox txtDataSourceLocation; + public System.Windows.Forms.RadioButton btnUnitsMGDL; + public System.Windows.Forms.RadioButton btnUnitsMMOL; + private System.Windows.Forms.Button btnBrowse; + private System.Windows.Forms.TableLayoutPanel tblpDataSourceLocations; + public System.Windows.Forms.TextBox txtUserName; + public System.Windows.Forms.TextBox txtPassword; + private System.Windows.Forms.Panel paneUserNamePassword; + private System.Windows.Forms.Label lblAck; + private System.Windows.Forms.TextBox txtBackColor; + private System.Windows.Forms.ColorDialog clrBack; + private System.Windows.Forms.Button btnBrowseBackImage; + public System.Windows.Forms.TextBox txtBackImage; + private System.Windows.Forms.ComboBox cbImageLayouts; + private System.Windows.Forms.Label label24; + public System.Windows.Forms.Label lblUsername; + public System.Windows.Forms.Label lblPassword; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.CheckBox chkEnableInvertedTrayIcon; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.RadioButton radioBtnBackgroundColor; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.RadioButton radioBtnBackgroundImage; + private System.Windows.Forms.Button btnBrowseBackColor; + } +} diff --git a/FloatingGlucose/FormGlucoseSettings.cs b/FloatingGlucose/FormGlucoseSettings.cs index 0e2d8fb..560c395 100644 --- a/FloatingGlucose/FormGlucoseSettings.cs +++ b/FloatingGlucose/FormGlucoseSettings.cs @@ -1,446 +1,483 @@ -using FloatingGlucose.Classes; -using FloatingGlucose.Classes.DataSources; -using FloatingGlucose.Classes.Extensions; -using FloatingGlucose.Classes.Utils; -using System; -using System.Data; -using System.Diagnostics; -using System.Drawing.Imaging; -using System.IO; -using System.Linq; -using System.Text; -using System.Windows.Forms; - -using static FloatingGlucose.Properties.Settings; - -namespace FloatingGlucose -{ - public partial class FormGlucoseSettings : Form - { - public FormGlucoseSettings() - { - InitializeComponent(); - } - - private void updateAlarmSettingsEnabled(bool enabled = true) - { - var controls = this.grpAlarmSettings.Controls.OfType().ToList(); - controls.ForEach(x => - { - x.Enabled = enabled; - }); - this.chkEnableSoundAlarms.Enabled = enabled; - } - - private void updateFormControlsFromSettings() - { - var enableAlarms = Default.EnableAlarms; - var alarmUrgentHigh = Default.AlarmUrgentHigh; - var alarmHigh = Default.AlarmHigh; - var alarmLow = Default.AlarmLow; - var alarmUrgentLow = Default.AlarmUrgentLow; - var nsurl = Default.DataPathLocation; - - var staleWarning = Default.AlarmStaleDataWarning; - var staleUrgent = Default.AlarmStaleDataUrgent; - - this.numUrgentHigh.Value = alarmUrgentHigh; - this.numHigh.Value = alarmHigh; - this.numLow.Value = alarmLow; - this.numUrgentLow.Value = alarmUrgentLow; - - this.numStaleWarning.Value = staleWarning; - this.numStaleUrgent.Value = staleUrgent; - - this.chkEnableSoundAlarms.Checked = Default.EnableSoundAlarms; - - this.btnUnitsMMOL.Checked = Default.GlucoseUnits == "mmol"; - this.btnUnitsMGDL.Checked = Default.GlucoseUnits == "mgdl"; - - //advanced settings - this.numScaling.Value = (decimal)Default.GuiScalingRatio; - this.numOpacity.Value = Default.GuiOpacity; - this.numRefreshInterval.Value = Default.RefreshIntervalInSeconds; - this.chkEnableExceptions.Checked = Default.EnableExceptionLoggingToStderr; - this.chkEnableRAWGlucose.Checked = Default.EnableRawGlucoseDisplay; - - this.chkDisableSoundOnWorkstationLock.Checked = Default.DisableSoundAlarmsOnWorkstationLock; - 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://...") - { - this.txtDataSourceLocation.Text = "https://mysite.azurewebsites.net"; - } - else - { - this.txtDataSourceLocation.Text = nsurl; - } - - this.txtUserName.Text = Default.UserName; - - var pass = Default.HashedPassword?.Text ?? ""; - if (pass.Length > 0) - { - this.txtPassword.Text = pass; - } - - this.updateAlarmSettingsEnabled(enableAlarms); - this.btnEnableAlarms.Checked = enableAlarms; - } - - private void FormGlucoseSettings_Load(object sender, EventArgs e) - { - this.updateFormControlsFromSettings(); - this.FormClosing += this.OnClosing; - - this.lblVersionInfo.Text = "Version: " + AppShared.AppVersion; - this.lblVersionInfo.Enabled = true; - - /*this.btnBrowse.Image = Properties.Resources.browse_file.ToBitmap(); - this.btnBrowse.Size = new Size(32,32); - this.btnBrowse.Text = "";*/ - - //browse button control visibility logic - //this.tblpDataSourceLocations.GetControlFromPosition(1, 0).Visible = false; - this.btnBrowse.Visible = false; - // Fill the list of plugins, these are fairly static and won't change during runtime - var allPlugins = PluginLoader.Instance.GetAllPlugins().OrderBy(x => x.Instance.SortOrder).ToList(); - IDataSourcePlugin activePlugin; - try - { - activePlugin = PluginLoader.Instance.GetActivePlugin(); - } - catch (NoSuchPluginException) - { - activePlugin = null; - } - catch (NoPluginChosenException) - { - activePlugin = null; - } - this.cbDataSource.Items.Clear(); - - foreach (DataSourceInfo plugin in allPlugins) - { - this.cbDataSource.Items.Add(plugin); - if (activePlugin != null && plugin.DataSourceShortName == activePlugin.DataSourceShortName) - { - this.cbDataSource.SelectedItem = plugin; - plugin.Instance.OnPluginSelected(this); - - this.lblAck.Text = activePlugin.Acknowledgment; - this.btnBrowse.Visible = activePlugin.RequiresBrowseButton; - this.lblDataSourceLocation.Enabled = txtDataSourceLocation.Enabled = activePlugin.RequiresDataSource; - this.paneUserNamePassword.Enabled = activePlugin.RequiresUserNameAndPassword; - } - } - - this.cbImageLayouts.Items.Clear(); - - foreach (var layout in Enum.GetNames(typeof(ImageLayout))) - { - this.cbImageLayouts.Items.Add(layout); - - if (Default.BackgroundImageLayout == layout) - { - this.cbImageLayouts.SelectedItem = layout; - } - } - - if (this.cbImageLayouts.SelectedIndex == -1) - { - this.cbImageLayouts.SelectedIndex = 0; - } - - //de-uglify glucosesettings by setting a default plugin even if there was none selected - //or a previously included plugin was selected that has been renamed or removed - if (activePlugin == null) - { - this.cbDataSource.SelectedIndex = 0; - } - - var selectedInstance = this.cbDataSource.SelectedItem; - - //different increments for mmol/L and mg/dL - var controls = this.grpAlarmSettings.Controls.OfType() - .Where(x => x.DecimalPlaces == 1).ToList(); - controls.ForEach(x => - { - x.Increment = x.Value >= 36 ? 1.0M : 0.1M; - x.ValueChanged += new System.EventHandler(this.NumericUpDowns_Value_Changed); - }); - - if (AppShared.SettingsFormShouldFocusAdvancedSettings) - { - AppShared.SettingsFormShouldFocusAdvancedSettings = false; - this.tabSettings.SelectTab(this.tabPageAdvanced); - } - else - { - this.tabSettings.SelectTab(this.tabPageBasic); - this.txtDataSourceLocation.Select(); - } - } - - private void OnClosing(object sender, FormClosingEventArgs e) - { - AppShared.IsShowingSettings = false; - - if (AppShared.SettingsUpdatedSuccessfully) - { - base.OnClosing(e); - AppShared.SettingsUpdatedSuccessfully = false; - - return; - } - - Debug.WriteLine("No settings changed; Restarting timer, as it was previously stopped"); - AppShared.refreshGlucoseTimer?.Start(); - - //reload to settings stored in file - //user has aborted the changes - //made in the gui - Debug.WriteLine("Resetting defaults values"); - - Default.Reload(); - base.OnClosing(e); - } - - private void btnEnableAlarms_CheckedChanged(object sender, EventArgs e) - { - this.updateAlarmSettingsEnabled(this.btnEnableAlarms.Checked); - } - - private void btnVerifySubmit_Click(object sender, EventArgs e) - { - /*if (!Validators.IsUrl(this.txtDataSourceLocation.Text) || this.txtDataSourceLocation.Text == "https://mysite.azurewebsites.net") { - MessageBox.Show("You have entered an invalid Nightscout site URL", AppShared.AppName, MessageBoxButtons.OK, - MessageBoxIcon.Error); - return; - }*/ - - Default.UserName = this.txtUserName.Text; - - Default.HashedPassword = new DataProtector(this.txtPassword.Text); - - Default.DataPathLocation = this.txtDataSourceLocation.Text; - Default.EnableAlarms = this.btnEnableAlarms.Checked; - Default.AlarmUrgentHigh = this.numUrgentHigh.Value; - Default.AlarmHigh = this.numHigh.Value; - Default.AlarmLow = this.numLow.Value; - Default.AlarmUrgentLow = this.numUrgentLow.Value; - Default.GlucoseUnits = this.btnUnitsMMOL.Checked ? "mmol" : "mgdl"; - - Default.AlarmStaleDataUrgent = (int)this.numStaleUrgent.Value; - Default.AlarmStaleDataWarning = (int)this.numStaleWarning.Value; - Default.EnableSoundAlarms = this.chkEnableSoundAlarms.Checked; - - //advanced settings - Default.GuiScalingRatio = (float)this.numScaling.Value; - Default.GuiOpacity = (int)this.numOpacity.Value; - Default.RefreshIntervalInSeconds = (int)this.numRefreshInterval.Value; - Default.EnableExceptionLoggingToStderr = this.chkEnableExceptions.Checked; - - Default.DisableSoundAlarmsOnWorkstationLock = this.chkDisableSoundOnWorkstationLock.Checked; - Default.EnableRawGlucoseDisplay = this.chkEnableRAWGlucose.Checked; - - 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; - - Default.BackgroundImageLayout = (cbImageLayouts.SelectedItem as String) ?? "Stretch"; - - DataSourceInfo plugin; - - try - { - plugin = (DataSourceInfo)this.cbDataSource.SelectedItem; - plugin.Instance.VerifyConfig(Default); - } - catch (ConfigValidationException ce) - { - MessageBox.Show(ce.Message, AppShared.AppName, MessageBoxButtons.OK, - MessageBoxIcon.Error); - return; - } - - Default.DataSourceFullName = plugin.FullName; - //this is here for a purpose - - var selectedPlugin = (this.cbDataSource.SelectedItem as DataSourceInfo); - PluginLoader.Instance.SetActivePlugin(selectedPlugin.FullName); - - //only save if validation succeeded. - Default.Save(); - - if (!this.chkEnableSoundAlarms.Checked) - { - var manager = SoundAlarm.Instance; - manager.StopAlarm(); - } - - AppShared.SettingsUpdatedSuccessfully = true; - MessageBox.Show("Settings have been saved! Please note: some settings might require a restart to take effect!", - AppShared.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information); - AppShared.IsShowingSettings = false; - - AppShared.NotifyFormSettingsHaveChanged(); - - this.Close(); - } - - private void NumericUpDowns_Value_Changed(object sender, EventArgs e) - { - var button = sender as NumericUpDown; - - if (button != null) - { - var above = button.Value >= 36; - if (above) - { - //if above 36,assume this is a mg/dl value rather than mmol/L - //for mgdl we really never want decimals.. - button.Increment = 1.0M; - button.Value = Math.Round(button.Value, 1); - } - else - { - button.Increment = 0.1M; - } - } - } - - private void GlucoseUnit_Changed(object sender, EventArgs e) - { - var isMmol = this.btnUnitsMMOL.Checked; - - if (isMmol) - { - if (this.numUrgentHigh.Value >= 36) - { - this.numUrgentHigh.Value = GlucoseMath.ToMmol(this.numUrgentHigh.Value); - } - if (this.numHigh.Value >= 36) - { - this.numHigh.Value = GlucoseMath.ToMmol(this.numHigh.Value); - } - - if (this.numLow.Value >= 36) - { - this.numLow.Value = GlucoseMath.ToMmol(this.numLow.Value); - } - - if (this.numUrgentLow.Value >= 36) - { - this.numUrgentLow.Value = GlucoseMath.ToMmol(this.numUrgentLow.Value); - } - } - else - { - if (this.numUrgentHigh.Value < 36) - { - this.numUrgentHigh.Value = GlucoseMath.ToMgdl(this.numUrgentHigh.Value); - } - if (this.numHigh.Value < 36) - { - this.numHigh.Value = GlucoseMath.ToMgdl(this.numHigh.Value); - } - - if (this.numLow.Value < 36) - { - this.numLow.Value = GlucoseMath.ToMgdl(this.numLow.Value); - } - - if (this.numUrgentLow.Value < 36) - { - this.numUrgentLow.Value = GlucoseMath.ToMgdl(this.numUrgentLow.Value); - } - } - } - - private void cbDataSource_SelectedIndexChanged(object sender, EventArgs e) - { - var selectedPlugin = (this.cbDataSource.SelectedItem as DataSourceInfo); - //PluginLoader.Instance.SetActivePlugin(selectedPlugin.FullName); - selectedPlugin.Instance.OnPluginSelected(this); - this.lblAck.Text = selectedPlugin.Instance.Acknowledgment; - this.paneUserNamePassword.Enabled = selectedPlugin.Instance.RequiresUserNameAndPassword; - this.lblDataSourceLocation.Enabled = txtDataSourceLocation.Enabled = selectedPlugin.Instance.RequiresDataSource; - this.btnBrowse.Visible = selectedPlugin.Instance.RequiresBrowseButton; - } - - private void btnBrowse_Click(object sender, EventArgs e) - { - OpenFileDialog dialog = new OpenFileDialog(); - var selectedPlugin = (this.cbDataSource.SelectedItem as DataSourceInfo); - - var file = this.txtDataSourceLocation.Text; - var ext = (file.Split('.')?.Last() ?? "").ToLower(); - - dialog.Filter = selectedPlugin.Instance.BrowseDialogFileFilter; - dialog.InitialDirectory = ext.Length > 0 && File.Exists(file) ? Path.GetDirectoryName(file) : Path.GetPathRoot(Environment.SystemDirectory); - dialog.Title = "Select a file for the plugin to handle"; - - if (dialog.ShowDialog() == DialogResult.OK) - { - this.txtDataSourceLocation.Text = dialog.FileName; - } - dialog.Dispose(); - dialog = null; - } - - private void txtBackColor_Click(object sender, EventArgs e) - { - this.clrBack.AnyColor = false; - this.clrBack.ShowDialog(); - this.txtBackColor.Text = this.clrBack.Color.ToHexString(); - } - - private void btnBrowseBackImage_Click(object sender, EventArgs e) - { - OpenFileDialog dialog = new OpenFileDialog(); - - var codecs = ImageCodecInfo.GetImageEncoders(); - var sep = ""; - - var i = 0; - - var file = this.txtBackImage.Text; - var ext = (file.Split('.')?.Last() ?? "").ToLower(); - - foreach (var c in codecs) - { - i++; - var codecName = c.CodecName.Substring(8).Replace("Codec", "Files").Trim(); - dialog.Filter = String.Format("{0}{1}{2} ({3})|{3}", dialog.Filter, sep, codecName, c.FilenameExtension); - - //if an image is previously set, set that image extension as selected - if (ext.Length > 0 && c.FilenameExtension.ToLower().IndexOf(ext) != -1) - { - dialog.FilterIndex = i; - } - - sep = "|"; - } - - dialog.InitialDirectory = ext.Length > 0 && File.Exists(file) ? Path.GetDirectoryName(file) : Path.GetPathRoot(Environment.SystemDirectory); - dialog.Title = "Select a background image"; - - if (dialog.ShowDialog() == DialogResult.OK) - { - this.txtBackImage.Text = dialog.FileName; - } - dialog.Dispose(); - dialog = null; - } - } +using FloatingGlucose.Classes; +using FloatingGlucose.Classes.DataSources; +using FloatingGlucose.Classes.Extensions; +using FloatingGlucose.Classes.Utils; +using System; +using System.Data; +using System.Diagnostics; +using System.Drawing.Imaging; +using System.IO; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +using static FloatingGlucose.Properties.Settings; + +namespace FloatingGlucose +{ + public partial class FormGlucoseSettings : Form + { + public FormGlucoseSettings() + { + InitializeComponent(); + } + + private void updateAlarmSettingsEnabled(bool enabled = true) + { + var controls = this.grpAlarmSettings.Controls.OfType().ToList(); + controls.ForEach(x => + { + x.Enabled = enabled; + }); + this.chkEnableSoundAlarms.Enabled = enabled; + } + + private void updateFormControlsFromSettings() + { + var enableAlarms = Default.EnableAlarms; + var alarmUrgentHigh = Default.AlarmUrgentHigh; + var alarmHigh = Default.AlarmHigh; + var alarmLow = Default.AlarmLow; + var alarmUrgentLow = Default.AlarmUrgentLow; + var nsurl = Default.DataPathLocation; + + var staleWarning = Default.AlarmStaleDataWarning; + var staleUrgent = Default.AlarmStaleDataUrgent; + + this.numUrgentHigh.Value = alarmUrgentHigh; + this.numHigh.Value = alarmHigh; + this.numLow.Value = alarmLow; + this.numUrgentLow.Value = alarmUrgentLow; + + this.numStaleWarning.Value = staleWarning; + this.numStaleUrgent.Value = staleUrgent; + + this.chkEnableSoundAlarms.Checked = Default.EnableSoundAlarms; + + this.btnUnitsMMOL.Checked = Default.GlucoseUnits == "mmol"; + this.btnUnitsMGDL.Checked = Default.GlucoseUnits == "mgdl"; + + //advanced settings + this.numScaling.Value = (decimal)Default.GuiScalingRatio; + this.numOpacity.Value = Default.GuiOpacity; + this.numRefreshInterval.Value = Default.RefreshIntervalInSeconds; + this.chkEnableExceptions.Checked = Default.EnableExceptionLoggingToStderr; + this.chkEnableRAWGlucose.Checked = Default.EnableRawGlucoseDisplay; + + this.chkDisableSoundOnWorkstationLock.Checked = Default.DisableSoundAlarmsOnWorkstationLock; + + this.radioBtnBackgroundImage.Checked = Default.EnableBackgroundImage; + 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://...") + { + this.txtDataSourceLocation.Text = "https://mysite.azurewebsites.net"; + } + else + { + this.txtDataSourceLocation.Text = nsurl; + } + + this.txtUserName.Text = Default.UserName; + + var pass = Default.HashedPassword?.Text ?? ""; + if (pass.Length > 0) + { + this.txtPassword.Text = pass; + } + + this.updateAlarmSettingsEnabled(enableAlarms); + this.btnEnableAlarms.Checked = enableAlarms; + } + + private void FormGlucoseSettings_Load(object sender, EventArgs e) + { + this.updateFormControlsFromSettings(); + this.FormClosing += this.OnClosing; + + this.lblVersionInfo.Text = "Version: " + AppShared.AppVersion; + this.lblVersionInfo.Enabled = true; + + /*this.btnBrowse.Image = Properties.Resources.browse_file.ToBitmap(); + this.btnBrowse.Size = new Size(32,32); + this.btnBrowse.Text = "";*/ + + //browse button control visibility logic + //this.tblpDataSourceLocations.GetControlFromPosition(1, 0).Visible = false; + this.btnBrowse.Visible = false; + // Fill the list of plugins, these are fairly static and won't change during runtime + var allPlugins = PluginLoader.Instance.GetAllPlugins().OrderBy(x => x.Instance.SortOrder).ToList(); + IDataSourcePlugin activePlugin; + try + { + activePlugin = PluginLoader.Instance.GetActivePlugin(); + } + catch (NoSuchPluginException) + { + activePlugin = null; + } + catch (NoPluginChosenException) + { + activePlugin = null; + } + this.cbDataSource.Items.Clear(); + + foreach (DataSourceInfo plugin in allPlugins) + { + this.cbDataSource.Items.Add(plugin); + if (activePlugin != null && plugin.DataSourceShortName == activePlugin.DataSourceShortName) + { + this.cbDataSource.SelectedItem = plugin; + plugin.Instance.OnPluginSelected(this); + + this.lblAck.Text = activePlugin.Acknowledgment; + this.btnBrowse.Visible = activePlugin.RequiresBrowseButton; + this.lblDataSourceLocation.Enabled = txtDataSourceLocation.Enabled = activePlugin.RequiresDataSource; + this.paneUserNamePassword.Enabled = activePlugin.RequiresUserNameAndPassword; + } + } + + this.cbImageLayouts.Items.Clear(); + + foreach (var layout in Enum.GetNames(typeof(ImageLayout))) + { + this.cbImageLayouts.Items.Add(layout); + + if (Default.BackgroundImageLayout == layout) + { + this.cbImageLayouts.SelectedItem = layout; + } + } + + if (this.cbImageLayouts.SelectedIndex == -1) + { + this.cbImageLayouts.SelectedIndex = 0; + } + + //de-uglify glucosesettings by setting a default plugin even if there was none selected + //or a previously included plugin was selected that has been renamed or removed + if (activePlugin == null) + { + this.cbDataSource.SelectedIndex = 0; + } + + var selectedInstance = this.cbDataSource.SelectedItem; + + //different increments for mmol/L and mg/dL + var controls = this.grpAlarmSettings.Controls.OfType() + .Where(x => x.DecimalPlaces == 1).ToList(); + controls.ForEach(x => + { + x.Increment = x.Value >= 36 ? 1.0M : 0.1M; + x.ValueChanged += new System.EventHandler(this.NumericUpDowns_Value_Changed); + }); + + if (AppShared.SettingsFormShouldFocusAdvancedSettings) + { + AppShared.SettingsFormShouldFocusAdvancedSettings = false; + this.tabSettings.SelectTab(this.tabPageAdvanced); + } + else + { + this.tabSettings.SelectTab(this.tabPageBasic); + this.txtDataSourceLocation.Select(); + } + + //disable BackgroundImage inputs, when BackgroundColor is selected + if (radioBtnBackgroundColor.Checked == true) + { + txtBackImage.Enabled = false; + btnBrowseBackImage.Enabled = false; + cbImageLayouts.Enabled = false; + } + else + { + txtBackColor.Enabled = false; + } + + } + + private void OnClosing(object sender, FormClosingEventArgs e) + { + AppShared.IsShowingSettings = false; + + if (AppShared.SettingsUpdatedSuccessfully) + { + base.OnClosing(e); + AppShared.SettingsUpdatedSuccessfully = false; + + return; + } + + Debug.WriteLine("No settings changed; Restarting timer, as it was previously stopped"); + AppShared.refreshGlucoseTimer?.Start(); + + //reload to settings stored in file + //user has aborted the changes + //made in the gui + Debug.WriteLine("Resetting defaults values"); + + Default.Reload(); + base.OnClosing(e); + } + + private void btnEnableAlarms_CheckedChanged(object sender, EventArgs e) + { + this.updateAlarmSettingsEnabled(this.btnEnableAlarms.Checked); + } + + private void btnVerifySubmit_Click(object sender, EventArgs e) + { + /*if (!Validators.IsUrl(this.txtDataSourceLocation.Text) || this.txtDataSourceLocation.Text == "https://mysite.azurewebsites.net") { + MessageBox.Show("You have entered an invalid Nightscout site URL", AppShared.AppName, MessageBoxButtons.OK, + MessageBoxIcon.Error); + return; + }*/ + + Default.UserName = this.txtUserName.Text; + + Default.HashedPassword = new DataProtector(this.txtPassword.Text); + + Default.DataPathLocation = this.txtDataSourceLocation.Text; + Default.EnableAlarms = this.btnEnableAlarms.Checked; + Default.AlarmUrgentHigh = this.numUrgentHigh.Value; + Default.AlarmHigh = this.numHigh.Value; + Default.AlarmLow = this.numLow.Value; + Default.AlarmUrgentLow = this.numUrgentLow.Value; + Default.GlucoseUnits = this.btnUnitsMMOL.Checked ? "mmol" : "mgdl"; + + Default.AlarmStaleDataUrgent = (int)this.numStaleUrgent.Value; + Default.AlarmStaleDataWarning = (int)this.numStaleWarning.Value; + Default.EnableSoundAlarms = this.chkEnableSoundAlarms.Checked; + + //advanced settings + Default.GuiScalingRatio = (float)this.numScaling.Value; + Default.GuiOpacity = (int)this.numOpacity.Value; + Default.RefreshIntervalInSeconds = (int)this.numRefreshInterval.Value; + Default.EnableExceptionLoggingToStderr = this.chkEnableExceptions.Checked; + + Default.DisableSoundAlarmsOnWorkstationLock = this.chkDisableSoundOnWorkstationLock.Checked; + Default.EnableRawGlucoseDisplay = this.chkEnableRAWGlucose.Checked; + + + Default.EnableBackgroundImage = this.radioBtnBackgroundImage.Checked; + 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; + + Default.BackgroundImageLayout = (cbImageLayouts.SelectedItem as String) ?? "Stretch"; + + DataSourceInfo plugin; + + try + { + plugin = (DataSourceInfo)this.cbDataSource.SelectedItem; + plugin.Instance.VerifyConfig(Default); + } + catch (ConfigValidationException ce) + { + MessageBox.Show(ce.Message, AppShared.AppName, MessageBoxButtons.OK, + MessageBoxIcon.Error); + return; + } + + Default.DataSourceFullName = plugin.FullName; + //this is here for a purpose + + var selectedPlugin = (this.cbDataSource.SelectedItem as DataSourceInfo); + PluginLoader.Instance.SetActivePlugin(selectedPlugin.FullName); + + //only save if validation succeeded. + Default.Save(); + + if (!this.chkEnableSoundAlarms.Checked) + { + var manager = SoundAlarm.Instance; + manager.StopAlarm(); + } + + AppShared.SettingsUpdatedSuccessfully = true; + MessageBox.Show("Settings have been saved! Please note: some settings might require a restart to take effect!", + AppShared.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information); + AppShared.IsShowingSettings = false; + + AppShared.NotifyFormSettingsHaveChanged(); + + this.Close(); + } + + private void NumericUpDowns_Value_Changed(object sender, EventArgs e) + { + var button = sender as NumericUpDown; + + if (button != null) + { + var above = button.Value >= 36; + if (above) + { + //if above 36,assume this is a mg/dl value rather than mmol/L + //for mgdl we really never want decimals.. + button.Increment = 1.0M; + button.Value = Math.Round(button.Value, 1); + } + else + { + button.Increment = 0.1M; + } + } + } + + private void GlucoseUnit_Changed(object sender, EventArgs e) + { + var isMmol = this.btnUnitsMMOL.Checked; + + if (isMmol) + { + if (this.numUrgentHigh.Value >= 36) + { + this.numUrgentHigh.Value = GlucoseMath.ToMmol(this.numUrgentHigh.Value); + } + if (this.numHigh.Value >= 36) + { + this.numHigh.Value = GlucoseMath.ToMmol(this.numHigh.Value); + } + + if (this.numLow.Value >= 36) + { + this.numLow.Value = GlucoseMath.ToMmol(this.numLow.Value); + } + + if (this.numUrgentLow.Value >= 36) + { + this.numUrgentLow.Value = GlucoseMath.ToMmol(this.numUrgentLow.Value); + } + } + else + { + if (this.numUrgentHigh.Value < 36) + { + this.numUrgentHigh.Value = GlucoseMath.ToMgdl(this.numUrgentHigh.Value); + } + if (this.numHigh.Value < 36) + { + this.numHigh.Value = GlucoseMath.ToMgdl(this.numHigh.Value); + } + + if (this.numLow.Value < 36) + { + this.numLow.Value = GlucoseMath.ToMgdl(this.numLow.Value); + } + + if (this.numUrgentLow.Value < 36) + { + this.numUrgentLow.Value = GlucoseMath.ToMgdl(this.numUrgentLow.Value); + } + } + } + + private void cbDataSource_SelectedIndexChanged(object sender, EventArgs e) + { + var selectedPlugin = (this.cbDataSource.SelectedItem as DataSourceInfo); + //PluginLoader.Instance.SetActivePlugin(selectedPlugin.FullName); + selectedPlugin.Instance.OnPluginSelected(this); + this.lblAck.Text = selectedPlugin.Instance.Acknowledgment; + this.paneUserNamePassword.Enabled = selectedPlugin.Instance.RequiresUserNameAndPassword; + this.lblDataSourceLocation.Enabled = txtDataSourceLocation.Enabled = selectedPlugin.Instance.RequiresDataSource; + this.btnBrowse.Visible = selectedPlugin.Instance.RequiresBrowseButton; + } + + private void btnBrowse_Click(object sender, EventArgs e) + { + OpenFileDialog dialog = new OpenFileDialog(); + var selectedPlugin = (this.cbDataSource.SelectedItem as DataSourceInfo); + + var file = this.txtDataSourceLocation.Text; + var ext = (file.Split('.')?.Last() ?? "").ToLower(); + + dialog.Filter = selectedPlugin.Instance.BrowseDialogFileFilter; + dialog.InitialDirectory = ext.Length > 0 && File.Exists(file) ? Path.GetDirectoryName(file) : Path.GetPathRoot(Environment.SystemDirectory); + dialog.Title = "Select a file for the plugin to handle"; + + if (dialog.ShowDialog() == DialogResult.OK) + { + this.txtDataSourceLocation.Text = dialog.FileName; + } + dialog.Dispose(); + dialog = null; + } + + private void btnBrowseBackImage_Click(object sender, EventArgs e) + { + OpenFileDialog dialog = new OpenFileDialog(); + + var codecs = ImageCodecInfo.GetImageEncoders(); + var sep = ""; + + var i = 0; + + var file = this.txtBackImage.Text; + var ext = (file.Split('.')?.Last() ?? "").ToLower(); + + foreach (var c in codecs) + { + i++; + var codecName = c.CodecName.Substring(8).Replace("Codec", "Files").Trim(); + dialog.Filter = String.Format("{0}{1}{2} ({3})|{3}", dialog.Filter, sep, codecName, c.FilenameExtension); + + //if an image is previously set, set that image extension as selected + if (ext.Length > 0 && c.FilenameExtension.ToLower().IndexOf(ext) != -1) + { + dialog.FilterIndex = i; + } + + sep = "|"; + } + + dialog.InitialDirectory = ext.Length > 0 && File.Exists(file) ? Path.GetDirectoryName(file) : Path.GetPathRoot(Environment.SystemDirectory); + dialog.Title = "Select a background image"; + + if (dialog.ShowDialog() == DialogResult.OK) + { + this.txtBackImage.Text = dialog.FileName; + } + dialog.Dispose(); + dialog = null; + } + + private void RadioBtnBackgroundImage_CheckedChanged(object sender, EventArgs e) + { + //disable BackgroundColor inputs, when BackgroundImage is selected + txtBackImage.Enabled = true; + btnBrowseBackImage.Enabled = true; + cbImageLayouts.Enabled = true; + txtBackColor.Enabled = false; + btnBrowseBackColor.Enabled = false; + } + + private void RadioBtnBackgroundColor_CheckedChanged(object sender, EventArgs e) + { + //disable BackgroundImage inputs, when BackgroundColor is selected + txtBackImage.Enabled = false; + btnBrowseBackImage.Enabled = false; + cbImageLayouts.Enabled = false; + txtBackColor.Enabled = true; + btnBrowseBackColor.Enabled = true; + } + + private void btnBrowseBackColor_Click(object sender, EventArgs e) + { + this.clrBack.AnyColor = false; + this.clrBack.ShowDialog(); + this.txtBackColor.Text = this.clrBack.Color.ToHexString(); + } + } } \ No newline at end of file diff --git a/FloatingGlucose/FormGlucoseSettings.resx b/FloatingGlucose/FormGlucoseSettings.resx index bdf8154..1cce79b 100644 --- a/FloatingGlucose/FormGlucoseSettings.resx +++ b/FloatingGlucose/FormGlucoseSettings.resx @@ -1,123 +1,123 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + \ No newline at end of file From 09ab1893a78eb7e6259f3c37cd7d98df5e19d27f Mon Sep 17 00:00:00 2001 From: Rapha <42291781+Tuphal@users.noreply.github.com> Date: Wed, 11 Sep 2019 09:54:52 +0200 Subject: [PATCH 5/6] Background Image usage Settings for usage of Background image or Color at start --- .../Properties/Settings.Designer.cs | 614 +++++++++--------- FloatingGlucose/Properties/Settings.settings | 151 ++--- 2 files changed, 390 insertions(+), 375 deletions(-) diff --git a/FloatingGlucose/Properties/Settings.Designer.cs b/FloatingGlucose/Properties/Settings.Designer.cs index c4cd945..cf88e27 100644 --- a/FloatingGlucose/Properties/Settings.Designer.cs +++ b/FloatingGlucose/Properties/Settings.Designer.cs @@ -1,301 +1,313 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime version:4.0.30319.42000 -// -// Changes to this file can cause incorrect behavior and are lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace FloatingGlucose.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")] - public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("https://...")] - public string DataPathLocation { - get { - return ((string)(this["DataPathLocation"])); - } - set { - this["DataPathLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool EnableExceptionLoggingToStderr { - get { - return ((bool)(this["EnableExceptionLoggingToStderr"])); - } - set { - this["EnableExceptionLoggingToStderr"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("60")] - public int RefreshIntervalInSeconds { - get { - return ((int)(this["RefreshIntervalInSeconds"])); - } - set { - this["RefreshIntervalInSeconds"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("1")] - public float GuiScalingRatio { - get { - return ((float)(this["GuiScalingRatio"])); - } - set { - this["GuiScalingRatio"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool EnableAlarms { - get { - return ((bool)(this["EnableAlarms"])); - } - set { - this["EnableAlarms"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("13")] - public decimal AlarmUrgentHigh { - get { - return ((decimal)(this["AlarmUrgentHigh"])); - } - set { - this["AlarmUrgentHigh"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("11")] - public decimal AlarmHigh { - get { - return ((decimal)(this["AlarmHigh"])); - } - set { - this["AlarmHigh"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("4.5")] - public decimal AlarmLow { - get { - return ((decimal)(this["AlarmLow"])); - } - set { - this["AlarmLow"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("3.8")] - public decimal AlarmUrgentLow { - get { - return ((decimal)(this["AlarmUrgentLow"])); - } - set { - this["AlarmUrgentLow"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool EnableRawGlucoseDisplay { - get { - return ((bool)(this["EnableRawGlucoseDisplay"])); - } - set { - this["EnableRawGlucoseDisplay"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("mmol")] - public string GlucoseUnits { - get { - return ((string)(this["GlucoseUnits"])); - } - set { - this["GlucoseUnits"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("15")] - public int AlarmStaleDataWarning { - get { - return ((int)(this["AlarmStaleDataWarning"])); - } - set { - this["AlarmStaleDataWarning"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("30")] - public int AlarmStaleDataUrgent { - get { - return ((int)(this["AlarmStaleDataUrgent"])); - } - set { - this["AlarmStaleDataUrgent"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool EnableSoundAlarms { - get { - return ((bool)(this["EnableSoundAlarms"])); - } - set { - this["EnableSoundAlarms"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DisableSoundAlarmsOnWorkstationLock { - get { - return ((bool)(this["DisableSoundAlarmsOnWorkstationLock"])); - } - set { - this["DisableSoundAlarmsOnWorkstationLock"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("85")] - public int GuiOpacity { - get { - return ((int)(this["GuiOpacity"])); - } - set { - this["GuiOpacity"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string DataSourceFullName { - get { - return ((string)(this["DataSourceFullName"])); - } - set { - this["DataSourceFullName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string UserName { - get { - return ((string)(this["UserName"])); - } - set { - this["UserName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::FloatingGlucose.Classes.Utils.DataProtector HashedPassword { - get { - return ((global::FloatingGlucose.Classes.Utils.DataProtector)(this["HashedPassword"])); - } - set { - this["HashedPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("FF000000")] - public string BackgroundColorHex { - get { - return ((string)(this["BackgroundColorHex"])); - } - set { - this["BackgroundColorHex"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string BackgroundImage { - get { - return ((string)(this["BackgroundImage"])); - } - set { - this["BackgroundImage"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Stretch")] - public string BackgroundImageLayout { - get { - return ((string)(this["BackgroundImageLayout"])); - } - set { - this["BackgroundImageLayout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool EnableInvertedTrayIcon { - get { - return ((bool)(this["EnableInvertedTrayIcon"])); - } - set { - this["EnableInvertedTrayIcon"] = value; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime version:4.0.30319.42000 +// +// Changes to this file can cause incorrect behavior and are lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FloatingGlucose.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")] + public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("https://...")] + public string DataPathLocation { + get { + return ((string)(this["DataPathLocation"])); + } + set { + this["DataPathLocation"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool EnableExceptionLoggingToStderr { + get { + return ((bool)(this["EnableExceptionLoggingToStderr"])); + } + set { + this["EnableExceptionLoggingToStderr"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("60")] + public int RefreshIntervalInSeconds { + get { + return ((int)(this["RefreshIntervalInSeconds"])); + } + set { + this["RefreshIntervalInSeconds"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("1")] + public float GuiScalingRatio { + get { + return ((float)(this["GuiScalingRatio"])); + } + set { + this["GuiScalingRatio"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool EnableAlarms { + get { + return ((bool)(this["EnableAlarms"])); + } + set { + this["EnableAlarms"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("13")] + public decimal AlarmUrgentHigh { + get { + return ((decimal)(this["AlarmUrgentHigh"])); + } + set { + this["AlarmUrgentHigh"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("11")] + public decimal AlarmHigh { + get { + return ((decimal)(this["AlarmHigh"])); + } + set { + this["AlarmHigh"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("4.5")] + public decimal AlarmLow { + get { + return ((decimal)(this["AlarmLow"])); + } + set { + this["AlarmLow"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("3.8")] + public decimal AlarmUrgentLow { + get { + return ((decimal)(this["AlarmUrgentLow"])); + } + set { + this["AlarmUrgentLow"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool EnableRawGlucoseDisplay { + get { + return ((bool)(this["EnableRawGlucoseDisplay"])); + } + set { + this["EnableRawGlucoseDisplay"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("mmol")] + public string GlucoseUnits { + get { + return ((string)(this["GlucoseUnits"])); + } + set { + this["GlucoseUnits"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("15")] + public int AlarmStaleDataWarning { + get { + return ((int)(this["AlarmStaleDataWarning"])); + } + set { + this["AlarmStaleDataWarning"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("30")] + public int AlarmStaleDataUrgent { + get { + return ((int)(this["AlarmStaleDataUrgent"])); + } + set { + this["AlarmStaleDataUrgent"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool EnableSoundAlarms { + get { + return ((bool)(this["EnableSoundAlarms"])); + } + set { + this["EnableSoundAlarms"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool DisableSoundAlarmsOnWorkstationLock { + get { + return ((bool)(this["DisableSoundAlarmsOnWorkstationLock"])); + } + set { + this["DisableSoundAlarmsOnWorkstationLock"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("85")] + public int GuiOpacity { + get { + return ((int)(this["GuiOpacity"])); + } + set { + this["GuiOpacity"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string DataSourceFullName { + get { + return ((string)(this["DataSourceFullName"])); + } + set { + this["DataSourceFullName"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string UserName { + get { + return ((string)(this["UserName"])); + } + set { + this["UserName"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::FloatingGlucose.Classes.Utils.DataProtector HashedPassword { + get { + return ((global::FloatingGlucose.Classes.Utils.DataProtector)(this["HashedPassword"])); + } + set { + this["HashedPassword"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("FF000000")] + public string BackgroundColorHex { + get { + return ((string)(this["BackgroundColorHex"])); + } + set { + this["BackgroundColorHex"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string BackgroundImage { + get { + return ((string)(this["BackgroundImage"])); + } + set { + this["BackgroundImage"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Stretch")] + public string BackgroundImageLayout { + get { + return ((string)(this["BackgroundImageLayout"])); + } + set { + this["BackgroundImageLayout"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool EnableInvertedTrayIcon { + get { + return ((bool)(this["EnableInvertedTrayIcon"])); + } + set { + this["EnableInvertedTrayIcon"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool EnableBackgroundImage { + get { + return ((bool)(this["EnableBackgroundImage"])); + } + set { + this["EnableBackgroundImage"] = value; + } + } + } +} diff --git a/FloatingGlucose/Properties/Settings.settings b/FloatingGlucose/Properties/Settings.settings index 0e7f463..094ba96 100644 --- a/FloatingGlucose/Properties/Settings.settings +++ b/FloatingGlucose/Properties/Settings.settings @@ -1,75 +1,78 @@ - - - - - - https://... - - - True - - - 60 - - - 1 - - - True - - - 13 - - - 11 - - - 4.5 - - - 3.8 - - - False - - - mmol - - - 15 - - - 30 - - - True - - - False - - - 85 - - - - - - - - - - - - FF000000 - - - - - - Stretch - - - False - - + + + + + + https://... + + + True + + + 60 + + + 1 + + + True + + + 13 + + + 11 + + + 4.5 + + + 3.8 + + + False + + + mmol + + + 15 + + + 30 + + + True + + + False + + + 85 + + + + + + + + + + + + FF000000 + + + + + + Stretch + + + False + + + False + + \ No newline at end of file From 1912f9eedb62401468a3b715815ed703d1ab1aea Mon Sep 17 00:00:00 2001 From: Rapha <42291781+Tuphal@users.noreply.github.com> Date: Wed, 11 Sep 2019 09:59:58 +0200 Subject: [PATCH 6/6] Background Image usage Settings for usage of Background image or Color at start --- FloatingGlucose/FormGlucoseSettings.Designer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/FloatingGlucose/FormGlucoseSettings.Designer.cs b/FloatingGlucose/FormGlucoseSettings.Designer.cs index 4d5c79f..461a88d 100644 --- a/FloatingGlucose/FormGlucoseSettings.Designer.cs +++ b/FloatingGlucose/FormGlucoseSettings.Designer.cs @@ -859,6 +859,7 @@ private void InitializeComponent() this.txtBackColor.Location = new System.Drawing.Point(334, 273); this.txtBackColor.Margin = new System.Windows.Forms.Padding(2); this.txtBackColor.Name = "txtBackColor"; + this.txtBackColor.ReadOnly = true; this.txtBackColor.Size = new System.Drawing.Size(112, 23); this.txtBackColor.TabIndex = 20; //