Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Mar 26, 2020
1 parent 046c5c3 commit c27ee54
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ CVS/
*.nsi
AssemblyFileVersion.cs
*.settings
Installer/*.config

# T4 generated files (for telemety ID)
Installer/*.config
*.tt.cs
4 changes: 2 additions & 2 deletions Installer/Installer.tt
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
Var mycheckbox

Function telemetrycheckshow
${NSD_CreateCheckbox} 120u -18u 50% 12u "Telemetry"
${NSD_CreateCheckbox} 120u -18u 50% 12u "Collect Telemetry Information"
Pop $mycheckbox
SetCtlColors $mycheckbox "" 0xFFFFFFFF ;${MUI_BGCOLOR}
${NSD_Check} $mycheckbox ; Check it by default
;${NSD_Check} $mycheckbox ; Do not check it by default
FunctionEnd

Function telemetrycheckleave
Expand Down
13 changes: 0 additions & 13 deletions README.md

This file was deleted.

8 changes: 0 additions & 8 deletions license.md

This file was deleted.

13 changes: 11 additions & 2 deletions src/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,17 @@ private void LoadCommands() {
// Invoker.Dispose();
}

// Load (reload) Commands
Invoker = Commands.Create($@"{Program.ConfigPath}MCEControl.commands", Settings.DisableInternalCommands);
if (Invoker == null)
notifyIcon.Visible = false;
else {
cmdWindow.RefreshList();

Logger.Instance.Log4.Info($"{Invoker.Count} commands available.");
cmdWindow.RefreshList();
}
cmdWindow.RefreshList();

Logger.Instance.Log4.Info($"{Invoker.Count} commands available.");
}

private void mainWindow_Closing(object sender, CancelEventArgs e) {
Expand Down Expand Up @@ -351,6 +354,12 @@ private void RestartClient() {
}
}

// Anytime a client or server receives data that looks like a command, ReceivData() is called.
// Those calls could come from threads other than the UI thread. This implementation relies on
// the async behavior of BeginInvoke such that they are each handled sequentially, in the
// order they happened.
private void ReceivedLine(Reply reply, String cmd) {
>>>>>>> Stashed changes
private void ShowCommandWindow() {
if (this.InvokeRequired) {
TelemetryService.Instance.TrackEvent("ShowCommandWindow");
Expand Down
6 changes: 3 additions & 3 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ internal static void CheckVersion() {
private static void Instance_GotLatestVersion(object sender, Version version) {
if (version == null && !String.IsNullOrWhiteSpace(UpdateService.Instance.ErrorMessage)) {
Logger.Instance.Log4.Info(
$"Could not access tig.github.io/mcec to check for a newer version. {UpdateService.Instance.ErrorMessage}");
$"Could not access tig.github.io/mcec to see if a newer version is available. {UpdateService.Instance.ErrorMessage}");
}
else if (UpdateService.Instance.CompareVersions() < 0) {
Logger.Instance.Log4.Info(
$"A newer version of MCE Controller ({version}) is available at {UpdateService.Instance.DownloadUri}");
}
else if (UpdateService.Instance.CompareVersions() > 0) {
Logger.Instance.Log4.Info(
$"This version of MCE Controller is NEWER than the latest release published on tig.github.io/mcec ({version}).");
$"You are are running a MORE recent version than can be found at tig.github.io/mcec ({version}).");
}
else {
Logger.Instance.Log4.Info("This version of MCE Controller is the most recent version from tig.github/mcec.");
Logger.Instance.Log4.Info("You are running the most recent version of MCE Controller.");
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/Services/UpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ public async Task GetLatestStableVersionAsync() {
try {
var github = new GitHubClient(new Octokit.ProductHeaderValue("tig-mcec"));
var release = await github.Repository.Release.GetLatest("tig", "mcec").ConfigureAwait(false);
#if false
#if DEBUG
Logger.Instance.Log4.Debug($"The latest release is tagged at {release.TagName} and is named {release.Name}. Download Url: {release.Assets[0].BrowserDownloadUrl}");
#endif

var v = release.TagName;
// Remove leading "v" (v2.0.0.1000.alpha)
if (v.StartsWith("v", StringComparison.InvariantCultureIgnoreCase))
Expand Down

0 comments on commit c27ee54

Please sign in to comment.