[mapguide-commits] r4876 - in sandbox/maestro-2.5/Maestro.Base: Commands Services UI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri May 14 02:55:47 EDT 2010


Author: jng
Date: 2010-05-14 02:55:46 -0400 (Fri, 14 May 2010)
New Revision: 4876

Modified:
   sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs
   sandbox/maestro-2.5/Maestro.Base/Services/UrlLauncher.cs
   sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.Designer.cs
   sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs
   sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.resx
Log:
Some cleanups in the embedded web browser

Modified: sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs	2010-05-14 06:10:27 UTC (rev 4875)
+++ sandbox/maestro-2.5/Maestro.Base/Commands/StartupCommand.cs	2010-05-14 06:55:46 UTC (rev 4876)
@@ -52,7 +52,7 @@
                 
                 //Show maestro home page
                 var launcher = ServiceRegistry.GetService<UrlLauncher>();
-                launcher.OpenUrlEmbedded("http://trac.osgeo.org/mapguide/wiki/maestro", "Maestro Home", true); //LOCALIZE
+                launcher.OpenUrlEmbedded("http://trac.osgeo.org/mapguide/wiki/maestro", false);
 
                 new LoginCommand().Run();
             };

Modified: sandbox/maestro-2.5/Maestro.Base/Services/UrlLauncher.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/Services/UrlLauncher.cs	2010-05-14 06:10:27 UTC (rev 4875)
+++ sandbox/maestro-2.5/Maestro.Base/Services/UrlLauncher.cs	2010-05-14 06:55:46 UTC (rev 4876)
@@ -47,17 +47,12 @@
         /// Opens the specified url using the embedded web browser
         /// </summary>
         /// <param name="url">the url to open</param>
-        /// <param name="title">The title for the embedded browser. Does nothing if <see cref="useBuiltInBrowser"/> is false</param>
         /// <param name="locked">If true, the navigation toolbar will be disabled</param>
-        public void OpenUrlEmbedded(string url, string title, bool locked)
+        public void OpenUrlEmbedded(string url, bool locked)
         {
             var mgr = ServiceRegistry.GetService<ViewContentManager>();
             var browser = mgr.OpenContent<EmbeddedWebBrowser>(ViewRegion.Document);
-            if (!string.IsNullOrEmpty(title))
-            {
-                browser.Title = title;
-                browser.Description = title;
-            }
+            
             browser.IsLockedDown = locked;
             browser.NavigateToUrl(url);
         }

Modified: sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.Designer.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.Designer.cs	2010-05-14 06:10:27 UTC (rev 4875)
+++ sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.Designer.cs	2010-05-14 06:55:46 UTC (rev 4876)
@@ -28,164 +28,163 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.navToolstrip = new System.Windows.Forms.ToolStrip();
-            this.btnBack = new System.Windows.Forms.ToolStripButton();
-            this.btnForward = new System.Windows.Forms.ToolStripButton();
-            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
-            this.btnRefresh = new System.Windows.Forms.ToolStripButton();
-            this.btnStop = new System.Windows.Forms.ToolStripButton();
-            this.loadingIndicator = new System.Windows.Forms.ToolStripProgressBar();
-            this.btnGo = new System.Windows.Forms.ToolStripButton();
-            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
-            this.txtUrl = new Maestro.Shared.UI.ToolStripSpringTextBox();
-            this.lblUrl = new System.Windows.Forms.ToolStripLabel();
             this.statusStrip1 = new System.Windows.Forms.StatusStrip();
             this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel();
+            this.progressBar = new System.Windows.Forms.ToolStripProgressBar();
+            this.navToolstrip = new System.Windows.Forms.Panel();
+            this.btnGo = new System.Windows.Forms.Button();
+            this.txtUrl = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.btnStop = new System.Windows.Forms.Button();
+            this.btnRefresh = new System.Windows.Forms.Button();
+            this.btnForward = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
             this.browser = new System.Windows.Forms.WebBrowser();
-            this.navToolstrip.SuspendLayout();
             this.statusStrip1.SuspendLayout();
+            this.navToolstrip.SuspendLayout();
             this.SuspendLayout();
             // 
-            // navToolstrip
+            // statusStrip1
             // 
