/[RomCheater]/trunk/RomCheater.ScratchPad/ScratchPad.cs
ViewVC logotype

Diff of /trunk/RomCheater.ScratchPad/ScratchPad.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.ScratchPad/ScratchPad.cs	2013/06/20 23:35:02	780
+++ trunk/RomCheater.ScratchPad/ScratchPad.cs	2013/06/21 04:26:36	783
@@ -73,32 +73,9 @@
         {
             //logger.Warn.WriteLine("plugin_OnSelectedProcessChanged::has not been implemented!");           
         }
-
-
-
-
-
-
-
-
-
-
-
+        
         private void ScratchPad_FormClosing(object sender, FormClosingEventArgs e)
         {
-            //if (txtScratchPad.Text != string.Empty && PostInitDone)
-            //{
-            //    DialogResult result = MessageBox.Show("Would you like to save the ScratchPad data before Closing?", "", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
-            //    if (result == DialogResult.Cancel)
-            //    {
-            //        e.Cancel = true;
-            //        return;
-            //    }
-            //    if (result == DialogResult.Yes)
-            //    {
-            //        mnuItemSave.PerformClick();
-            //    }
-            //}
             for (int i = 0; i < docuemntList.Count; i++)
             {
                 var Document = docuemntList[i];
@@ -124,6 +101,30 @@
             this.tb.TabPages.Add(t.DocumentTab);
             t.Dock = DockStyle.Fill;
             t.Font = new System.Drawing.Font(this.Font.FontFamily, this.Font.SizeInPoints);
+            t.LinkClicked += new EventHandler<LinkClickedEventArgs>(t_LinkClicked);
+        }
+
+        void t_LinkClicked(object sender, LinkClickedEventArgs e)
+        {
+            //System.Diagnostics.Process.Start(e.LinkText);
+            if (this.plugin != null)
+            {
+                var p = this.plugin.WebBrowserInterface;
+                if (p != null)
+                {
+                    p.Navigate(e.LinkText);
+                }
+                else
+                {
+                    logger.Debug.WriteLine("Could not navigate to url: '{0}'", e.LinkText);
+                    logger.Debug.WriteLine("Could not obtain a handle to the WebBrowser Provider's Interface.");
+                }
+            }
+            else
+            {
+                logger.Debug.WriteLine("Could not navigate to url: '{0}'", e.LinkText);
+                logger.Debug.WriteLine("Loaded plugin is null");
+            }
         }
 
         private void mnuItemNew_Click(object sender, EventArgs e)
@@ -146,28 +147,5 @@
                 int index = e.Args;
                 this.docuemntList.RemoveAt(index);
         }
-
-        //private void txtScratchPad_LinkClicked(object sender, LinkClickedEventArgs e)
-        //{
-        //    //System.Diagnostics.Process.Start(e.LinkText);
-        //    if (this.plugin != null)
-        //    {
-        //        var p = this.plugin.WebBrowserInterface;
-        //        if (p != null)
-        //        {
-        //            p.Navigate(e.LinkText);
-        //        }
-        //        else
-        //        {
-        //            logger.Debug.WriteLine("Could not navigate to url: '{0}'", e.LinkText);
-        //            logger.Debug.WriteLine("Could not obtain a handle to the WebBrowser Provider's Interface.");
-        //        }
-        //    }
-        //    else
-        //    {
-        //        logger.Debug.WriteLine("Could not navigate to url: '{0}'", e.LinkText);
-        //        logger.Debug.WriteLine("Loaded plugin is null");
-        //    }
-        //}
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22