|
|
|
@ -44,21 +44,17 @@ namespace HtmlHelp2 |
|
|
|
private int internalIndex = 0; |
|
|
|
private int internalIndex = 0; |
|
|
|
private StringCollection dynamicHelpTerms = new StringCollection(); |
|
|
|
private StringCollection dynamicHelpTerms = new StringCollection(); |
|
|
|
private string debugPreElement = String.Empty; |
|
|
|
private string debugPreElement = String.Empty; |
|
|
|
private bool enableDebugInfo = true; |
|
|
|
private bool enableDebugInfo = false; |
|
|
|
|
|
|
|
|
|
|
|
public override Control Control |
|
|
|
public override Control Control |
|
|
|
{ |
|
|
|
{ |
|
|
|
get { return dynamicHelpBrowser; } |
|
|
|
get { return dynamicHelpBrowser; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override void Dispose() |
|
|
|
// public override void Dispose()
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
try |
|
|
|
// dynamicHelpBrowser.Dispose();
|
|
|
|
{ |
|
|
|
// }
|
|
|
|
dynamicHelpBrowser.Dispose(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override void RedrawContent() |
|
|
|
public override void RedrawContent() |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -78,64 +74,47 @@ namespace HtmlHelp2 |
|
|
|
private void BuildDynamicHelpList(string expectedLanguage) |
|
|
|
private void BuildDynamicHelpList(string expectedLanguage) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(this.dynamicHelpTerms.Count == 0) return; |
|
|
|
if(this.dynamicHelpTerms.Count == 0) return; |
|
|
|
|
|
|
|
this.RemoveAllChildren(); |
|
|
|
|
|
|
|
this.debugPreElement = String.Empty; |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
Cursor.Current = Cursors.WaitCursor; |
|
|
|
|
|
|
|
foreach(string currentHelpTerm in dynamicHelpTerms) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.RemoveAllChildren(); |
|
|
|
this.CallDynamicHelp(currentHelpTerm, expectedLanguage, false); |
|
|
|
this.debugPreElement = String.Empty; |
|
|
|
|
|
|
|
bool result = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cursor.Current = Cursors.WaitCursor; |
|
|
|
|
|
|
|
foreach(string currentHelpTerm in dynamicHelpTerms) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(currentHelpTerm.StartsWith("!") && !result) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result = this.CallDynamicHelp(currentHelpTerm.Substring(1), expectedLanguage, false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if(!currentHelpTerm.StartsWith("!")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.CallDynamicHelp(currentHelpTerm, expectedLanguage, false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Cursor.Current = Cursors.Default; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.enableDebugInfo) this.CreateDebugPre(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
Cursor.Current = Cursors.Default; |
|
|
|
|
|
|
|
if(this.enableDebugInfo) this.CreateDebugPre(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private bool CallDynamicHelp(string searchTerm, string expectedLanguage, bool keywordSearch) |
|
|
|
private bool CallDynamicHelp(string searchTerm, string expectedLanguage, bool keywordSearch) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(!HtmlHelp2Environment.IsReady || HtmlHelp2Environment.DynamicHelpIsBusy) return false; |
|
|
|
if(!HtmlHelp2Environment.IsReady || HtmlHelp2Environment.DynamicHelpIsBusy) return false; |
|
|
|
bool result = false; |
|
|
|
bool result = false; |
|
|
|
|
|
|
|
IHxTopicList topics = null; |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
IHxTopicList topics = null; |
|
|
|
|
|
|
|
if(keywordSearch) topics = HtmlHelp2Environment.GetMatchingTopicsForKeywordSearch(searchTerm); |
|
|
|
if(keywordSearch) topics = HtmlHelp2Environment.GetMatchingTopicsForKeywordSearch(searchTerm); |
|
|
|
else topics = HtmlHelp2Environment.GetMatchingTopicsForDynamicHelp(searchTerm); |
|
|
|
else topics = HtmlHelp2Environment.GetMatchingTopicsForDynamicHelp(searchTerm); |
|
|
|
|
|
|
|
result = (topics != null && topics.Count > 0); |
|
|
|
|
|
|
|
|
|
|
|
this.debugPreElement += String.Format("{0} ({1}): {2} {3}<br>", |
|
|
|
this.debugPreElement += String.Format("{0} ({1}): {2} {3}<br>", |
|
|
|
searchTerm, (keywordSearch)?"Kwd":"DH", |
|
|
|
searchTerm, (keywordSearch)?"Kwd":"DH", |
|
|
|
topics.Count.ToString(), (topics.Count == 1)?"topic":"topics"); |
|
|
|
topics.Count.ToString(), (topics.Count == 1)?"topic":"topics"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch {} |
|
|
|
|
|
|
|
|
|
|
|
if(topics.Count > 0) |
|
|
|
if(result) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
List<IHxTopic> newTopics = this.SortTopics(topics); |
|
|
|
|
|
|
|
foreach(IHxTopic topic in newTopics) |
|
|
|
{ |
|
|
|
{ |
|
|
|
result = true; |
|
|
|
this.BuildNewChild(topic.Location, |
|
|
|
|
|
|
|
topic.get_Title(HxTopicGetTitleType.HxTopicGetTOCTitle, |
|
|
|
List<IHxTopic> newTopics = this.SortTopics(topics); |
|
|
|
HxTopicGetTitleDefVal.HxTopicGetTitleFileName), |
|
|
|
// IHxTopic[] newTopics = this.SortTopics(topics);
|
|
|
|
topic.URL); |
|
|
|
foreach(IHxTopic topic in newTopics) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.BuildNewChild(topic.Location, |
|
|
|
|
|
|
|
topic.get_Title(HxTopicGetTitleType.HxTopicGetTOCTitle, |
|
|
|
|
|
|
|
HxTopicGetTitleDefVal.HxTopicGetTitleFileName), |
|
|
|
|
|
|
|
topic.URL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -158,24 +137,20 @@ namespace HtmlHelp2 |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(elem.GetAttribute("className") == "section") |
|
|
|
if(elem.GetAttribute("className") == "section") |
|
|
|
{ |
|
|
|
{ |
|
|
|
try |
|
|
|
HtmlElement sectionBlock = elem.FirstChild.NextSibling; |
|
|
|
{ |
|
|
|
HtmlElement contentSpan = sectionBlock.NextSibling.NextSibling; |
|
|
|
HtmlElement sectionBlock = elem.FirstChild.NextSibling; |
|
|
|
|
|
|
|
HtmlElement contentSpan = sectionBlock.NextSibling.NextSibling; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(sectionBlock.TagName == "B" && sectionBlock.InnerText == sectionName && |
|
|
|
if(sectionBlock.TagName == "B" && sectionBlock.InnerText == sectionName && |
|
|
|
contentSpan.TagName == "SPAN" && contentSpan.GetAttribute("className") == "content") |
|
|
|
contentSpan.TagName == "SPAN" && contentSpan.GetAttribute("className") == "content") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(!this.DoesLinkExist(contentSpan, topicName, topicUrl)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(!this.DoesLinkExist(contentSpan, topicName, topicUrl)) |
|
|
|
contentSpan.AppendChild(this.CreateNewLink(topicUrl, topicName)); |
|
|
|
{ |
|
|
|
contentSpan.AppendChild(this.CreateABreak()); |
|
|
|
contentSpan.AppendChild(this.CreateNewLink(topicUrl, topicName)); |
|
|
|
|
|
|
|
contentSpan.AppendChild(this.CreateABreak()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -191,7 +166,10 @@ namespace HtmlHelp2 |
|
|
|
|
|
|
|
|
|
|
|
this.internalIndex++; |
|
|
|
this.internalIndex++; |
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
catch(Exception ex) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LoggingService.Error("Help 2.0: cannot build node for dynamic help; " + ex.ToString()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private HtmlElement CreateNewSection(string sectionName, out HtmlElement linkNode) |
|
|
|
private HtmlElement CreateNewSection(string sectionName, out HtmlElement linkNode) |
|
|
|
@ -310,7 +288,10 @@ namespace HtmlHelp2 |
|
|
|
objArray[0] = (object)sectionId; |
|
|
|
objArray[0] = (object)sectionId; |
|
|
|
dynamicHelpBrowser.Document.InvokeScript("ExpandCollapse", objArray); |
|
|
|
dynamicHelpBrowser.Document.InvokeScript("ExpandCollapse", objArray); |
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
catch(Exception ex) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LoggingService.Error("Help 2.0: cannot run script; " + ex.ToString()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void OnLinkClick(object sender, HtmlElementEventArgs e) |
|
|
|
private void OnLinkClick(object sender, HtmlElementEventArgs e) |
|
|
|
@ -326,43 +307,39 @@ namespace HtmlHelp2 |
|
|
|
#region Taken from DefinitionView.cs
|
|
|
|
#region Taken from DefinitionView.cs
|
|
|
|
private void UpdateTick(object sender, ParserUpdateStepEventArgs e) |
|
|
|
private void UpdateTick(object sender, ParserUpdateStepEventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
try |
|
|
|
this.dynamicHelpTerms.Clear(); |
|
|
|
{ |
|
|
|
|
|
|
|
this.dynamicHelpTerms.Clear(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ResolveResult res = ResolveAtCaret(e); |
|
|
|
ResolveResult res = ResolveAtCaret(e); |
|
|
|
if(res == null) return; |
|
|
|
if(res == null) return; |
|
|
|
|
|
|
|
|
|
|
|
if(res != null && res.ResolvedType != null) |
|
|
|
if(res != null && res.ResolvedType != null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.AddToStringCollection(res.ResolvedType.FullyQualifiedName); |
|
|
|
this.AddToStringCollection(res.ResolvedType.FullyQualifiedName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MemberResolveResult member = res as MemberResolveResult; |
|
|
|
MemberResolveResult member = res as MemberResolveResult; |
|
|
|
NamespaceResolveResult nspace = res as NamespaceResolveResult; |
|
|
|
NamespaceResolveResult nspace = res as NamespaceResolveResult; |
|
|
|
MethodResolveResult method = res as MethodResolveResult; |
|
|
|
MethodResolveResult method = res as MethodResolveResult; |
|
|
|
TypeResolveResult types = res as TypeResolveResult; |
|
|
|
TypeResolveResult types = res as TypeResolveResult; |
|
|
|
|
|
|
|
|
|
|
|
if(member != null && member.ResolvedMember != null) |
|
|
|
if(member != null && member.ResolvedMember != null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.AddToStringCollection(0, member.ResolvedMember.FullyQualifiedName); |
|
|
|
this.AddToStringCollection(0, member.ResolvedMember.FullyQualifiedName); |
|
|
|
} |
|
|
|
|
|
|
|
if(nspace != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.AddToStringCollection(0, nspace.Name); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(method != null && method.ContainingType != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.AddToStringCollection(0, method.ContainingType.FullyQualifiedName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(types != null && types.ResolvedClass != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.AddToStringCollection(0, types.ResolvedClass.FullyQualifiedName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WorkbenchSingleton.SafeThreadAsyncCall(this, "BuildDynamicHelpList", ""); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
if(nspace != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.AddToStringCollection(0, nspace.Name); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(method != null && method.ContainingType != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.AddToStringCollection(0, method.ContainingType.FullyQualifiedName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(types != null && types.ResolvedClass != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.AddToStringCollection(0, types.ResolvedClass.FullyQualifiedName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WorkbenchSingleton.SafeThreadAsyncCall(this, "BuildDynamicHelpList", ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private ResolveResult ResolveAtCaret(ParserUpdateStepEventArgs e) |
|
|
|
private ResolveResult ResolveAtCaret(ParserUpdateStepEventArgs e) |
|
|
|
@ -403,28 +380,19 @@ namespace HtmlHelp2 |
|
|
|
private void CallDynamicHelpForFormsDesigner(object selectedObject, GridItem selectedItem) |
|
|
|
private void CallDynamicHelpForFormsDesigner(object selectedObject, GridItem selectedItem) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(selectedObject == null) return; |
|
|
|
if(selectedObject == null) return; |
|
|
|
|
|
|
|
this.dynamicHelpTerms.Clear(); |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
Type myObject = selectedObject.GetType(); |
|
|
|
|
|
|
|
if(selectedItem != null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.dynamicHelpTerms.Clear(); |
|
|
|
foreach(Type type in TypeHandling.FindDeclaringType(myObject, selectedItem.Label)) |
|
|
|
|
|
|
|
|
|
|
|
Type myObject = selectedObject.GetType(); |
|
|
|
|
|
|
|
if(selectedItem != null) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach(Type type in TypeHandling.FindDeclaringType(myObject, selectedItem.Label)) |
|
|
|
this.AddToStringCollection(String.Format("{0}.{1}", type.FullName, selectedItem.Label)); |
|
|
|
{ |
|
|
|
|
|
|
|
this.AddToStringCollection(String.Format("{0}.{1}", |
|
|
|
|
|
|
|
type.FullName, |
|
|
|
|
|
|
|
selectedItem.Label)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.AddToStringCollection(myObject.FullName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WorkbenchSingleton.SafeThreadAsyncCall(this, |
|
|
|
|
|
|
|
"BuildDynamicHelpList", |
|
|
|
|
|
|
|
""); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
this.AddToStringCollection(myObject.FullName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WorkbenchSingleton.SafeThreadAsyncCall(this, "BuildDynamicHelpList", ""); |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
@ -435,8 +403,10 @@ namespace HtmlHelp2 |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
dynamicHelpBrowser.Document.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.BeforeEnd, this.CreateABreak()); |
|
|
|
dynamicHelpBrowser.Document.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.BeforeEnd, |
|
|
|
dynamicHelpBrowser.Document.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.BeforeEnd, this.CreateABreak()); |
|
|
|
this.CreateABreak()); |
|
|
|
|
|
|
|
dynamicHelpBrowser.Document.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.BeforeEnd, |
|
|
|
|
|
|
|
this.CreateABreak()); |
|
|
|
|
|
|
|
|
|
|
|
HtmlElement pre = dynamicHelpBrowser.CreateHtmlElement("pre"); |
|
|
|
HtmlElement pre = dynamicHelpBrowser.CreateHtmlElement("pre"); |
|
|
|
pre.InnerHtml = "--- Dynamic Help Debug ---<br>" + this.debugPreElement; |
|
|
|
pre.InnerHtml = "--- Dynamic Help Debug ---<br>" + this.debugPreElement; |
|
|
|
@ -484,7 +454,10 @@ namespace HtmlHelp2 |
|
|
|
result.Sort(topicComparer); |
|
|
|
result.Sort(topicComparer); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch {} |
|
|
|
catch(Exception ex) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LoggingService.Error("Help 2.0: error while rebuild topics; " + ex.ToString()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -530,33 +503,18 @@ namespace HtmlHelp2 |
|
|
|
|
|
|
|
|
|
|
|
public void RemoveAllChildren() |
|
|
|
public void RemoveAllChildren() |
|
|
|
{ |
|
|
|
{ |
|
|
|
try |
|
|
|
axWebBrowser.Document.Body.InnerHtml = ""; |
|
|
|
{ |
|
|
|
|
|
|
|
axWebBrowser.Document.Body.InnerHtml = ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch {} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public HtmlElement CreateHtmlElement(string elementName) |
|
|
|
public HtmlElement CreateHtmlElement(string elementName) |
|
|
|
{ |
|
|
|
{ |
|
|
|
try |
|
|
|
HtmlElement newElement = axWebBrowser.Document.CreateElement(elementName); |
|
|
|
{ |
|
|
|
return newElement; |
|
|
|
HtmlElement newElement = axWebBrowser.Document.CreateElement(elementName); |
|
|
|
|
|
|
|
return newElement; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void InsertHtmlElement(HtmlElementInsertionOrientation insertWhere, HtmlElement insertWhat) |
|
|
|
public void InsertHtmlElement(HtmlElementInsertionOrientation insertWhere, HtmlElement insertWhat) |
|
|
|
{ |
|
|
|
{ |
|
|
|
try |
|
|
|
axWebBrowser.Document.Body.InsertAdjacentElement(insertWhere, insertWhat); |
|
|
|
{ |
|
|
|
|
|
|
|
axWebBrowser.Document.Body.InsertAdjacentElement(insertWhere, insertWhat); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch {} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -580,14 +538,15 @@ namespace HtmlHelp2 |
|
|
|
Size = new Size(500, 500); |
|
|
|
Size = new Size(500, 500); |
|
|
|
|
|
|
|
|
|
|
|
Controls.Add(axWebBrowser); |
|
|
|
Controls.Add(axWebBrowser); |
|
|
|
axWebBrowser.Dock = DockStyle.Fill; |
|
|
|
axWebBrowser.Dock = DockStyle.Fill; |
|
|
|
axWebBrowser.WebBrowserShortcutsEnabled = false; |
|
|
|
axWebBrowser.WebBrowserShortcutsEnabled = false; |
|
|
|
axWebBrowser.IsWebBrowserContextMenuEnabled = false; |
|
|
|
axWebBrowser.IsWebBrowserContextMenuEnabled = false; |
|
|
|
axWebBrowser.AllowWebBrowserDrop = false; |
|
|
|
axWebBrowser.AllowWebBrowserDrop = false; |
|
|
|
|
|
|
|
|
|
|
|
Controls.Add(dynamicHelpToolbar); |
|
|
|
Controls.Add(dynamicHelpToolbar); |
|
|
|
dynamicHelpToolbar.Dock = DockStyle.Top; |
|
|
|
dynamicHelpToolbar.Dock = DockStyle.Top; |
|
|
|
dynamicHelpToolbar.AllowItemReorder = false; |
|
|
|
dynamicHelpToolbar.AllowItemReorder = false; |
|
|
|
|
|
|
|
dynamicHelpToolbar.Enabled = HtmlHelp2Environment.IsReady; |
|
|
|
for(int i = 0; i < toolbarButtons.Length; i++) |
|
|
|
for(int i = 0; i < toolbarButtons.Length; i++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ToolStripButton button = new ToolStripButton(); |
|
|
|
ToolStripButton button = new ToolStripButton(); |
|
|
|
@ -612,15 +571,13 @@ namespace HtmlHelp2 |
|
|
|
|
|
|
|
|
|
|
|
private void LoadDynamicHelpPage() |
|
|
|
private void LoadDynamicHelpPage() |
|
|
|
{ |
|
|
|
{ |
|
|
|
try |
|
|
|
if(!HtmlHelp2Environment.IsReady) return; |
|
|
|
{ |
|
|
|
|
|
|
|
string url = String.Format("{0}\\context.html", |
|
|
|
|
|
|
|
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!File.Exists(url)) url = "about:blank"; |
|
|
|
string url = String.Format("{0}\\context.html", |
|
|
|
axWebBrowser.Navigate(url); |
|
|
|
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); |
|
|
|
} |
|
|
|
|
|
|
|
catch {} |
|
|
|
if(!File.Exists(url)) url = "about:blank"; |
|
|
|
|
|
|
|
axWebBrowser.Navigate(url); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void ToolStripButtonClicked(object sender, EventArgs e) |
|
|
|
private void ToolStripButtonClicked(object sender, EventArgs e) |
|
|
|
|