-            this.navToolstrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.btnBack,
-            this.btnForward,
-            this.toolStripSeparator1,
-            this.btnRefresh,
-            this.btnStop,
-            this.loadingIndicator,
-            this.btnGo,
-            this.toolStripSeparator2,
-            this.txtUrl,
-            this.lblUrl});
-            this.navToolstrip.Location = new System.Drawing.Point(0, 0);
-            this.navToolstrip.Name = "navToolstrip";
-            this.navToolstrip.Size = new System.Drawing.Size(515, 25);
-            this.navToolstrip.TabIndex = 0;
-            this.navToolstrip.Text = "toolStrip1";
+            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.lblStatus,
+            this.progressBar});
+            this.statusStrip1.Location = new System.Drawing.Point(0, 370);
+            this.statusStrip1.Name = "statusStrip1";
+            this.statusStrip1.Size = new System.Drawing.Size(497, 22);
+            this.statusStrip1.TabIndex = 1;
+            this.statusStrip1.Text = "statusStrip1";
             // 
-            // btnBack
+            // lblStatus
             // 
-            this.btnBack.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
-            this.btnBack.Image = global::Maestro.Base.Properties.Resources.arrow_180;
-            this.btnBack.ImageTransparentColor = System.Drawing.Color.Magenta;
-            this.btnBack.Name = "btnBack";
-            this.btnBack.Size = new System.Drawing.Size(23, 22);
-            this.btnBack.Text = "toolStripButton1";
-            this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
+            this.lblStatus.Name = "lblStatus";
+            this.lblStatus.Size = new System.Drawing.Size(380, 17);
+            this.lblStatus.Spring = true;
+            this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
-            // btnForward
+            // progressBar
             // 
-            this.btnForward.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
-            this.btnForward.Image = global::Maestro.Base.Properties.Resources.arrow;
-            this.btnForward.ImageTransparentColor = System.Drawing.Color.Magenta;
-            this.btnForward.Name = "btnForward";
-            this.btnForward.Size = new System.Drawing.Size(23, 22);
-            this.btnForward.Text = "toolStripButton2";
-            this.btnForward.Click += new System.EventHandler(this.btnForward_Click);
+            this.progressBar.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+            this.progressBar.Name = "progressBar";
+            this.progressBar.Size = new System.Drawing.Size(100, 16);
             // 
-            // toolStripSeparator1
+            // navToolstrip
             // 
-            this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+            this.navToolstrip.Controls.Add(this.btnGo);
+            this.navToolstrip.Controls.Add(this.txtUrl);
+            this.navToolstrip.Controls.Add(this.label1);
+            this.navToolstrip.Controls.Add(this.btnStop);
+            this.navToolstrip.Controls.Add(this.btnRefresh);
+            this.navToolstrip.Controls.Add(this.btnForward);
+            this.navToolstrip.Controls.Add(this.btnBack);
+            this.navToolstrip.Dock = System.Windows.Forms.DockStyle.Top;
+            this.navToolstrip.Location = new System.Drawing.Point(0, 0);
+            this.navToolstrip.Name = "navToolstrip";
+            this.navToolstrip.Size = new System.Drawing.Size(497, 31);
+            this.navToolstrip.TabIndex = 3;
             // 
-            // btnRefresh
-            // 
-            this.btnRefresh.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
-            this.btnRefresh.Image = global::Maestro.Base.Properties.Resources.arrow_circle_045_left;
-            this.btnRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
-            this.btnRefresh.Name = "btnRefresh";
-            this.btnRefresh.Size = new System.Drawing.Size(23, 22);
-            this.btnRefresh.Text = "toolStripButton5";
-            this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
-            // 
-            // btnStop
-            // 
-            this.btnStop.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
-            this.btnStop.Image = global::Maestro.Base.Properties.Resources.cross_circle;
-            this.btnStop.ImageTransparentColor = System.Drawing.Color.Magenta;
-            this.btnStop.Name = "btnStop";
-            this.btnStop.Size = new System.Drawing.Size(23, 22);
-            this.btnStop.Text = "toolStripButton3";
-            this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
-            // 
-            // loadingIndicator
-            // 
-            this.loadingIndicator.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
-            this.loadingIndicator.Name = "loadingIndicator";
-            this.loadingIndicator.Size = new System.Drawing.Size(50, 22);
-            this.loadingIndicator.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
-            this.loadingIndicator.Visible = false;
-            // 
             // btnGo
             // 
