Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
Maintance: remove trailing slashes from url and diable broken yr plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjorn committed Jan 14, 2019
1 parent 0df8630 commit 03fdb57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class YrWeatherServiceEndpoint : IDataSourcePlugin
public bool PluginHandlesFormatting => true;
public bool RequiresUserNameAndPassword => false;
public bool RequiresDataSource => true;
public bool PluginDisabled => false;
public bool PluginDisabled => true;
public bool RequiresBrowseButton => false;
public string BrowseDialogFileFilter => "";
public string DataSourceShortName => "Yr.no Weather";
Expand Down
16 changes: 15 additions & 1 deletion FloatingGlucose/FloatingGlucose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ private NameValueCollection datasourceLocation
// data points to calculate raw glucose diff
var count = Default.EnableRawGlucoseDisplay ? 2 : 1;
var units = Default.GlucoseUnits;
var urlstripped = Default.DataPathLocation.TrimEnd('/');
return new NameValueCollection()
{
{ "raw", Default.DataPathLocation },
{ "location", $"{Default.DataPathLocation}/pebble?count={count}&units={units}"}
{ "location", $"{urlstripped}/pebble?count={count}&units={units}"}
};
}
}
Expand All @@ -57,6 +58,17 @@ private FormGlucoseSettings settingsForm
return this._settingsForm;
}
}
[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // height of ellipse
int nHeightEllipse // width of ellipse
);


public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
Expand Down Expand Up @@ -105,6 +117,8 @@ public FloatingGlucose()
var r = Screen.PrimaryScreen.WorkingArea;
this.Location = new Point(r.Width - this.Width, r.Height - this.Height);
}
//draws round corners
//this.Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(Width, Height, Width, Height, 20, 20));
}

private void setFormSize()
Expand Down

0 comments on commit 03fdb57

Please sign in to comment.