public Help(StudioCore Core) { this.Core = Core; HideOnClose = true; InitializeComponent(); webBrowser.ScriptErrorsSuppressed = true; try { #if DEBUG string helpDocPath = @"..\..\..\..\Doc\main.html"; #else string helpDocPath = @"Doc\main.html"; #endif string fullPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Application.ExecutablePath), helpDocPath); Core.AddToOutput("Help Path: " + fullPath); webBrowser.Navigate(fullPath); } catch (Exception ex) { Debug.Log("Got exception: " + ex.ToString()); Core.AddToOutput("Help exception: " + ex.ToString()); } webBrowser.CanGoBackChanged += new EventHandler(webBrowser_CanGoBackChanged); webBrowser.CanGoForwardChanged += new EventHandler(webBrowser_CanGoForwardChanged); toolStripBtnForward.Enabled = webBrowser.CanGoForward; toolStripBtnBack.Enabled = webBrowser.CanGoBack; }
public void RunTask() { try { TaskSuccessful = ProcessTask(); } catch (Exception ex) { Core.AddToOutput("An exception occurred: " + ex.ToString() + System.Environment.NewLine); } if (TaskFinished != null) { TaskFinished(this); } }
public void RunTask() { try { TaskSuccessful = ProcessTask(); } catch (Exception ex) { Core.AddToOutput("An exception occurred: " + ex.Message); } if (TaskFinished != null) { TaskFinished(this); } }