-            this.btnGo.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
-            this.btnGo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
-            this.btnGo.Image = global::Maestro.Base.Properties.Resources.navigation_000_white;
-            this.btnGo.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnGo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnGo.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.btnGo.Image = global::Maestro.Base.Properties.Resources.arrow;
+            this.btnGo.Location = new System.Drawing.Point(471, 4);
             this.btnGo.Name = "btnGo";
-            this.btnGo.Size = new System.Drawing.Size(23, 22);
-            this.btnGo.Text = "toolStripButton4";
+            this.btnGo.Size = new System.Drawing.Size(23, 23);
+            this.btnGo.TabIndex = 7;
+            this.btnGo.UseVisualStyleBackColor = true;
             this.btnGo.Click += new System.EventHandler(this.btnGo_Click);
             // 
-            // toolStripSeparator2
-            // 
-            this.toolStripSeparator2.Name = "toolStripSeparator2";
-            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
-            // 
             // txtUrl
             // 
-            this.txtUrl.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+            this.txtUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtUrl.Location = new System.Drawing.Point(171, 6);
             this.txtUrl.Name = "txtUrl";
-            this.txtUrl.Size = new System.Drawing.Size(247, 25);
+            this.txtUrl.Size = new System.Drawing.Size(294, 20);
+            this.txtUrl.TabIndex = 5;
+            this.txtUrl.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtUrl_KeyUp);
             // 
-            // lblUrl
+            // label1
             // 
-            this.lblUrl.Name = "lblUrl";
-            this.lblUrl.Size = new System.Drawing.Size(46, 22);
-            this.lblUrl.Text = "Address";
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(120, 9);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(45, 13);
+            this.label1.TabIndex = 4;
+            this.label1.Text = "Address";
             // 
-            // statusStrip1
+            // btnStop
             // 
-            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.lblStatus});
-            this.statusStrip1.Location = new System.Drawing.Point(0, 370);
-            this.statusStrip1.Name = "statusStrip1";
-            this.statusStrip1.Size = new System.Drawing.Size(515, 22);
-            this.statusStrip1.TabIndex = 1;
-            this.statusStrip1.Text = "statusStrip1";
+            this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.btnStop.Image = global::Maestro.Base.Properties.Resources.cross_circle;
+            this.btnStop.Location = new System.Drawing.Point(91, 4);
+            this.btnStop.Name = "btnStop";
+            this.btnStop.Size = new System.Drawing.Size(23, 23);
+            this.btnStop.TabIndex = 3;
+            this.btnStop.UseVisualStyleBackColor = true;
+            this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
             // 
-            // lblStatus
+            // btnRefresh
             // 
-            this.lblStatus.Name = "lblStatus";
-            this.lblStatus.Size = new System.Drawing.Size(0, 17);
+            this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.btnRefresh.Image = global::Maestro.Base.Properties.Resources.arrow_circle_045_left;
+            this.btnRefresh.Location = new System.Drawing.Point(62, 4);
+            this.btnRefresh.Name = "btnRefresh";
+            this.btnRefresh.Size = new System.Drawing.Size(23, 23);
+            this.btnRefresh.TabIndex = 2;
+            this.btnRefresh.UseVisualStyleBackColor = true;
+            this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
             // 
+            // btnForward
+            // 
+            this.btnForward.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.btnForward.Image = global::Maestro.Base.Properties.Resources.navigation_000_white;
+            this.btnForward.Location = new System.Drawing.Point(33, 4);
+            this.btnForward.Name = "btnForward";
+            this.btnForward.Size = new System.Drawing.Size(23, 23);
+            this.btnForward.TabIndex = 1;
+            this.btnForward.UseVisualStyleBackColor = true;
+            this.btnForward.Click += new System.EventHandler(this.btnForward_Click);
+            // 
+            // btnBack
+            // 
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.btnBack.Image = global::Maestro.Base.Properties.Resources.navigation_180_white;
+            this.btnBack.Location = new System.Drawing.Point(4, 4);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(23, 23);
+            this.btnBack.TabIndex = 0;
+            this.btnBack.UseVisualStyleBackColor = true;
+            this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
+            // 
             // browser
             // 
             this.browser.AllowWebBrowserDrop = false;
             this.browser.Dock = System.Windows.Forms.DockStyle.Fill;
             this.browser.IsWebBrowserContextMenuEnabled = false;
