[mapguide-commits] r8075 - trunk/Tools/Maestro/Maestro.Base/Commands
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sat Apr 26 11:58:29 PDT 2014
Author: jng
Date: 2014-04-26 11:58:29 -0700 (Sat, 26 Apr 2014)
New Revision: 8075
Modified:
trunk/Tools/Maestro/Maestro.Base/Commands/LoginCommand.cs
trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs
Log:
#2093: Only show tip of the day after the login dialog is dismissed and only on startup.
Modified: trunk/Tools/Maestro/Maestro.Base/Commands/LoginCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/LoginCommand.cs 2014-04-26 17:29:32 UTC (rev 8074)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/LoginCommand.cs 2014-04-26 18:58:29 UTC (rev 8075)
@@ -34,33 +34,42 @@
{
public override void Run()
{
- var login = new LoginDialog();
- login.Owner = Workbench.Instance;
- if (login.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+ RunInternal(false);
+ }
+
+ internal static void RunInternal(bool showTipOfTheDay)
+ {
+ using (var login = new LoginDialog())
{
- var conn = login.Connection;
+ login.Owner = Workbench.Instance;
+ var result = login.ShowDialog();
+ if (showTipOfTheDay)
+ TipOfTheDayDialog.FirstTimeOpen();
+ if (result == System.Windows.Forms.DialogResult.OK)
+ {
+ var conn = login.Connection;
- //TODO: Determine if this is a http connection. If not,
- //wrap it in an IServerConnection decorator that will do all the
- //request dispatch broadcasting. This will solve trac #1505 and will
- //work for any future non-http implementations
+ //TODO: Determine if this is a http connection. If not,
+ //wrap it in an IServerConnection decorator that will do all the
+ //request dispatch broadcasting. This will solve trac #1505 and will
+ //work for any future non-http implementations
- var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
- Debug.Assert(mgr != null);
+ var mgr = ServiceRegistry.GetService<ServerConnectionManager>();
+ Debug.Assert(mgr != null);
- // Connection display names should be unique. A duplicate means we are connecting to the same MG server
+ // Connection display names should be unique. A duplicate means we are connecting to the same MG server
- LoggingService.Info("Connection created: " + conn.DisplayName); //NOXLATE
- if (mgr.GetConnection(conn.DisplayName) == null)
- {
- mgr.AddConnection(conn.DisplayName, conn);
- Workbench.Instance.ActiveSiteExplorer.FullRefresh();
+ LoggingService.Info("Connection created: " + conn.DisplayName); //NOXLATE
+ if (mgr.GetConnection(conn.DisplayName) == null)
+ {
+ mgr.AddConnection(conn.DisplayName, conn);
+ Workbench.Instance.ActiveSiteExplorer.FullRefresh();
+ }
+ else
+ {
+ MessageService.ShowError(Strings.ConnectionAlreadyEstablished);
+ }
}
- else
- {
- MessageService.ShowError(Strings.ConnectionAlreadyEstablished);
- }
- var vmgr = ServiceRegistry.GetService<ViewContentManager>();
}
}
}
Modified: trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs 2014-04-26 17:29:32 UTC (rev 8074)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/StartupCommand.cs 2014-04-26 18:58:29 UTC (rev 8075)
@@ -66,8 +66,7 @@
if (Props.Get(ConfigProperties.ShowOutboundRequests, true))
mgr.OpenContent<OutboundRequestViewer>(ViewRegion.Bottom);
- TipOfTheDayDialog.FirstTimeOpen();
- new LoginCommand().Run();
+ LoginCommand.RunInternal(true);
};
}
More information about the mapguide-commits
mailing list