From c27ee5470ed499d72abb593581f0cc6e1909b225 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Thu, 26 Mar 2020 10:36:46 -0600 Subject: [PATCH] merge --- .gitignore | 2 +- Installer/Installer.tt | 4 ++-- README.md | 13 ------------- license.md | 8 -------- src/MainWindow.cs | 13 +++++++++++-- src/Program.cs | 6 +++--- src/Services/UpdateService.cs | 3 ++- 7 files changed, 19 insertions(+), 30 deletions(-) delete mode 100644 README.md delete mode 100644 license.md diff --git a/.gitignore b/.gitignore index f559b0f..090cf56 100644 --- a/.gitignore +++ b/.gitignore @@ -82,7 +82,7 @@ CVS/ *.nsi AssemblyFileVersion.cs *.settings -Installer/*.config # T4 generated files (for telemety ID) +Installer/*.config *.tt.cs \ No newline at end of file diff --git a/Installer/Installer.tt b/Installer/Installer.tt index 2fb8d4f..524d60d 100644 --- a/Installer/Installer.tt +++ b/Installer/Installer.tt @@ -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 diff --git a/README.md b/README.md deleted file mode 100644 index e7f33ce..0000000 --- a/README.md +++ /dev/null @@ -1,13 +0,0 @@ -[![CodeFactor](https://www.codefactor.io/repository/github/tig/mcec/badge)](https://www.codefactor.io/repository/github/tig/mcec) - -# MCE Controller - -By Charlie Kindel ([@ckindel on Twitter](http://www.twitter.com/ckindel)) - Copyright © 2020 [Kindel Systems](http://www.kindel.com), LLC. - -![mcec](https://tig.github.io/mcec/mainwindow.png "MCE Controller") - -MCE Controller provides robust remote control a Windows HTPC (or any PC) over the network. It runs in the background listening on the network (or serial port) for commands. It then translates those commands into actions such as keystrokes, text input, and the starting of programs. Any remote control, home control system, or application that can send text strings via TCP/IP or a serial port can use MCE Controller to control a Windows PC. - -* [Download](https://tig.github.io/mcec/) -* [Full MCE Controller Documentation](https://tig.github.io/mcec/documentation.html) -* [Charlie's Blog Posts on MCE Controller](http://ceklog.kindel.com/category/passions/homeautomation/mce-controller/) diff --git a/license.md b/license.md deleted file mode 100644 index f96809b..0000000 --- a/license.md +++ /dev/null @@ -1,8 +0,0 @@ -MIT -Copyright (c) 2019 Kindel Systems, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/MainWindow.cs b/src/MainWindow.cs index 0cebfab..019bce2 100644 --- a/src/MainWindow.cs +++ b/src/MainWindow.cs @@ -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) { @@ -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"); diff --git a/src/Program.cs b/src/Program.cs index e3ffb3a..20bff6c 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -62,7 +62,7 @@ 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( @@ -70,10 +70,10 @@ private static void Instance_GotLatestVersion(object sender, Version version) { } 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."); } } diff --git a/src/Services/UpdateService.cs b/src/Services/UpdateService.cs index fd3ff73..d19029a 100644 --- a/src/Services/UpdateService.cs +++ b/src/Services/UpdateService.cs @@ -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))