-            this.browser.Location = new System.Drawing.Point(0, 25);
+            this.browser.Location = new System.Drawing.Point(0, 31);
             this.browser.MinimumSize = new System.Drawing.Size(20, 20);
             this.browser.Name = "browser";
             this.browser.ScriptErrorsSuppressed = true;
-            this.browser.Size = new System.Drawing.Size(515, 345);
-            this.browser.TabIndex = 2;
+            this.browser.Size = new System.Drawing.Size(497, 339);
+            this.browser.TabIndex = 4;
+            this.browser.ProgressChanged += new System.Windows.Forms.WebBrowserProgressChangedEventHandler(this.browser_ProgressChanged);
+            this.browser.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.browser_DocumentCompleted);
             // 
             // EmbeddedWebBrowser
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.browser);
-            this.Controls.Add(this.statusStrip1);
             this.Controls.Add(this.navToolstrip);
+            this.Controls.Add(this.statusStrip1);
             this.Name = "EmbeddedWebBrowser";
-            this.Size = new System.Drawing.Size(515, 392);
-            this.navToolstrip.ResumeLayout(false);
-            this.navToolstrip.PerformLayout();
+            this.Size = new System.Drawing.Size(497, 392);
             this.statusStrip1.ResumeLayout(false);
             this.statusStrip1.PerformLayout();
+            this.navToolstrip.ResumeLayout(false);
+            this.navToolstrip.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -193,19 +192,17 @@
 
         #endregion
 
-        private System.Windows.Forms.ToolStrip navToolstrip;
-        private System.Windows.Forms.ToolStripButton btnBack;
-        private System.Windows.Forms.ToolStripButton btnForward;
-        private System.Windows.Forms.ToolStripButton btnRefresh;
-        private System.Windows.Forms.ToolStripButton btnStop;
-        private System.Windows.Forms.ToolStripButton btnGo;
-        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
-        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
-        private Maestro.Shared.UI.ToolStripSpringTextBox txtUrl;
-        private System.Windows.Forms.ToolStripLabel lblUrl;
-        private System.Windows.Forms.ToolStripProgressBar loadingIndicator;
         private System.Windows.Forms.StatusStrip statusStrip1;
-        private System.Windows.Forms.WebBrowser browser;
         private System.Windows.Forms.ToolStripStatusLabel lblStatus;
+        private System.Windows.Forms.Panel navToolstrip;
+        private System.Windows.Forms.Button btnRefresh;
+        private System.Windows.Forms.Button btnForward;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.WebBrowser browser;
+        private System.Windows.Forms.Button btnGo;
+        private System.Windows.Forms.TextBox txtUrl;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Button btnStop;
+        private System.Windows.Forms.ToolStripProgressBar progressBar;
     }
 }

Modified: sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs	2010-05-14 06:10:27 UTC (rev 4875)
+++ sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.cs	2010-05-14 06:55:46 UTC (rev 4876)
@@ -73,6 +73,7 @@
         public string Url
         {
             get { return txtUrl.Text; }
+            set { txtUrl.Text = value; }
         }
 
         private void btnBack_Click(object sender, EventArgs e)
@@ -146,18 +147,6 @@
             }
         }
 
-        bool IWebBrowserView.ShowLoadingIndicator
-        {
-            get
-            {
-                return loadingIndicator.Visible;
-            }
-            set
-            {
-                loadingIndicator.Visible = value;
-            }
-        }
-
         void IWebBrowserView.Back()
         {
             browser.GoBack();
@@ -215,6 +204,22 @@
         {
             lblStatus.Text = text;
         }
+
+        private void browser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
+        {
+            progressBar.Maximum = (int)e.MaximumProgress;
+            progressBar.Value = (int)e.CurrentProgress;
+            this.Title = browser.Document.Title;
+            this.Description = browser.Document.Title + " - Embedded Web Browser"; //LOCALIZE
+        }
+
+        private void txtUrl_KeyUp(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                btnGo_Click(this, EventArgs.Empty);
+            }
+        }
     }
 
     internal interface IWebBrowserView
