diff --git a/mRemoteV1/App/Startup.cs b/mRemoteV1/App/Startup.cs
index ca500765e..3de84b0ef 100644
--- a/mRemoteV1/App/Startup.cs
+++ b/mRemoteV1/App/Startup.cs
@@ -21,14 +21,10 @@ namespace mRemoteNG.App
{
public class Startup
{
- private static readonly Startup _singletonInstance = new Startup();
private CompatibilityChecker _compatibilityChecker;
private AppUpdater _appUpdate;
- public static Startup Instance
- {
- get { return _singletonInstance; }
- }
+ public static Startup Instance { get; } = new Startup();
private Startup()
{
@@ -242,48 +238,6 @@ namespace mRemoteNG.App
}
}
- private void CheckForAnnouncement()
- {
- if (_appUpdate == null)
- _appUpdate = new AppUpdater();
- else if (_appUpdate.IsGetAnnouncementInfoRunning)
- return;
-
- _appUpdate.GetAnnouncementInfoCompletedEvent += GetAnnouncementInfoCompleted;
- _appUpdate.GetAnnouncementInfoAsync();
- }
-
- private void GetAnnouncementInfoCompleted(object sender, AsyncCompletedEventArgs e)
- {
- if (frmMain.Default.InvokeRequired)
- {
- frmMain.Default.Invoke(new AsyncCompletedEventHandler(GetAnnouncementInfoCompleted), new object[] { sender, e });
- return;
- }
-
- try
- {
- _appUpdate.GetAnnouncementInfoCompletedEvent -= GetAnnouncementInfoCompleted;
-
- if (e.Cancelled)
- {
- return;
- }
- if (e.Error != null)
- {
- throw (e.Error);
- }
-
- if (_appUpdate.IsAnnouncementAvailable())
- {
- Windows.Show(WindowType.Announcement);
- }
- }
- catch (Exception ex)
- {
- Runtime.MessageCollector.AddExceptionMessage("GetAnnouncementInfoCompleted() failed.", ex, MessageClass.ErrorMsg, true);
- }
- }
private void ParseCommandLineArgs()
{
diff --git a/mRemoteV1/App/Update/AppUpdater.cs b/mRemoteV1/App/Update/AppUpdater.cs
index e3bcebf22..d5093e358 100644
--- a/mRemoteV1/App/Update/AppUpdater.cs
+++ b/mRemoteV1/App/Update/AppUpdater.cs
@@ -15,61 +15,30 @@ namespace mRemoteNG.App.Update
{
private UpdateInfo _currentUpdateInfo;
private string _changeLog;
- private AnnouncementInfo _currentAnnouncementInfo;
private WebProxy _webProxy;
private Thread _getUpdateInfoThread;
private Thread _getChangeLogThread;
- private Thread _getAnnouncementInfoThread;
#region Public Properties
public UpdateInfo CurrentUpdateInfo => _currentUpdateInfo;
public string ChangeLog => _changeLog;
- public AnnouncementInfo CurrentAnnouncementInfo => _currentAnnouncementInfo;
-
public bool IsGetUpdateInfoRunning
{
get
{
- if (_getUpdateInfoThread != null)
- {
- if (_getUpdateInfoThread.IsAlive)
- {
- return true;
- }
- }
- return false;
+ if (_getUpdateInfoThread == null) return false;
+ return _getUpdateInfoThread.IsAlive;
}
}
-
- public bool IsGetChangeLogRunning
+
+ private bool IsGetChangeLogRunning
{
get
{
- if (_getChangeLogThread != null)
- {
- if (_getChangeLogThread.IsAlive)
- {
- return true;
- }
- }
- return false;
- }
- }
-
- public bool IsGetAnnouncementInfoRunning
- {
- get
- {
- if (_getAnnouncementInfoThread != null)
- {
- if (_getAnnouncementInfoThread.IsAlive)
- {
- return true;
- }
- }
- return false;
+ if (_getChangeLogThread == null) return false;
+ return _getChangeLogThread.IsAlive;
}
}
@@ -120,16 +89,6 @@ namespace mRemoteNG.App.Update
return _currentUpdateInfo.Version > GeneralAppInfo.getVer();
}
- public bool IsAnnouncementAvailable()
- {
- if (_currentAnnouncementInfo == null || (!_currentAnnouncementInfo.IsValid || string.IsNullOrEmpty(_currentAnnouncementInfo.Name)))
- {
- return false;
- }
-
- return (_currentAnnouncementInfo.Name != Settings.Default.LastAnnouncement);
- }
-
public void GetUpdateInfoAsync()
{
if (IsGetUpdateInfoRunning)
@@ -161,19 +120,6 @@ namespace mRemoteNG.App.Update
_getChangeLogThread.Start();
}
- public void GetAnnouncementInfoAsync()
- {
- if (IsGetAnnouncementInfoRunning)
- {
- _getAnnouncementInfoThread.Abort();
- }
-
- _getAnnouncementInfoThread = new Thread(GetAnnouncementInfo);
- _getAnnouncementInfoThread.SetApartmentState(ApartmentState.STA);
- _getAnnouncementInfoThread.IsBackground = true;
- _getAnnouncementInfoThread.Start();
- }
-
public void DownloadUpdateAsync()
{
if (_downloadUpdateWebClient != null)
@@ -286,24 +232,6 @@ namespace mRemoteNG.App.Update
GetChangeLogCompletedEventEvent?.Invoke(this, e);
}
- private void GetAnnouncementInfo()
- {
- Uri announcementFileUri = new Uri(Convert.ToString(Settings.Default.AnnouncementAddress));
- DownloadStringCompletedEventArgs e = DownloadString(announcementFileUri);
-
- if (!e.Cancelled && e.Error == null)
- {
- _currentAnnouncementInfo = AnnouncementInfo.FromString(e.Result);
-
- if (!string.IsNullOrEmpty(_currentAnnouncementInfo.Name))
- {
- Settings.Default.LastAnnouncement = _currentAnnouncementInfo.Name;
- }
- }
-
- GetAnnouncementInfoCompletedEventEvent?.Invoke(this, e);
- }
-
private void DownloadUpdateProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
DownloadUpdateProgressChangedEventEvent?.Invoke(sender, e);
@@ -317,21 +245,22 @@ namespace mRemoteNG.App.Update
{
try
{
- Authenticode updateAuthenticode = new Authenticode(_currentUpdateInfo.UpdateFilePath);
- updateAuthenticode.RequireThumbprintMatch = true;
- updateAuthenticode.ThumbprintToMatch = _currentUpdateInfo.CertificateThumbprint;
-
- if (updateAuthenticode.Verify() != Authenticode.StatusValue.Verified)
- {
- if (updateAuthenticode.Status == Authenticode.StatusValue.UnhandledException)
+ Authenticode updateAuthenticode = new Authenticode(_currentUpdateInfo.UpdateFilePath)
+ {
+ // I'm guessing that this is going to prevent 1.72 from auto updating to 1.74+
+ RequireThumbprintMatch = true,
+ ThumbprintToMatch = _currentUpdateInfo.CertificateThumbprint
+ };
+
+ if (updateAuthenticode.Verify() != Authenticode.StatusValue.Verified)
+ {
+ if (updateAuthenticode.Status == Authenticode.StatusValue.UnhandledException)
{
throw (updateAuthenticode.Exception);
}
- else
- {
- throw (new Exception(updateAuthenticode.StatusMessage));
- }
- }
+
+ throw (new Exception(updateAuthenticode.StatusMessage));
+ }
}
catch (Exception ex)
{
diff --git a/mRemoteV1/App/Windows.cs b/mRemoteV1/App/Windows.cs
index 98934b967..39dacbafb 100644
--- a/mRemoteV1/App/Windows.cs
+++ b/mRemoteV1/App/Windows.cs
@@ -31,8 +31,6 @@ namespace mRemoteNG.App
public static DockContent ErrorsPanel { get; set; } = new DockContent();
public static ScreenshotManagerWindow ScreenshotForm { get; set; }
public static DockContent ScreenshotPanel { get; set; } = new DockContent();
- public static AnnouncementWindow AnnouncementForm { get; set; }
- public static DockContent AnnouncementPanel { get; set; } = new DockContent();
public static UpdateWindow UpdateForm { get; set; }
public static DockContent UpdatePanel { get; set; } = new DockContent();
public static SSHTransferWindow SshtransferForm { get; set; }
@@ -124,15 +122,6 @@ namespace mRemoteNG.App
}
_componentscheckForm.Show(frmMain.Default.pnlDock);
}
- else if (windowType.Equals(WindowType.Announcement))
- {
- if (AnnouncementForm == null || AnnouncementForm.IsDisposed)
- {
- AnnouncementForm = new AnnouncementWindow(AnnouncementPanel);
- AnnouncementPanel = AnnouncementForm;
- }
- AnnouncementForm.Show(frmMain.Default.pnlDock);
- }
}
catch (Exception ex)
{
diff --git a/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs b/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs
index 2a55a2661..7df4b3852 100644
--- a/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs
+++ b/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs
@@ -1,6 +1,5 @@
using mRemoteNG.App;
using mRemoteNG.App.Info;
-using mRemoteNG.Tree;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.Window;
using System;
@@ -86,7 +85,7 @@ namespace mRemoteNG.Config.Settings
return null;
}
- public void CreatePanels()
+ private void CreatePanels()
{
Windows.ConfigForm = new ConfigWindow(Windows.ConfigPanel);
Windows.ConfigPanel = Windows.ConfigForm;
@@ -102,9 +101,6 @@ namespace mRemoteNG.Config.Settings
Windows.UpdateForm = new UpdateWindow(Windows.UpdatePanel);
Windows.UpdatePanel = Windows.UpdateForm;
-
- Windows.AnnouncementForm = new AnnouncementWindow(Windows.AnnouncementPanel);
- Windows.AnnouncementPanel = Windows.AnnouncementForm;
}
}
}
\ No newline at end of file
diff --git a/mRemoteV1/UI/Forms/OptionsPages/UpdatesPage.Designer.cs b/mRemoteV1/UI/Forms/OptionsPages/UpdatesPage.Designer.cs
index 38af68d62..78e3ce2ac 100644
--- a/mRemoteV1/UI/Forms/OptionsPages/UpdatesPage.Designer.cs
+++ b/mRemoteV1/UI/Forms/OptionsPages/UpdatesPage.Designer.cs
@@ -67,8 +67,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.lblUpdatesExplanation.Name = "lblUpdatesExplanation";
this.lblUpdatesExplanation.Size = new System.Drawing.Size(536, 40);
this.lblUpdatesExplanation.TabIndex = 3;
- this.lblUpdatesExplanation.Text = "mRemoteNG can periodically connect to the mRemoteNG website to check for updates " +
- "and product announcements.";
+ this.lblUpdatesExplanation.Text = "mRemoteNG can periodically connect to the mRemoteNG website to check for updates.";
//
//pnlUpdateCheck
//
@@ -96,7 +95,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.chkCheckForUpdatesOnStartup.Name = "chkCheckForUpdatesOnStartup";
this.chkCheckForUpdatesOnStartup.Size = new System.Drawing.Size(213, 17);
this.chkCheckForUpdatesOnStartup.TabIndex = 0;
- this.chkCheckForUpdatesOnStartup.Text = "Check for updates and announcements";
+ this.chkCheckForUpdatesOnStartup.Text = "Check for updates";
this.chkCheckForUpdatesOnStartup.UseVisualStyleBackColor = true;
//
//cboUpdateCheckFrequency
diff --git a/mRemoteV1/UI/Forms/frmMain.Designer.cs b/mRemoteV1/UI/Forms/frmMain.Designer.cs
index 035f3e85e..5f4806fb5 100644
--- a/mRemoteV1/UI/Forms/frmMain.Designer.cs
+++ b/mRemoteV1/UI/Forms/frmMain.Designer.cs
@@ -88,7 +88,6 @@ namespace mRemoteNG.UI.Forms
this.mMenInfoForum = new System.Windows.Forms.ToolStripMenuItem();
this.mMenInfoBugReport = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
- this.mMenInfoAnnouncements = new System.Windows.Forms.ToolStripMenuItem();
this.mMenToolsUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.mMenInfoSep2 = new System.Windows.Forms.ToolStripSeparator();
this.mMenInfoAbout = new System.Windows.Forms.ToolStripMenuItem();
@@ -143,10 +142,10 @@ namespace mRemoteNG.UI.Forms
this.mMenView,
this.mMenTools,
this.mMenInfo});
- this.msMain.Location = new System.Drawing.Point(5, 0);
+ this.msMain.Location = new System.Drawing.Point(3, 0);
this.msMain.Name = "msMain";
this.msMain.Padding = new System.Windows.Forms.Padding(2, 2, 0, 2);
- this.msMain.Size = new System.Drawing.Size(269, 24);
+ this.msMain.Size = new System.Drawing.Size(176, 24);
this.msMain.Stretch = false;
this.msMain.TabIndex = 16;
this.msMain.Text = "Main Toolbar";
@@ -363,7 +362,7 @@ namespace mRemoteNG.UI.Forms
//
this.mMenViewAddConnectionPanel.Image = global::mRemoteNG.Resources.Panel_Add;
this.mMenViewAddConnectionPanel.Name = "mMenViewAddConnectionPanel";
- this.mMenViewAddConnectionPanel.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewAddConnectionPanel.Size = new System.Drawing.Size(227, 22);
this.mMenViewAddConnectionPanel.Text = "Add Connection Panel";
this.mMenViewAddConnectionPanel.Click += new System.EventHandler(this.mMenViewAddConnectionPanel_Click);
//
@@ -371,13 +370,13 @@ namespace mRemoteNG.UI.Forms
//
this.mMenViewConnectionPanels.Image = global::mRemoteNG.Resources.Panels;
this.mMenViewConnectionPanels.Name = "mMenViewConnectionPanels";
- this.mMenViewConnectionPanels.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewConnectionPanels.Size = new System.Drawing.Size(227, 22);
this.mMenViewConnectionPanels.Text = "Connection Panels";
//
// mMenViewSep1
//
this.mMenViewSep1.Name = "mMenViewSep1";
- this.mMenViewSep1.Size = new System.Drawing.Size(225, 6);
+ this.mMenViewSep1.Size = new System.Drawing.Size(224, 6);
//
// mMenViewConnections
//
@@ -385,7 +384,7 @@ namespace mRemoteNG.UI.Forms
this.mMenViewConnections.CheckState = System.Windows.Forms.CheckState.Checked;
this.mMenViewConnections.Image = global::mRemoteNG.Resources.Root;
this.mMenViewConnections.Name = "mMenViewConnections";
- this.mMenViewConnections.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewConnections.Size = new System.Drawing.Size(227, 22);
this.mMenViewConnections.Text = "Connections";
this.mMenViewConnections.Click += new System.EventHandler(this.mMenViewConnections_Click);
//
@@ -395,7 +394,7 @@ namespace mRemoteNG.UI.Forms
this.mMenViewConfig.CheckState = System.Windows.Forms.CheckState.Checked;
this.mMenViewConfig.Image = global::mRemoteNG.Resources.cog;
this.mMenViewConfig.Name = "mMenViewConfig";
- this.mMenViewConfig.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewConfig.Size = new System.Drawing.Size(227, 22);
this.mMenViewConfig.Text = "Config";
this.mMenViewConfig.Click += new System.EventHandler(this.mMenViewConfig_Click);
//
@@ -405,7 +404,7 @@ namespace mRemoteNG.UI.Forms
this.mMenViewErrorsAndInfos.CheckState = System.Windows.Forms.CheckState.Checked;
this.mMenViewErrorsAndInfos.Image = global::mRemoteNG.Resources.ErrorsAndInfos;
this.mMenViewErrorsAndInfos.Name = "mMenViewErrorsAndInfos";
- this.mMenViewErrorsAndInfos.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewErrorsAndInfos.Size = new System.Drawing.Size(227, 22);
this.mMenViewErrorsAndInfos.Text = "Errors and Infos";
this.mMenViewErrorsAndInfos.Click += new System.EventHandler(this.mMenViewErrorsAndInfos_Click);
//
@@ -413,14 +412,14 @@ namespace mRemoteNG.UI.Forms
//
this.mMenViewScreenshotManager.Image = ((System.Drawing.Image)(resources.GetObject("mMenViewScreenshotManager.Image")));
this.mMenViewScreenshotManager.Name = "mMenViewScreenshotManager";
- this.mMenViewScreenshotManager.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewScreenshotManager.Size = new System.Drawing.Size(227, 22);
this.mMenViewScreenshotManager.Text = "Screenshot Manager";
this.mMenViewScreenshotManager.Click += new System.EventHandler(this.mMenViewScreenshotManager_Click);
//
// ToolStripSeparator1
//
this.ToolStripSeparator1.Name = "ToolStripSeparator1";
- this.ToolStripSeparator1.Size = new System.Drawing.Size(225, 6);
+ this.ToolStripSeparator1.Size = new System.Drawing.Size(224, 6);
//
// mMenViewJumpTo
//
@@ -429,7 +428,7 @@ namespace mRemoteNG.UI.Forms
this.mMenViewJumpToErrorsInfos});
this.mMenViewJumpTo.Image = global::mRemoteNG.Resources.JumpTo;
this.mMenViewJumpTo.Name = "mMenViewJumpTo";
- this.mMenViewJumpTo.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewJumpTo.Size = new System.Drawing.Size(227, 22);
this.mMenViewJumpTo.Text = "Jump To";
//
// mMenViewJumpToConnectionsConfig
@@ -456,20 +455,20 @@ namespace mRemoteNG.UI.Forms
//
this.mMenViewResetLayout.Image = global::mRemoteNG.Resources.application_side_tree;
this.mMenViewResetLayout.Name = "mMenViewResetLayout";
- this.mMenViewResetLayout.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewResetLayout.Size = new System.Drawing.Size(227, 22);
this.mMenViewResetLayout.Text = "Reset Layout";
this.mMenViewResetLayout.Click += new System.EventHandler(this.mMenViewResetLayout_Click);
//
// mMenViewSep2
//
this.mMenViewSep2.Name = "mMenViewSep2";
- this.mMenViewSep2.Size = new System.Drawing.Size(225, 6);
+ this.mMenViewSep2.Size = new System.Drawing.Size(224, 6);
//
// mMenViewQuickConnectToolbar
//
this.mMenViewQuickConnectToolbar.Image = global::mRemoteNG.Resources.Play_Quick;
this.mMenViewQuickConnectToolbar.Name = "mMenViewQuickConnectToolbar";
- this.mMenViewQuickConnectToolbar.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewQuickConnectToolbar.Size = new System.Drawing.Size(227, 22);
this.mMenViewQuickConnectToolbar.Text = "Quick Connect Toolbar";
this.mMenViewQuickConnectToolbar.Click += new System.EventHandler(this.mMenViewQuickConnectToolbar_Click);
//
@@ -477,21 +476,21 @@ namespace mRemoteNG.UI.Forms
//
this.mMenViewExtAppsToolbar.Image = global::mRemoteNG.Resources.ExtApp;
this.mMenViewExtAppsToolbar.Name = "mMenViewExtAppsToolbar";
- this.mMenViewExtAppsToolbar.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewExtAppsToolbar.Size = new System.Drawing.Size(227, 22);
this.mMenViewExtAppsToolbar.Text = "External Applications Toolbar";
this.mMenViewExtAppsToolbar.Click += new System.EventHandler(this.mMenViewExtAppsToolbar_Click);
//
// mMenViewSep3
//
this.mMenViewSep3.Name = "mMenViewSep3";
- this.mMenViewSep3.Size = new System.Drawing.Size(225, 6);
+ this.mMenViewSep3.Size = new System.Drawing.Size(224, 6);
//
// mMenViewFullscreen
//
this.mMenViewFullscreen.Image = global::mRemoteNG.Resources.arrow_out;
this.mMenViewFullscreen.Name = "mMenViewFullscreen";
this.mMenViewFullscreen.ShortcutKeys = System.Windows.Forms.Keys.F11;
- this.mMenViewFullscreen.Size = new System.Drawing.Size(228, 22);
+ this.mMenViewFullscreen.Size = new System.Drawing.Size(227, 22);
this.mMenViewFullscreen.Text = "Full Screen";
this.mMenViewFullscreen.Click += new System.EventHandler(this.mMenViewFullscreen_Click);
//
@@ -506,7 +505,7 @@ namespace mRemoteNG.UI.Forms
this.mMenToolsComponentsCheck,
this.mMenToolsOptions});
this.mMenTools.Name = "mMenTools";
- this.mMenTools.Size = new System.Drawing.Size(48, 20);
+ this.mMenTools.Size = new System.Drawing.Size(47, 20);
this.mMenTools.Text = "&Tools";
//
// mMenToolsSSHTransfer
@@ -573,7 +572,6 @@ namespace mRemoteNG.UI.Forms
this.mMenInfoForum,
this.mMenInfoBugReport,
this.ToolStripSeparator2,
- this.mMenInfoAnnouncements,
this.mMenToolsUpdate,
this.mMenInfoSep2,
this.mMenInfoAbout});
@@ -633,14 +631,6 @@ namespace mRemoteNG.UI.Forms
this.ToolStripSeparator2.Name = "ToolStripSeparator2";
this.ToolStripSeparator2.Size = new System.Drawing.Size(187, 6);
//
- // mMenInfoAnnouncements
- //
- this.mMenInfoAnnouncements.Image = global::mRemoteNG.Resources.News;
- this.mMenInfoAnnouncements.Name = "mMenInfoAnnouncements";
- this.mMenInfoAnnouncements.Size = new System.Drawing.Size(190, 22);
- this.mMenInfoAnnouncements.Text = "Announcements";
- this.mMenInfoAnnouncements.Click += new System.EventHandler(this.mMenInfoAnnouncements_Click);
- //
// mMenToolsUpdate
//
this.mMenToolsUpdate.Image = global::mRemoteNG.Resources.Update;
@@ -700,9 +690,9 @@ namespace mRemoteNG.UI.Forms
//
// tsContainer.TopToolStripPanel
//
- this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain);
this.tsContainer.TopToolStripPanel.Controls.Add(this.tsQuickConnect);
this.tsContainer.TopToolStripPanel.Controls.Add(this.tsExternalTools);
+ this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain);
this.tsContainer.TopToolStripPanel.Controls.Add(this.ToolStrip1);
//
// tsQuickConnect
@@ -713,7 +703,7 @@ namespace mRemoteNG.UI.Forms
this.cmbQuickConnect,
this.btnQuickConnect,
this.btnConnections});
- this.tsQuickConnect.Location = new System.Drawing.Point(274, 0);
+ this.tsQuickConnect.Location = new System.Drawing.Point(179, 0);
this.tsQuickConnect.MaximumSize = new System.Drawing.Size(0, 25);
this.tsQuickConnect.Name = "tsQuickConnect";
this.tsQuickConnect.Size = new System.Drawing.Size(387, 25);
@@ -772,14 +762,14 @@ namespace mRemoteNG.UI.Forms
this.cMenExtAppsToolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cMenToolbarShowText});
this.cMenExtAppsToolbar.Name = "cMenToolbar";
- this.cMenExtAppsToolbar.Size = new System.Drawing.Size(129, 26);
+ this.cMenExtAppsToolbar.Size = new System.Drawing.Size(128, 26);
//
// cMenToolbarShowText
//
this.cMenToolbarShowText.Checked = true;
this.cMenToolbarShowText.CheckState = System.Windows.Forms.CheckState.Checked;
this.cMenToolbarShowText.Name = "cMenToolbarShowText";
- this.cMenToolbarShowText.Size = new System.Drawing.Size(128, 22);
+ this.cMenToolbarShowText.Size = new System.Drawing.Size(127, 22);
this.cMenToolbarShowText.Text = "Show Text";
this.cMenToolbarShowText.Click += new System.EventHandler(this.cMenToolbarShowText_Click);
//
@@ -933,7 +923,6 @@ namespace mRemoteNG.UI.Forms
internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator1;
internal System.Windows.Forms.ToolStripMenuItem mMenToolsUVNCSC;
internal System.Windows.Forms.ToolStripMenuItem mMenToolsComponentsCheck;
- internal System.Windows.Forms.ToolStripMenuItem mMenInfoAnnouncements;
internal System.Windows.Forms.ToolStripSeparator mMenInfoSep2;
internal System.Windows.Forms.ToolStripMenuItem mMenInfoBugReport;
internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator2;
diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs
index adc682de4..3402b0bb1 100644
--- a/mRemoteV1/UI/Forms/frmMain.cs
+++ b/mRemoteV1/UI/Forms/frmMain.cs
@@ -229,7 +229,6 @@ namespace mRemoteNG.UI.Forms
mMenInfoDonate.Text = Language.strMenuDonate;
mMenInfoWebsite.Text = Language.strMenuWebsite;
mMenInfoAbout.Text = Language.strMenuAbout;
- mMenInfoAnnouncements.Text = Language.strMenuAnnouncements;
lblQuickConnect.Text = Language.strLabelConnect;
btnQuickConnect.Text = Language.strMenuConnect;
@@ -288,7 +287,7 @@ namespace mRemoteNG.UI.Forms
private void frmMain_Shown(object sender, EventArgs e)
{
#if PORTABLE
-// ReSharper disable once RedundantJumpStatement
+ // ReSharper disable once RedundantJumpStatement
return;
#endif
if (!Settings.Default.CheckForUpdatesAsked)
@@ -955,11 +954,6 @@ namespace mRemoteNG.UI.Forms
Runtime.GoToDonate();
}
- private void mMenInfoAnnouncements_Click(object sender, EventArgs e)
- {
- Windows.Show(WindowType.Announcement);
- }
-
private void mMenInfoAbout_Click(object sender, EventArgs e)
{
Windows.Show(WindowType.About);
@@ -976,20 +970,19 @@ namespace mRemoteNG.UI.Forms
MouseUpEventHandler = ConnectionsMenuItem_MouseUp
};
+ // ReSharper disable once CoVariantArrayConversion
ToolStripItem[] rootMenuItems = menuItemsConverter.CreateToolStripDropDownItems(Runtime.ConnectionTreeModel).ToArray();
btnConnections.DropDownItems.AddRange(rootMenuItems);
}
private static void ConnectionsMenuItem_MouseUp(object sender, MouseEventArgs e)
{
- if (e.Button == MouseButtons.Left)
- {
- var tag = ((ToolStripMenuItem)sender).Tag as ConnectionInfo;
- if (tag != null)
- {
- ConnectionInitiator.OpenConnection(tag);
- }
- }
+ if (e.Button != MouseButtons.Left) return;
+ var tag = ((ToolStripMenuItem)sender).Tag as ConnectionInfo;
+ if (tag != null)
+ {
+ ConnectionInitiator.OpenConnection(tag);
+ }
}
#endregion
diff --git a/mRemoteV1/UI/Window/AnnouncementWindow.Designer.cs b/mRemoteV1/UI/Window/AnnouncementWindow.Designer.cs
deleted file mode 100644
index 7ca9c7dfb..000000000
--- a/mRemoteV1/UI/Window/AnnouncementWindow.Designer.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-using mRemoteNG.My;
-
-namespace mRemoteNG.UI.Window
-{
- public partial class AnnouncementWindow
- {
- #region Windows Form Designer generated code
- internal System.Windows.Forms.WebBrowser webBrowser;
-
- private void InitializeComponent()
- {
- this.webBrowser = new System.Windows.Forms.WebBrowser();
- this.Load += new System.EventHandler(Announcement_Load);
- this.SuspendLayout();
- //
- //webBrowser
- //
- this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
- this.webBrowser.Location = new System.Drawing.Point(0, 0);
- this.webBrowser.MinimumSize = new System.Drawing.Size(20, 20);
- this.webBrowser.Name = "webBrowser";
- this.webBrowser.Size = new System.Drawing.Size(549, 474);
- this.webBrowser.TabIndex = 0;
- //
- //Announcement
- //
- this.ClientSize = new System.Drawing.Size(549, 474);
- this.Controls.Add(this.webBrowser);
- this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, System.Convert.ToByte(0));
- this.Icon = Resources.News_Icon;
- this.Name = "Announcement";
- this.TabText = "Announcement";
- this.Text = "Announcement";
- this.ResumeLayout(false);
-
- }
- #endregion
- }
-}
diff --git a/mRemoteV1/UI/Window/AnnouncementWindow.cs b/mRemoteV1/UI/Window/AnnouncementWindow.cs
deleted file mode 100644
index d3dcce735..000000000
--- a/mRemoteV1/UI/Window/AnnouncementWindow.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using System;
-using System.ComponentModel;
-using WeifenLuo.WinFormsUI.Docking;
-using mRemoteNG.App;
-using mRemoteNG.App.Update;
-
-
-namespace mRemoteNG.UI.Window
-{
- public partial class AnnouncementWindow : BaseWindow
- {
- #region Public Methods
- public AnnouncementWindow(DockContent panel)
- {
- WindowType = WindowType.Announcement;
- DockPnl = panel;
- InitializeComponent();
- }
- #endregion
-
- #region Private Fields
- private AppUpdater _appUpdate;
- #endregion
-
- #region Private Methods
- public void Announcement_Load(object sender, EventArgs e)
- {
- webBrowser.Navigated += webBrowser_Navigated;
-
- ApplyLanguage();
- CheckForAnnouncement();
- }
-
- private void ApplyLanguage()
- {
-
- }
-
- private void webBrowser_Navigated(object sender, System.Windows.Forms.WebBrowserNavigatedEventArgs e)
- {
- // This can only be set once the WebBrowser control is shown, it will throw a COM exception otherwise.
- webBrowser.AllowWebBrowserDrop = false;
-
- webBrowser.Navigated -= webBrowser_Navigated;
- }
-
- private void CheckForAnnouncement()
- {
- if (_appUpdate == null)
- {
- _appUpdate = new AppUpdater();
- //_appUpdate.Load += _appUpdate.Update_Load;
- }
- else if (_appUpdate.IsGetAnnouncementInfoRunning)
- {
- return ;
- }
-
- _appUpdate.GetAnnouncementInfoCompletedEvent += GetAnnouncementInfoCompleted;
-
- _appUpdate.GetAnnouncementInfoAsync();
- }
-
- private void GetAnnouncementInfoCompleted(object sender, AsyncCompletedEventArgs e)
- {
- if (InvokeRequired)
- {
- AsyncCompletedEventHandler myDelegate = new AsyncCompletedEventHandler(GetAnnouncementInfoCompleted);
- Invoke(myDelegate, new object[] {sender, e});
- return ;
- }
-
- try
- {
- _appUpdate.GetAnnouncementInfoCompletedEvent -= GetAnnouncementInfoCompleted;
-
- if (e.Cancelled)
- {
- return ;
- }
- if (e.Error != null)
- {
- throw (e.Error);
- }
-
- webBrowser.Navigate(_appUpdate.CurrentAnnouncementInfo.Address);
- }
- catch (Exception ex)
- {
- Runtime.MessageCollector.AddExceptionMessage(Language.strUpdateGetAnnouncementInfoFailed, ex);
- }
- }
- #endregion
- }
-}
diff --git a/mRemoteV1/UI/Window/AnnouncementWindow.resx b/mRemoteV1/UI/Window/AnnouncementWindow.resx
deleted file mode 100644
index 19dc0dd8b..000000000
--- a/mRemoteV1/UI/Window/AnnouncementWindow.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj
index 4ebf0c10a..01047abbe 100644
--- a/mRemoteV1/mRemoteV1.csproj
+++ b/mRemoteV1/mRemoteV1.csproj
@@ -413,12 +413,6 @@
Form
-
- AnnouncementWindow.cs
-
-
- Form
-
Form
@@ -602,10 +596,6 @@
ActiveDirectoryImportWindow.cs
Designer
-
- AnnouncementWindow.cs
- Designer
-
ComponentsCheckWindow.cs
Designer