@@ -228,12 +233,11 @@
         event EventHandler BrowserLoading;
         event EventHandler BrowserLoaded;
 
-        string Url { get; }
+        string Url { get; set; }
 
         bool GoBackEnabled { get; set; }
         bool GoForwardEnabled { get; set; }
         bool StopEnabled { get; set; }
-        bool ShowLoadingIndicator { get; set; }
 
         void Back();
         void Forward();
@@ -263,7 +267,7 @@
             _view.StopLoading += new EventHandler(OnStopLoading);
 
             _view.GoBackEnabled = HasHistory();
-            _view.GoForwardEnabled = IsCurrentUrl();
+            _view.GoForwardEnabled = CanGoForward();
         }
 
         void OnStopLoading(object sender, EventArgs e)
@@ -271,12 +275,12 @@
             _view.Stop();
             _view.StopEnabled = false;
             _view.GoBackEnabled = HasHistory();
-            _view.GoForwardEnabled = IsCurrentUrl();
+            _view.GoForwardEnabled = CanGoForward();
         }
 
-        private bool IsCurrentUrl()
+        private bool CanGoForward()
         {
-            return _position == _urls.Count - 1;
+            return _position < _urls.Count - 1;
         }
 
         private bool HasHistory()
@@ -286,15 +290,21 @@
 
         private void PruneForwardUrls()
         {
-            for (int i = _urls.Count; i > _position; i--)
+            if (_urls.Count > 0)
             {
-                _urls.RemoveAt(i);
+                for (int i = _urls.Count - 1; i > _position; i--)
+                {
+                    _urls.RemoveAt(i);
+                }
             }
         }
 
         void OnRefreshPage(object sender, EventArgs e)
         {
             _view.Refresh();
+            _view.StopEnabled = true;
+            _view.GoBackEnabled = HasHistory();
+            _view.GoForwardEnabled = CanGoForward();
         }
 
         void OnNavigate(object sender, EventArgs e)
@@ -313,7 +323,7 @@
 
             //Otherwise if we're not at the current url, prune any urls
             //ahead.
-            if (!IsCurrentUrl())
+            if (!CanGoForward())
                 PruneForwardUrls();
 
             //Now navigate
@@ -322,33 +332,35 @@
             _position++;
 
             _view.GoBackEnabled = HasHistory();
-            _view.GoForwardEnabled = IsCurrentUrl();
+            _view.GoForwardEnabled = CanGoForward();
         }
 
         void OnGoForward(object sender, EventArgs e)
         {
+            _position++;
             _view.Forward();
             _view.GoBackEnabled = HasHistory();
-            _view.GoForwardEnabled = IsCurrentUrl();
+            _view.GoForwardEnabled = CanGoForward();
+            _view.Url = _urls[_position];
         }
 
         void OnGoBack(object sender, EventArgs e)
         {
+            _position--;
             _view.Back();
             _view.GoBackEnabled = HasHistory();
-            _view.GoForwardEnabled = IsCurrentUrl();
+            _view.GoForwardEnabled = CanGoForward();
+            _view.Url = _urls[_position];
         }
 
         void OnBrowserLoading(object sender, EventArgs e)
         {
-            _view.ShowLoadingIndicator = true;
             _view.StopEnabled = true;
             _view.SetStatusText(Properties.Resources.Browser_Loading);
         }
 
         void OnBrowserLoaded(object sender, EventArgs e)
         {
-            _view.ShowLoadingIndicator = false;
             _view.StopEnabled = false;
             _view.SetStatusText(Properties.Resources.Browser_Complete);
         }

Modified: sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.resx
===================================================================
--- sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.resx	2010-05-14 06:10:27 UTC (rev 4875)
+++ sandbox/maestro-2.5/Maestro.Base/UI/EmbeddedWebBrowser.resx	2010-05-14 06:55:46 UTC (rev 4876)
@@ -117,9 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="navToolstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>129, 17</value>
   </metadata>



More information about the mapguide-commits mailing list