", int.MaxValue), "");
+ Verify(BalanceForUrl("test", 20), "tes");
- Verify(Balance("test", 2, new TextOnlyCostFilter()), "te");
- Verify(Balance("test test", 8, new TextOnlyCostFilter()), "test");
- }
+ Verify(Balance("test", 2, new TextOnlyCostFilter()), "te");
+ Verify(Balance("test test", 8, new TextOnlyCostFilter()), "test");
+ }
- private static void Verify(string a, string b)
- {
- if (a != b)
- throw new Exception(a + " != " + b);
- }
+ private static void Verify(string a, string b)
+ {
+ if (a != b)
+ throw new Exception(a + " != " + b);
+ }
- private class DoubleCostFilter : HTMLBalancerCostFilter
- {
- public override int ElementCost(Element el)
- {
- return el.ToString().Length * 2;
- }
+ private class DoubleCostFilter : HTMLBalancerCostFilter
+ {
+ public override int ElementCost(Element el)
+ {
+ return el.ToString().Length * 2;
+ }
- protected override int CharCost(char c)
- {
- return 2;
- }
- }
+ protected override int CharCost(char c)
+ {
+ return 2;
+ }
+ }
#endif
}
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLDocumentHelper.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLDocumentHelper.cs
index 50a9fdd9..f7117fe6 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLDocumentHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLDocumentHelper.cs
@@ -68,11 +68,11 @@ namespace OpenLiveWriter.CoreServices
html = html.Replace("url(" + UrlHelper.CleanUpUrl(url) + ")", "Url(" + newUrl + ")"); // url(_)
html = html.Replace("url( " + UrlHelper.CleanUpUrl(url) + " )", "Url(" + newUrl + ")"); // url( _ )
#else
- string pattern1 = @"(=?\s*(?:'|"")?)(" + Regex.Escape(cleanedUpUrl) + @")((?:""|')?\s*>?)";
- html = Regex.Replace(html, pattern1, new MatchEvaluator(helper.MatchEvaluator1));
+ string pattern1 = @"(=?\s*(?:'|"")?)(" + Regex.Escape(cleanedUpUrl) + @")((?:""|')?\s*>?)";
+ html = Regex.Replace(html, pattern1, new MatchEvaluator(helper.MatchEvaluator1));
- string pattern2 = @"url\(\s*" + Regex.Escape(cleanedUpUrl) + @"\s*\)";
- html = Regex.Replace(html, pattern2, "Url(" + newUrl + ")", RegexOptions.IgnoreCase);
+ string pattern2 = @"url\(\s*" + Regex.Escape(cleanedUpUrl) + @"\s*\)";
+ html = Regex.Replace(html, pattern2, "Url(" + newUrl + ")", RegexOptions.IgnoreCase);
#endif
// HACK: Bug 1380. Be careful, because there can be some crazy things, like escaped tabs in URLs!
@@ -91,13 +91,13 @@ namespace OpenLiveWriter.CoreServices
html = html.Replace("url(" + HttpUtility.UrlDecode(UrlHelper.CleanUpUrl(url)) + ")", "Url(" + newUrl + ")");
html = html.Replace("url( " + HttpUtility.UrlDecode(UrlHelper.CleanUpUrl(url)) + " )", "Url(" + newUrl + ")");
#else
- string decodedUrl = HttpUtility.UrlDecode(cleanedUpUrl);
+ string decodedUrl = HttpUtility.UrlDecode(cleanedUpUrl);
- string pattern3 = @"(=?\s*(?:'|"")?)(" + Regex.Escape(decodedUrl) + @")((?:""|')?\s*>?)";
- html = Regex.Replace(html, pattern3, new MatchEvaluator(helper.MatchEvaluator1));
+ string pattern3 = @"(=?\s*(?:'|"")?)(" + Regex.Escape(decodedUrl) + @")((?:""|')?\s*>?)";
+ html = Regex.Replace(html, pattern3, new MatchEvaluator(helper.MatchEvaluator1));
- string pattern4 = @"url\(\s*" + Regex.Escape(decodedUrl) + @"\s*\)";
- html = Regex.Replace(html, pattern4, "Url(" + newUrl + ")", RegexOptions.IgnoreCase);
+ string pattern4 = @"url\(\s*" + Regex.Escape(decodedUrl) + @"\s*\)";
+ html = Regex.Replace(html, pattern4, "Url(" + newUrl + ")", RegexOptions.IgnoreCase);
#endif
// When an absolute path doesn't end with a file or a slash (i.e. http://www.realultimatepower.net)
@@ -323,7 +323,6 @@ namespace OpenLiveWriter.CoreServices
return htmlText;
}
-
///
/// Gets the body text for a given url
///
@@ -350,7 +349,6 @@ namespace OpenLiveWriter.CoreServices
}
-
///
///
///
@@ -509,7 +507,6 @@ namespace OpenLiveWriter.CoreServices
}
-
///
/// Converts an HTML string into an IHTMLDocument2
///
@@ -664,7 +661,6 @@ namespace OpenLiveWriter.CoreServices
return url;
}
-
///
/// Structure of special headers that may begin the HTML at the beginning of an
/// HTMLDocument, but be omitted from the DOM
@@ -1386,7 +1382,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
private static string GetParamValue(IHTMLElement param, string[] attributesToSearch)
{
string relativePath = null;
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLElementHelper.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLElementHelper.cs
index 5666e34e..0ba36088 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLElementHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLElementHelper.cs
@@ -460,7 +460,6 @@ namespace OpenLiveWriter.CoreServices
return newElement;
}
-
///
/// Helper method to remove an element from a document
///
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLThinner.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLThinner.cs
index 822830ee..cde908df 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLThinner.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/HTMLThinner.cs
@@ -11,269 +11,266 @@ using OpenLiveWriter.CoreServices.Progress;
namespace OpenLiveWriter.CoreServices
{
- ///
- /// Summary description for HTMLThinner.
- ///
- public class HTMLThinner
- {
- private class TickableProgressTick : ProgressTick
- {
- public TickableProgressTick(IProgressHost progress, int totalTicks) : base(progress, 100, 100)
- {
- _totalTicks = totalTicks;
- }
- private int _totalTicks = -1;
- private int _currentTicks = 0;
+ ///
+ /// Summary description for HTMLThinner.
+ ///
+ public class HTMLThinner
+ {
+ private class TickableProgressTick : ProgressTick
+ {
+ public TickableProgressTick(IProgressHost progress, int totalTicks) : base(progress, 100, 100)
+ {
+ _totalTicks = totalTicks;
+ }
+ private int _totalTicks = -1;
+ private int _currentTicks = 0;
- public void Tick()
- {
- this.UpdateProgress(Math.Min(_currentTicks++,_totalTicks), _totalTicks);
- }
- }
+ public void Tick()
+ {
+ this.UpdateProgress(Math.Min(_currentTicks++,_totalTicks), _totalTicks);
+ }
+ }
+ public static string Thin(IHTMLElement startElement)
+ {
+ return Thin(startElement, false, SilentProgressHost.Instance);
+ }
- public static string Thin(IHTMLElement startElement)
- {
- return Thin(startElement, false, SilentProgressHost.Instance);
- }
+ public static string Thin(IHTMLElement startElement, IProgressHost progressHost)
+ {
+ return Thin(startElement, false, progressHost);
+ }
- public static string Thin(IHTMLElement startElement, IProgressHost progressHost)
- {
- return Thin(startElement, false, progressHost);
- }
+ public static string Thin(IHTMLElement startElement, bool preserveImages)
+ {
+ return Thin(startElement, preserveImages, SilentProgressHost.Instance);
+ }
- public static string Thin(IHTMLElement startElement, bool preserveImages)
- {
- return Thin(startElement, preserveImages, SilentProgressHost.Instance);
- }
+ public static string Thin(IHTMLElement startElement, bool preserveImages, IProgressHost progressHost)
+ {
+ StringBuilder escapedText = new StringBuilder();
+ if (startElement != null)
+ {
+ IHTMLElementCollection elements = (IHTMLElementCollection)startElement.all;
+ TickableProgressTick progress = new TickableProgressTick(progressHost, elements.length + 1);
+ IHTMLDOMNode startNode = (IHTMLDOMNode) startElement;
+ StripChildNodes(startNode, escapedText, preserveImages, progress);
+ }
+ return escapedText.ToString();
+ }
- public static string Thin(IHTMLElement startElement, bool preserveImages, IProgressHost progressHost)
- {
- StringBuilder escapedText = new StringBuilder();
- if (startElement != null)
- {
- IHTMLElementCollection elements = (IHTMLElementCollection)startElement.all;
- TickableProgressTick progress = new TickableProgressTick(progressHost, elements.length + 1);
- IHTMLDOMNode startNode = (IHTMLDOMNode) startElement;
- StripChildNodes(startNode, escapedText, preserveImages, progress);
- }
- return escapedText.ToString();
- }
+ ///
+ /// Used as a part of HTML thinning to remove extraneous child nodes from an HTMLDOMNode
+ ///
+ /// The node whose children should be stripped
+ /// An HTML string with the DOMNodes cleaned out
+ private static void StripChildNodes(IHTMLDOMNode node, StringBuilder escapedText, bool preserveImages, TickableProgressTick progress)
+ {
- ///
- /// Used as a part of HTML thinning to remove extraneous child nodes from an HTMLDOMNode
- ///
- /// The node whose children should be stripped
- /// An HTML string with the DOMNodes cleaned out
- private static void StripChildNodes(IHTMLDOMNode node, StringBuilder escapedText, bool preserveImages, TickableProgressTick progress)
- {
+ // is this a text node? If so, just get the text and return it
+ if (node.nodeType == HTMLDocumentHelper.HTMLDOMNodeTypes.TextNode)
+ escapedText.Append(HttpUtility.HtmlEncode(node.nodeValue.ToString()));
+ else
+ {
+ progress.Tick();
+ bool tagStillOpen = false;
+ ArrayList preserveTags = PreserveTags;
+ if (preserveImages)
+ preserveTags = PreserveTagsWithImages;
- // is this a text node? If so, just get the text and return it
- if (node.nodeType == HTMLDocumentHelper.HTMLDOMNodeTypes.TextNode)
- escapedText.Append(HttpUtility.HtmlEncode(node.nodeValue.ToString()));
- else
- {
- progress.Tick();
- bool tagStillOpen = false;
- ArrayList preserveTags = PreserveTags;
- if (preserveImages)
- preserveTags = PreserveTagsWithImages;
+ // if we're in an element node (a tag) and we should preserve the tag,
+ // append it to the returned text
+ if (preserveTags.Contains(node.nodeName))
+ {
+ // Append the opening tag element, with any extraneous
+ // attributes stripped
+ escapedText.Append("<" + node.nodeName);
+ StripAttributes((IHTMLElement)node, escapedText);
- // if we're in an element node (a tag) and we should preserve the tag,
- // append it to the returned text
- if (preserveTags.Contains(node.nodeName))
- {
- // Append the opening tag element, with any extraneous
- // attributes stripped
- escapedText.Append("<" + node.nodeName);
- StripAttributes((IHTMLElement)node, escapedText);
+ // if the element has no children, we can simply close out the tag
+ if (!node.hasChildNodes())
+ {
+ if (node.nodeName == HTMLTokens.IFrame)
+ escapedText.Append(">" + node.nodeName + ">");
+ else
+ escapedText.Append("/>");
+ }
+ else // the element has children, leave the tag open
+ {
+ escapedText.Append(">");
+ tagStillOpen = true;
+ }
+ }
+ else if (ReplaceTags.Contains(node.nodeName))
+ {
+ // If there are no children, just emit the replacement tag
+ if (!node.hasChildNodes())
+ {
+ // Replace the tag
+ escapedText.Append("<" + (string)ReplaceTags[node.nodeName] + "/>");
+ }
+ else
+ {
+ if (!IsChildlessTag((string)ReplaceTags[node.nodeName]))
+ {
+ escapedText.Append("<" + (string)ReplaceTags[node.nodeName] + ">");
+ }
+ // Since there are children, we're going to emit the replacement
+ // tag at the end of this node
+ tagStillOpen = true;
+ }
+ }
- // if the element has no children, we can simply close out the tag
- if (!node.hasChildNodes())
- {
- if (node.nodeName == HTMLTokens.IFrame)
- escapedText.Append(">" + node.nodeName + ">");
- else
- escapedText.Append("/>");
- }
- else // the element has children, leave the tag open
- {
- escapedText.Append(">");
- tagStillOpen = true;
- }
- }
- else if (ReplaceTags.Contains(node.nodeName))
- {
- // If there are no children, just emit the replacement tag
- if (!node.hasChildNodes())
- {
- // Replace the tag
- escapedText.Append("<" + (string)ReplaceTags[node.nodeName] + "/>");
- }
- else
- {
- if (!IsChildlessTag((string)ReplaceTags[node.nodeName]))
- {
- escapedText.Append("<" + (string)ReplaceTags[node.nodeName] + ">");
- }
- // Since there are children, we're going to emit the replacement
- // tag at the end of this node
- tagStillOpen = true;
- }
- }
+ if (node.firstChild != null)
+ {
+ StripChildNodes(node.firstChild, escapedText, preserveImages, progress);
+ }
- if (node.firstChild != null)
- {
- StripChildNodes(node.firstChild, escapedText, preserveImages, progress);
- }
+ // put a closing tag in for the current element (because we left it open in case of children)
+ if (tagStillOpen)
+ {
+ if (PreserveTags.Contains(node.nodeName))
+ escapedText.Append("" + node.nodeName + ">");
+ else if (ReplaceTags.Contains(node.nodeName))
+ {
+ if (!IsChildlessTag((string)ReplaceTags[node.nodeName]))
+ escapedText.Append("" + (string)ReplaceTags[node.nodeName] + ">");
+ else
+ escapedText.Append("<" + (string)ReplaceTags[node.nodeName] + "/>");
+ }
+ }
+ }
- // put a closing tag in for the current element (because we left it open in case of children)
- if (tagStillOpen)
- {
- if (PreserveTags.Contains(node.nodeName))
- escapedText.Append("" + node.nodeName + ">");
- else if (ReplaceTags.Contains(node.nodeName))
- {
- if (!IsChildlessTag((string)ReplaceTags[node.nodeName]))
- escapedText.Append("" + (string)ReplaceTags[node.nodeName] + ">");
- else
- escapedText.Append("<" + (string)ReplaceTags[node.nodeName] + "/>");
- }
- }
- }
+ if (node.nextSibling != null)
+ {
+ StripChildNodes(node.nextSibling, escapedText, preserveImages, progress);
+ }
+ }
- if (node.nextSibling != null)
- {
- StripChildNodes(node.nextSibling, escapedText, preserveImages, progress);
- }
- }
+ ///
+ /// Remove any extraneous attributes from an Attribute Collection
+ ///
+ /// The attribute collection
+ /// a string representing the attributes with extraneous attributes removed
+ public static void StripAttributes(IHTMLElement element, StringBuilder escapedText)
+ {
+ foreach (string attr in PreserveAttributes)
+ {
- ///
- /// Remove any extraneous attributes from an Attribute Collection
- ///
- /// The attribute collection
- /// a string representing the attributes with extraneous attributes removed
- public static void StripAttributes(IHTMLElement element, StringBuilder escapedText)
- {
- foreach (string attr in PreserveAttributes)
- {
+ object attrObject = element.getAttribute(attr, 2); //note: use 2 as param to get pure attr value
+ string attrValue = null;
+ if (attrObject != null)
+ attrValue = attrObject.ToString();
- object attrObject = element.getAttribute(attr, 2); //note: use 2 as param to get pure attr value
- string attrValue = null;
- if (attrObject != null)
- attrValue = attrObject.ToString();
+ if (attrValue != null && attrValue != string.Empty)
+ {
+ escapedText.Append(" " + attr.ToUpper(CultureInfo.InvariantCulture) + "=\"" + attrValue + "\"");
+ }
+ }
+ }
- if (attrValue != null && attrValue != string.Empty)
- {
- escapedText.Append(" " + attr.ToUpper(CultureInfo.InvariantCulture) + "=\"" + attrValue + "\"");
- }
- }
- }
+ private static bool IsChildlessTag(string tagName)
+ {
+ return tagName == HTMLTokens.Br;
+ }
- private static bool IsChildlessTag(string tagName)
- {
- return tagName == HTMLTokens.Br;
- }
+ ///
+ /// The list of tags that will be preserved when the HTML is thinned.
+ ///
+ private static ArrayList PreserveTags
+ {
+ get
+ {
+ if (m_preserveTags == null)
+ {
+ m_preserveTags = new ArrayList();
+ m_preserveTags.Add(HTMLTokens.A);
+ m_preserveTags.Add(HTMLTokens.P);
+ m_preserveTags.Add(HTMLTokens.Br);
+ m_preserveTags.Add(HTMLTokens.Form);
+ m_preserveTags.Add(HTMLTokens.Input);
+ m_preserveTags.Add(HTMLTokens.Select);
+ m_preserveTags.Add(HTMLTokens.Option);
+ m_preserveTags.Add(HTMLTokens.Ilayer);
+ m_preserveTags.Add(HTMLTokens.Meta);
+ m_preserveTags.Add(HTMLTokens.Head);
+ m_preserveTags.Add(HTMLTokens.Body);
+ m_preserveTags.Add(HTMLTokens.Div);
+ m_preserveTags.Add(HTMLTokens.IFrame);
+ m_preserveTags.Add(HTMLTokens.Pre);
+ }
+ return m_preserveTags;
+ }
+ }
+ private static ArrayList m_preserveTags;
+ private static ArrayList PreserveTagsWithImages
+ {
+ get
+ {
+ if (m_preserveTagsWithImages == null)
+ {
+ m_preserveTagsWithImages = new ArrayList();
+ foreach (string s in PreserveTags)
+ m_preserveTagsWithImages.Add(s);
+ m_preserveTagsWithImages.Add(HTMLTokens.Img);
+ }
+ return m_preserveTagsWithImages;
+ }
+ }
+ private static ArrayList m_preserveTagsWithImages;
- ///
- /// The list of tags that will be preserved when the HTML is thinned.
- ///
- private static ArrayList PreserveTags
- {
- get
- {
- if (m_preserveTags == null)
- {
- m_preserveTags = new ArrayList();
- m_preserveTags.Add(HTMLTokens.A);
- m_preserveTags.Add(HTMLTokens.P);
- m_preserveTags.Add(HTMLTokens.Br);
- m_preserveTags.Add(HTMLTokens.Form);
- m_preserveTags.Add(HTMLTokens.Input);
- m_preserveTags.Add(HTMLTokens.Select);
- m_preserveTags.Add(HTMLTokens.Option);
- m_preserveTags.Add(HTMLTokens.Ilayer);
- m_preserveTags.Add(HTMLTokens.Meta);
- m_preserveTags.Add(HTMLTokens.Head);
- m_preserveTags.Add(HTMLTokens.Body);
- m_preserveTags.Add(HTMLTokens.Div);
- m_preserveTags.Add(HTMLTokens.IFrame);
- m_preserveTags.Add(HTMLTokens.Pre);
- }
- return m_preserveTags;
- }
- }
- private static ArrayList m_preserveTags;
+ ///
+ /// A table of tags and their replacements when thinning
+ ///
+ private static Hashtable ReplaceTags
+ {
+ get
+ {
+ if (m_replaceTags == null)
+ {
+ m_replaceTags = new Hashtable();
+ m_replaceTags.Add(HTMLTokens.H1, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H2, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H3, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H4, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H5, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H6, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Hr, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Li, HTMLTokens.Br);
+ m_replaceTags.Add(HTMLTokens.Dt, HTMLTokens.Br);
+ m_replaceTags.Add(HTMLTokens.Dd, HTMLTokens.Br);
+ m_replaceTags.Add(HTMLTokens.Menu, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Ul, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Ol, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Dir, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Dl, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Blockquote, HTMLTokens.P);
- private static ArrayList PreserveTagsWithImages
- {
- get
- {
- if (m_preserveTagsWithImages == null)
- {
- m_preserveTagsWithImages = new ArrayList();
- foreach (string s in PreserveTags)
- m_preserveTagsWithImages.Add(s);
- m_preserveTagsWithImages.Add(HTMLTokens.Img);
- }
- return m_preserveTagsWithImages;
- }
- }
- private static ArrayList m_preserveTagsWithImages;
+ }
+ return m_replaceTags;
+ }
+ }
+ private static Hashtable m_replaceTags;
- ///
- /// A table of tags and their replacements when thinning
- ///
- private static Hashtable ReplaceTags
- {
- get
- {
- if (m_replaceTags == null)
- {
- m_replaceTags = new Hashtable();
- m_replaceTags.Add(HTMLTokens.H1, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H2, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H3, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H4, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H5, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H6, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Hr, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Li, HTMLTokens.Br);
- m_replaceTags.Add(HTMLTokens.Dt, HTMLTokens.Br);
- m_replaceTags.Add(HTMLTokens.Dd, HTMLTokens.Br);
- m_replaceTags.Add(HTMLTokens.Menu, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Ul, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Ol, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Dir, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Dl, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Blockquote, HTMLTokens.P);
+ ///
+ /// The list of attributes that should be preserved
+ ///
+ private static ArrayList PreserveAttributes
+ {
+ get
+ {
+ if (m_preserveAttributes == null)
+ {
+ m_preserveAttributes = new ArrayList(
+ new string[]{HTMLTokens.Href,HTMLTokens.Name,HTMLTokens.Value,HTMLTokens.Action,HTMLTokens.Method,
+ HTMLTokens.Enctype,HTMLTokens.Size,HTMLTokens.Type,HTMLTokens.Src, HTMLTokens.Content, HTMLTokens.HttpEquiv,
+ HTMLTokens.Height, HTMLTokens.Width, HTMLTokens.Alt});
+ }
+ return m_preserveAttributes;
+ }
+ }
+ private static ArrayList m_preserveAttributes;
- }
- return m_replaceTags;
- }
- }
- private static Hashtable m_replaceTags;
-
- ///
- /// The list of attributes that should be preserved
- ///
- private static ArrayList PreserveAttributes
- {
- get
- {
- if (m_preserveAttributes == null)
- {
- m_preserveAttributes = new ArrayList(
- new string[]{HTMLTokens.Href,HTMLTokens.Name,HTMLTokens.Value,HTMLTokens.Action,HTMLTokens.Method,
- HTMLTokens.Enctype,HTMLTokens.Size,HTMLTokens.Type,HTMLTokens.Src, HTMLTokens.Content, HTMLTokens.HttpEquiv,
- HTMLTokens.Height, HTMLTokens.Width, HTMLTokens.Alt});
- }
- return m_preserveAttributes;
- }
- }
- private static ArrayList m_preserveAttributes;
-
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/HtmlCleaner.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/HtmlCleaner.cs
index 39e3d14a..ae8570c1 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/HtmlCleaner.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/HtmlCleaner.cs
@@ -9,23 +9,22 @@ using OpenLiveWriter.HtmlParser.Parser;
namespace OpenLiveWriter.CoreServices.HTML
{
/*
- HTML enters the PostEditor "from the wild" in 4 ways:
+ HTML enters the PostEditor "from the wild" in 4 ways:
- - HTML marshalling (HtmlHandler.DoInsertData). This entry point calls the HtmlGenerationService
- CleanupHtml method the PostEditor implementation of which calls PostEditorHtmlCleaner.CleanupHtml
+ - HTML marshalling (HtmlHandler.DoInsertData). This entry point calls the HtmlGenerationService
+ CleanupHtml method the PostEditor implementation of which calls PostEditorHtmlCleaner.CleanupHtml
- - LC marshalling (LiveClipboardHtmlFormatHandler.DoInsertData). This entry point calls
- PostEditorHtmlCleaner.RemoveScripts to remove only scripts, the assumption being that
- LC presentations only need security transformations not formatting transformations.
+ - LC marshalling (LiveClipboardHtmlFormatHandler.DoInsertData). This entry point calls
+ PostEditorHtmlCleaner.RemoveScripts to remove only scripts, the assumption being that
+ LC presentations only need security transformations not formatting transformations.
-
- - Plugins can insert HTML in two places. Simple content sources (ultimately) go through
- BlogPostHtmlEditor.InsertHtml, which ultimately calls HtmlEditorControl.InsertContent.
- Smart content sources call SmartContentInsertionHelper to do their insertion. Both of
- these paths allow "raw" access to HTML insertion. We will ultimately need to provide a
- service to plugins to do security and formatting oriented transformations of HTML
- that they retreive "from the wild".
- */
+ - Plugins can insert HTML in two places. Simple content sources (ultimately) go through
+ BlogPostHtmlEditor.InsertHtml, which ultimately calls HtmlEditorControl.InsertContent.
+ Smart content sources call SmartContentInsertionHelper to do their insertion. Both of
+ these paths allow "raw" access to HTML insertion. We will ultimately need to provide a
+ service to plugins to do security and formatting oriented transformations of HTML
+ that they retreive "from the wild".
+ */
public class HtmlCleaner
{
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLDocument.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLDocument.cs
index 7095eba8..90f40cc4 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLDocument.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLDocument.cs
@@ -683,7 +683,6 @@ namespace OpenLiveWriter.CoreServices
base.OnEndTag(tag);
}
-
protected override void OnText(Text text)
{
if (_nextTextIsTitleText)
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLReplacer.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLReplacer.cs
index dd8ed492..e6d9a9dc 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLReplacer.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLReplacer.cs
@@ -106,7 +106,6 @@ namespace OpenLiveWriter.CoreServices
return html;
}
-
private int _scriptDepth = 0;
protected override void OnBeginTag(BeginTag tag)
{
@@ -393,7 +392,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
//check substitution Urls
return value;
}
@@ -407,7 +405,6 @@ namespace OpenLiveWriter.CoreServices
}
private static string[] _jscriptAttributes = new string[] { "onload", "onclick", "onblur", "onchange", "onerror", "onfocus", "onmouseout", "onmouseover", "onreset", "onsubmit", "onselect", "onunload", "onmousedown", "onmouseup", "ondblclick", "onmousemove", "onkeypress", "onkeydown", "onkeyup", };
-
private void ModifyMetaDataAsNecessary(BeginTag tag)
{
if (_metaData == null)
@@ -506,5 +503,4 @@ namespace OpenLiveWriter.CoreServices
private static string[] _permittedBeforeBody = new string[] { HTMLTokens.Html, HTMLTokens.Head, HTMLTokens.Title, HTMLTokens.Script, HTMLTokens.Style, HTMLTokens.Meta, HTMLTokens.Link, HTMLTokens.Object, HTMLTokens.Base, HTMLTokens.Frame, HTMLTokens.FrameSet, HTMLTokens.NoScript };
}
-
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLThinner.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLThinner.cs
index 5530faee..335a5d89 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLThinner.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/LightWeightHTMLThinner.cs
@@ -8,284 +8,284 @@ using OpenLiveWriter.HtmlParser.Parser;
namespace OpenLiveWriter.CoreServices
{
- ///
- /// Summary description for LightweightHTMLThinner.
- ///
- public class LightWeightHTMLThinner : LightWeightHTMLReplacer
- {
- [Flags]
- public enum ThinnerBehavior
- {
- ThinForPage = 1,
- ThinForSnippet = 2,
- PreserveImages = 4
- }
+ ///
+ /// Summary description for LightweightHTMLThinner.
+ ///
+ public class LightWeightHTMLThinner : LightWeightHTMLReplacer
+ {
+ [Flags]
+ public enum ThinnerBehavior
+ {
+ ThinForPage = 1,
+ ThinForSnippet = 2,
+ PreserveImages = 4
+ }
- public static string ThinHTML(string html)
- {
- return ThinHTML(html, ThinnerBehavior.ThinForPage);
- }
+ public static string ThinHTML(string html)
+ {
+ return ThinHTML(html, ThinnerBehavior.ThinForPage);
+ }
- public static string ThinHTML(string html, string url)
- {
- return ThinHTML(html, url, ThinnerBehavior.ThinForPage);
- }
+ public static string ThinHTML(string html, string url)
+ {
+ return ThinHTML(html, url, ThinnerBehavior.ThinForPage);
+ }
- public static string ThinHTML(string html, ThinnerBehavior behavior)
- {
- return ThinHTML(html, null, behavior);
- }
+ public static string ThinHTML(string html, ThinnerBehavior behavior)
+ {
+ return ThinHTML(html, null, behavior);
+ }
- public static string ThinHTML(string html, string url, ThinnerBehavior behavior)
- {
- LightWeightHTMLThinner thinner = new LightWeightHTMLThinner(html, url, behavior);
- return thinner.DoReplace();
- }
+ public static string ThinHTML(string html, string url, ThinnerBehavior behavior)
+ {
+ LightWeightHTMLThinner thinner = new LightWeightHTMLThinner(html, url, behavior);
+ return thinner.DoReplace();
+ }
- private LightWeightHTMLThinner(string html, string url, ThinnerBehavior behavior) : base(html, url)
- {
- _behavior = behavior;
- }
- private ThinnerBehavior _behavior;
+ private LightWeightHTMLThinner(string html, string url, ThinnerBehavior behavior) : base(html, url)
+ {
+ _behavior = behavior;
+ }
+ private ThinnerBehavior _behavior;
- private ArrayList TagsToPreserve
- {
- get
- {
- if (_tagsToPreserve == null)
- {
- if ((_behavior & ThinnerBehavior.ThinForPage) == ThinnerBehavior.ThinForPage)
- _tagsToPreserve = (ArrayList)PreserveTagsForPage.Clone();
- else
- _tagsToPreserve = (ArrayList)PreserveTagsForSnippets.Clone();
+ private ArrayList TagsToPreserve
+ {
+ get
+ {
+ if (_tagsToPreserve == null)
+ {
+ if ((_behavior & ThinnerBehavior.ThinForPage) == ThinnerBehavior.ThinForPage)
+ _tagsToPreserve = (ArrayList)PreserveTagsForPage.Clone();
+ else
+ _tagsToPreserve = (ArrayList)PreserveTagsForSnippets.Clone();
- if ((_behavior & ThinnerBehavior.PreserveImages) == ThinnerBehavior.PreserveImages)
- _tagsToPreserve = IncludeImages(_tagsToPreserve);
- }
- return _tagsToPreserve;
- }
- }
- private ArrayList _tagsToPreserve = null;
+ if ((_behavior & ThinnerBehavior.PreserveImages) == ThinnerBehavior.PreserveImages)
+ _tagsToPreserve = IncludeImages(_tagsToPreserve);
+ }
+ return _tagsToPreserve;
+ }
+ }
+ private ArrayList _tagsToPreserve = null;
- protected override void OnBeginTag(BeginTag tag)
- {
- if (tag.NameEquals(HTMLTokens.Title) && !tag.Complete)
- _inTitle = true;
+ protected override void OnBeginTag(BeginTag tag)
+ {
+ if (tag.NameEquals(HTMLTokens.Title) && !tag.Complete)
+ _inTitle = true;
- if (TagsToPreserve.Contains(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
- {
- EmitTagAndAttributes(tag.Name, tag);
- }
- else if (ReplaceTags.ContainsKey(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
- {
- EmitTagAndAttributes((string)ReplaceTags[tag.Name.ToUpper(CultureInfo.InvariantCulture)], tag);
- }
- }
+ if (TagsToPreserve.Contains(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
+ {
+ EmitTagAndAttributes(tag.Name, tag);
+ }
+ else if (ReplaceTags.ContainsKey(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
+ {
+ EmitTagAndAttributes((string)ReplaceTags[tag.Name.ToUpper(CultureInfo.InvariantCulture)], tag);
+ }
+ }
- private bool _inTitle = false;
+ private bool _inTitle = false;
- protected override string InsertSpecialHeaders(string html)
- {
- return html;
- }
+ protected override string InsertSpecialHeaders(string html)
+ {
+ return html;
+ }
- private void EmitTagAndAttributes(string tagName, Tag tag)
- {
- BeginTag beginTag = tag as BeginTag;
- if (beginTag != null)
- {
- Emit(string.Format(CultureInfo.InvariantCulture, "<{0}", tagName));
- foreach (Attr attr in beginTag.Attributes)
- if (PreserveAttributes.Contains(attr.Name.ToUpper(CultureInfo.InvariantCulture)))
- Emit(" " + attr.ToString());
- if (beginTag.Complete)
- Emit("/");
- Emit(">");
- }
- else
- {
- if (tagName.ToUpper(CultureInfo.InvariantCulture) != HTMLTokens.Br && tagName.ToUpper(CultureInfo.InvariantCulture) != HTMLTokens.Img)
- Emit(string.Format(CultureInfo.InvariantCulture, "{0}>", tagName));
- }
- }
+ private void EmitTagAndAttributes(string tagName, Tag tag)
+ {
+ BeginTag beginTag = tag as BeginTag;
+ if (beginTag != null)
+ {
+ Emit(string.Format(CultureInfo.InvariantCulture, "<{0}", tagName));
+ foreach (Attr attr in beginTag.Attributes)
+ if (PreserveAttributes.Contains(attr.Name.ToUpper(CultureInfo.InvariantCulture)))
+ Emit(" " + attr.ToString());
+ if (beginTag.Complete)
+ Emit("/");
+ Emit(">");
+ }
+ else
+ {
+ if (tagName.ToUpper(CultureInfo.InvariantCulture) != HTMLTokens.Br && tagName.ToUpper(CultureInfo.InvariantCulture) != HTMLTokens.Img)
+ Emit(string.Format(CultureInfo.InvariantCulture, "{0}>", tagName));
+ }
+ }
- protected override void OnEndTag(EndTag tag)
- {
- if (tag.Implicit)
- return;
- if (tag.NameEquals(HTMLTokens.Title))
- _inTitle = false;
+ protected override void OnEndTag(EndTag tag)
+ {
+ if (tag.Implicit)
+ return;
+ if (tag.NameEquals(HTMLTokens.Title))
+ _inTitle = false;
- if (TagsToPreserve.Contains(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
- EmitTagAndAttributes(tag.Name, tag);
- else if (ReplaceTags.ContainsKey(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
- {
- EmitTagAndAttributes((string)ReplaceTags[tag.Name.ToUpper(CultureInfo.InvariantCulture)], tag);
- }
- }
+ if (TagsToPreserve.Contains(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
+ EmitTagAndAttributes(tag.Name, tag);
+ else if (ReplaceTags.ContainsKey(tag.Name.ToUpper(CultureInfo.InvariantCulture)))
+ {
+ EmitTagAndAttributes((string)ReplaceTags[tag.Name.ToUpper(CultureInfo.InvariantCulture)], tag);
+ }
+ }
- protected override void OnComment(Comment comment)
- {
- base.OnComment (comment);
- }
+ protected override void OnComment(Comment comment)
+ {
+ base.OnComment (comment);
+ }
- protected override void OnMarkupDirective(MarkupDirective markupDirective)
- {
- }
+ protected override void OnMarkupDirective(MarkupDirective markupDirective)
+ {
+ }
- protected override void OnScriptComment(ScriptComment scriptComment)
- {
- }
+ protected override void OnScriptComment(ScriptComment scriptComment)
+ {
+ }
- protected override void OnScriptLiteral(ScriptLiteral literal)
- {
- }
+ protected override void OnScriptLiteral(ScriptLiteral literal)
+ {
+ }
- protected override void OnScriptText(ScriptText scriptText)
- {
- }
+ protected override void OnScriptText(ScriptText scriptText)
+ {
+ }
- protected override void OnStyleLiteral(StyleLiteral literal)
- {
- }
+ protected override void OnStyleLiteral(StyleLiteral literal)
+ {
+ }
- protected override void OnStyleText(StyleText text)
- {
- }
+ protected override void OnStyleText(StyleText text)
+ {
+ }
- protected override void OnStyleUrl(StyleUrl styleUrl)
- {
- }
+ protected override void OnStyleUrl(StyleUrl styleUrl)
+ {
+ }
- protected override void OnDocumentBegin()
- {
- }
+ protected override void OnDocumentBegin()
+ {
+ }
- protected override void OnDocumentEnd()
- {
- }
+ protected override void OnDocumentEnd()
+ {
+ }
- protected override void OnText(Text text)
- {
- if (_inTitle)
- return;
+ protected override void OnText(Text text)
+ {
+ if (_inTitle)
+ return;
- string textToEmit = text.RawText;
- textToEmit = textToEmit.Replace("\n", " ");
- textToEmit = textToEmit.Replace("\r", " ");
- textToEmit = textToEmit.Replace("\r\n", " ");
- Emit(textToEmit);
- }
+ string textToEmit = text.RawText;
+ textToEmit = textToEmit.Replace("\n", " ");
+ textToEmit = textToEmit.Replace("\r", " ");
+ textToEmit = textToEmit.Replace("\r\n", " ");
+ Emit(textToEmit);
+ }
- protected override void OnStyleImport(StyleImport styleImport)
- {
+ protected override void OnStyleImport(StyleImport styleImport)
+ {
- }
+ }
- ///
- /// A table of tags and their replacements when thinning
- ///
- private static Hashtable ReplaceTags
- {
- get
- {
- if (m_replaceTags == null)
- {
- m_replaceTags = new Hashtable();
- m_replaceTags.Add(HTMLTokens.H1, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H2, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H3, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H4, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H5, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.H6, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Hr, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Li, HTMLTokens.Br);
- m_replaceTags.Add(HTMLTokens.Dt, HTMLTokens.Br);
- m_replaceTags.Add(HTMLTokens.Dd, HTMLTokens.Br);
- m_replaceTags.Add(HTMLTokens.Menu, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Ul, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Ol, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Dir, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Dl, HTMLTokens.P);
- m_replaceTags.Add(HTMLTokens.Blockquote, HTMLTokens.P);
+ ///
+ /// A table of tags and their replacements when thinning
+ ///
+ private static Hashtable ReplaceTags
+ {
+ get
+ {
+ if (m_replaceTags == null)
+ {
+ m_replaceTags = new Hashtable();
+ m_replaceTags.Add(HTMLTokens.H1, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H2, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H3, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H4, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H5, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.H6, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Hr, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Li, HTMLTokens.Br);
+ m_replaceTags.Add(HTMLTokens.Dt, HTMLTokens.Br);
+ m_replaceTags.Add(HTMLTokens.Dd, HTMLTokens.Br);
+ m_replaceTags.Add(HTMLTokens.Menu, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Ul, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Ol, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Dir, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Dl, HTMLTokens.P);
+ m_replaceTags.Add(HTMLTokens.Blockquote, HTMLTokens.P);
- }
- return m_replaceTags;
- }
- }
- private static Hashtable m_replaceTags = null;
+ }
+ return m_replaceTags;
+ }
+ }
+ private static Hashtable m_replaceTags = null;
- ///
- /// The list of attributes that should be preserved
- ///
- private static ArrayList PreserveAttributes
- {
- get
- {
- if (m_preserveAttributes == null)
- {
- m_preserveAttributes = new ArrayList(
- new string[]{HTMLTokens.Href,HTMLTokens.Name,HTMLTokens.Value,HTMLTokens.Action,HTMLTokens.Method,
- HTMLTokens.Enctype,HTMLTokens.Size,HTMLTokens.Type,HTMLTokens.Src, HTMLTokens.Content, HTMLTokens.HttpEquiv,
- HTMLTokens.Height, HTMLTokens.Width, HTMLTokens.Alt});
- }
- return m_preserveAttributes;
- }
- }
- private static ArrayList m_preserveAttributes = null;
+ ///
+ /// The list of attributes that should be preserved
+ ///
+ private static ArrayList PreserveAttributes
+ {
+ get
+ {
+ if (m_preserveAttributes == null)
+ {
+ m_preserveAttributes = new ArrayList(
+ new string[]{HTMLTokens.Href,HTMLTokens.Name,HTMLTokens.Value,HTMLTokens.Action,HTMLTokens.Method,
+ HTMLTokens.Enctype,HTMLTokens.Size,HTMLTokens.Type,HTMLTokens.Src, HTMLTokens.Content, HTMLTokens.HttpEquiv,
+ HTMLTokens.Height, HTMLTokens.Width, HTMLTokens.Alt});
+ }
+ return m_preserveAttributes;
+ }
+ }
+ private static ArrayList m_preserveAttributes = null;
- ///
- /// The list of tags that should be preserved by the thinner, including images
- ///
- private ArrayList IncludeImages(ArrayList tagList)
- {
- tagList.Add(HTMLTokens.Img);
- return tagList;
- }
+ ///
+ /// The list of tags that should be preserved by the thinner, including images
+ ///
+ private ArrayList IncludeImages(ArrayList tagList)
+ {
+ tagList.Add(HTMLTokens.Img);
+ return tagList;
+ }
- private static ArrayList PreserveTagsForPage
- {
- get
- {
- if (_preserverTagsForPage == null)
- {
- _preserverTagsForPage = new ArrayList();
- foreach (string s in PreserveTagsForSnippets)
- _preserverTagsForPage.Add(s);
- _preserverTagsForPage.Add(HTMLTokens.Meta);
- _preserverTagsForPage.Add(HTMLTokens.Head);
- _preserverTagsForPage.Add(HTMLTokens.Body);
- }
- return _preserverTagsForPage;
- }
- }
- private static ArrayList _preserverTagsForPage;
+ private static ArrayList PreserveTagsForPage
+ {
+ get
+ {
+ if (_preserverTagsForPage == null)
+ {
+ _preserverTagsForPage = new ArrayList();
+ foreach (string s in PreserveTagsForSnippets)
+ _preserverTagsForPage.Add(s);
+ _preserverTagsForPage.Add(HTMLTokens.Meta);
+ _preserverTagsForPage.Add(HTMLTokens.Head);
+ _preserverTagsForPage.Add(HTMLTokens.Body);
+ }
+ return _preserverTagsForPage;
+ }
+ }
+ private static ArrayList _preserverTagsForPage;
- ///
- /// The list of tags that will be preserved when the HTML is thinned.
- ///
- private static ArrayList PreserveTagsForSnippets
- {
- get
- {
- if (m_preserveTags == null)
- {
- m_preserveTags = new ArrayList();
- m_preserveTags.Add(HTMLTokens.A);
- m_preserveTags.Add(HTMLTokens.P);
- m_preserveTags.Add(HTMLTokens.Br);
- m_preserveTags.Add(HTMLTokens.Form);
- m_preserveTags.Add(HTMLTokens.Input);
- m_preserveTags.Add(HTMLTokens.Select);
- m_preserveTags.Add(HTMLTokens.Option);
- m_preserveTags.Add(HTMLTokens.Ilayer);
- m_preserveTags.Add(HTMLTokens.Div);
- m_preserveTags.Add(HTMLTokens.IFrame);
- m_preserveTags.Add(HTMLTokens.Pre);
- }
- return m_preserveTags;
- }
- }
- private static ArrayList m_preserveTags = null;
- }
+ ///
+ /// The list of tags that will be preserved when the HTML is thinned.
+ ///
+ private static ArrayList PreserveTagsForSnippets
+ {
+ get
+ {
+ if (m_preserveTags == null)
+ {
+ m_preserveTags = new ArrayList();
+ m_preserveTags.Add(HTMLTokens.A);
+ m_preserveTags.Add(HTMLTokens.P);
+ m_preserveTags.Add(HTMLTokens.Br);
+ m_preserveTags.Add(HTMLTokens.Form);
+ m_preserveTags.Add(HTMLTokens.Input);
+ m_preserveTags.Add(HTMLTokens.Select);
+ m_preserveTags.Add(HTMLTokens.Option);
+ m_preserveTags.Add(HTMLTokens.Ilayer);
+ m_preserveTags.Add(HTMLTokens.Div);
+ m_preserveTags.Add(HTMLTokens.IFrame);
+ m_preserveTags.Add(HTMLTokens.Pre);
+ }
+ return m_preserveTags;
+ }
+ }
+ private static ArrayList m_preserveTags = null;
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/LightweightCSSIterator.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/LightweightCSSIterator.cs
index 902bb140..779e5a2b 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/LightweightCSSIterator.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/LightweightCSSIterator.cs
@@ -73,6 +73,5 @@ namespace OpenLiveWriter.CoreServices
protected virtual void OnStyleText(StyleText styleText)
{ }
-
}
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/HTML/WebPageDownloader.cs b/src/managed/OpenLiveWriter.CoreServices/HTML/WebPageDownloader.cs
index 75039626..b6a4594b 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HTML/WebPageDownloader.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HTML/WebPageDownloader.cs
@@ -15,169 +15,162 @@ using Project31.BrowserControl ;
using mshtml ;
-
namespace Project31.CoreServices
{
- public class WebPageDownloader : IDisposable, IOleClientSite
- {
- ///
- /// Initialize the downloader
- ///
- public WebPageDownloader()
- {
- // create the undelrying control
- browserControl = new ExplorerBrowserControl() ;
+ public class WebPageDownloader : IDisposable, IOleClientSite
+ {
+ ///
+ /// Initialize the downloader
+ ///
+ public WebPageDownloader()
+ {
+ // create the undelrying control
+ browserControl = new ExplorerBrowserControl() ;
- // set us as the client site
- // http://www.codeproject.com/books/0764549146_8.asp
- // http://discuss.develop.com/archives/wa.exe?A2=ind0205A&L=DOTNET&D=0&P=15756
- IOleObject oleObject = (IOleObject)browserControl.Browser ;
- oleObject.SetClientSite( this ) ;
+ // set us as the client site
+ // http://www.codeproject.com/books/0764549146_8.asp
+ // http://discuss.develop.com/archives/wa.exe?A2=ind0205A&L=DOTNET&D=0&P=15756
+ IOleObject oleObject = (IOleObject)browserControl.Browser ;
+ oleObject.SetClientSite( this ) ;
- // configure options
- browserControl.Browser.Silent = true ;
+ // configure options
+ browserControl.Browser.Silent = true ;
- // subscribe to events
- browserControl.ProgressChange +=new BrowserProgressChangeEventHandler(browserControl_ProgressChange);
- browserControl.DocumentComplete +=new BrowserDocumentEventHandler(browserControl_DocumentComplete);
- browserControl.NewWindow2 +=new Project31.BrowserControl.DWebBrowserEvents2_NewWindow2EventHandler(browserControl_NewWindow2);
- }
+ // subscribe to events
+ browserControl.ProgressChange +=new BrowserProgressChangeEventHandler(browserControl_ProgressChange);
+ browserControl.DocumentComplete +=new BrowserDocumentEventHandler(browserControl_DocumentComplete);
+ browserControl.NewWindow2 +=new Project31.BrowserControl.DWebBrowserEvents2_NewWindow2EventHandler(browserControl_NewWindow2);
+ }
+
+ ///
+ /// Download from the specified URL
+ ///
+ ///
+ public void DownloadFromUrl( string url )
+ {
+ browserControl.Navigate( url, false ) ;
+ }
- ///
- /// Download from the specified URL
- ///
- ///
- public void DownloadFromUrl( string url )
- {
- browserControl.Navigate( url, false ) ;
- }
+ ///
+ /// Event which indicates that the download is complete
+ ///
+ public event EventHandler DownloadComplete ;
+ ///
+ /// Event which fires when total download progress is updated
+ ///
+ public event ProgressUpdatedEventHandler ProgressUpdated ;
+ ///
+ /// Get the underlying document that the control has downloaded (only
+ /// available after DownloadComplete fires)
+ ///
+ public IHTMLDocument2 HTMLDocument
+ {
+ get { return (IHTMLDocument2)browserControl.Document; }
- ///
- /// Event which indicates that the download is complete
- ///
- public event EventHandler DownloadComplete ;
+ }
+ ///
+ /// Cleanup resources
+ ///
+ public void Dispose()
+ {
+ if ( browserControl != null )
+ browserControl.Dispose() ;
+ }
- ///
- /// Event which fires when total download progress is updated
- ///
- public event ProgressUpdatedEventHandler ProgressUpdated ;
+ ///
+ /// Respond to the AMBIENT_DLCONTROL disp-id by returning our download-control flags
+ ///
+ ///
+ [DispId(MSHTML_DISPID.AMBIENT_DLCONTROL)]
+ public int AmbientDLControl()
+ {
+ return DLCTL.DOWNLOADONLY | DLCTL.NO_CLIENTPULL |
+ DLCTL.NO_JAVA | DLCTL.NO_DLACTIVEXCTLS |
+ DLCTL.NO_RUNACTIVEXCTLS | DLCTL.SILENT ;
+ }
- ///
- /// Get the underlying document that the control has downloaded (only
- /// available after DownloadComplete fires)
- ///
- public IHTMLDocument2 HTMLDocument
- {
- get { return (IHTMLDocument2)browserControl.Document; }
+ ///
+ /// Handle document complete event
+ ///
+ /// sender
+ /// event args
+ private void browserControl_DocumentComplete(object sender, BrowserDocumentEventArgs e)
+ {
+ // verify ready-state complete
+ Debug.Assert( browserControl.Browser.ReadyState == tagREADYSTATE.READYSTATE_COMPLETE ) ;
- }
+ // propagate event
+ if ( DownloadComplete != null )
+ DownloadComplete( this, EventArgs.Empty ) ;
+ }
- ///
- /// Cleanup resources
- ///
- public void Dispose()
- {
- if ( browserControl != null )
- browserControl.Dispose() ;
- }
+ ///
+ /// Handle new window event (prevent all pop-up windows from displaying)
+ ///
+ /// sender
+ /// event args
+ private void browserControl_NewWindow2(object sender, DWebBrowserEvents2_NewWindow2Event e)
+ {
+ // prevent pop-ups!
+ e.cancel = true ;
+ }
+ ///
+ /// Handle progress changed event
+ ///
+ /// sender
+ /// event args
+ private void browserControl_ProgressChange(object sender, BrowserProgressChangeEventArgs e)
+ {
+ if ( ProgressUpdated != null )
+ {
+ ProgressUpdatedEventArgs ea = new ProgressUpdatedEventArgs(
+ Convert.ToInt32(e.Progress), Convert.ToInt32(e.ProgressMax), String.Empty ) ;
+ ProgressUpdated( this, ea ) ;
+ }
+ }
- ///
- /// Respond to the AMBIENT_DLCONTROL disp-id by returning our download-control flags
- ///
- ///
- [DispId(MSHTML_DISPID.AMBIENT_DLCONTROL)]
- public int AmbientDLControl()
- {
- return DLCTL.DOWNLOADONLY | DLCTL.NO_CLIENTPULL |
- DLCTL.NO_JAVA | DLCTL.NO_DLACTIVEXCTLS |
- DLCTL.NO_RUNACTIVEXCTLS | DLCTL.SILENT ;
- }
+ #region IOleClientSite Members
+ void IOleClientSite.SaveObject()
+ {
+ }
- ///
- /// Handle document complete event
- ///
- /// sender
- /// event args
- private void browserControl_DocumentComplete(object sender, BrowserDocumentEventArgs e)
- {
- // verify ready-state complete
- Debug.Assert( browserControl.Browser.ReadyState == tagREADYSTATE.READYSTATE_COMPLETE ) ;
+ int IOleClientSite.GetMoniker(OLEGETMONIKER dwAssign, OLEWHICHMK dwWhichMoniker, out UCOMIMoniker ppmk)
+ {
+ ppmk = null;
+ return HRESULT.E_NOTIMPL ;
+ }
- // propagate event
- if ( DownloadComplete != null )
- DownloadComplete( this, EventArgs.Empty ) ;
- }
+ int IOleClientSite.GetContainer(out IOleContainer ppContainer)
+ {
+ ppContainer = null ;
+ return HRESULT.E_NOINTERFACE;
+ }
- ///
- /// Handle new window event (prevent all pop-up windows from displaying)
- ///
- /// sender
- /// event args
- private void browserControl_NewWindow2(object sender, DWebBrowserEvents2_NewWindow2Event e)
- {
- // prevent pop-ups!
- e.cancel = true ;
- }
+ void IOleClientSite.ShowObject()
+ {
+ }
- ///
- /// Handle progress changed event
- ///
- /// sender
- /// event args
- private void browserControl_ProgressChange(object sender, BrowserProgressChangeEventArgs e)
- {
- if ( ProgressUpdated != null )
- {
- ProgressUpdatedEventArgs ea = new ProgressUpdatedEventArgs(
- Convert.ToInt32(e.Progress), Convert.ToInt32(e.ProgressMax), String.Empty ) ;
- ProgressUpdated( this, ea ) ;
- }
- }
+ void IOleClientSite.OnShowWindow(bool fShow)
+ {
+ }
+ int IOleClientSite.RequestNewObjectLayout()
+ {
+ return HRESULT.E_NOTIMPL ;
+ }
- #region IOleClientSite Members
+ #endregion
- void IOleClientSite.SaveObject()
- {
- }
-
- int IOleClientSite.GetMoniker(OLEGETMONIKER dwAssign, OLEWHICHMK dwWhichMoniker, out UCOMIMoniker ppmk)
- {
- ppmk = null;
- return HRESULT.E_NOTIMPL ;
- }
-
- int IOleClientSite.GetContainer(out IOleContainer ppContainer)
- {
- ppContainer = null ;
- return HRESULT.E_NOINTERFACE;
- }
-
- void IOleClientSite.ShowObject()
- {
- }
-
- void IOleClientSite.OnShowWindow(bool fShow)
- {
- }
-
- int IOleClientSite.RequestNewObjectLayout()
- {
- return HRESULT.E_NOTIMPL ;
- }
-
- #endregion
-
- ///
- /// Embedded web browser
- ///
- private ExplorerBrowserControl browserControl = null ;
- }
+ ///
+ /// Embedded web browser
+ ///
+ private ExplorerBrowserControl browserControl = null ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/HtmlScreenCaptureCore.cs b/src/managed/OpenLiveWriter.CoreServices/HtmlScreenCaptureCore.cs
index 016e88a1..e99b8c18 100644
--- a/src/managed/OpenLiveWriter.CoreServices/HtmlScreenCaptureCore.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/HtmlScreenCaptureCore.cs
@@ -141,7 +141,6 @@ namespace OpenLiveWriter.CoreServices
return bitmap;
}
-
[STAThread]
private void ThreadMain(ConditionVariable signal, string[] ids)
{
@@ -552,7 +551,6 @@ namespace OpenLiveWriter.CoreServices
_browserControl.Height = originalHeight;
}
-
// fire event to see if the Bitmap is ready
using (Bitmap bitmap = HtmlScreenCaptureCore.TakeSnapshot((IViewObject)_browserControl.Document, _browserControl.Width, _browserControl.Height))
{
diff --git a/src/managed/OpenLiveWriter.CoreServices/IconHelper.cs b/src/managed/OpenLiveWriter.CoreServices/IconHelper.cs
index a90ce14f..9c3f8538 100644
--- a/src/managed/OpenLiveWriter.CoreServices/IconHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/IconHelper.cs
@@ -9,108 +9,106 @@ using OpenLiveWriter.Interop.Windows;
namespace OpenLiveWriter.CoreServices
{
- ///
- /// Summary description for IconHelper.
- ///
- public class IconHelper
- {
- public static Bitmap GetBitmapForIcon(Icon icon)
- {
- using (IconInfo iconInfo = new IconInfo(icon))
- {
- if (!iconInfo.Info.fIcon)
- return null; // this is a cursor!
+ ///
+ /// Summary description for IconHelper.
+ ///
+ public class IconHelper
+ {
+ public static Bitmap GetBitmapForIcon(Icon icon)
+ {
+ using (IconInfo iconInfo = new IconInfo(icon))
+ {
+ if (!iconInfo.Info.fIcon)
+ return null; // this is a cursor!
- if (iconInfo.BitmapStruct.bmBitsPixel!=32)
- return Bitmap.FromHicon(icon.Handle); // no alpha blending, so use regular .Net
+ if (iconInfo.BitmapStruct.bmBitsPixel!=32)
+ return Bitmap.FromHicon(icon.Handle); // no alpha blending, so use regular .Net
- Bitmap iconBitmap = Bitmap.FromHbitmap(iconInfo.Info.hbmColor);
+ Bitmap iconBitmap = Bitmap.FromHbitmap(iconInfo.Info.hbmColor);
- // get broken bitmap (broken - pixelformat doesn't specify alpha channel, even though the alpha data is there),
- // copy to a new bitmap with a healthy (includes the alpha channel) pixelformat
- Bitmap transparentBitmap;
- using (LockedBitMap lockedBitmap = new LockedBitMap(iconBitmap))
- {
- transparentBitmap = new Bitmap(lockedBitmap.Data.Width, lockedBitmap.Data.Height, lockedBitmap.Data.Stride, PixelFormat.Format32bppArgb, lockedBitmap.Data.Scan0);
- }
- return transparentBitmap;
- }
- }
+ // get broken bitmap (broken - pixelformat doesn't specify alpha channel, even though the alpha data is there),
+ // copy to a new bitmap with a healthy (includes the alpha channel) pixelformat
+ Bitmap transparentBitmap;
+ using (LockedBitMap lockedBitmap = new LockedBitMap(iconBitmap))
+ {
+ transparentBitmap = new Bitmap(lockedBitmap.Data.Width, lockedBitmap.Data.Height, lockedBitmap.Data.Stride, PixelFormat.Format32bppArgb, lockedBitmap.Data.Scan0);
+ }
+ return transparentBitmap;
+ }
+ }
- private class LockedBitMap : IDisposable
- {
- public LockedBitMap(Bitmap bitmapToLock)
- {
- _bitmapToLock = bitmapToLock;
- _bitmapData = bitmapToLock.LockBits(new Rectangle(0, 0, bitmapToLock.Width, bitmapToLock.Height),
- ImageLockMode.ReadOnly, bitmapToLock.PixelFormat);
+ private class LockedBitMap : IDisposable
+ {
+ public LockedBitMap(Bitmap bitmapToLock)
+ {
+ _bitmapToLock = bitmapToLock;
+ _bitmapData = bitmapToLock.LockBits(new Rectangle(0, 0, bitmapToLock.Width, bitmapToLock.Height),
+ ImageLockMode.ReadOnly, bitmapToLock.PixelFormat);
- }
- private BitmapData _bitmapData;
- private Bitmap _bitmapToLock;
+ }
+ private BitmapData _bitmapData;
+ private Bitmap _bitmapToLock;
- public BitmapData Data
- {
- get
- {
- return _bitmapData;
- }
- }
+ public BitmapData Data
+ {
+ get
+ {
+ return _bitmapData;
+ }
+ }
- public void Dispose()
- {
- _bitmapToLock.UnlockBits(_bitmapData);
- }
+ public void Dispose()
+ {
+ _bitmapToLock.UnlockBits(_bitmapData);
+ }
+ }
- }
+ private class IconInfo : IDisposable
+ {
+ public IconInfo(Icon icon)
+ {
+ User32.GetIconInfo(icon.Handle, out _iconInfo);
- private class IconInfo : IDisposable
- {
- public IconInfo(Icon icon)
- {
- User32.GetIconInfo(icon.Handle, out _iconInfo);
+ int size = Marshal.SizeOf(typeof(BITMAP));
- int size = Marshal.SizeOf(typeof(BITMAP));
+ IntPtr ptr = Marshal.AllocCoTaskMem(size);
+ try
+ {
+ Gdi32.GetObject(Info.hbmColor, size , ptr);
+ _bitmapStruct = (BITMAP)Marshal.PtrToStructure(ptr, typeof(BITMAP));
+ }
+ finally
+ {
+ Marshal.FreeCoTaskMem(ptr);
+ }
+ }
- IntPtr ptr = Marshal.AllocCoTaskMem(size);
- try
- {
- Gdi32.GetObject(Info.hbmColor, size , ptr);
- _bitmapStruct = (BITMAP)Marshal.PtrToStructure(ptr, typeof(BITMAP));
- }
- finally
- {
- Marshal.FreeCoTaskMem(ptr);
- }
- }
+ public User32.ICONINFO Info
+ {
+ get
+ {
+ return _iconInfo;
+ }
+ }
- public User32.ICONINFO Info
- {
- get
- {
- return _iconInfo;
- }
- }
+ public BITMAP BitmapStruct
+ {
+ get
+ {
+ return _bitmapStruct;
+ }
+ }
+ private BITMAP _bitmapStruct;
- public BITMAP BitmapStruct
- {
- get
- {
- return _bitmapStruct;
- }
- }
- private BITMAP _bitmapStruct;
+ public void Dispose()
+ {
+ Gdi32.DeleteObject(_iconInfo.hbmColor);
+ Gdi32.DeleteObject(_iconInfo.hbmMask);
+ }
+ private User32.ICONINFO _iconInfo;
- public void Dispose()
- {
- Gdi32.DeleteObject(_iconInfo.hbmColor);
- Gdi32.DeleteObject(_iconInfo.hbmMask);
- }
-
- private User32.ICONINFO _iconInfo;
-
- }
- }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/ImageHelper2.cs b/src/managed/OpenLiveWriter.CoreServices/ImageHelper2.cs
index f6f1cb26..de4604be 100644
--- a/src/managed/OpenLiveWriter.CoreServices/ImageHelper2.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/ImageHelper2.cs
@@ -581,16 +581,16 @@ namespace OpenLiveWriter.CoreServices
}
/*
- ColorPalette p = bitmap.Palette;
- bool seenTransparent = false;
- foreach (Color c in p.Entries)
- {
- if (c.A == 0)
- {
- Trace.Assert(!seenTransparent);
- seenTransparent = true;
- }
- }
+ ColorPalette p = bitmap.Palette;
+ bool seenTransparent = false;
+ foreach (Color c in p.Entries)
+ {
+ if (c.A == 0)
+ {
+ Trace.Assert(!seenTransparent);
+ seenTransparent = true;
+ }
+ }
*/
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/Instrumentor.cs b/src/managed/OpenLiveWriter.CoreServices/Instrumentor.cs
index 48b529aa..98b444b9 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Instrumentor.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Instrumentor.cs
@@ -10,198 +10,197 @@ using Microsoft.Win32;
namespace OpenLiveWriter.CoreServices
{
- //usage:
- //Instrumentor.IncrementCounter(Instrumentor.COUNTERNAME);
- //handles creating the registry keys and opt in stuff, so you don't have to
+ //usage:
+ //Instrumentor.IncrementCounter(Instrumentor.COUNTERNAME);
+ //handles creating the registry keys and opt in stuff, so you don't have to
- ///
- /// Summary description for Intrumentor.
- ///
- public class Instrumentor
- {
- public const string WRITER_OPENED = "wr";
- public const string LINKS = "lk";
- public const string IMAGES = "im";
- public const string MAPS = "ma";
- public const string PLUG_INS_COUNT = "pc";
- public const string PLUG_INS_LIST = "pl";
- public const string SOURCE_CODE_VIEW = "sv";
- public const string NO_STYLE_EDIT = "ns";
- public const string EDIT_OLD_POST = "ep";
- public const string DEFAULT_BLOG_PROVIDER = "db";
+ ///
+ /// Summary description for Intrumentor.
+ ///
+ public class Instrumentor
+ {
+ public const string WRITER_OPENED = "wr";
+ public const string LINKS = "lk";
+ public const string IMAGES = "im";
+ public const string MAPS = "ma";
+ public const string PLUG_INS_COUNT = "pc";
+ public const string PLUG_INS_LIST = "pl";
+ public const string SOURCE_CODE_VIEW = "sv";
+ public const string NO_STYLE_EDIT = "ns";
+ public const string EDIT_OLD_POST = "ep";
+ public const string DEFAULT_BLOG_PROVIDER = "db";
- private const string ALWAYS_SEND = "n";
- private const string OPT_IN_ONLY = "o";
+ private const string ALWAYS_SEND = "n";
+ private const string OPT_IN_ONLY = "o";
- private readonly static string instrumentationReportKey;
+ private readonly static string instrumentationReportKey;
- private static bool SearchLoggerWorks = false;
+ private static bool SearchLoggerWorks = false;
- static Instrumentor()
- {
- try
- {
- using (RegistryKey slVersionKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSN Apps\\SL", false))
- {
- if (slVersionKey != null)
- {
- string version = (string)slVersionKey.GetValue("Version");
- int minorVersionNum = Int32.Parse(version.Substring(version.LastIndexOf('.') + 1), CultureInfo.InvariantCulture);
- int majorVersionNum = Int32.Parse(version.Substring(0,version.IndexOf('.')), CultureInfo.InvariantCulture);
- if (majorVersionNum >= 3 && minorVersionNum >= 1458)
- {
- SearchLoggerWorks = true;
- }
- }
- }
+ static Instrumentor()
+ {
+ try
+ {
+ using (RegistryKey slVersionKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSN Apps\\SL", false))
+ {
+ if (slVersionKey != null)
+ {
+ string version = (string)slVersionKey.GetValue("Version");
+ int minorVersionNum = Int32.Parse(version.Substring(version.LastIndexOf('.') + 1), CultureInfo.InvariantCulture);
+ int majorVersionNum = Int32.Parse(version.Substring(0,version.IndexOf('.')), CultureInfo.InvariantCulture);
+ if (majorVersionNum >= 3 && minorVersionNum >= 1458)
+ {
+ SearchLoggerWorks = true;
+ }
+ }
+ }
- if (SearchLoggerWorks)
- {
- string hkcu = string.Empty;
- if (Environment.OSVersion.Version.Major >= 6)
- {
- // Under Vista Protected Mode, this is the low-integrity root
- hkcu = @"Software\AppDataLow\";
- }
- instrumentationReportKey = hkcu + @"Software\Microsoft\MSN Apps\Open Live Writer\SL";
- }
- else
- {
- instrumentationReportKey = null;
- }
- }
- catch (Exception ex)
- {
- Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
- }
- }
+ if (SearchLoggerWorks)
+ {
+ string hkcu = string.Empty;
+ if (Environment.OSVersion.Version.Major >= 6)
+ {
+ // Under Vista Protected Mode, this is the low-integrity root
+ hkcu = @"Software\AppDataLow\";
+ }
+ instrumentationReportKey = hkcu + @"Software\Microsoft\MSN Apps\Open Live Writer\SL";
+ }
+ else
+ {
+ instrumentationReportKey = null;
+ }
+ }
+ catch (Exception ex)
+ {
+ Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
+ }
+ }
- public static void IncrementCounter(string keyName)
- {
- string regKey = GetKeyName(keyName);
+ public static void IncrementCounter(string keyName)
+ {
+ string regKey = GetKeyName(keyName);
- //check that AL key exists--if not, add it
- //check that specific key exists--if not, add it
- //increment specific key
- try
- {
- if (SearchLoggerWorks)
- {
- using ( RegistryKey reportingKey = Registry.CurrentUser.CreateSubKey(instrumentationReportKey) )
- {
- if ( reportingKey != null )
- {
- int currentVal = (int)reportingKey.GetValue(regKey, 0);
- currentVal++;
- reportingKey.SetValue(regKey, currentVal);
- }
- else
- {
- Debug.Fail("Unable to open Onfolio instrumentation reporting registry key") ;
- }
- }
- }
- }
- catch (Exception ex)
- {
- Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
- }
- }
+ //check that AL key exists--if not, add it
+ //check that specific key exists--if not, add it
+ //increment specific key
+ try
+ {
+ if (SearchLoggerWorks)
+ {
+ using ( RegistryKey reportingKey = Registry.CurrentUser.CreateSubKey(instrumentationReportKey) )
+ {
+ if ( reportingKey != null )
+ {
+ int currentVal = (int)reportingKey.GetValue(regKey, 0);
+ currentVal++;
+ reportingKey.SetValue(regKey, currentVal);
+ }
+ else
+ {
+ Debug.Fail("Unable to open Onfolio instrumentation reporting registry key") ;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
+ }
+ }
- public static void SetKeyValue(string keyName, object keyValue)
- {
- string regKey = GetKeyName(keyName);
+ public static void SetKeyValue(string keyName, object keyValue)
+ {
+ string regKey = GetKeyName(keyName);
- //check that AL key exists--if not, add it
- //check that specific key exists--if not, add it
- try
- {
- if (SearchLoggerWorks)
- {
- using ( RegistryKey reportingKey = Registry.CurrentUser.CreateSubKey(instrumentationReportKey) )
- {
- if ( reportingKey != null )
- {
- reportingKey.SetValue(regKey, keyValue);
- }
- else
- {
- Debug.Fail("Unable to open Onfolio instrumentation reporting registry key") ;
- }
- }
- }
- }
- catch (Exception ex)
- {
- Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
- }
- }
+ //check that AL key exists--if not, add it
+ //check that specific key exists--if not, add it
+ try
+ {
+ if (SearchLoggerWorks)
+ {
+ using ( RegistryKey reportingKey = Registry.CurrentUser.CreateSubKey(instrumentationReportKey) )
+ {
+ if ( reportingKey != null )
+ {
+ reportingKey.SetValue(regKey, keyValue);
+ }
+ else
+ {
+ Debug.Fail("Unable to open Onfolio instrumentation reporting registry key") ;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
+ }
+ }
- public static void AddItemToList(string keyName, string item)
- {
- string regKey = GetKeyName(keyName);
+ public static void AddItemToList(string keyName, string item)
+ {
+ string regKey = GetKeyName(keyName);
- //check that AL key exists--if not, add it
- //check that specific key exists--if not, add it
- try
- {
- if (SearchLoggerWorks)
- {
- using ( RegistryKey reportingKey = Registry.CurrentUser.CreateSubKey(instrumentationReportKey) )
- {
- if ( reportingKey != null )
- {
- string newVal = EscapeString(item);
- String currentVal = (String)reportingKey.GetValue(regKey, "");
- if (currentVal != "")
- {
- //add this item if it isn't in the list
- if (currentVal.IndexOf(newVal) < 0)
- {
- currentVal += "," + newVal;
- }
- }
- else
- {
- //new list, set to item
- currentVal = newVal;
- }
- reportingKey.SetValue(regKey, currentVal);
- }
- else
- {
- Debug.Fail("Unable to open Writer instrumentation reporting registry key") ;
- }
- }
- }
- }
- catch (Exception ex)
- {
- Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
- }
- }
+ //check that AL key exists--if not, add it
+ //check that specific key exists--if not, add it
+ try
+ {
+ if (SearchLoggerWorks)
+ {
+ using ( RegistryKey reportingKey = Registry.CurrentUser.CreateSubKey(instrumentationReportKey) )
+ {
+ if ( reportingKey != null )
+ {
+ string newVal = EscapeString(item);
+ String currentVal = (String)reportingKey.GetValue(regKey, "");
+ if (currentVal != "")
+ {
+ //add this item if it isn't in the list
+ if (currentVal.IndexOf(newVal) < 0)
+ {
+ currentVal += "," + newVal;
+ }
+ }
+ else
+ {
+ //new list, set to item
+ currentVal = newVal;
+ }
+ reportingKey.SetValue(regKey, currentVal);
+ }
+ else
+ {
+ Debug.Fail("Unable to open Writer instrumentation reporting registry key") ;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Trace.Fail("Exception while writing instrumentation values to registry: " + ex.ToString());
+ }
+ }
- private static string GetKeyName(string keyName)
- {
- string regKey = keyName;
- //the final letter of the key name determines whether it is opt-in only or not
- //right now everything is opt in only
- regKey += OPT_IN_ONLY;
- return regKey;
- }
+ private static string GetKeyName(string keyName)
+ {
+ string regKey = keyName;
+ //the final letter of the key name determines whether it is opt-in only or not
+ //right now everything is opt in only
+ regKey += OPT_IN_ONLY;
+ return regKey;
+ }
- private static string EscapeString(string val)
- {
- if (val == null)
- return "";
+ private static string EscapeString(string val)
+ {
+ if (val == null)
+ return "";
- // optimize for common case
- if (val.IndexOf('\t') == -1 && val.IndexOf('\n') == -1 && val.IndexOf('\"') == -1)
- return "\"" + val + "\"";
+ // optimize for common case
+ if (val.IndexOf('\t') == -1 && val.IndexOf('\n') == -1 && val.IndexOf('\"') == -1)
+ return "\"" + val + "\"";
- return "\"" + val.Replace("\"", "\"\"") + "\"";
- }
- }
+ return "\"" + val.Replace("\"", "\"\"") + "\"";
+ }
+ }
}
-
diff --git a/src/managed/OpenLiveWriter.CoreServices/KeyboardHook.cs b/src/managed/OpenLiveWriter.CoreServices/KeyboardHook.cs
index a0400c48..d100587b 100644
--- a/src/managed/OpenLiveWriter.CoreServices/KeyboardHook.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/KeyboardHook.cs
@@ -63,7 +63,6 @@ namespace OpenLiveWriter.CoreServices
///
public bool IsInstalled { get { return m_hHook != IntPtr.Zero; } }
-
///
/// Remove the keyboard hook
///
diff --git a/src/managed/OpenLiveWriter.CoreServices/Layout/LayoutHelper.cs b/src/managed/OpenLiveWriter.CoreServices/Layout/LayoutHelper.cs
index ae19759c..2d19bd1b 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Layout/LayoutHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Layout/LayoutHelper.cs
@@ -50,7 +50,7 @@ namespace OpenLiveWriter.CoreServices.Layout
///
/// Naturalizes height, then distributes vertically ACCORDING TO THE ORDER YOU PASSED THEM IN
///
- public static void NaturalizeHeightAndDistribute(int pixelsBetween, params object[] controls)
+ public static void NaturalizeHeightAndDistribute(int pixelsBetween, params object[] controls)
{
NaturalizeHeight(controls);
DistributeVertically(pixelsBetween, false, controls);
diff --git a/src/managed/OpenLiveWriter.CoreServices/LinkedList.cs b/src/managed/OpenLiveWriter.CoreServices/LinkedList.cs
index 8d255441..058a8545 100644
--- a/src/managed/OpenLiveWriter.CoreServices/LinkedList.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/LinkedList.cs
@@ -385,13 +385,13 @@ namespace OpenLiveWriter.CoreServices
}
#if FALSE
- public string String
- {
- get
- {
- return this.ToString();
- }
- }
+ public string String
+ {
+ get
+ {
+ return this.ToString();
+ }
+ }
#endif
}
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/Mime/MimeHelper.cs b/src/managed/OpenLiveWriter.CoreServices/Mime/MimeHelper.cs
index f5cea8af..254d9aeb 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Mime/MimeHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Mime/MimeHelper.cs
@@ -33,7 +33,6 @@ namespace OpenLiveWriter.CoreServices
return GetContentType(fileExtension, null);
}
-
///
/// This sets the content type value in the registry for a given file
/// extension
@@ -60,7 +59,6 @@ namespace OpenLiveWriter.CoreServices
}
-
///
/// Application/octet-stream content type, a good default for
/// unrecognized content types.
@@ -508,41 +506,41 @@ namespace OpenLiveWriter.CoreServices
///
private static int[,,] QPStateTable =
{
- // SCANNING
- {
+ // SCANNING
+ {
{OUTPUT,PENDING}, // Legal Ascii
- {OUTPUT_ESCAPED,PENDING}, // Illegal Ascii
- {OUTPUT,PENDING}, // WriteSpace
- {NONE,LOOK_FOR_LF}, // CarriageReturn
- {OUTPUT_CRLF, SCANNING} // Linefeed
- },
+ {OUTPUT_ESCAPED,PENDING}, // Illegal Ascii
+ {OUTPUT,PENDING}, // WriteSpace
+ {NONE,LOOK_FOR_LF}, // CarriageReturn
+ {OUTPUT_CRLF, SCANNING} // Linefeed
+ },
- // LOOK_FOR_LF
- {
+ // LOOK_FOR_LF
+ {
{CRLF_AND_PUTBACK, SCANNING}, // Legal Ascii
- {CRLF_AND_PUTBACK, SCANNING}, // Illegal Ascii
- {CRLF_AND_PUTBACK, SCANNING}, // WhiteSpace
- {CRLF_AND_PUTBACK, SCANNING}, // CarriageReturn
- {OUTPUT_CRLF, SCANNING} // Linefeed
- },
+ {CRLF_AND_PUTBACK, SCANNING}, // Illegal Ascii
+ {CRLF_AND_PUTBACK, SCANNING}, // WhiteSpace
+ {CRLF_AND_PUTBACK, SCANNING}, // CarriageReturn
+ {OUTPUT_CRLF, SCANNING} // Linefeed
+ },
- // REDZONE
- {
+ // REDZONE
+ {
{OUTPUT, END_OF_LINE}, // Legal Ascii
- {OUTPUT_ESCAPED, END_OF_LINE}, // Illegal Ascii
- {OUTPUT_ESCAPED, END_OF_LINE}, // WhiteSpace
- {NONE, LOOK_FOR_LF}, // CarriageReturn
- {OUTPUT_CRLF, SCANNING} // Linefeed
- },
+ {OUTPUT_ESCAPED, END_OF_LINE}, // Illegal Ascii
+ {OUTPUT_ESCAPED, END_OF_LINE}, // WhiteSpace
+ {NONE, LOOK_FOR_LF}, // CarriageReturn
+ {OUTPUT_CRLF, SCANNING} // Linefeed
+ },
- // END_OF_LINE
- {
+ // END_OF_LINE
+ {
{SOFT_CRLF_AND_PUTBACK, SCANNING}, // Legal Ascii
- {SOFT_CRLF_AND_PUTBACK, SCANNING}, // Illegal Ascii
- {SOFT_CRLF_AND_PUTBACK, SCANNING}, // WhiteSpace
- {NONE, LOOK_FOR_LF}, // CarriageReturn
- {OUTPUT_CRLF, SCANNING} // Linefeed
- }
+ {SOFT_CRLF_AND_PUTBACK, SCANNING}, // Illegal Ascii
+ {SOFT_CRLF_AND_PUTBACK, SCANNING}, // WhiteSpace
+ {NONE, LOOK_FOR_LF}, // CarriageReturn
+ {OUTPUT_CRLF, SCANNING} // Linefeed
+ }
};
#endregion
diff --git a/src/managed/OpenLiveWriter.CoreServices/PathHelper.cs b/src/managed/OpenLiveWriter.CoreServices/PathHelper.cs
index ba2f3a2e..fbe2dd25 100644
--- a/src/managed/OpenLiveWriter.CoreServices/PathHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/PathHelper.cs
@@ -27,33 +27,33 @@ namespace OpenLiveWriter.CoreServices
}
#if FALSE
- // not localized
- public static string GetPrettyPath(string path, bool hideExtensionsForKnowTypes)
- {
- if (path == null)
- return null;
+ // not localized
+ public static string GetPrettyPath(string path, bool hideExtensionsForKnowTypes)
+ {
+ if (path == null)
+ return null;
- // obtain special paths.
- string myDocumentsPath = (Environment.GetFolderPath(Environment.SpecialFolder.Personal)+Path.DirectorySeparatorChar).ToLower() ;
- string desktopPath = (Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)+Path.DirectorySeparatorChar).ToLower() ;
+ // obtain special paths.
+ string myDocumentsPath = (Environment.GetFolderPath(Environment.SpecialFolder.Personal)+Path.DirectorySeparatorChar).ToLower() ;
+ string desktopPath = (Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)+Path.DirectorySeparatorChar).ToLower() ;
- // default to pretty path being the same as base path
- string prettyPath = path ;
+ // default to pretty path being the same as base path
+ string prettyPath = path ;
- if ( prettyPath.ToLower().StartsWith(myDocumentsPath) )
- prettyPath = "My Documents\\" + prettyPath.Substring( myDocumentsPath.Length ) ;
+ if ( prettyPath.ToLower().StartsWith(myDocumentsPath) )
+ prettyPath = "My Documents\\" + prettyPath.Substring( myDocumentsPath.Length ) ;
- // also check for the desktop
- else if ( prettyPath.ToLower().StartsWith(desktopPath) )
- prettyPath = "Desktop\\" + prettyPath.Substring( desktopPath.Length ) ;
+ // also check for the desktop
+ else if ( prettyPath.ToLower().StartsWith(desktopPath) )
+ prettyPath = "Desktop\\" + prettyPath.Substring( desktopPath.Length ) ;
- // if we should hide the extension, do so.
- if (hideExtensionsForKnowTypes)
- prettyPath = Path.Combine(Path.GetDirectoryName(prettyPath), Path.GetFileNameWithoutExtension(prettyPath));
+ // if we should hide the extension, do so.
+ if (hideExtensionsForKnowTypes)
+ prettyPath = Path.Combine(Path.GetDirectoryName(prettyPath), Path.GetFileNameWithoutExtension(prettyPath));
- // return the pretty path
- return prettyPath ;
- }
+ // return the pretty path
+ return prettyPath ;
+ }
#endif
public static bool PathsEqual(string file1, string file2)
diff --git a/src/managed/OpenLiveWriter.CoreServices/Progress/MultipartAsyncOperation.cs b/src/managed/OpenLiveWriter.CoreServices/Progress/MultipartAsyncOperation.cs
index ce4d157d..12695626 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Progress/MultipartAsyncOperation.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Progress/MultipartAsyncOperation.cs
@@ -62,7 +62,6 @@ namespace OpenLiveWriter.CoreServices.Progress
AddProgressOperation(operation, null, completed, tickSize);
}
-
///
/// Adds a new ProgressOperation to the list of work to perform and assigns the operation
/// the number of ticks that it should take up in the overall operation.
diff --git a/src/managed/OpenLiveWriter.CoreServices/QuickTimer.cs b/src/managed/OpenLiveWriter.CoreServices/QuickTimer.cs
index 165744a7..61f96543 100644
--- a/src/managed/OpenLiveWriter.CoreServices/QuickTimer.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/QuickTimer.cs
@@ -40,11 +40,11 @@ namespace OpenLiveWriter.CoreServices
double time = timer.ElapsedTime();
Debug.WriteLine("QuickTimer: [" + label + "] " + time + "ms");
#else
- // This is only here to prevent the compiler from warning that label isn't in use
- // The label is only present in release because if we completely empty this class
- // in release, a placeholder is generated by asmmeta, and that placeholder causes
- // asmmeta to vary between release and debug
- Debug.WriteLine("QuickTimer: [" + label + "] - no timing information");
+ // This is only here to prevent the compiler from warning that label isn't in use
+ // The label is only present in release because if we completely empty this class
+ // in release, a placeholder is generated by asmmeta, and that placeholder causes
+ // asmmeta to vary between release and debug
+ Debug.WriteLine("QuickTimer: [" + label + "] - no timing information");
#endif
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/ResourceFileDownloader.cs b/src/managed/OpenLiveWriter.CoreServices/ResourceFileDownloader.cs
index 8ed770b2..cc58489d 100644
--- a/src/managed/OpenLiveWriter.CoreServices/ResourceFileDownloader.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/ResourceFileDownloader.cs
@@ -92,7 +92,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
///
/// Initialize the downloader with the appropriate paths and options
///
@@ -119,7 +118,6 @@ namespace OpenLiveWriter.CoreServices
return GetResource(Assembly.GetCallingAssembly(), name, resourceUrl, contentType, requiredFreshnessDays, timeoutMs);
}
-
///
/// Get and process a resource (see comment on GetResource for more info on resources)
/// This method attempts to load the resource normally (i.e. from the network). If
@@ -281,7 +279,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
///
/// Get the specified resource from the local cache
///
@@ -302,7 +299,6 @@ namespace OpenLiveWriter.CoreServices
}
-
private void SafeDeleteLocalCacheFile(Assembly assembly, string resourceName)
{
try
diff --git a/src/managed/OpenLiveWriter.CoreServices/Settings/ISettingsPersister.cs b/src/managed/OpenLiveWriter.CoreServices/Settings/ISettingsPersister.cs
index 721fc439..86877bd3 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Settings/ISettingsPersister.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Settings/ISettingsPersister.cs
@@ -71,8 +71,7 @@ namespace OpenLiveWriter.CoreServices.Settings
///
/// An IDisposable that should be disposed when
/// the batch operation completes, OR NULL.
- IDisposable BatchUpdate();
-
+ IDisposable BatchUpdate();
///
/// Determine whether the specified sub-settings exists
diff --git a/src/managed/OpenLiveWriter.CoreServices/Settings/MemorySettingsPersister.cs b/src/managed/OpenLiveWriter.CoreServices/Settings/MemorySettingsPersister.cs
index 87a6b9ba..40a1d001 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Settings/MemorySettingsPersister.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Settings/MemorySettingsPersister.cs
@@ -101,7 +101,6 @@ namespace OpenLiveWriter.CoreServices.Settings
{
}
-
private string[] CollectionToSortedStringArray(ICollection foo)
{
string[] names = new string[data.Count];
diff --git a/src/managed/OpenLiveWriter.CoreServices/Settings/RegistryCodec.cs b/src/managed/OpenLiveWriter.CoreServices/Settings/RegistryCodec.cs
index 8f255a44..337aacc4 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Settings/RegistryCodec.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Settings/RegistryCodec.cs
@@ -35,14 +35,14 @@ namespace OpenLiveWriter.CoreServices.Settings
/// Any Codec that is not part of this list will never get called.
///
private Codec[] codecs = {
- // common types up top
- new StringCodec(),
+ // common types up top
+ new StringCodec(),
new BooleanCodec(),
new Int32Codec(),
new DoubleCodec(),
new Int64Codec(),
- // now all other primitive types
- new SByteCodec(),
+ // now all other primitive types
+ new SByteCodec(),
new ByteCodec(),
new CharCodec(),
new Int16Codec(),
@@ -51,15 +51,15 @@ namespace OpenLiveWriter.CoreServices.Settings
new UInt64Codec(),
new FloatCodec(),
new DecimalCodec(),
- // date-time
- new DateTimeCodec(),
+ // date-time
+ new DateTimeCodec(),
new RectangleCodec(),
new PointCodec(),
new SizeCodec(),
new SizeFCodec(),
new MultiStringCodec(),
- // catch-all case
- new SerializableCodec()
+ // catch-all case
+ new SerializableCodec()
};
///
@@ -68,7 +68,6 @@ namespace OpenLiveWriter.CoreServices.Settings
///
private Hashtable codecCache = new Hashtable();
-
///
/// Take a native value and return a registry-ready representation.
///
diff --git a/src/managed/OpenLiveWriter.CoreServices/Settings/RegistrySettingsPersister.cs b/src/managed/OpenLiveWriter.CoreServices/Settings/RegistrySettingsPersister.cs
index 39d7a4b5..6cf7c92a 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Settings/RegistrySettingsPersister.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Settings/RegistrySettingsPersister.cs
@@ -87,7 +87,6 @@ namespace OpenLiveWriter.CoreServices.Settings
private bool haveLoggedFailedDefault = false;
private bool haveLoggedFailedGetKey = false;
-
///
/// Low-level get (returns null if the value doesn't exist).
///
diff --git a/src/managed/OpenLiveWriter.CoreServices/Settings/SettingsPersisterHelper.cs b/src/managed/OpenLiveWriter.CoreServices/Settings/SettingsPersisterHelper.cs
index 23bf094b..6a3ee428 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Settings/SettingsPersisterHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Settings/SettingsPersisterHelper.cs
@@ -80,7 +80,6 @@ namespace OpenLiveWriter.CoreServices.Settings
}
}
-
///
/// Get the names of available settings.
///
@@ -627,7 +626,6 @@ namespace OpenLiveWriter.CoreServices.Settings
settingsPersister.UnsetSubSettingsTree(name);
}
-
///
/// Returns a SettingsPersisterHelper for the first RegistryKeySpec that exists
/// in the registry, or null if the registry doesn't contain any of them.
diff --git a/src/managed/OpenLiveWriter.CoreServices/ShellHelper.cs b/src/managed/OpenLiveWriter.CoreServices/ShellHelper.cs
index a32fc6d2..9bd8d516 100644
--- a/src/managed/OpenLiveWriter.CoreServices/ShellHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/ShellHelper.cs
@@ -71,7 +71,6 @@ namespace OpenLiveWriter.CoreServices
return propStore;
}
-
///
/// For a file extension (with leading period) and a verb (or null for default
/// verb), returns the (full?) path to the executable file that is assigned to
diff --git a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/FileBasedSiteStorage.cs b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/FileBasedSiteStorage.cs
index 439a6915..9e612f67 100644
--- a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/FileBasedSiteStorage.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/FileBasedSiteStorage.cs
@@ -60,13 +60,11 @@ namespace OpenLiveWriter.CoreServices
fileFilter = filter;
}
-
///
/// File system path that contains the site.
///
public string BasePath { get { return m_basePath; } }
-
///
/// Method called by base class SupportingFiles implementation
///
@@ -93,7 +91,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
///
/// Test to see whether the specified file already exists
///
@@ -106,7 +103,6 @@ namespace OpenLiveWriter.CoreServices
return File.Exists(fullPath);
}
-
///
/// Retrieve a Stream for the given path (Read or Write access can be specified).
/// Stream.Close() should be called when you are finished using the Stream.
diff --git a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/ISiteStorage.cs b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/ISiteStorage.cs
index f03e47df..9274a66d 100644
--- a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/ISiteStorage.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/ISiteStorage.cs
@@ -61,5 +61,4 @@ namespace OpenLiveWriter.CoreServices
Write
};
-
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/SiteStorageBase.cs b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/SiteStorageBase.cs
index 446689ec..ed6be0fb 100644
--- a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/SiteStorageBase.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/SiteStorageBase.cs
@@ -145,7 +145,6 @@ namespace OpenLiveWriter.CoreServices
static char[] mimeInvalid = new char[] { };
// both ( and ) were protected, but I couldn't replicate a problem w/parens in Content headers.
-
// storage for root file name
private string m_rootFile = null;
diff --git a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/TempFileSiteStorage.cs b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/TempFileSiteStorage.cs
index 71d99844..852aa971 100644
--- a/src/managed/OpenLiveWriter.CoreServices/SiteStorage/TempFileSiteStorage.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/SiteStorage/TempFileSiteStorage.cs
@@ -75,7 +75,6 @@ namespace OpenLiveWriter.CoreServices
{
}
-
///
/// Recursively delete all files contained in the temporary directory
///
@@ -107,7 +106,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
// Helper function to generate a temporary site path name
private static string GetTemporarySitePath(string prefix, string tempDirectory)
{
diff --git a/src/managed/OpenLiveWriter.CoreServices/StringTokenizer.cs b/src/managed/OpenLiveWriter.CoreServices/StringTokenizer.cs
index 15488096..b8620150 100644
--- a/src/managed/OpenLiveWriter.CoreServices/StringTokenizer.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/StringTokenizer.cs
@@ -8,125 +8,125 @@ using System.Text;
namespace Project31.CoreServices
{
- ///
- /// Breaks a string into tokens according to one or more delimiters.
- ///
- public class StringTokenizer : IEnumerable, IEnumerator
- {
- private readonly string stringValue;
- private readonly bool returnDelimiters;
- private readonly string[] delimiters;
+ ///
+ /// Breaks a string into tokens according to one or more delimiters.
+ ///
+ public class StringTokenizer : IEnumerable, IEnumerator
+ {
+ private readonly string stringValue;
+ private readonly bool returnDelimiters;
+ private readonly string[] delimiters;
- private int offset;
- private int len;
+ private int offset;
+ private int len;
- public StringTokenizer(string stringValue, bool returnDelimiters, params string[] delimiters)
- {
- foreach (string delimiter in delimiters)
- {
- if (delimiter == null || delimiter == string.Empty)
- {
- Trace.Fail("Null or empty string cannot be used as delimiter");
- throw new ArgumentOutOfRangeException("Null or empty string cannot be used as delimiter");
- }
- }
+ public StringTokenizer(string stringValue, bool returnDelimiters, params string[] delimiters)
+ {
+ foreach (string delimiter in delimiters)
+ {
+ if (delimiter == null || delimiter == string.Empty)
+ {
+ Trace.Fail("Null or empty string cannot be used as delimiter");
+ throw new ArgumentOutOfRangeException("Null or empty string cannot be used as delimiter");
+ }
+ }
- this.stringValue = stringValue;
- this.returnDelimiters = returnDelimiters;
- this.delimiters = delimiters;
+ this.stringValue = stringValue;
+ this.returnDelimiters = returnDelimiters;
+ this.delimiters = delimiters;
- this.offset = 0;
- this.len = 0;
- }
+ this.offset = 0;
+ this.len = 0;
+ }
- ///
- /// Initializes a tokenizer; delimiters will not be returned.
- ///
- /// The string to be tokenized.
- /// The strings that delimit tokens.
- public StringTokenizer(string stringValue, params string[] delimiters) : this(stringValue, false, delimiters)
- {
- }
+ ///
+ /// Initializes a tokenizer; delimiters will not be returned.
+ ///
+ /// The string to be tokenized.
+ /// The strings that delimit tokens.
+ public StringTokenizer(string stringValue, params string[] delimiters) : this(stringValue, false, delimiters)
+ {
+ }
- public bool MoveNext()
- {
- retry:
+ public bool MoveNext()
+ {
+ retry:
- offset += len;
- len = 0;
- if (offset >= stringValue.Length)
- return false;
+ offset += len;
+ len = 0;
+ if (offset >= stringValue.Length)
+ return false;
- int delimStart;
- int delimLen;
- FindFirstDelimiter(offset, out delimStart, out delimLen);
+ int delimStart;
+ int delimLen;
+ FindFirstDelimiter(offset, out delimStart, out delimLen);
- if (delimStart == offset)
- {
- len = delimLen;
- if (returnDelimiters)
- return true;
- else
- goto retry; // same as calling return MoveNext(), but without using up the stack
- }
- else
- {
- len = delimStart - offset;
- return true;
- }
- }
+ if (delimStart == offset)
+ {
+ len = delimLen;
+ if (returnDelimiters)
+ return true;
+ else
+ goto retry; // same as calling return MoveNext(), but without using up the stack
+ }
+ else
+ {
+ len = delimStart - offset;
+ return true;
+ }
+ }
- ///
- /// Finds the first delimiter from startIndex on.
- /// If none found, offset will be greater than stringValue.Length
- /// and len will be -1.
- ///
- private void FindFirstDelimiter(int startIndex, out int offset, out int len)
- {
- for (offset = startIndex; offset < stringValue.Length; offset++)
- {
- len = DetectDelimiter(offset);
- if (len != -1)
- return;
- }
- len = -1;
- }
+ ///
+ /// Finds the first delimiter from startIndex on.
+ /// If none found, offset will be greater than stringValue.Length
+ /// and len will be -1.
+ ///
+ private void FindFirstDelimiter(int startIndex, out int offset, out int len)
+ {
+ for (offset = startIndex; offset < stringValue.Length; offset++)
+ {
+ len = DetectDelimiter(offset);
+ if (len != -1)
+ return;
+ }
+ len = -1;
+ }
- private int DetectDelimiter(int offset)
- {
- int lenLeft = stringValue.Length - offset;
- foreach (string delimiter in delimiters)
- {
- // not enough space for this delimiter
- if (lenLeft < delimiter.Length)
- continue;
+ private int DetectDelimiter(int offset)
+ {
+ int lenLeft = stringValue.Length - offset;
+ foreach (string delimiter in delimiters)
+ {
+ // not enough space for this delimiter
+ if (lenLeft < delimiter.Length)
+ continue;
- if (stringValue.Substring(offset, delimiter.Length) == delimiter)
- return delimiter.Length;
- }
- return -1;
- }
+ if (stringValue.Substring(offset, delimiter.Length) == delimiter)
+ return delimiter.Length;
+ }
+ return -1;
+ }
- public void Reset()
- {
- this.offset = 0;
- this.len = 0;
- }
+ public void Reset()
+ {
+ this.offset = 0;
+ this.len = 0;
+ }
- public IEnumerator GetEnumerator()
- {
- return this;
- }
+ public IEnumerator GetEnumerator()
+ {
+ return this;
+ }
- public object Current
- {
- get
- {
- if (len == 0)
- throw new InvalidOperationException();
+ public object Current
+ {
+ get
+ {
+ if (len == 0)
+ throw new InvalidOperationException();
- return stringValue.Substring(offset, len);
- }
- }
- }
+ return stringValue.Substring(offset, len);
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/TransientDirectory.cs b/src/managed/OpenLiveWriter.CoreServices/TransientDirectory.cs
index 76e8918d..47c55fa0 100644
--- a/src/managed/OpenLiveWriter.CoreServices/TransientDirectory.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/TransientDirectory.cs
@@ -54,44 +54,44 @@ namespace OpenLiveWriter.CoreServices
}
/*
- public int MaxChildPath(StringBuilder buffer)
- {
- buffer.Append(Path.DirectorySeparatorChar);
- buffer.Append(name);
+ public int MaxChildPath(StringBuilder buffer)
+ {
+ buffer.Append(Path.DirectorySeparatorChar);
+ buffer.Append(name);
- int startPos = buffer.Length;
- int currLen = 0;
- int depth = 0;
+ int startPos = buffer.Length;
+ int currLen = 0;
+ int depth = 0;
- StringBuilder maxChildPath = new StringBuilder();
- StringBuilder currChildPath = new StringBuilder();
- foreach (TransientFileSystemItem child in children)
- {
- int tmpDepth = child.MaxChildPath(currChildPath);
- if (currChildPath.Length > currLen && tmpDepth > depth)
- {
- if (currLen != 0)
- {
- buffer.Remove(startPos, currLen);
- }
- buffer.Append(currChildPath.ToString());
- currLen = currChildPath.Length;
- depth = tmpDepth;
- }
- else
- {
- currChildPath.Remove(0, currChildPath.Length);
- }
- Debug.Assert(currChildPath.Length == 0, "Programming error: currChildPath != 0");
- }
- if (maxChildPath.Length > 0)
- {
- buffer.Append(maxChildPath.ToString());
- }
+ StringBuilder maxChildPath = new StringBuilder();
+ StringBuilder currChildPath = new StringBuilder();
+ foreach (TransientFileSystemItem child in children)
+ {
+ int tmpDepth = child.MaxChildPath(currChildPath);
+ if (currChildPath.Length > currLen && tmpDepth > depth)
+ {
+ if (currLen != 0)
+ {
+ buffer.Remove(startPos, currLen);
+ }
+ buffer.Append(currChildPath.ToString());
+ currLen = currChildPath.Length;
+ depth = tmpDepth;
+ }
+ else
+ {
+ currChildPath.Remove(0, currChildPath.Length);
+ }
+ Debug.Assert(currChildPath.Length == 0, "Programming error: currChildPath != 0");
+ }
+ if (maxChildPath.Length > 0)
+ {
+ buffer.Append(maxChildPath.ToString());
+ }
- return ++depth;
- }
- */
+ return ++depth;
+ }
+ */
public FileSystemInfo Create(DirectoryInfo destination)
{
diff --git a/src/managed/OpenLiveWriter.CoreServices/TreeSet.cs b/src/managed/OpenLiveWriter.CoreServices/TreeSet.cs
index 0c1ec7aa..4a8daa5d 100644
--- a/src/managed/OpenLiveWriter.CoreServices/TreeSet.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/TreeSet.cs
@@ -446,69 +446,67 @@ namespace OpenLiveWriter.CoreServices
#endregion
-
-
#if TEST
- ///
- /// Brute-force correctness test of insert/delete operations.
- ///
- public static void Test()
- {
- TreeSet ts = new TreeSet();
- int count = 0;
+ ///
+ /// Brute-force correctness test of insert/delete operations.
+ ///
+ public static void Test()
+ {
+ TreeSet ts = new TreeSet();
+ int count = 0;
- for (int loops = 0; ; loops++)
- {
- count += ts.AddAll(RandomArrayList(100000 - ts.Count));
+ for (int loops = 0; ; loops++)
+ {
+ count += ts.AddAll(RandomArrayList(100000 - ts.Count));
- InOrder(ts);
+ InOrder(ts);
- ArrayList data = ts.ToArrayList();
+ ArrayList data = ts.ToArrayList();
- RandomizeOrder(ref data);
+ RandomizeOrder(ref data);
- for (int i = 0; i < 50000 && i < data.Count; i++)
- {
- if (ts.Remove(data[i]))
- count--;
- }
+ for (int i = 0; i < 50000 && i < data.Count; i++)
+ {
+ if (ts.Remove(data[i]))
+ count--;
+ }
- Debug.Assert(count == ts.Count);
- InOrder(ts);
+ Debug.Assert(count == ts.Count);
+ InOrder(ts);
- if ((loops % 10) == 0)
- Console.WriteLine("So far so good: " + loops + " " + count);
- }
- }
+ if ((loops % 10) == 0)
+ Console.WriteLine("So far so good: " + loops + " " + count);
+ }
+ }
- public static void InOrder(TreeSet tree)
- {
- object last = null;
- foreach (object o in tree)
- {
- if (last != null)
- Debug.Assert(((IComparable)last).CompareTo(o) < 0, "Out of order");
- }
- }
+ public static void InOrder(TreeSet tree)
+ {
+ object last = null;
+ foreach (object o in tree)
+ {
+ if (last != null)
+ Debug.Assert(((IComparable)last).CompareTo(o) < 0, "Out of order");
+ }
+ }
- public static void RandomizeOrder(ref ArrayList list)
- {
- Hashtable table = new Hashtable(list.Count);
- foreach (object o in list)
- table[o] = string.Empty;
- list = new ArrayList(table.Keys);
- }
+ public static void RandomizeOrder(ref ArrayList list)
+ {
+ Hashtable table = new Hashtable(list.Count);
+ foreach (object o in list)
+ table[o] = string.Empty;
+ list = new ArrayList(table.Keys);
+ }
- public static ArrayList RandomArrayList(int size)
- {
- Random r = new Random();
+ public static ArrayList RandomArrayList(int size)
+ {
+ Random r = new Random();
- ArrayList al = new ArrayList(size);
- for (int i = 0; i < size; i++)
- al.Add(r.Next());
+ ArrayList al = new ArrayList(size);
+ for (int i = 0; i < size; i++)
+ al.Add(r.Next());
- return al;
- }
+ return al;
+ }
#endif
}
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/Trie.cs b/src/managed/OpenLiveWriter.CoreServices/Trie.cs
index 5da13317..72113561 100644
--- a/src/managed/OpenLiveWriter.CoreServices/Trie.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/Trie.cs
@@ -119,5 +119,4 @@ namespace OpenLiveWriter.CoreServices
private T _value;
}
-
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/UI/GdiPaint.cs b/src/managed/OpenLiveWriter.CoreServices/UI/GdiPaint.cs
index 3816f4a9..2c4bf058 100644
--- a/src/managed/OpenLiveWriter.CoreServices/UI/GdiPaint.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/UI/GdiPaint.cs
@@ -7,37 +7,37 @@ using OpenLiveWriter.Interop.Windows;
namespace OpenLiveWriter.CoreServices.UI
{
- public class GdiPaint
- {
- public static void BitBlt(Graphics g, IntPtr hObject, Rectangle srcRect, Point destPoint)
- {
- IntPtr pTarget = g.GetHdc();
- try
- {
- IntPtr pSource = Gdi32.CreateCompatibleDC(pTarget);
- try
- {
- IntPtr pOrig = Gdi32.SelectObject(pSource, hObject);
- try
- {
- Gdi32.BitBlt(pTarget, destPoint.X, destPoint.Y, srcRect.Width, srcRect.Height, pSource, srcRect.X, srcRect.Y,
- Gdi32.TernaryRasterOperations.SRCCOPY);
- }
- finally
- {
- Gdi32.SelectObject(pSource, pOrig);
- }
- }
- finally
- {
- Gdi32.DeleteDC(pSource);
- }
- }
- finally
- {
- g.ReleaseHdc(pTarget);
- }
+ public class GdiPaint
+ {
+ public static void BitBlt(Graphics g, IntPtr hObject, Rectangle srcRect, Point destPoint)
+ {
+ IntPtr pTarget = g.GetHdc();
+ try
+ {
+ IntPtr pSource = Gdi32.CreateCompatibleDC(pTarget);
+ try
+ {
+ IntPtr pOrig = Gdi32.SelectObject(pSource, hObject);
+ try
+ {
+ Gdi32.BitBlt(pTarget, destPoint.X, destPoint.Y, srcRect.Width, srcRect.Height, pSource, srcRect.X, srcRect.Y,
+ Gdi32.TernaryRasterOperations.SRCCOPY);
+ }
+ finally
+ {
+ Gdi32.SelectObject(pSource, pOrig);
+ }
+ }
+ finally
+ {
+ Gdi32.DeleteDC(pSource);
+ }
+ }
+ finally
+ {
+ g.ReleaseHdc(pTarget);
+ }
- }
- }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/AsyncWebRequestWithCache.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/AsyncWebRequestWithCache.cs
index 4f6e6900..f37a1178 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/AsyncWebRequestWithCache.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/AsyncWebRequestWithCache.cs
@@ -8,77 +8,77 @@ using OpenLiveWriter.Interop.Windows;
namespace OpenLiveWriter.CoreServices
{
- ///
- /// WebRequestHelper provides a mechanism for retrieve web data synchronously and
- /// asynchronously. It includes the capability to automatically check the local
- /// internet explorer cache for improved performance.
- ///
- public class AsyncWebRequestWithCache
- {
- ///
- /// The Reponse Stream returned by the WebRequestHelper
- ///
- public Stream ResponseStream;
+ ///
+ /// WebRequestHelper provides a mechanism for retrieve web data synchronously and
+ /// asynchronously. It includes the capability to automatically check the local
+ /// internet explorer cache for improved performance.
+ ///
+ public class AsyncWebRequestWithCache
+ {
+ ///
+ /// The Reponse Stream returned by the WebRequestHelper
+ ///
+ public Stream ResponseStream;
- ///
- /// Event called when an ansychronous request is completed.
- ///
- public event EventHandler RequestComplete;
- protected void OnRequestComplete(EventArgs e)
- {
- if (RequestComplete != null)
- RequestComplete(this, e);
- }
+ ///
+ /// Event called when an ansychronous request is completed.
+ ///
+ public event EventHandler RequestComplete;
+ protected void OnRequestComplete(EventArgs e)
+ {
+ if (RequestComplete != null)
+ RequestComplete(this, e);
+ }
- ///
- /// Constructs a new WebRequestHelper
- ///
- /// The url to which the request will be made
- public AsyncWebRequestWithCache(string url)
- {
- m_url = url;
- }
+ ///
+ /// Constructs a new WebRequestHelper
+ ///
+ /// The url to which the request will be made
+ public AsyncWebRequestWithCache(string url)
+ {
+ m_url = url;
+ }
- ///
- /// Begins an asynchronous request using default cache and timeout behaviour.
- ///
- public void StartRequest()
- {
- StartRequest(CacheSettings.CHECKCACHE);
- }
+ ///
+ /// Begins an asynchronous request using default cache and timeout behaviour.
+ ///
+ public void StartRequest()
+ {
+ StartRequest(CacheSettings.CHECKCACHE);
+ }
- ///
- /// Begins an asynchronous request using the default timeout
- ///
- /// true to cache, otherwise false
- public void StartRequest(CacheSettings cacheSettings)
- {
- StartRequest(cacheSettings, DEFAULT_TIMEOUT_MS);
- }
+ ///
+ /// Begins an asynchronous request using the default timeout
+ ///
+ /// true to cache, otherwise false
+ public void StartRequest(CacheSettings cacheSettings)
+ {
+ StartRequest(cacheSettings, DEFAULT_TIMEOUT_MS);
+ }
- ///
- /// Begins an asynchronous request
- ///
- /// true to use cache, otherwise false
- /// timeout, in milliseconds
- public void StartRequest(CacheSettings cacheSettings, int timeOut)
- {
- requestRunning = true;
+ ///
+ /// Begins an asynchronous request
+ ///
+ /// true to use cache, otherwise false
+ /// timeout, in milliseconds
+ public void StartRequest(CacheSettings cacheSettings, int timeOut)
+ {
+ requestRunning = true;
- // Check the cache
- if (cacheSettings != CacheSettings.NOCACHE)
- {
- Internet_Cache_Entry_Info cacheInfo;
- if (WinInet.GetUrlCacheEntryInfo(m_url, out cacheInfo))
- {
- ResponseStream = new FileStream(cacheInfo.lpszLocalFileName, FileMode.Open, FileAccess.Read);
- FireRequestComplete();
- }
- }
+ // Check the cache
+ if (cacheSettings != CacheSettings.NOCACHE)
+ {
+ Internet_Cache_Entry_Info cacheInfo;
+ if (WinInet.GetUrlCacheEntryInfo(m_url, out cacheInfo))
+ {
+ ResponseStream = new FileStream(cacheInfo.lpszLocalFileName, FileMode.Open, FileAccess.Read);
+ FireRequestComplete();
+ }
+ }
- // Make an async request
- if (ResponseStream == null && cacheSettings != CacheSettings.CACHEONLY)
- {
+ // Make an async request
+ if (ResponseStream == null && cacheSettings != CacheSettings.CACHEONLY)
+ {
try
{
m_webRequest = HttpRequestHelper.CreateHttpWebRequest(m_url, true);
@@ -91,74 +91,74 @@ namespace OpenLiveWriter.CoreServices
m_webRequest.Timeout = timeOut;
m_webRequest.BeginGetResponse(new AsyncCallback(RequestCompleteHandler), new object());
- }
- }
+ }
+ }
- ///
- /// Cancels a running a synchronous request
- ///
- public void Cancel()
- {
- if (requestRunning)
- m_webRequest.Abort();
- }
+ ///
+ /// Cancels a running a synchronous request
+ ///
+ public void Cancel()
+ {
+ if (requestRunning)
+ m_webRequest.Abort();
+ }
- ///
- /// Handles completed asynchronous webRequest
- ///
- private void RequestCompleteHandler(
- IAsyncResult ar
- )
- {
- WebResponse response = m_webRequest.EndGetResponse(ar);
- ResponseStream = response.GetResponseStream();
- FireRequestComplete();
- }
+ ///
+ /// Handles completed asynchronous webRequest
+ ///
+ private void RequestCompleteHandler(
+ IAsyncResult ar
+ )
+ {
+ WebResponse response = m_webRequest.EndGetResponse(ar);
+ ResponseStream = response.GetResponseStream();
+ FireRequestComplete();
+ }
- ///
- /// Helper method that notifies of request completion
- ///
- private void FireRequestComplete()
- {
- OnRequestComplete(EventArgs.Empty);
- requestRunning = false;
- }
+ ///
+ /// Helper method that notifies of request completion
+ ///
+ private void FireRequestComplete()
+ {
+ OnRequestComplete(EventArgs.Empty);
+ requestRunning = false;
+ }
- ///
- /// The web request
- ///
- private WebRequest m_webRequest;
+ ///
+ /// The web request
+ ///
+ private WebRequest m_webRequest;
- ///
- /// The url
- ///
- public string Url
- {
- get
- {
- return m_url;
- }
- }
- private string m_url;
+ ///
+ /// The url
+ ///
+ public string Url
+ {
+ get
+ {
+ return m_url;
+ }
+ }
+ private string m_url;
- ///
- /// Indicated whether the request is actually running
- ///
- private bool requestRunning = false;
+ ///
+ /// Indicated whether the request is actually running
+ ///
+ private bool requestRunning = false;
- ///
- /// default timeout for request
- ///
- private static int DEFAULT_TIMEOUT_MS = 20000;
+ ///
+ /// default timeout for request
+ ///
+ private static int DEFAULT_TIMEOUT_MS = 20000;
- ///
- /// Cache settings control how the cache is checked.
- ///
- public enum CacheSettings
- {
- CHECKCACHE,
- NOCACHE,
- CACHEONLY
- }
- }
+ ///
+ /// Cache settings control how the cache is checked.
+ ///
+ public enum CacheSettings
+ {
+ CHECKCACHE,
+ NOCACHE,
+ CACHEONLY
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/HTMLDocumentDownloader.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/HTMLDocumentDownloader.cs
index 13fbc221..a9bcdbeb 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/HTMLDocumentDownloader.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/HTMLDocumentDownloader.cs
@@ -13,7 +13,6 @@ using OpenLiveWriter.CoreServices.Progress;
namespace OpenLiveWriter.CoreServices
{
-
///
/// Gets HTMLDocuments for a given URL. It gets two versions of the Document,
/// one that can be used to get a list of references in the Document and one that
@@ -259,7 +258,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
#region IDisposable Members
///
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/HttpRequestHelper.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/HttpRequestHelper.cs
index 3ebe7b71..0375dd68 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/HttpRequestHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/HttpRequestHelper.cs
@@ -61,7 +61,6 @@ namespace OpenLiveWriter.CoreServices
return true;
}
-
public static void TrackResponseClosing(ref HttpWebRequest req)
{
CloseTrackingHttpWebRequest.Wrap(ref req);
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/InternetShortCut.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/InternetShortCut.cs
index 257bc185..22862aa6 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/InternetShortCut.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/InternetShortCut.cs
@@ -7,38 +7,38 @@ using Project31.Interop.Com.SHDocVw ;
namespace Project31.CoreServices
{
- ///
- /// InternetShortcut is a class for generating and manipulating internet shortcut files
- ///
- public class InternetShortcut
- {
- ///
- /// Constructs a new instance of internetshortcut
- ///
- public InternetShortcut()
- {
- // Note that we tried marking this class with the Comimport and Guid attributes,
- // but when we did that, the type couldn't be loaded. The below works around that.
- Type isType = Type.GetTypeFromCLSID(new Guid("fbf23b40-e3f0-101b-8488-00aa003e56f8")) ;
- internetShortcut = Activator.CreateInstance(isType) ;
- }
+ ///
+ /// InternetShortcut is a class for generating and manipulating internet shortcut files
+ ///
+ public class InternetShortcut
+ {
+ ///
+ /// Constructs a new instance of internetshortcut
+ ///
+ public InternetShortcut()
+ {
+ // Note that we tried marking this class with the Comimport and Guid attributes,
+ // but when we did that, the type couldn't be loaded. The below works around that.
+ Type isType = Type.GetTypeFromCLSID(new Guid("fbf23b40-e3f0-101b-8488-00aa003e56f8")) ;
+ internetShortcut = Activator.CreateInstance(isType) ;
+ }
- ///
- /// Writes a url file representing the current navigation state of a browser
- ///
- /// The IWebBrowser2 for which to write the url file
- /// The path to the url file
- public void WriteForBrowser( IWebBrowser2 browser, string filePath )
- {
- IObjectWithSite site = internetShortcut as IObjectWithSite ;
- site.SetSite( browser ) ;
- IPersistFile file = internetShortcut as IPersistFile ;
- file.Save( filePath, false ) ;
- }
+ ///
+ /// Writes a url file representing the current navigation state of a browser
+ ///
+ /// The IWebBrowser2 for which to write the url file
+ /// The path to the url file
+ public void WriteForBrowser( IWebBrowser2 browser, string filePath )
+ {
+ IObjectWithSite site = internetShortcut as IObjectWithSite ;
+ site.SetSite( browser ) ;
+ IPersistFile file = internetShortcut as IPersistFile ;
+ file.Save( filePath, false ) ;
+ }
- ///
- /// holds the internetshortcut object (COM)
- ///
- private object internetShortcut ;
- }
+ ///
+ /// holds the internetshortcut object (COM)
+ ///
+ private object internetShortcut ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/MultiThreadedPageDownloader.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/MultiThreadedPageDownloader.cs
index 0396c71f..6ce21945 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/MultiThreadedPageDownloader.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/MultiThreadedPageDownloader.cs
@@ -15,144 +15,144 @@ using Project31.CoreServices.Progress;
namespace Project31.CoreServices
{
- public class DownloadResults
- {
+ public class DownloadResults
+ {
- public DownloadResults()
- {
- }
+ public DownloadResults()
+ {
+ }
- public void AddResult(string url, string filePath)
- {
- if (!_result.ContainsKey(url))
- {
- _result.Add(url, filePath);
- }
- }
+ public void AddResult(string url, string filePath)
+ {
+ if (!_result.ContainsKey(url))
+ {
+ _result.Add(url, filePath);
+ }
+ }
- public string GetFilePathForUrl(string url)
- {
- return (string)_result[url];
- }
+ public string GetFilePathForUrl(string url)
+ {
+ return (string)_result[url];
+ }
- private Hashtable _result = new Hashtable();
+ private Hashtable _result = new Hashtable();
- }
- ///
- /// Summary description for MultiThreadedPageDownloader.
- ///
- public class MultiThreadedPageDownloader
- {
+ }
+ ///
+ /// Summary description for MultiThreadedPageDownloader.
+ ///
+ public class MultiThreadedPageDownloader
+ {
- public MultiThreadedPageDownloader(IProgressHost progressHost) : this(2, progressHost)
- {
+ public MultiThreadedPageDownloader(IProgressHost progressHost) : this(2, progressHost)
+ {
- }
+ }
- public MultiThreadedPageDownloader(int threadCount, IProgressHost progressHost)
- {
- _threadCount = threadCount;
- _progressHost = progressHost;
- }
- private int _threadCount = 2;
- private IProgressHost _progressHost;
- private Hashtable _urlsToDownload = new Hashtable();
+ public MultiThreadedPageDownloader(int threadCount, IProgressHost progressHost)
+ {
+ _threadCount = threadCount;
+ _progressHost = progressHost;
+ }
+ private int _threadCount = 2;
+ private IProgressHost _progressHost;
+ private Hashtable _urlsToDownload = new Hashtable();
- public void AddUrl(string url, int timeout)
- {
- if (!_urlsToDownload.ContainsKey(url))
- _urlsToDownload.Add(url, timeout);
- }
+ public void AddUrl(string url, int timeout)
+ {
+ if (!_urlsToDownload.ContainsKey(url))
+ _urlsToDownload.Add(url, timeout);
+ }
- private ThreadSafeQueue _downloadQueue = new ThreadSafeQueue();
+ private ThreadSafeQueue _downloadQueue = new ThreadSafeQueue();
- public DownloadResults Download()
- {
- TickableProgressTick tickableProgress = new TickableProgressTick(_progressHost, _urlsToDownload.Count);
+ public DownloadResults Download()
+ {
+ TickableProgressTick tickableProgress = new TickableProgressTick(_progressHost, _urlsToDownload.Count);
- Hashtable workItems = new Hashtable();
- foreach (string url in _urlsToDownload.Keys)
- {
- DownloadWorkItem workItem = new DownloadWorkItem(url, (int)_urlsToDownload[url], tickableProgress);
- workItems.Add(url, workItem);
- _downloadQueue.Enqueue(workItem);
- }
+ Hashtable workItems = new Hashtable();
+ foreach (string url in _urlsToDownload.Keys)
+ {
+ DownloadWorkItem workItem = new DownloadWorkItem(url, (int)_urlsToDownload[url], tickableProgress);
+ workItems.Add(url, workItem);
+ _downloadQueue.Enqueue(workItem);
+ }
- ParallelExecution execution = new
- ParallelExecution(new ThreadStart(DoWork), _threadCount);
- execution.Execute();
+ ParallelExecution execution = new
+ ParallelExecution(new ThreadStart(DoWork), _threadCount);
+ execution.Execute();
- DownloadResults results = new DownloadResults();
- foreach (string url in workItems.Keys)
- {
- results.AddResult(url, ((DownloadWorkItem)workItems[url]).FilePath);
- }
- return results;
- }
+ DownloadResults results = new DownloadResults();
+ foreach (string url in workItems.Keys)
+ {
+ results.AddResult(url, ((DownloadWorkItem)workItems[url]).FilePath);
+ }
+ return results;
+ }
- private void DoWork()
- {
- while (true)
- {
- if (_progressHost.CancelRequested)
- throw new OperationCancelledException();
+ private void DoWork()
+ {
+ while (true)
+ {
+ if (_progressHost.CancelRequested)
+ throw new OperationCancelledException();
- bool success;
- DownloadWorkItem workItem =
- (DownloadWorkItem)_downloadQueue.TryDequeue(out success);
- if (!success)
- return; // no more work in queue; this thread is done
+ bool success;
+ DownloadWorkItem workItem =
+ (DownloadWorkItem)_downloadQueue.TryDequeue(out success);
+ if (!success)
+ return; // no more work in queue; this thread is done
- try
- {
- workItem.Download();
- }
- catch(Exception e)
- {
- Trace.WriteLine("Error downloading link while importing favorites: " + e.ToString());
- }
- }
- }
+ try
+ {
+ workItem.Download();
+ }
+ catch(Exception e)
+ {
+ Trace.WriteLine("Error downloading link while importing favorites: " + e.ToString());
+ }
+ }
+ }
- private class DownloadWorkItem
- {
- public DownloadWorkItem(string url, int timeout,
- TickableProgressTick tickableProgress)
- {
- _url = url;
- _timeout = timeout;
- _tickableProgress = tickableProgress;
- }
- private string _url;
- private int _timeout;
- private TickableProgressTick _tickableProgress;
+ private class DownloadWorkItem
+ {
+ public DownloadWorkItem(string url, int timeout,
+ TickableProgressTick tickableProgress)
+ {
+ _url = url;
+ _timeout = timeout;
+ _tickableProgress = tickableProgress;
+ }
+ private string _url;
+ private int _timeout;
+ private TickableProgressTick _tickableProgress;
- public void Download()
- {
- _tickableProgress.Message("Indexing " + _url);
- string filePath = TempFileManager.Instance.CreateTempFile();
- WebRequestWithCache request = new WebRequestWithCache(_url);
+ public void Download()
+ {
+ _tickableProgress.Message("Indexing " + _url);
+ string filePath = TempFileManager.Instance.CreateTempFile();
+ WebRequestWithCache request = new WebRequestWithCache(_url);
- Stream response = request.GetResponseStream(WebRequestWithCache.CacheSettings.CHECKCACHE,_timeout);
- FileStream fileStream = new FileStream(filePath, FileMode.Open);
- using (response)
- using (fileStream)
- StreamHelper.Transfer(response, fileStream);
+ Stream response = request.GetResponseStream(WebRequestWithCache.CacheSettings.CHECKCACHE,_timeout);
+ FileStream fileStream = new FileStream(filePath, FileMode.Open);
+ using (response)
+ using (fileStream)
+ StreamHelper.Transfer(response, fileStream);
- _filePath = filePath;
+ _filePath = filePath;
- _tickableProgress.Tick();
- }
+ _tickableProgress.Tick();
+ }
- public string FilePath
- {
- get
- {
- return _filePath;
- }
- }
- private string _filePath = null;
- }
+ public string FilePath
+ {
+ get
+ {
+ return _filePath;
+ }
+ }
+ private string _filePath = null;
+ }
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/PageToDownload.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/PageToDownload.cs
index fa91178f..f078064a 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/PageToDownload.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/PageToDownload.cs
@@ -267,7 +267,6 @@ namespace OpenLiveWriter.CoreServices
}
private LightWeightHTMLDocument _lightweightHTMLDocument = null;
-
///
///
///
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlDownloadToFile.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlDownloadToFile.cs
index ee1a5f3a..39f4d516 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlDownloadToFile.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlDownloadToFile.cs
@@ -78,7 +78,6 @@ namespace OpenLiveWriter.CoreServices
return urlDownloadToFile.FilePath;
}
-
public enum DownloadActions
{
GET,
@@ -151,7 +150,6 @@ namespace OpenLiveWriter.CoreServices
private NetworkCredential _networkCredential = null;
private string _cookieString = null;
-
public DownloadActions DownloadAction
{
get
@@ -567,7 +565,6 @@ namespace OpenLiveWriter.CoreServices
LOG(iface, method);
}
-
#endregion
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlHelper.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlHelper.cs
index 210f9a51..f2bfc030 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlHelper.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/UrlHelper.cs
@@ -126,51 +126,51 @@ namespace OpenLiveWriter.CoreServices
// The only downside of using the Uri above is that it doesn't handle UNC paths of the form:
// \\?\UNC\...
- // allocate buffer to hold url
- uint bufferSize = 4096 ;
- StringBuilder buffer = new StringBuilder(Convert.ToInt32(bufferSize)) ;
+ // allocate buffer to hold url
+ uint bufferSize = 4096 ;
+ StringBuilder buffer = new StringBuilder(Convert.ToInt32(bufferSize)) ;
- // normalize the url
- int result = Shlwapi.UrlCreateFromPath( path, buffer, ref bufferSize, 0 ) ;
+ // normalize the url
+ int result = Shlwapi.UrlCreateFromPath( path, buffer, ref bufferSize, 0 ) ;
- // successfully converted
- if ( result == HRESULT.S_OK )
- {
- // return URL converted to a .NET URL encoded value
- string url = buffer.ToString();
- url = ShlwapiFileUrlToDotnetEncodedUrl(url); //fixes bug 47859
+ // successfully converted
+ if ( result == HRESULT.S_OK )
+ {
+ // return URL converted to a .NET URL encoded value
+ string url = buffer.ToString();
+ url = ShlwapiFileUrlToDotnetEncodedUrl(url); //fixes bug 47859
- try
- {
- if(new FileInfo(path).FullName != new FileInfo(new Uri(url).LocalPath).FullName)
- {
- Trace.Fail("Possible bug encoding/decoding path: " + path);
- }
- }
- catch(Exception ex)
- {
- Trace.Fail("Exception while checking path encoding. Original path: " + path + " url from Shlwapi: " + url);
- throw ex;
- }
- return url;
- }
- // didn't need conversion
- else if ( result == HRESULT.S_FALSE )
+ try
+ {
+ if(new FileInfo(path).FullName != new FileInfo(new Uri(url).LocalPath).FullName)
+ {
+ Trace.Fail("Possible bug encoding/decoding path: " + path);
+ }
+ }
+ catch(Exception ex)
+ {
+ Trace.Fail("Exception while checking path encoding. Original path: " + path + " url from Shlwapi: " + url);
+ throw ex;
+ }
+ return url;
+ }
+ // didn't need conversion
+ else if ( result == HRESULT.S_FALSE )
- {
- // docs say that even if we don't need conversion it will
- // copy the buffer we passed it to the result
- Debug.Assert( path.Equals(buffer.ToString()) );
+ {
+ // docs say that even if we don't need conversion it will
+ // copy the buffer we passed it to the result
+ Debug.Assert( path.Equals(buffer.ToString()) );
- // return start url
- return path ;
- }
- // unxpected error occurred!
- else
- {
- throw new
- COMException( "Error calling UrlCreateFromPath for path " + path, result ) ;
- }
+ // return start url
+ return path ;
+ }
+ // unxpected error occurred!
+ else
+ {
+ throw new
+ COMException( "Error calling UrlCreateFromPath for path " + path, result ) ;
+ }
#endif
}
@@ -328,28 +328,28 @@ namespace OpenLiveWriter.CoreServices
else
return false;
#if false
- // TODO: For some reason, IsvalidURL is always returning 1 (S_FALSE)
- // no matter what URL you pass into the sucker.
- // Handle only the base URL
- if (url.IndexOf("?") > -1)
- url = url.Substring(0, url.IndexOf("?"));
+ // TODO: For some reason, IsvalidURL is always returning 1 (S_FALSE)
+ // no matter what URL you pass into the sucker.
+ // Handle only the base URL
+ if (url.IndexOf("?") > -1)
+ url = url.Substring(0, url.IndexOf("?"));
- int hResult = UrlMon.IsValidURL(
- IntPtr.Zero,
- url,
- 0);
+ int hResult = UrlMon.IsValidURL(
+ IntPtr.Zero,
+ url,
+ 0);
- switch (hResult)
- {
- case HRESULT.S_OK:
- return true;
- case HRESULT.E_INVALIDARG:
- Trace.Log("IsUrl returned HRESULT.E_INVALIDARG for this url: " + url);
- return false;
- case HRESULT.S_FALSE:
- default:
- return false;
- }
+ switch (hResult)
+ {
+ case HRESULT.S_OK:
+ return true;
+ case HRESULT.E_INVALIDARG:
+ Trace.Log("IsUrl returned HRESULT.E_INVALIDARG for this url: " + url);
+ return false;
+ case HRESULT.S_FALSE:
+ default:
+ return false;
+ }
#endif
}
@@ -795,7 +795,6 @@ namespace OpenLiveWriter.CoreServices
return string.Format(CultureInfo.InvariantCulture, "\r\n", url.Length, url);
}
-
public static bool IsUrlLinkable(string url)
{
if (UrlHelper.IsUrl(url))
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageCapture.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageCapture.cs
index c6e728b3..e8860c74 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageCapture.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageCapture.cs
@@ -11,147 +11,145 @@ using OpenLiveWriter.CoreServices.Progress;
namespace OpenLiveWriter.CoreServices
{
- public class WebPageCapture
- {
+ public class WebPageCapture
+ {
- public WebPageCapture(string targetUrl, string destinationPath)
- {
- _targetUrl = targetUrl ;
- _destinationPath = destinationPath ;
- }
+ public WebPageCapture(string targetUrl, string destinationPath)
+ {
+ _targetUrl = targetUrl ;
+ _destinationPath = destinationPath ;
+ }
- public string TargetUrl
- {
- get { return _targetUrl; }
- }
- private string _targetUrl ;
+ public string TargetUrl
+ {
+ get { return _targetUrl; }
+ }
+ private string _targetUrl ;
- public string DestinationPath
- {
- get { return _destinationPath; }
- }
- private string _destinationPath ;
+ public string DestinationPath
+ {
+ get { return _destinationPath; }
+ }
+ private string _destinationPath ;
+ public string Capture(int timeoutMs)
+ {
+ // flag indicating whether we should continue with the capture
+ bool continueCapture = true ;
- public string Capture(int timeoutMs)
- {
- // flag indicating whether we should continue with the capture
- bool continueCapture = true ;
+ // request the page
+ HttpWebResponse response = RequestPage(TargetUrl, timeoutMs);
+ OnHeadersReceived(response.Headers, ref continueCapture) ;
+ if ( !continueCapture )
+ throw new OperationCancelledException() ;
- // request the page
- HttpWebResponse response = RequestPage(TargetUrl, timeoutMs);
- OnHeadersReceived(response.Headers, ref continueCapture) ;
- if ( !continueCapture )
- throw new OperationCancelledException() ;
+ // transfer it to a stream
+ MemoryStream pageStream = new MemoryStream();
+ using ( Stream responseStream = response.GetResponseStream() )
+ StreamHelper.Transfer(responseStream, pageStream);
+ pageStream.Seek(0, SeekOrigin.Begin) ;
- // transfer it to a stream
- MemoryStream pageStream = new MemoryStream();
- using ( Stream responseStream = response.GetResponseStream() )
- StreamHelper.Transfer(responseStream, pageStream);
- pageStream.Seek(0, SeekOrigin.Begin) ;
+ // allow filter on content
+ OnContentReceived( new StreamReader(pageStream).ReadToEnd(), ref continueCapture ) ;
+ if ( !continueCapture )
+ throw new OperationCancelledException() ;
+ pageStream.Seek(0, SeekOrigin.Begin) ;
- // allow filter on content
- OnContentReceived( new StreamReader(pageStream).ReadToEnd(), ref continueCapture ) ;
- if ( !continueCapture )
- throw new OperationCancelledException() ;
- pageStream.Seek(0, SeekOrigin.Begin) ;
+ // Read the stream into a lightweight HTML doc. We use from LightWeightHTMLDocument.FromIHTMLDocument2
+ // instead of LightWeightHTMLDocument.FromStream because from stream improperly shoves a saveFrom declaration
+ // above the docType (bug 289357)
+ IHTMLDocument2 doc = HTMLDocumentHelper.StreamToHTMLDoc(pageStream, TargetUrl, false);
+ LightWeightHTMLDocument ldoc = LightWeightHTMLDocument.FromIHTMLDocument2(doc, TargetUrl, true);
- // Read the stream into a lightweight HTML doc. We use from LightWeightHTMLDocument.FromIHTMLDocument2
- // instead of LightWeightHTMLDocument.FromStream because from stream improperly shoves a saveFrom declaration
- // above the docType (bug 289357)
- IHTMLDocument2 doc = HTMLDocumentHelper.StreamToHTMLDoc(pageStream, TargetUrl, false);
- LightWeightHTMLDocument ldoc = LightWeightHTMLDocument.FromIHTMLDocument2(doc, TargetUrl, true);
+ // download references
+ FileBasedSiteStorage siteStorage = new FileBasedSiteStorage(DestinationPath, "index.htm");
+ PageToDownload page = new PageToDownload(ldoc, TargetUrl, siteStorage.RootFile);
+ PageAndReferenceDownloader downloader = new PageAndReferenceDownloader(new PageToDownload[]{page}, siteStorage) ;
+ downloader.Download(new TimeoutProgressHost(timeoutMs)) ;
- // download references
- FileBasedSiteStorage siteStorage = new FileBasedSiteStorage(DestinationPath, "index.htm");
- PageToDownload page = new PageToDownload(ldoc, TargetUrl, siteStorage.RootFile);
- PageAndReferenceDownloader downloader = new PageAndReferenceDownloader(new PageToDownload[]{page}, siteStorage) ;
- downloader.Download(new TimeoutProgressHost(timeoutMs)) ;
+ // return path to captured page
+ return Path.Combine(DestinationPath, siteStorage.RootFile) ;
+ }
- // return path to captured page
- return Path.Combine(DestinationPath, siteStorage.RootFile) ;
- }
+ public string SafeCapture(int timeoutMs)
+ {
+ try
+ {
+ return Capture(timeoutMs) ;
+ }
+ catch
+ {
+ return null ;
+ }
+ }
+ protected virtual void OnHeadersReceived(WebHeaderCollection headers, ref bool continueCapture)
+ {
+ }
- public string SafeCapture(int timeoutMs)
- {
- try
- {
- return Capture(timeoutMs) ;
- }
- catch
- {
- return null ;
- }
- }
+ protected virtual void OnContentReceived(string content, ref bool continueCapture)
+ {
+ }
- protected virtual void OnHeadersReceived(WebHeaderCollection headers, ref bool continueCapture)
- {
- }
+ private HttpWebResponse RequestPage(string targetUrl, int timeoutMs)
+ {
+ try
+ {
+ return HttpRequestHelper.SendRequest(targetUrl, timeoutMs);
+ }
+ catch(WebResponseTimeoutException)
+ {
+ // convert "special" timed out exception into conventional .net timed out exception
+ throw new OperationTimedOutException() ;
+ }
+ }
- protected virtual void OnContentReceived(string content, ref bool continueCapture)
- {
- }
+ private class TimeoutProgressHost : IProgressHost
+ {
+ private DateTime _timeoutTime ;
- private HttpWebResponse RequestPage(string targetUrl, int timeoutMs)
- {
- try
- {
- return HttpRequestHelper.SendRequest(targetUrl, timeoutMs);
- }
- catch(WebResponseTimeoutException)
- {
- // convert "special" timed out exception into conventional .net timed out exception
- throw new OperationTimedOutException() ;
- }
- }
+ public TimeoutProgressHost(int timeoutMs)
+ {
+ _timeoutTime = DateTime.Now.AddMilliseconds(timeoutMs) ;
+ }
- private class TimeoutProgressHost : IProgressHost
- {
- private DateTime _timeoutTime ;
+ private void CheckForTimeout()
+ {
+ if ( DateTime.Now.CompareTo(_timeoutTime) > 0 )
+ throw new OperationTimedOutException();
+ }
- public TimeoutProgressHost(int timeoutMs)
- {
- _timeoutTime = DateTime.Now.AddMilliseconds(timeoutMs) ;
- }
+ public void UpdateProgress(int complete, int total, string message)
+ {
+ CheckForTimeout() ;
+ }
- private void CheckForTimeout()
- {
- if ( DateTime.Now.CompareTo(_timeoutTime) > 0 )
- throw new OperationTimedOutException();
- }
+ public void UpdateProgress(int complete, int total)
+ {
+ CheckForTimeout() ;
+ }
- public void UpdateProgress(int complete, int total, string message)
- {
- CheckForTimeout() ;
- }
+ public void UpdateProgress(string message)
+ {
+ CheckForTimeout() ;
+ }
- public void UpdateProgress(int complete, int total)
- {
- CheckForTimeout() ;
- }
+ public bool CancelRequested
+ {
+ get
+ {
+ return false;
+ }
+ }
- public void UpdateProgress(string message)
- {
- CheckForTimeout() ;
- }
+ public double ProgressCompletionPercentage
+ {
+ get
+ {
+ return 0;
+ }
+ }
+ }
- public bool CancelRequested
- {
- get
- {
- return false;
- }
- }
-
- public double ProgressCompletionPercentage
- {
- get
- {
- return 0;
- }
- }
- }
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageDownloader.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageDownloader.cs
index 81f54c9d..1f7d97bd 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageDownloader.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebPageDownloader.cs
@@ -217,7 +217,6 @@ namespace OpenLiveWriter.CoreServices
OnDownloadComplete(e);
}
-
///
/// Handle new window event (prevent all pop-up windows from displaying)
///
@@ -435,7 +434,6 @@ namespace OpenLiveWriter.CoreServices
#endregion
-
public class WebPageDownloaderResult
{
public static WebPageDownloaderResult Ok = new WebPageDownloaderResult(-1);
@@ -498,7 +496,6 @@ namespace OpenLiveWriter.CoreServices
}
-
public class WebPageDownloaderException : Exception
{
public WebPageDownloaderException(string message, string finalUrl) : this(-1, message, finalUrl)
@@ -531,5 +528,4 @@ namespace OpenLiveWriter.CoreServices
}
}
-
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebProxySettings.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebProxySettings.cs
index ce0b7e15..465643d3 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebProxySettings.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebProxySettings.cs
@@ -79,7 +79,6 @@ namespace OpenLiveWriter.CoreServices
#region Class Configuration (location of settings, etc)
-
private static SettingsPersisterHelper WriteSettingsKey
{
get
@@ -138,5 +137,4 @@ namespace OpenLiveWriter.CoreServices
}
-
}
diff --git a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebRequestWithCache.cs b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebRequestWithCache.cs
index 1cb991b3..e121676f 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebRequestWithCache.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WebRequest/WebRequestWithCache.cs
@@ -124,7 +124,6 @@ namespace OpenLiveWriter.CoreServices
if (m_url == null)
return null;
-
if (WebRequest is HttpWebRequest)
{
HttpWebRequest thisRequest = (HttpWebRequest)WebRequest;
diff --git a/src/managed/OpenLiveWriter.CoreServices/WindowSubClasser.cs b/src/managed/OpenLiveWriter.CoreServices/WindowSubClasser.cs
index f19bcdae..165a086f 100644
--- a/src/managed/OpenLiveWriter.CoreServices/WindowSubClasser.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/WindowSubClasser.cs
@@ -74,7 +74,6 @@ namespace OpenLiveWriter.CoreServices
return User32.CallWindowProc(m_baseWndProc, hWnd, uMsg, wParam, lParam);
}
-
// implementation data
private IWin32Window _window;
private WndProcDelegate m_wndProcDelegate;
diff --git a/src/managed/OpenLiveWriter.CoreServices/XmlRpcClient.cs b/src/managed/OpenLiveWriter.CoreServices/XmlRpcClient.cs
index 08e54531..04e322c9 100644
--- a/src/managed/OpenLiveWriter.CoreServices/XmlRpcClient.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/XmlRpcClient.cs
@@ -223,7 +223,6 @@ namespace OpenLiveWriter.CoreServices
private string _transportEncoding;
}
-
public abstract class XmlRpcValue
{
protected XmlRpcValue(object value)
@@ -405,7 +404,6 @@ namespace OpenLiveWriter.CoreServices
}
}
-
public class XmlRpcStruct : XmlRpcValue
{
///
@@ -567,7 +565,6 @@ namespace OpenLiveWriter.CoreServices
public readonly string Response;
}
-
///
/// Utility class used to write elements
///
diff --git a/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogClientException.cs b/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogClientException.cs
index 8c1368b1..4d116a87 100644
--- a/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogClientException.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogClientException.cs
@@ -225,4 +225,3 @@ namespace OpenLiveWriter.Extensibility.BlogClient
}
}
-
diff --git a/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogPostCategory.cs b/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogPostCategory.cs
index cb5c63e2..e341b418 100644
--- a/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogPostCategory.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/BlogClient/BlogPostCategory.cs
@@ -109,7 +109,6 @@ namespace OpenLiveWriter.Extensibility.BlogClient
return String.Compare(Name, category.Name, StringComparison.Ordinal);
}
-
public object Clone()
{
return new BlogPostCategory(Id, Name, Parent);
diff --git a/src/managed/OpenLiveWriter.Extensibility/BlogClient/IBlogClient.cs b/src/managed/OpenLiveWriter.Extensibility/BlogClient/IBlogClient.cs
index dad63aa4..7008da92 100644
--- a/src/managed/OpenLiveWriter.Extensibility/BlogClient/IBlogClient.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/BlogClient/IBlogClient.cs
@@ -39,7 +39,6 @@ namespace OpenLiveWriter.Extensibility.BlogClient
private readonly string _protocolName;
}
-
public interface IBlogClient
{
string ProtocolName { get; }
@@ -183,6 +182,5 @@ namespace OpenLiveWriter.Extensibility.BlogClient
private string _id;
private string _name;
-
}
}
diff --git a/src/managed/OpenLiveWriter.Extensibility/ImageEditing/IImageDecorator.cs b/src/managed/OpenLiveWriter.Extensibility/ImageEditing/IImageDecorator.cs
index 40d9aed9..3abb6cb6 100644
--- a/src/managed/OpenLiveWriter.Extensibility/ImageEditing/IImageDecorator.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/ImageEditing/IImageDecorator.cs
@@ -9,69 +9,69 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.Extensibility.ImageEditing
{
#if SUPPORT_PLUGINS
- [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
- public class ImageDecoratorAttribute : Attribute
- {
- public ImageDecoratorAttribute(string name)
- {
- Name = name;
- }
+ [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
+ public class ImageDecoratorAttribute : Attribute
+ {
+ public ImageDecoratorAttribute(string name)
+ {
+ Name = name;
+ }
- ///
- /// The display name to show in the image effects list.
- ///
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
+ ///
+ /// The display name to show in the image effects list.
+ ///
+ public string Name
+ {
+ get { return name; }
+ set { name = value; }
+ }
- ///
- /// The unique ID to assign a decorator.
- ///
- public string Id
- {
- get { return id; }
- set { id = value; }
- }
+ ///
+ /// The unique ID to assign a decorator.
+ ///
+ public string Id
+ {
+ get { return id; }
+ set { id = value; }
+ }
- ///
- /// The decorator group to assign a decorator to.
- ///
- [Obsolete("Groups need to have separate names and IDs in order to be properly localizable. This should become GroupId.", true)]
- public string Group
- {
- get { return group; }
- set { group = value; }
- }
+ ///
+ /// The decorator group to assign a decorator to.
+ ///
+ [Obsolete("Groups need to have separate names and IDs in order to be properly localizable. This should become GroupId.", true)]
+ public string Group
+ {
+ get { return group; }
+ set { group = value; }
+ }
- ///
- /// If true, then the decorator supports an editor control that should be display if the user
- /// wants to customize the decorator's behavior.
- ///
- public bool Editable
- {
- get { return editable; }
- set { editable = value; }
- }
+ ///
+ /// If true, then the decorator supports an editor control that should be display if the user
+ /// wants to customize the decorator's behavior.
+ ///
+ public bool Editable
+ {
+ get { return editable; }
+ set { editable = value; }
+ }
- ///
- /// If true, then the decorator and its current settings can be applied by default if the user
- /// saves an set of applied image effects as the default. If false, then the decorator will not
- /// be included in the set of effects to apply to images by default.
- ///
- public bool Defaultable
- {
- get { return defaultable; }
- set { defaultable = value; }
- }
+ ///
+ /// If true, then the decorator and its current settings can be applied by default if the user
+ /// saves an set of applied image effects as the default. If false, then the decorator will not
+ /// be included in the set of effects to apply to images by default.
+ ///
+ public bool Defaultable
+ {
+ get { return defaultable; }
+ set { defaultable = value; }
+ }
- private string name;
- private string id;
- private string group;
- private bool editable;
- private bool defaultable;
- }
+ private string name;
+ private string id;
+ private string group;
+ private bool editable;
+ private bool defaultable;
+ }
#endif
///
diff --git a/src/managed/OpenLiveWriter.Extensibility/ImageServices/IImageUploadSettingsEditorContext.cs b/src/managed/OpenLiveWriter.Extensibility/ImageServices/IImageUploadSettingsEditorContext.cs
index d89285ce..bbff0d30 100644
--- a/src/managed/OpenLiveWriter.Extensibility/ImageServices/IImageUploadSettingsEditorContext.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/ImageServices/IImageUploadSettingsEditorContext.cs
@@ -5,11 +5,11 @@ using OpenLiveWriter.Api;
namespace OpenLiveWriter.Extensibility.ImageServices
{
- ///
- /// Summary description for IImageUploadSettingsEditorContext.
- ///
- public interface IImageUploadSettingsEditorContext
- {
- IProperties ImageUploadSettings { get; }
- }
+ ///
+ /// Summary description for IImageUploadSettingsEditorContext.
+ ///
+ public interface IImageUploadSettingsEditorContext
+ {
+ IProperties ImageUploadSettings { get; }
+ }
}
diff --git a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageFileUploadSettingsEditor.cs b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageFileUploadSettingsEditor.cs
index 7e3d9160..dd13f7cc 100644
--- a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageFileUploadSettingsEditor.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageFileUploadSettingsEditor.cs
@@ -10,98 +10,98 @@ using OpenLiveWriter.Extensibility.ImageServices;
namespace OpenLiveWriter.Extensibility.ImageServices
{
- ///
- /// Base editor control for editing file upload settings for an individual image file.
- ///
- public class ImageFileUploadSettingsEditor : UserControl
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Base editor control for editing file upload settings for an individual image file.
+ ///
+ public class ImageFileUploadSettingsEditor : UserControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ImageFileUploadSettingsEditor()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public ImageFileUploadSettingsEditor()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- // set the background color
- BackColor = ApplicationManager.ApplicationStyle.ActiveTabBottomColor ;
- ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
- }
+ // set the background color
+ BackColor = ApplicationManager.ApplicationStyle.ActiveTabBottomColor ;
+ ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- ApplicationStyleManager.ApplicationStyleChanged -= new EventHandler(ApplicationManager_ApplicationStyleChanged);
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ ApplicationStyleManager.ApplicationStyleChanged -= new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- }
- #endregion
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+ #endregion
- ///
- /// Hook that allows subclasses to refresh their cached appearance settings.
- ///
- protected virtual void LoadAppearanceSettings()
- {
- BackColor = ApplicationManager.ApplicationStyle.ActiveTabBottomColor ;
- }
+ ///
+ /// Hook that allows subclasses to refresh their cached appearance settings.
+ ///
+ protected virtual void LoadAppearanceSettings()
+ {
+ BackColor = ApplicationManager.ApplicationStyle.ActiveTabBottomColor ;
+ }
- private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
- {
- LoadAppearanceSettings();
- PerformLayout();
- Invalidate();
- }
+ private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
+ {
+ LoadAppearanceSettings();
+ PerformLayout();
+ Invalidate();
+ }
- protected enum ControlState { Uninitialized, Loading, Loaded };
- protected ControlState EditorState
- {
- get{ return _loadedState; }
- }
- private ControlState _loadedState = ControlState.Uninitialized;
+ protected enum ControlState { Uninitialized, Loading, Loaded };
+ protected ControlState EditorState
+ {
+ get{ return _loadedState; }
+ }
+ private ControlState _loadedState = ControlState.Uninitialized;
- public void LoadEditor(IImageUploadSettingsEditorContext context)
- {
- _loadedState = ControlState.Loading;
- _context = context;
- LoadEditor();
- _loadedState = ControlState.Loaded;
- }
+ public void LoadEditor(IImageUploadSettingsEditorContext context)
+ {
+ _loadedState = ControlState.Loading;
+ _context = context;
+ LoadEditor();
+ _loadedState = ControlState.Loaded;
+ }
- ///
- /// Hook to allow subclasses to initialize the editor after the editor context has been set.
- ///
- protected virtual void LoadEditor()
- {
+ ///
+ /// Hook to allow subclasses to initialize the editor after the editor context has been set.
+ ///
+ protected virtual void LoadEditor()
+ {
- }
+ }
- internal protected IImageUploadSettingsEditorContext EditorContext
- {
- get
- {
- return _context;
- }
- }
- private IImageUploadSettingsEditorContext _context;
- }
+ internal protected IImageUploadSettingsEditorContext EditorContext
+ {
+ get
+ {
+ return _context;
+ }
+ }
+ private IImageUploadSettingsEditorContext _context;
+ }
}
diff --git a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageService.cs b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageService.cs
index 0d2fa679..bd9c4611 100644
--- a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageService.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageService.cs
@@ -7,53 +7,53 @@ using OpenLiveWriter.Extensibility.ImageServices;
namespace OpenLiveWriter.Extensibility.ImageServices
{
- public interface IImageFile
- {
- int Width {get; }
- int Height {get; }
- string FilePath { get; }
- ImageEmbedType ImageEmbedType { get; }
- }
+ public interface IImageFile
+ {
+ int Width {get; }
+ int Height {get; }
+ string FilePath { get; }
+ ImageEmbedType ImageEmbedType { get; }
+ }
- public interface IImageUploadResult
- {
- string ImageUrl { get; }
- }
+ public interface IImageUploadResult
+ {
+ string ImageUrl { get; }
+ }
- public interface IUploadImageContext
- {
- IImageFile[] UploadImageFiles {get; }
- IProperties ImageFileUploadSettings { get; }
- //IImageFile GenerateImageFile(int width, int height, ImageGenerationFlags flags);
- }
+ public interface IUploadImageContext
+ {
+ IImageFile[] UploadImageFiles {get; }
+ IProperties ImageFileUploadSettings { get; }
+ //IImageFile GenerateImageFile(int width, int height, ImageGenerationFlags flags);
+ }
- public interface IImageServiceUploader
- {
- void Connect();
- void Disconnect();
- IImageUploadResult[] UploadImages(IUploadImageContext uploadImageContext);
- }
+ public interface IImageServiceUploader
+ {
+ void Connect();
+ void Disconnect();
+ IImageUploadResult[] UploadImages(IUploadImageContext uploadImageContext);
+ }
- public interface IImageService
- {
- ///
- /// Create an image service uploader instance.
- ///
- ///
- ///
- IImageServiceUploader CreateImageServiceUploader(IProperties imageServiceSettings);
+ public interface IImageService
+ {
+ ///
+ /// Create an image service uploader instance.
+ ///
+ ///
+ ///
+ IImageServiceUploader CreateImageServiceUploader(IProperties imageServiceSettings);
- ///
- /// Create an editor for customizing the image service settings.
- ///
- ///
- ImageServiceSettingsEditor CreateImageServiceSettingsEditor();
+ ///
+ /// Create an editor for customizing the image service settings.
+ ///
+ ///
+ ImageServiceSettingsEditor CreateImageServiceSettingsEditor();
- ///
- /// Create an editor for customizing the upload settings for an individual image file.
- ///
- ///
- ImageFileUploadSettingsEditor CreateImageFileUploadSettingsEditor();
- }
+ ///
+ /// Create an editor for customizing the upload settings for an individual image file.
+ ///
+ ///
+ ImageFileUploadSettingsEditor CreateImageFileUploadSettingsEditor();
+ }
}
diff --git a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageServiceSettingsEditor.cs b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageServiceSettingsEditor.cs
index 1f6a4b7c..9964bfb3 100644
--- a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageServiceSettingsEditor.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageServiceSettingsEditor.cs
@@ -7,78 +7,78 @@ using OpenLiveWriter.Api;
namespace OpenLiveWriter.Extensibility.ImageServices
{
- ///
- /// Summary description for ImageServiceImageSettingsEditor.
- ///
- public class ImageServiceSettingsEditor: UserControl
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for ImageServiceImageSettingsEditor.
+ ///
+ public class ImageServiceSettingsEditor: UserControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ImageServiceSettingsEditor()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
- }
+ public ImageServiceSettingsEditor()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- }
- #endregion
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+ #endregion
- protected enum ControlState { Uninitialized, Loading, Loaded };
- protected ControlState EditorState
- {
- get{ return _loadedState; }
- }
- private ControlState _loadedState = ControlState.Uninitialized;
+ protected enum ControlState { Uninitialized, Loading, Loaded };
+ protected ControlState EditorState
+ {
+ get{ return _loadedState; }
+ }
+ private ControlState _loadedState = ControlState.Uninitialized;
- public void LoadEditor(IProperties imageServiceSettings)
- {
- _loadedState = ControlState.Loading;
- _imageServiceSettings = imageServiceSettings;
- LoadEditor();
- _loadedState = ControlState.Loaded;
- }
+ public void LoadEditor(IProperties imageServiceSettings)
+ {
+ _loadedState = ControlState.Loading;
+ _imageServiceSettings = imageServiceSettings;
+ LoadEditor();
+ _loadedState = ControlState.Loaded;
+ }
- ///
- /// Hook to allow subclasses to initialize the editor after the editor context has been set.
- ///
- protected virtual void LoadEditor()
- {
+ ///
+ /// Hook to allow subclasses to initialize the editor after the editor context has been set.
+ ///
+ protected virtual void LoadEditor()
+ {
- }
+ }
- internal protected IProperties ImageServiceSettings
- {
- get
- {
- return _imageServiceSettings;
- }
- }
- private IProperties _imageServiceSettings;
- }
+ internal protected IProperties ImageServiceSettings
+ {
+ get
+ {
+ return _imageServiceSettings;
+ }
+ }
+ private IProperties _imageServiceSettings;
+ }
}
diff --git a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageUploadResult.cs b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageUploadResult.cs
index 55ebdfdf..d70c6051 100644
--- a/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageUploadResult.cs
+++ b/src/managed/OpenLiveWriter.Extensibility/ImageServices/ImageUploadResult.cs
@@ -5,24 +5,24 @@ using OpenLiveWriter.Extensibility.ImageServices;
namespace OpenLiveWriter.Extensibility.ImageServices
{
- public class ImageUploadResult : IImageUploadResult
- {
- public ImageUploadResult(string imageUrl)
- {
- _imageUrl = imageUrl;
- }
+ public class ImageUploadResult : IImageUploadResult
+ {
+ public ImageUploadResult(string imageUrl)
+ {
+ _imageUrl = imageUrl;
+ }
- public string ImageUrl
- {
- get
- {
- return _imageUrl;
- }
- set
- {
- _imageUrl = value;
- }
- }
- private string _imageUrl;
- }
+ public string ImageUrl
+ {
+ get
+ {
+ return _imageUrl;
+ }
+ set
+ {
+ _imageUrl = value;
+ }
+ }
+ private string _imageUrl;
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/DestinationProfile.cs b/src/managed/OpenLiveWriter.FileDestinations/DestinationProfile.cs
index a1dd5997..a79fd457 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/DestinationProfile.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/DestinationProfile.cs
@@ -80,7 +80,6 @@ namespace OpenLiveWriter.FileDestinations
}
}
-
private string ftpServer = "";
///
/// The hostname of the FTP server
@@ -161,7 +160,6 @@ namespace OpenLiveWriter.FileDestinations
}
}
-
public override string ToString()
{
return Name;
diff --git a/src/managed/OpenLiveWriter.FileDestinations/DestinationProfileManager.cs b/src/managed/OpenLiveWriter.FileDestinations/DestinationProfileManager.cs
index 90d25039..3e4acac1 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/DestinationProfileManager.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/DestinationProfileManager.cs
@@ -28,7 +28,6 @@ namespace OpenLiveWriter.FileDestinations
#region Destination Settings Management
-
public bool HasProfile(string key)
{
if (key == string.Empty)
@@ -154,7 +153,6 @@ namespace OpenLiveWriter.FileDestinations
}
}
-
///
/// Returns the registry subtree for a specified profile.
///
@@ -169,7 +167,6 @@ namespace OpenLiveWriter.FileDestinations
#endregion
-
#region Class Configuration (location of settings, etc)
///
@@ -188,7 +185,6 @@ namespace OpenLiveWriter.FileDestinations
#endregion
-
#region Constants
// root key
diff --git a/src/managed/OpenLiveWriter.FileDestinations/FileDestination.cs b/src/managed/OpenLiveWriter.FileDestinations/FileDestination.cs
index 6dd56812..4b03e093 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/FileDestination.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/FileDestination.cs
@@ -91,7 +91,6 @@ namespace OpenLiveWriter.FileDestinations
if (CopyFile(fromPath, toPath, overWrite))
break;
-
// Wait and then retry copyfile
attempts++;
@@ -115,7 +114,6 @@ namespace OpenLiveWriter.FileDestinations
}
-
///
/// This method is called to make a connection to the destination
///
diff --git a/src/managed/OpenLiveWriter.FileDestinations/FileSystemDestination.cs b/src/managed/OpenLiveWriter.FileDestinations/FileSystemDestination.cs
index b48b5dd2..f5c374cc 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/FileSystemDestination.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/FileSystemDestination.cs
@@ -40,7 +40,6 @@ namespace OpenLiveWriter.FileDestinations
}
}
-
///
/// Copies files to a local destination
///
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessageDesigner.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessageDesigner.cs
index 846ac0a9..99129c2c 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessageDesigner.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessageDesigner.cs
@@ -4,39 +4,39 @@ using System.Windows.Forms.Design;
namespace OpenLiveWriter.FileDestinations
{
- public class WebPublishMessageDesigner : ComponentDocumentDesigner
- {
- // Stores reference to the LocalizationExtenderProvider this designer adds, in order to remove it on Dispose.
- private LocalizationExtenderProvider localizationExtenderProvider;
+ public class WebPublishMessageDesigner : ComponentDocumentDesigner
+ {
+ // Stores reference to the LocalizationExtenderProvider this designer adds, in order to remove it on Dispose.
+ private LocalizationExtenderProvider localizationExtenderProvider;
- // Adds a LocalizationExtenderProvider for the component this designer is initialized to support.
- public override void Initialize(IComponent component)
- {
- base.Initialize(component);
+ // Adds a LocalizationExtenderProvider for the component this designer is initialized to support.
+ public override void Initialize(IComponent component)
+ {
+ base.Initialize(component);
- // If no extender from this designer is active...
- if( localizationExtenderProvider == null )
- {
- // Adds a LocalizationExtenderProvider that provides localization support properties to the specified component.
- localizationExtenderProvider = new LocalizationExtenderProvider(component.Site, component);
- localizationExtenderProvider.SetLocalizable(component, true);
- }
- }
+ // If no extender from this designer is active...
+ if( localizationExtenderProvider == null )
+ {
+ // Adds a LocalizationExtenderProvider that provides localization support properties to the specified component.
+ localizationExtenderProvider = new LocalizationExtenderProvider(component.Site, component);
+ localizationExtenderProvider.SetLocalizable(component, true);
+ }
+ }
- // If a LocalizationExtenderProvider has been added, removes the extender provider.
- protected override void Dispose(bool disposing)
- {
- base.Dispose(disposing);
+ // If a LocalizationExtenderProvider has been added, removes the extender provider.
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
- // If an extender has been added, remove it
- if( localizationExtenderProvider != null )
- {
- // Disposes of the extender provider. The extender
- // provider removes itself from the extender provider
- // service when it is disposed.
- localizationExtenderProvider.Dispose();
- localizationExtenderProvider = null;
- }
- }
- }
+ // If an extender has been added, remove it
+ if( localizationExtenderProvider != null )
+ {
+ // Disposes of the extender provider. The extender
+ // provider removes itself from the extender provider
+ // service when it is disposed.
+ localizationExtenderProvider.Dispose();
+ localizationExtenderProvider = null;
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/ConnectionTimeoutWebPublishMessage.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/ConnectionTimeoutWebPublishMessage.cs
index 040d7687..463d4350 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/ConnectionTimeoutWebPublishMessage.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/ConnectionTimeoutWebPublishMessage.cs
@@ -3,40 +3,38 @@
namespace OpenLiveWriter.FileDestinations
{
- ///
- /// Summary description for TargetPathNotFound.
- ///
- public class ConnectionTimeoutWebPublishMessage : WebPublishMessage
- {
+ ///
+ /// Summary description for TargetPathNotFound.
+ ///
+ public class ConnectionTimeoutWebPublishMessage : WebPublishMessage
+ {
+ public ConnectionTimeoutWebPublishMessage(params object[] textFormatArgs)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- public ConnectionTimeoutWebPublishMessage(params object[] textFormatArgs)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ // set text format args if they were specified
+ TextFormatArgs = textFormatArgs ;
+ }
- // set text format args if they were specified
- TextFormatArgs = textFormatArgs ;
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConnectionTimeoutWebPublishMessage
+ //
+ this.Text = "Unable to establish a connection with the FTP server.";
+ this.Title = "Connection Timed Out";
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConnectionTimeoutWebPublishMessage
- //
- this.Text = "Unable to establish a connection with the FTP server.";
- this.Title = "Connection Timed Out";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/FtpServerUnavailableWebPublishMessage.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/FtpServerUnavailableWebPublishMessage.cs
index ea592514..2ed7b7ab 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/FtpServerUnavailableWebPublishMessage.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/FtpServerUnavailableWebPublishMessage.cs
@@ -3,40 +3,38 @@
namespace OpenLiveWriter.FileDestinations
{
- ///
- /// Summary description for TargetPathNotFound.
- ///
- public class FtpServerUnavailableWebPublishMessage : WebPublishMessage
- {
+ ///
+ /// Summary description for TargetPathNotFound.
+ ///
+ public class FtpServerUnavailableWebPublishMessage : WebPublishMessage
+ {
+ public FtpServerUnavailableWebPublishMessage(params object[] textFormatArgs)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- public FtpServerUnavailableWebPublishMessage(params object[] textFormatArgs)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ // set text format args if they were specified
+ TextFormatArgs = textFormatArgs ;
+ }
- // set text format args if they were specified
- TextFormatArgs = textFormatArgs ;
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // FtpServerUnavailableWebPublishMessage
+ //
+ this.Text = "The specified hostname does not appear to be running an FTP server";
+ this.Title = "FTP Server Unavailable";
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // FtpServerUnavailableWebPublishMessage
- //
- this.Text = "The specified hostname does not appear to be running an FTP server";
- this.Title = "FTP Server Unavailable";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/InvalidHostnameWebPublishMessage.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/InvalidHostnameWebPublishMessage.cs
index 1d77449e..24232e3c 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/InvalidHostnameWebPublishMessage.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/InvalidHostnameWebPublishMessage.cs
@@ -3,40 +3,38 @@
namespace OpenLiveWriter.FileDestinations
{
- ///
- /// Summary description for TargetPathNotFound.
- ///
- public class InvalidHostnameWebPublishMessage : WebPublishMessage
- {
+ ///
+ /// Summary description for TargetPathNotFound.
+ ///
+ public class InvalidHostnameWebPublishMessage : WebPublishMessage
+ {
+ public InvalidHostnameWebPublishMessage(params object[] textFormatArgs)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- public InvalidHostnameWebPublishMessage(params object[] textFormatArgs)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ // set text format args if they were specified
+ TextFormatArgs = textFormatArgs ;
+ }
- // set text format args if they were specified
- TextFormatArgs = textFormatArgs ;
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // InvalidHostnameWebPublishMessage
+ //
+ this.Text = "The specified hostname does not exist.";
+ this.Title = "Hostname Not Found";
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // InvalidHostnameWebPublishMessage
- //
- this.Text = "The specified hostname does not exist.";
- this.Title = "Hostname Not Found";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/LoginFailedWebPublishMessage.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/LoginFailedWebPublishMessage.cs
index ab43a4c2..48575268 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/LoginFailedWebPublishMessage.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/LoginFailedWebPublishMessage.cs
@@ -3,40 +3,38 @@
namespace OpenLiveWriter.FileDestinations
{
- ///
- /// Summary description for TargetPathNotFound.
- ///
- public class LoginFailedWebPublishMessage : WebPublishMessage
- {
+ ///
+ /// Summary description for TargetPathNotFound.
+ ///
+ public class LoginFailedWebPublishMessage : WebPublishMessage
+ {
+ public LoginFailedWebPublishMessage(params object[] textFormatArgs)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- public LoginFailedWebPublishMessage(params object[] textFormatArgs)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ // set text format args if they were specified
+ TextFormatArgs = textFormatArgs ;
+ }
- // set text format args if they were specified
- TextFormatArgs = textFormatArgs ;
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // LoginFailedWebPublishMessage
+ //
+ this.Text = "Login failed. Please check your username and password.";
+ this.Title = "Login Failed";
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // LoginFailedWebPublishMessage
- //
- this.Text = "Login failed. Please check your username and password.";
- this.Title = "Login Failed";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/NoSuchPublishFolderWebPublishMessage.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/NoSuchPublishFolderWebPublishMessage.cs
index 03a9ddc2..81c283e8 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/NoSuchPublishFolderWebPublishMessage.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/NoSuchPublishFolderWebPublishMessage.cs
@@ -3,40 +3,38 @@
namespace OpenLiveWriter.FileDestinations
{
- ///
- /// Summary description for TargetPathNotFound.
- ///
- public class NoSuchPublishFolderWebPublishMessage : WebPublishMessage
- {
+ ///
+ /// Summary description for TargetPathNotFound.
+ ///
+ public class NoSuchPublishFolderWebPublishMessage : WebPublishMessage
+ {
+ public NoSuchPublishFolderWebPublishMessage(params object[] textFormatArgs)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- public NoSuchPublishFolderWebPublishMessage(params object[] textFormatArgs)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ // set text format args if they were specified
+ TextFormatArgs = textFormatArgs ;
+ }
- // set text format args if they were specified
- TextFormatArgs = textFormatArgs ;
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // NoSuchPublishFolderWebPublishMessage
+ //
+ this.Text = "The specified publish folder does not exist.";
+ this.Title = "Publish Folder Does Not Exist";
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // NoSuchPublishFolderWebPublishMessage
- //
- this.Text = "The specified publish folder does not exist.";
- this.Title = "Publish Folder Does Not Exist";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/PublishFailedWebPublishMessage.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/PublishFailedWebPublishMessage.cs
index 13d0fa7c..1935d00e 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/PublishFailedWebPublishMessage.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishMessages/PublishFailedWebPublishMessage.cs
@@ -3,40 +3,38 @@
namespace OpenLiveWriter.FileDestinations
{
- ///
- /// Summary description for TargetPathNotFound.
- ///
- public class PublishFailedWebPublishMessage : WebPublishMessage
- {
+ ///
+ /// Summary description for TargetPathNotFound.
+ ///
+ public class PublishFailedWebPublishMessage : WebPublishMessage
+ {
+ public PublishFailedWebPublishMessage(params object[] textFormatArgs)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- public PublishFailedWebPublishMessage(params object[] textFormatArgs)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ // set text format args if they were specified
+ TextFormatArgs = textFormatArgs ;
+ }
- // set text format args if they were specified
- TextFormatArgs = textFormatArgs ;
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // PublishFailedWebPublishMessage
+ //
+ this.Text = "A publishing error occurred: {0}";
+ this.Title = "Publishing Error";
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // PublishFailedWebPublishMessage
- //
- this.Text = "A publishing error occurred: {0}";
- this.Title = "Publishing Error";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishSettings.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishSettings.cs
index 9873600e..557ae953 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishSettings.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishSettings.cs
@@ -46,7 +46,6 @@ namespace OpenLiveWriter.FileDestinations
}
private WebPublishDestination webPublishDestination = new WebPublishDestination(null);
-
///
/// Publish path
///
@@ -72,7 +71,6 @@ namespace OpenLiveWriter.FileDestinations
}
private string publishPath = String.Empty;
-
public string FullPublishPath
{
get
@@ -118,20 +116,17 @@ namespace OpenLiveWriter.FileDestinations
}
}
-
///
/// Notify users that the publishing destination has changed
///
public event EventHandler DestinationChanged;
-
///
/// Notify users that the publish folder has changed
///
public event EventHandler PublishPathChanged;
-
///
/// Cleans up the file separators in a path name based on whether the current
/// destination type is FTP or Windows.
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishUtils.cs b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishUtils.cs
index 8b41c092..f4772abf 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishUtils.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WebPublish/WebPublishUtils.cs
@@ -54,7 +54,6 @@ namespace OpenLiveWriter.FileDestinations
return dest;
}
-
///
/// Translate an exception into an error message
///
diff --git a/src/managed/OpenLiveWriter.FileDestinations/WinInetFTPFileDestination.cs b/src/managed/OpenLiveWriter.FileDestinations/WinInetFTPFileDestination.cs
index 6be7c44c..f4b9740b 100644
--- a/src/managed/OpenLiveWriter.FileDestinations/WinInetFTPFileDestination.cs
+++ b/src/managed/OpenLiveWriter.FileDestinations/WinInetFTPFileDestination.cs
@@ -51,7 +51,6 @@ namespace OpenLiveWriter.FileDestinations
{
}
-
///
/// FTP Destination constructor, specify FTP port.
///
@@ -73,7 +72,6 @@ namespace OpenLiveWriter.FileDestinations
m_ftpPort = ftpPort;
}
-
///
/// FTP Destination constructor, specify FTP port.
///
@@ -498,7 +496,6 @@ namespace OpenLiveWriter.FileDestinations
}
}
-
///
/// Disconnect from the FTP Server
///
@@ -589,7 +586,6 @@ namespace OpenLiveWriter.FileDestinations
}
}
-
///
/// Throws the correct Site Destination exception for a given WinInet Error Code.
/// This attempts to map common WinInet errors to corresponding Destination errors.
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Commands/CommandSpellCheck.cs b/src/managed/OpenLiveWriter.HtmlEditor/Commands/CommandSpellCheck.cs
index 53a8faf2..3c4879b2 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Commands/CommandSpellCheck.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Commands/CommandSpellCheck.cs
@@ -6,67 +6,67 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.HtmlEditor.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandSpellCheck : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandSpellCheck : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandSpellCheck(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public CommandSpellCheck(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public CommandSpellCheck()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandSpellCheck()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandSpellCheck
- //
- this.ContextMenuPath = "";
- this.Identifier = "Onfolio.Core.HtmlEditor.Commands.SpellCheck";
- this.MainMenuPath = "Too&ls@9/Check &Spelling...@100";
- this.Shortcut = System.Windows.Forms.Shortcut.ShiftF7;
- this.Text = "Check Spelling";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandSpellCheck
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "Onfolio.Core.HtmlEditor.Commands.SpellCheck";
+ this.MainMenuPath = "Too&ls@9/Check &Spelling...@100";
+ this.Shortcut = System.Windows.Forms.Shortcut.ShiftF7;
+ this.Text = "Check Spelling";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Controls/SourceCodeContextMenuDefinition.cs b/src/managed/OpenLiveWriter.HtmlEditor/Controls/SourceCodeContextMenuDefinition.cs
index b39935f5..2c4a4adf 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Controls/SourceCodeContextMenuDefinition.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Controls/SourceCodeContextMenuDefinition.cs
@@ -6,112 +6,112 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.HtmlEditor.Controls
{
- ///
- /// Summary description for SourceCodeContextMenuDefinition.
- ///
- public class SourceCodeContextMenuDefinition : CommandContextMenuDefinition
- {
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandCut;
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandCopy;
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandPaste;
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandPasteSpecial;
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandSelectAll;
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandInsertLink;
+ ///
+ /// Summary description for SourceCodeContextMenuDefinition.
+ ///
+ public class SourceCodeContextMenuDefinition : CommandContextMenuDefinition
+ {
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandCut;
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandCopy;
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandPaste;
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandPasteSpecial;
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandSelectAll;
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandInsertLink;
- private IContainer components;
+ private IContainer components;
- public SourceCodeContextMenuDefinition(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
- }
+ public SourceCodeContextMenuDefinition(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
+ }
- public SourceCodeContextMenuDefinition()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public SourceCodeContextMenuDefinition()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.menuDefinitionEntryCommandCut = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- this.menuDefinitionEntryCommandCopy = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- this.menuDefinitionEntryCommandPaste = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- this.menuDefinitionEntryCommandPasteSpecial = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- this.menuDefinitionEntryCommandSelectAll = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- this.menuDefinitionEntryCommandInsertLink = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- //
- // menuDefinitionEntryCommandCut
- //
- this.menuDefinitionEntryCommandCut.CommandIdentifier = "MindShare.ApplicationCore.Commands.Cut";
- this.menuDefinitionEntryCommandCut.SeparatorAfter = false;
- this.menuDefinitionEntryCommandCut.SeparatorBefore = false;
- //
- // menuDefinitionEntryCommandCopy
- //
- this.menuDefinitionEntryCommandCopy.CommandIdentifier = "MindShare.ApplicationCore.Commands.Copy";
- this.menuDefinitionEntryCommandCopy.SeparatorAfter = false;
- this.menuDefinitionEntryCommandCopy.SeparatorBefore = false;
- //
- // menuDefinitionEntryCommandPaste
- //
- this.menuDefinitionEntryCommandPaste.CommandIdentifier = "MindShare.ApplicationCore.Commands.Paste";
- this.menuDefinitionEntryCommandPaste.SeparatorAfter = false;
- this.menuDefinitionEntryCommandPaste.SeparatorBefore = false;
- //
- // menuDefinitionEntryCommandPasteSpecial
- //
- this.menuDefinitionEntryCommandPasteSpecial.CommandIdentifier = "MindShare.ApplicationCore.Commands.PasteSpecial";
- this.menuDefinitionEntryCommandPasteSpecial.SeparatorAfter = false;
- this.menuDefinitionEntryCommandPasteSpecial.SeparatorBefore = false;
- //
- // menuDefinitionEntryCommandSelectAll
- //
- this.menuDefinitionEntryCommandSelectAll.CommandIdentifier = "MindShare.ApplicationCore.Commands.SelectAll";
- this.menuDefinitionEntryCommandSelectAll.SeparatorAfter = true;
- this.menuDefinitionEntryCommandSelectAll.SeparatorBefore = true;
- //
- // menuDefinitionEntryCommandInsertLink
- //
- this.menuDefinitionEntryCommandInsertLink.CommandIdentifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
- this.menuDefinitionEntryCommandInsertLink.SeparatorAfter = true;
- this.menuDefinitionEntryCommandInsertLink.SeparatorBefore = true;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.menuDefinitionEntryCommandCut = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ this.menuDefinitionEntryCommandCopy = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ this.menuDefinitionEntryCommandPaste = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ this.menuDefinitionEntryCommandPasteSpecial = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ this.menuDefinitionEntryCommandSelectAll = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ this.menuDefinitionEntryCommandInsertLink = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ //
+ // menuDefinitionEntryCommandCut
+ //
+ this.menuDefinitionEntryCommandCut.CommandIdentifier = "MindShare.ApplicationCore.Commands.Cut";
+ this.menuDefinitionEntryCommandCut.SeparatorAfter = false;
+ this.menuDefinitionEntryCommandCut.SeparatorBefore = false;
+ //
+ // menuDefinitionEntryCommandCopy
+ //
+ this.menuDefinitionEntryCommandCopy.CommandIdentifier = "MindShare.ApplicationCore.Commands.Copy";
+ this.menuDefinitionEntryCommandCopy.SeparatorAfter = false;
+ this.menuDefinitionEntryCommandCopy.SeparatorBefore = false;
+ //
+ // menuDefinitionEntryCommandPaste
+ //
+ this.menuDefinitionEntryCommandPaste.CommandIdentifier = "MindShare.ApplicationCore.Commands.Paste";
+ this.menuDefinitionEntryCommandPaste.SeparatorAfter = false;
+ this.menuDefinitionEntryCommandPaste.SeparatorBefore = false;
+ //
+ // menuDefinitionEntryCommandPasteSpecial
+ //
+ this.menuDefinitionEntryCommandPasteSpecial.CommandIdentifier = "MindShare.ApplicationCore.Commands.PasteSpecial";
+ this.menuDefinitionEntryCommandPasteSpecial.SeparatorAfter = false;
+ this.menuDefinitionEntryCommandPasteSpecial.SeparatorBefore = false;
+ //
+ // menuDefinitionEntryCommandSelectAll
+ //
+ this.menuDefinitionEntryCommandSelectAll.CommandIdentifier = "MindShare.ApplicationCore.Commands.SelectAll";
+ this.menuDefinitionEntryCommandSelectAll.SeparatorAfter = true;
+ this.menuDefinitionEntryCommandSelectAll.SeparatorBefore = true;
+ //
+ // menuDefinitionEntryCommandInsertLink
+ //
+ this.menuDefinitionEntryCommandInsertLink.CommandIdentifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
+ this.menuDefinitionEntryCommandInsertLink.SeparatorAfter = true;
+ this.menuDefinitionEntryCommandInsertLink.SeparatorBefore = true;
- this.Entries.AddRange(new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntry[] {
- this.menuDefinitionEntryCommandCut,
- this.menuDefinitionEntryCommandCopy,
- this.menuDefinitionEntryCommandPaste,
- this.menuDefinitionEntryCommandPasteSpecial,
- this.menuDefinitionEntryCommandSelectAll,
- this.menuDefinitionEntryCommandInsertLink});
+ this.Entries.AddRange(new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntry[] {
+ this.menuDefinitionEntryCommandCut,
+ this.menuDefinitionEntryCommandCopy,
+ this.menuDefinitionEntryCommandPaste,
+ this.menuDefinitionEntryCommandPasteSpecial,
+ this.menuDefinitionEntryCommandSelectAll,
+ this.menuDefinitionEntryCommandInsertLink});
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Debugging/StyleDebugger.cs b/src/managed/OpenLiveWriter.HtmlEditor/Debugging/StyleDebugger.cs
index fdb7b8c2..2d0e31af 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Debugging/StyleDebugger.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Debugging/StyleDebugger.cs
@@ -20,280 +20,278 @@ namespace OpenLiveWriter.HtmlEditor.Debugging
#if DEBUG_STYLES
- private ColumnHeader columnHeaderStyleName;
- private ColumnHeader columnHeaderStyleValue;
- private ListView listViewStyle;
- private Button buttonLoad;
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ private ColumnHeader columnHeaderStyleName;
+ private ColumnHeader columnHeaderStyleValue;
+ private ListView listViewStyle;
+ private Button buttonLoad;
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public StyleDebugger()
- {
- Init();
- }
+ public StyleDebugger()
+ {
+ Init();
+ }
- /*public StyleDebugger(IWin32Window parentFrame) : base(parentFrame)
- {
- Init();
+ /*public StyleDebugger(IWin32Window parentFrame) : base(parentFrame)
+ {
+ Init();
- }*/
+ }*/
- private void Init()
- {
- InitializeComponent();
- InitStyleItems();
- }
+ private void Init()
+ {
+ InitializeComponent();
+ InitStyleItems();
+ }
- public static void ShowDebugger(IWin32Window parentFrame, MshtmlEditorEx editor)
- {
- StyleDebugger styleDebugger = new StyleDebugger();
- styleDebugger.MshtmlEditor = editor;
- styleDebugger.Location = new Point(0, 0);
- styleDebugger.Show();
- styleDebugger.BringToFront();
- }
+ public static void ShowDebugger(IWin32Window parentFrame, MshtmlEditorEx editor)
+ {
+ StyleDebugger styleDebugger = new StyleDebugger();
+ styleDebugger.MshtmlEditor = editor;
+ styleDebugger.Location = new Point(0, 0);
+ styleDebugger.Show();
+ styleDebugger.BringToFront();
+ }
#region Style list items
- private void InitStyleItems()
- {
- //load the style list items
- AddStyleItem("color", new StyleExtractor(GetColor));
- AddStyleItem("font-size", new StyleExtractor(GetFontSize));
- AddStyleItem("font-family", new StyleExtractor(GetFontFamily));
- AddStyleItem("font-style", new StyleExtractor(GetFontStyle));
- AddStyleItem("font-variant", new StyleExtractor(GetFontVariant));
- AddStyleItem("font-weight", new StyleExtractor(GetFontWeight));
- AddStyleItem("padding", new StyleExtractor(GetPadding));
- AddStyleItem("margin", new StyleExtractor(GetMargin));
- }
- private delegate object StyleExtractor(IHTMLCurrentStyle style);
+ private void InitStyleItems()
+ {
+ //load the style list items
+ AddStyleItem("color", new StyleExtractor(GetColor));
+ AddStyleItem("font-size", new StyleExtractor(GetFontSize));
+ AddStyleItem("font-family", new StyleExtractor(GetFontFamily));
+ AddStyleItem("font-style", new StyleExtractor(GetFontStyle));
+ AddStyleItem("font-variant", new StyleExtractor(GetFontVariant));
+ AddStyleItem("font-weight", new StyleExtractor(GetFontWeight));
+ AddStyleItem("padding", new StyleExtractor(GetPadding));
+ AddStyleItem("margin", new StyleExtractor(GetMargin));
+ }
+ private delegate object StyleExtractor(IHTMLCurrentStyle style);
- private object GetColor(IHTMLCurrentStyle style){ return style.color; }
- private object GetFontSize(IHTMLCurrentStyle style){ return style.fontSize; }
- private object GetFontFamily(IHTMLCurrentStyle style){ return style.fontFamily; }
- private object GetFontStyle(IHTMLCurrentStyle style){ return style.fontStyle; }
- private object GetFontVariant(IHTMLCurrentStyle style){ return style.fontVariant; }
- private object GetFontWeight(IHTMLCurrentStyle style){ return style.fontWeight; }
- private object GetPadding(IHTMLCurrentStyle style){ return style.padding; }
- private object GetMargin(IHTMLCurrentStyle style){ return style.margin; }
+ private object GetColor(IHTMLCurrentStyle style){ return style.color; }
+ private object GetFontSize(IHTMLCurrentStyle style){ return style.fontSize; }
+ private object GetFontFamily(IHTMLCurrentStyle style){ return style.fontFamily; }
+ private object GetFontStyle(IHTMLCurrentStyle style){ return style.fontStyle; }
+ private object GetFontVariant(IHTMLCurrentStyle style){ return style.fontVariant; }
+ private object GetFontWeight(IHTMLCurrentStyle style){ return style.fontWeight; }
+ private object GetPadding(IHTMLCurrentStyle style){ return style.padding; }
+ private object GetMargin(IHTMLCurrentStyle style){ return style.margin; }
- private void AddStyleItem(string name, StyleExtractor extractor)
- {
- listViewStyle.Items.Add(new StyleListItem(name, extractor));
- }
+ private void AddStyleItem(string name, StyleExtractor extractor)
+ {
+ listViewStyle.Items.Add(new StyleListItem(name, extractor));
+ }
- private void RefreshStyleItems(IHTMLCurrentStyle style)
- {
- //listViewStyle.BeginUpdate();
- foreach(StyleListItem item in listViewStyle.Items)
- item.RefreshStyle(style);
- //listViewStyle.EndUpdate();
- }
+ private void RefreshStyleItems(IHTMLCurrentStyle style)
+ {
+ //listViewStyle.BeginUpdate();
+ foreach(StyleListItem item in listViewStyle.Items)
+ item.RefreshStyle(style);
+ //listViewStyle.EndUpdate();
+ }
#endregion
-
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
#region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.listViewStyle = new System.Windows.Forms.ListView();
- this.columnHeaderStyleName = new System.Windows.Forms.ColumnHeader();
- this.columnHeaderStyleValue = new System.Windows.Forms.ColumnHeader();
- this.buttonLoad = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // listViewStyle
- //
- this.listViewStyle.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.listViewStyle.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeaderStyleName,
- this.columnHeaderStyleValue});
- this.listViewStyle.Location = new System.Drawing.Point(4, 4);
- this.listViewStyle.Name = "listViewStyle";
- this.listViewStyle.Size = new System.Drawing.Size(284, 332);
- this.listViewStyle.TabIndex = 0;
- this.listViewStyle.View = System.Windows.Forms.View.Details;
- //
- // columnHeaderStyleName
- //
- this.columnHeaderStyleName.Text = "Attribute";
- this.columnHeaderStyleName.Width = 98;
- //
- // columnHeaderStyleValue
- //
- this.columnHeaderStyleValue.Text = "Value";
- this.columnHeaderStyleValue.Width = 149;
- //
- // buttonLoad
- //
- this.buttonLoad.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonLoad.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonLoad.Location = new System.Drawing.Point(204, 344);
- this.buttonLoad.Name = "buttonLoad";
- this.buttonLoad.TabIndex = 1;
- this.buttonLoad.Text = "Load Style";
- this.buttonLoad.Click += new System.EventHandler(this.buttonLoad_Click);
- //
- // StyleDebugger
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.ClientSize = new System.Drawing.Size(292, 374);
- this.Controls.Add(this.buttonLoad);
- this.Controls.Add(this.listViewStyle);
- this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
- this.Name = "StyleDebugger";
- this.Text = "StyleDebugger";
- this.ResumeLayout(false);
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.listViewStyle = new System.Windows.Forms.ListView();
+ this.columnHeaderStyleName = new System.Windows.Forms.ColumnHeader();
+ this.columnHeaderStyleValue = new System.Windows.Forms.ColumnHeader();
+ this.buttonLoad = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // listViewStyle
+ //
+ this.listViewStyle.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.listViewStyle.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.columnHeaderStyleName,
+ this.columnHeaderStyleValue});
+ this.listViewStyle.Location = new System.Drawing.Point(4, 4);
+ this.listViewStyle.Name = "listViewStyle";
+ this.listViewStyle.Size = new System.Drawing.Size(284, 332);
+ this.listViewStyle.TabIndex = 0;
+ this.listViewStyle.View = System.Windows.Forms.View.Details;
+ //
+ // columnHeaderStyleName
+ //
+ this.columnHeaderStyleName.Text = "Attribute";
+ this.columnHeaderStyleName.Width = 98;
+ //
+ // columnHeaderStyleValue
+ //
+ this.columnHeaderStyleValue.Text = "Value";
+ this.columnHeaderStyleValue.Width = 149;
+ //
+ // buttonLoad
+ //
+ this.buttonLoad.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonLoad.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonLoad.Location = new System.Drawing.Point(204, 344);
+ this.buttonLoad.Name = "buttonLoad";
+ this.buttonLoad.TabIndex = 1;
+ this.buttonLoad.Text = "Load Style";
+ this.buttonLoad.Click += new System.EventHandler(this.buttonLoad_Click);
+ //
+ // StyleDebugger
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.ClientSize = new System.Drawing.Size(292, 374);
+ this.Controls.Add(this.buttonLoad);
+ this.Controls.Add(this.listViewStyle);
+ this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+ this.Name = "StyleDebugger";
+ this.Text = "StyleDebugger";
+ this.ResumeLayout(false);
- }
+ }
#endregion
- public MshtmlEditorEx MshtmlEditor
- {
- get { return mshtmlEditor; }
- set { mshtmlEditor = value; }
- }
- private MshtmlEditorEx mshtmlEditor;
+ public MshtmlEditorEx MshtmlEditor
+ {
+ get { return mshtmlEditor; }
+ set { mshtmlEditor = value; }
+ }
+ private MshtmlEditorEx mshtmlEditor;
- private void buttonLoad_Click(object sender, EventArgs e)
- {
- MarkupRange selection = GetSelectedMarkupRange();
- if(selection.IsEmpty())
- {
- this.listViewStyle.Enabled = true;
+ private void buttonLoad_Click(object sender, EventArgs e)
+ {
+ MarkupRange selection = GetSelectedMarkupRange();
+ if(selection.IsEmpty())
+ {
+ this.listViewStyle.Enabled = true;
- IHTMLElement2 element = (IHTMLElement2)selection.Start.CurrentScope;
- IHTMLCurrentStyle style = element.currentStyle;
- RefreshStyleItems(style);
- }
- else
- {
- this.listViewStyle.Enabled = false;
- }
- }
+ IHTMLElement2 element = (IHTMLElement2)selection.Start.CurrentScope;
+ IHTMLCurrentStyle style = element.currentStyle;
+ RefreshStyleItems(style);
+ }
+ else
+ {
+ this.listViewStyle.Enabled = false;
+ }
+ }
- private MshtmlMarkupServices MarkupServices
- {
- get
- {
- return mshtmlEditor.MshtmlControl.MarkupServices;
- }
- }
+ private MshtmlMarkupServices MarkupServices
+ {
+ get
+ {
+ return mshtmlEditor.MshtmlControl.MarkupServices;
+ }
+ }
- private IHTMLDocument2 HTMLDocument
- {
- get
- {
- return mshtmlEditor.HTMLDocument;
- }
- }
+ private IHTMLDocument2 HTMLDocument
+ {
+ get
+ {
+ return mshtmlEditor.HTMLDocument;
+ }
+ }
- ///
- /// Get current selection pointers
- ///
- /// selection pointers
- public MarkupRange GetSelectedMarkupRange()
- {
- return MarkupServices.CreateMarkupRange( SelectedRange ) ;
- }
+ ///
+ /// Get current selection pointers
+ ///
+ /// selection pointers
+ public MarkupRange GetSelectedMarkupRange()
+ {
+ return MarkupServices.CreateMarkupRange( SelectedRange ) ;
+ }
+ ///
+ /// Currently selected range (null if there is no selection)
+ ///
+ private IHTMLTxtRange SelectedRange
+ {
+ get
+ {
+ // get hte selection
+ IHTMLSelectionObject selection = HTMLDocument.selection ;
+ if ( selection == null )
+ {
+ return null ;
+ }
- ///
- /// Currently selected range (null if there is no selection)
- ///
- private IHTMLTxtRange SelectedRange
- {
- get
- {
- // get hte selection
- IHTMLSelectionObject selection = HTMLDocument.selection ;
- if ( selection == null )
- {
- return null ;
- }
+ // see what type of range is selected
+ object range = selection.createRange() ;
+ if ( range is IHTMLTxtRange )
+ {
+ return range as IHTMLTxtRange ;
+ }
+ else if ( range is IHTMLControlRange )
+ {
+ // we only support single-selection so a "control-range" can always
+ // be converted into a single-element text range
+ IHTMLControlRange controlRange = range as IHTMLControlRange ;
+ if ( controlRange.length == 1)
+ {
+ //bug fix 1793: use markup services to select the range of markup because the
+ //IHTMLTxtRange.moveToElementText() operation doesn't create a reasonable
+ //selection range for selections within an anchor (thumbnails, etc)
+ IHTMLElement selectedElement = controlRange.item(0);
+ MarkupRange markupRange = MarkupServices.CreateMarkupRange(selectedElement);
+ if(selectedElement.parentElement.tagName == "A")
+ {
+ //expand the selection to include the anchor if there is no content between
+ //the selected element and its anchor.
+ markupRange.MoveOutwardIfNoContent();
+ }
- // see what type of range is selected
- object range = selection.createRange() ;
- if ( range is IHTMLTxtRange )
- {
- return range as IHTMLTxtRange ;
- }
- else if ( range is IHTMLControlRange )
- {
- // we only support single-selection so a "control-range" can always
- // be converted into a single-element text range
- IHTMLControlRange controlRange = range as IHTMLControlRange ;
- if ( controlRange.length == 1)
- {
- //bug fix 1793: use markup services to select the range of markup because the
- //IHTMLTxtRange.moveToElementText() operation doesn't create a reasonable
- //selection range for selections within an anchor (thumbnails, etc)
- IHTMLElement selectedElement = controlRange.item(0);
- MarkupRange markupRange = MarkupServices.CreateMarkupRange(selectedElement);
- if(selectedElement.parentElement.tagName == "A")
- {
- //expand the selection to include the anchor if there is no content between
- //the selected element and its anchor.
- markupRange.MoveOutwardIfNoContent();
- }
+ //return the precisely positioned text range
+ return markupRange.ToTextRange();
+ }
+ else
+ {
+ Debug.Fail( "Length of control range not equal to 1 (value was " + controlRange.length.ToString() ) ;
+ return null ;
+ }
+ }
+ else // null or unexpected range type
+ {
+ return null ;
+ }
+ }
+ }
+ private class StyleListItem : ListViewItem
+ {
+ string _name;
+ StyleExtractor _extractor;
+ public StyleListItem(string name, StyleExtractor extractor)
+ {
+ _name = name;
+ _extractor = extractor;
+ SubItems.Add("");
+ SubItems.Add("");
+ }
- //return the precisely positioned text range
- return markupRange.ToTextRange();
- }
- else
- {
- Debug.Fail( "Length of control range not equal to 1 (value was " + controlRange.length.ToString() ) ;
- return null ;
- }
- }
- else // null or unexpected range type
- {
- return null ;
- }
- }
- }
- private class StyleListItem : ListViewItem
- {
- string _name;
- StyleExtractor _extractor;
- public StyleListItem(string name, StyleExtractor extractor)
- {
- _name = name;
- _extractor = extractor;
- SubItems.Add("");
- SubItems.Add("");
- }
-
- public void RefreshStyle(IHTMLCurrentStyle style)
- {
- object val = _extractor(style);
- SubItems[0].Text = _name;
- SubItems[1].Text = val != null ? val.ToString() : "";
- }
- }
+ public void RefreshStyle(IHTMLCurrentStyle style)
+ {
+ object val = _extractor(style);
+ SubItems[0].Text = _name;
+ SubItems[1].Text = val != null ? val.ToString() : "";
+ }
+ }
#endif
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/FinishedSearchingDocumentDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/FinishedSearchingDocumentDisplayMessage.cs
index 3a19f95b..e352dd4c 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/FinishedSearchingDocumentDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/FinishedSearchingDocumentDisplayMessage.cs
@@ -9,61 +9,61 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.DisplayMessages
{
- public class FinishedSearchingDocumentDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class FinishedSearchingDocumentDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public FinishedSearchingDocumentDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public FinishedSearchingDocumentDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public FinishedSearchingDocumentDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public FinishedSearchingDocumentDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // FinishedSearchingDocumentDisplayMessage
- //
- this.Text = "Finished searching the document.";
- this.Title = "Find";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // FinishedSearchingDocumentDisplayMessage
+ //
+ this.Text = "Finished searching the document.";
+ this.Title = "Find";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/NotLinkableDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/NotLinkableDisplayMessage.cs
index ef81f504..84783763 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/NotLinkableDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/NotLinkableDisplayMessage.cs
@@ -10,63 +10,63 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.DisplayMessages
{
- public class NotLinkableDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class NotLinkableDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public NotLinkableDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public NotLinkableDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public NotLinkableDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public NotLinkableDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // NotLinkableDisplayMessage
- //
- this.Type = DisplayMessageType.Information;
- this.Buttons = MessageBoxButtons.OK;
- this.Text = "Your selection cannot be hyperlinked. Please select text, or click on an image.";
- this.Title = "Cannot Add Link to Selection";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // NotLinkableDisplayMessage
+ //
+ this.Type = DisplayMessageType.Information;
+ this.Buttons = MessageBoxButtons.OK;
+ this.Text = "Your selection cannot be hyperlinked. Please select text, or click on an image.";
+ this.Title = "Cannot Add Link to Selection";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/PasteSpecialInvalidDataDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/PasteSpecialInvalidDataDisplayMessage.cs
index 8651247e..5bb4af45 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/PasteSpecialInvalidDataDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/DisplayMessages/PasteSpecialInvalidDataDisplayMessage.cs
@@ -6,72 +6,72 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.DisplayMessages
{
- ///
- /// Summary description for PasteSpecialInvalidDataDisplayMessage.
- ///
- public class PasteSpecialInvalidDataDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for PasteSpecialInvalidDataDisplayMessage.
+ ///
+ public class PasteSpecialInvalidDataDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public PasteSpecialInvalidDataDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public PasteSpecialInvalidDataDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public PasteSpecialInvalidDataDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public PasteSpecialInvalidDataDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // PasteSpecialInvalidDataDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
- this.Text = "Paste Special can only be used with HTML and text data.";
- this.Title = "Invalid Data Selection";
- this.Type = DisplayMessageType.Information;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // PasteSpecialInvalidDataDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
+ this.Text = "Paste Special can only be used with HTML and text data.";
+ this.Title = "Invalid Data Selection";
+ this.Type = DisplayMessageType.Information;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/EditorLinkNavigator.cs b/src/managed/OpenLiveWriter.HtmlEditor/EditorLinkNavigator.cs
index f0894f4c..1c6d6c97 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/EditorLinkNavigator.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/EditorLinkNavigator.cs
@@ -192,7 +192,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
///
/// Handle TranslateAccelerator to update feedback on cursor and to clear the
/// tooltip for ALT-TAB, CTL-HOME, etc.
@@ -268,7 +267,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
///
/// Clear any existing link feedback
///
@@ -294,7 +292,6 @@ namespace OpenLiveWriter.HtmlEditor
UpdateCursor();
}
-
///
/// Update the status bar
///
@@ -415,7 +412,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
///
/// Gets the parent link element (if any) for the passed element
///
@@ -470,7 +466,6 @@ namespace OpenLiveWriter.HtmlEditor
public readonly IHTMLElement DelayElement;
}
-
///
/// editor context we are attached to
///
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorControl.cs b/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorControl.cs
index 8cc619c7..4d70f960 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorControl.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorControl.cs
@@ -439,7 +439,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
///
/// Returns the Html generation service.
///
@@ -1034,7 +1033,6 @@ namespace OpenLiveWriter.HtmlEditor
# region Command Initialization
-
private IMshtmlCommand GetMshtmlCommand(uint key)
{
return _mshtmlEditor.Commands[key] as IMshtmlCommand;
@@ -1164,7 +1162,7 @@ namespace OpenLiveWriter.HtmlEditor
mshtmlEditorDragAndDropTarget.Initialize(EditorControl);
#if DEBUG_STYLES
- // StyleDebugger.ShowDebugger(_mainFrameWindow, MshtmlEditor);
+ // StyleDebugger.ShowDebugger(_mainFrameWindow, MshtmlEditor);
#endif
// one-time init
_initialDocumentLoaded = true;
@@ -1280,9 +1278,8 @@ namespace OpenLiveWriter.HtmlEditor
// global processing for Mouse Up (none for the time being )
}
-
#if SELECTION_DEBUG
- private SelectionDebugDialog SelectionDebugDialog;
+ private SelectionDebugDialog SelectionDebugDialog;
#endif
private void DocumentEvents_SelectionChanged(object sender, EventArgs e)
{
@@ -1482,10 +1479,8 @@ namespace OpenLiveWriter.HtmlEditor
ele.innerHTML = CurrentDefaultFont.ApplyFont("");
}
-
IHTMLElement finalElement = FindFontElement(true);
-
if (finalElement == null)
{
finalElement = FindFontElement(false);
@@ -1581,7 +1576,6 @@ namespace OpenLiveWriter.HtmlEditor
}
-
#endregion
#region Spell Checking Helpers
@@ -1693,7 +1687,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
protected MarkupRange CleanUpRange()
{
MarkupRange mRange = null;
@@ -2650,7 +2643,6 @@ namespace OpenLiveWriter.HtmlEditor
start.PopGravity();
}
-
if (allowNewLineInsert && TidyWhitespace)
{
try
@@ -3231,7 +3223,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
public virtual void EmptySelection()
{
if (HTMLDocument.readyState == "complete" && HTMLDocument.selection != null)
@@ -4795,7 +4786,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
MshtmlMarkupServices IHtmlEditorComponentContext.MarkupServices
{
get
@@ -5040,7 +5030,6 @@ namespace OpenLiveWriter.HtmlEditor
}
}
-
public void Undo()
{
try
@@ -5255,7 +5244,6 @@ namespace OpenLiveWriter.HtmlEditor
GetMshtmlCommand(IDM.COPY).Execute();
}
-
private static bool ClipboardHasData
{
get
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehavior.cs b/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehavior.cs
index 1d9165bb..0d6bfb88 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehavior.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehavior.cs
@@ -39,7 +39,6 @@ namespace OpenLiveWriter.HtmlEditor
UpdateSelectionState();
}
-
public bool Selected
{
get
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehaviorManager.cs b/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehaviorManager.cs
index 30a8952a..003e91ae 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehaviorManager.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/HtmlEditorElementBehaviorManager.cs
@@ -10,119 +10,118 @@ using mshtml;
namespace Onfolio.Core.HtmlEditor
{
- public class HtmlEditorElementBehaviorManager : IDisposable
- {
- public HtmlEditorElementBehaviorManager(IHtmlEditorComponentContext editorContext)
- {
- _editorContext = editorContext ;
- _editorContext.SelectionChanged +=new EventHandler(_editorContext_SelectionChanged);
- }
+ public class HtmlEditorElementBehaviorManager : IDisposable
+ {
+ public HtmlEditorElementBehaviorManager(IHtmlEditorComponentContext editorContext)
+ {
+ _editorContext = editorContext ;
+ _editorContext.SelectionChanged +=new EventHandler(_editorContext_SelectionChanged);
+ }
- public void Dispose()
- {
- if ( _activeBehaviors != null )
- {
- _editorContext.SelectionChanged -=new EventHandler(_editorContext_SelectionChanged);
+ public void Dispose()
+ {
+ if ( _activeBehaviors != null )
+ {
+ _editorContext.SelectionChanged -=new EventHandler(_editorContext_SelectionChanged);
- // all of the elements left in the activeBehaviors list are no longer in the document
- // so we should dispose and remove them from the list
- foreach ( HtmlEditorElementBehavior elementBehavior in _activeBehaviors.Values )
- elementBehavior.DetachFromElement();
- _activeBehaviors.Clear();
- _activeBehaviors = null ;
- }
- }
+ // all of the elements left in the activeBehaviors list are no longer in the document
+ // so we should dispose and remove them from the list
+ foreach ( HtmlEditorElementBehavior elementBehavior in _activeBehaviors.Values )
+ elementBehavior.DetachFromElement();
+ _activeBehaviors.Clear();
+ _activeBehaviors = null ;
+ }
+ }
- public void RegisterBehavior( string appliesToTag, Type behaviorType )
- {
- lock(this)
- {
- _globalElementBehaviors[appliesToTag] = behaviorType ;
- }
- }
+ public void RegisterBehavior( string appliesToTag, Type behaviorType )
+ {
+ lock(this)
+ {
+ _globalElementBehaviors[appliesToTag] = behaviorType ;
+ }
+ }
- public void RegisterBehavior( IHTMLElement element, HtmlEditorElementBehavior behavior)
- {
- lock(this)
- {
- _activeBehaviors[element] = behavior;
- _elementBehaviors[element] = behavior;
- }
- }
+ public void RegisterBehavior( IHTMLElement element, HtmlEditorElementBehavior behavior)
+ {
+ lock(this)
+ {
+ _activeBehaviors[element] = behavior;
+ _elementBehaviors[element] = behavior;
+ }
+ }
- public void RefreshBehaviors(IHTMLDocument2 document)
- {
- lock(this)
- {
- // get interface needed for element enumeration
- IHTMLDocument3 document3 = (IHTMLDocument3)document ;
+ public void RefreshBehaviors(IHTMLDocument2 document)
+ {
+ lock(this)
+ {
+ // get interface needed for element enumeration
+ IHTMLDocument3 document3 = (IHTMLDocument3)document ;
- // build new list of active behaviors
- Hashtable newActiveBehaviors = new Hashtable();
+ // build new list of active behaviors
+ Hashtable newActiveBehaviors = new Hashtable();
- //register global behaviors
- IDictionaryEnumerator behaviorEnumerator = _globalElementBehaviors.GetEnumerator() ;
- while (behaviorEnumerator.MoveNext())
- {
- string tagName = (string)behaviorEnumerator.Key ;
- foreach( IHTMLElement element in document3.getElementsByTagName(tagName))
- {
- // if the element is already assigned an active behavior then move it
- if ( _activeBehaviors.ContainsKey(element) )
- {
- newActiveBehaviors[element] = _activeBehaviors[element] ;
- _activeBehaviors.Remove(element);
- }
- else // otherwise create a new behavior and add it
- {
- HtmlEditorElementBehavior elementBehavior = (HtmlEditorElementBehavior)Activator.CreateInstance(
- (Type)behaviorEnumerator.Value, new object[] { element, _editorContext} ) ;
- newActiveBehaviors[element] = elementBehavior ;
- }
- }
- }
+ //register global behaviors
+ IDictionaryEnumerator behaviorEnumerator = _globalElementBehaviors.GetEnumerator() ;
+ while (behaviorEnumerator.MoveNext())
+ {
+ string tagName = (string)behaviorEnumerator.Key ;
+ foreach( IHTMLElement element in document3.getElementsByTagName(tagName))
+ {
+ // if the element is already assigned an active behavior then move it
+ if ( _activeBehaviors.ContainsKey(element) )
+ {
+ newActiveBehaviors[element] = _activeBehaviors[element] ;
+ _activeBehaviors.Remove(element);
+ }
+ else // otherwise create a new behavior and add it
+ {
+ HtmlEditorElementBehavior elementBehavior = (HtmlEditorElementBehavior)Activator.CreateInstance(
+ (Type)behaviorEnumerator.Value, new object[] { element, _editorContext} ) ;
+ newActiveBehaviors[element] = elementBehavior ;
+ }
+ }
+ }
- //register element behaviors
- behaviorEnumerator = _elementBehaviors.GetEnumerator() ;
- while (behaviorEnumerator.MoveNext())
- {
- IHTMLElement element = (IHTMLElement)behaviorEnumerator.Key ;
- // if the element is already assigned an active behavior then move it
- if ( _activeBehaviors.ContainsKey(element) )
- {
- newActiveBehaviors[element] = _activeBehaviors[element] ;
- _activeBehaviors.Remove(element);
- }
- else // otherwise create a new behavior and add it
- {
- Debug.Fail("illegal state: element behavior is not in the _activeBehaviors table");
- }
- }
+ //register element behaviors
+ behaviorEnumerator = _elementBehaviors.GetEnumerator() ;
+ while (behaviorEnumerator.MoveNext())
+ {
+ IHTMLElement element = (IHTMLElement)behaviorEnumerator.Key ;
+ // if the element is already assigned an active behavior then move it
+ if ( _activeBehaviors.ContainsKey(element) )
+ {
+ newActiveBehaviors[element] = _activeBehaviors[element] ;
+ _activeBehaviors.Remove(element);
+ }
+ else // otherwise create a new behavior and add it
+ {
+ Debug.Fail("illegal state: element behavior is not in the _activeBehaviors table");
+ }
+ }
- // all of the elements left in the activeBehaviors list are no longer in the document
- // so we should dispose and remove them from the list
- foreach ( HtmlEditorElementBehavior elementBehavior in _activeBehaviors.Values )
- elementBehavior.DetachFromElement();
- _activeBehaviors.Clear();
+ // all of the elements left in the activeBehaviors list are no longer in the document
+ // so we should dispose and remove them from the list
+ foreach ( HtmlEditorElementBehavior elementBehavior in _activeBehaviors.Values )
+ elementBehavior.DetachFromElement();
+ _activeBehaviors.Clear();
- // swap for new list
- _activeBehaviors = newActiveBehaviors ;
- }
- }
+ // swap for new list
+ _activeBehaviors = newActiveBehaviors ;
+ }
+ }
+ private void _editorContext_SelectionChanged(object sender, EventArgs e)
+ {
+ // update 'active' state of behaviors based on whether they contain the selection
+ MarkupRange selectedRange = _editorContext.GetSelectedMarkupRange() ;
+ foreach ( HtmlEditorElementBehavior elementBehavior in _activeBehaviors.Values )
+ elementBehavior.SelectionChanged(selectedRange);
+ }
- private void _editorContext_SelectionChanged(object sender, EventArgs e)
- {
- // update 'active' state of behaviors based on whether they contain the selection
- MarkupRange selectedRange = _editorContext.GetSelectedMarkupRange() ;
- foreach ( HtmlEditorElementBehavior elementBehavior in _activeBehaviors.Values )
- elementBehavior.SelectionChanged(selectedRange);
- }
+ private Hashtable _globalElementBehaviors = new Hashtable();
+ private Hashtable _elementBehaviors = new Hashtable();
+ private Hashtable _activeBehaviors = new Hashtable();
+ private IHtmlEditorComponentContext _editorContext;
- private Hashtable _globalElementBehaviors = new Hashtable();
- private Hashtable _elementBehaviors = new Hashtable();
- private Hashtable _activeBehaviors = new Hashtable();
- private IHtmlEditorComponentContext _editorContext;
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/HtmlSourceEditorFindTextForm.cs b/src/managed/OpenLiveWriter.HtmlEditor/HtmlSourceEditorFindTextForm.cs
index 5c842844..1d092273 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/HtmlSourceEditorFindTextForm.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/HtmlSourceEditorFindTextForm.cs
@@ -71,7 +71,6 @@ namespace OpenLiveWriter.HtmlEditor
DisplayHelper.AutoFitSystemRadioButton(radioButtonUp, 0, int.MaxValue);
radioButtonDown.Left = radioButtonUp.Right + distance;
-
using (new AutoGrow(this, AnchorStyles.Bottom | AnchorStyles.Right, false))
{
int oldTop = radioButtonDown.Top;
@@ -82,9 +81,9 @@ namespace OpenLiveWriter.HtmlEditor
}
///
- /// Clean up any resources being used.
- ///
- protected override void Dispose(bool disposing)
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose(bool disposing)
{
if (disposing)
{
@@ -96,7 +95,6 @@ namespace OpenLiveWriter.HtmlEditor
base.Dispose(disposing);
}
-
private void textBoxFindWhat_TextChanged(object sender, System.EventArgs e)
{
buttonFindNext.Enabled = textBoxFindWhat.Text.Length != 0;
@@ -245,6 +243,5 @@ namespace OpenLiveWriter.HtmlEditor
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/IHtmlEditorComponentContext.cs b/src/managed/OpenLiveWriter.HtmlEditor/IHtmlEditorComponentContext.cs
index 20a36645..3a999a78 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/IHtmlEditorComponentContext.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/IHtmlEditorComponentContext.cs
@@ -256,7 +256,5 @@ namespace OpenLiveWriter.HtmlEditor
public delegate void HtmlEditorSelectionOperationEventHandler(HtmlEditorSelectionOperationEventArgs ea);
-
}
-
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/Commands/CommandAddToGlossary.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/Commands/CommandAddToGlossary.cs
index 7ccdad59..6fc6f437 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/Commands/CommandAddToGlossary.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/Commands/CommandAddToGlossary.cs
@@ -7,56 +7,55 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.HtmlEditor.Linking.Commands
{
- ///
- /// Summary description for CommandAddToGlossary.
- ///
- public class CommandAddToGlossary : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandAddToGlossary.
+ ///
+ public class CommandAddToGlossary : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandAddToGlossary(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandAddToGlossary(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandAddToGlossary()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandAddToGlossary()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandAddToGlossary
- //
- this.ContextMenuPath = "&Add to Glossary@104";
- this.Identifier = "OpenLiveWriter.HtmlEditor.Linking.Commands.CommandAddToGlossary";
- this.Text = "Add To Glossary";
- this.MenuText = "&Add to Glossary";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandAddToGlossary
+ //
+ this.ContextMenuPath = "&Add to Glossary@104";
+ this.Identifier = "OpenLiveWriter.HtmlEditor.Linking.Commands.CommandAddToGlossary";
+ this.Text = "Add To Glossary";
+ this.MenuText = "&Add to Glossary";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/AlertNoEntryDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/AlertNoEntryDisplayMessage.cs
index c4f7f5b7..ceaa1047 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/AlertNoEntryDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/AlertNoEntryDisplayMessage.cs
@@ -7,65 +7,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.Linking.DisplayMessages
{
- ///
- /// Summary description for AlertNoEntryDisplayMessage.
- ///
- public class AlertNoEntryDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for AlertNoEntryDisplayMessage.
+ ///
+ public class AlertNoEntryDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public AlertNoEntryDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public AlertNoEntryDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public AlertNoEntryDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public AlertNoEntryDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // AlertNoEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
- this.Text = "There is no glossary entry for that link term.";
- this.Title = "No Entry Found";
- this.Type = DisplayMessageType.Information;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // AlertNoEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
+ this.Text = "There is no glossary entry for that link term.";
+ this.Title = "No Entry Found";
+ this.Type = DisplayMessageType.Information;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmDeleteEntryDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmDeleteEntryDisplayMessage.cs
index 9c34d478..019b686c 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmDeleteEntryDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmDeleteEntryDisplayMessage.cs
@@ -7,65 +7,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.Linking.DisplayMessages
{
- ///
- /// Summary description for ConfirmDeleteEntryDisplayMessage.
- ///
- public class ConfirmDeleteEntryDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for ConfirmDeleteEntryDisplayMessage.
+ ///
+ public class ConfirmDeleteEntryDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ConfirmDeleteEntryDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ConfirmDeleteEntryDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public ConfirmDeleteEntryDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public ConfirmDeleteEntryDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConfirmDeleteEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "Are you sure that you want to delete the selected glossary entry?";
- this.Title = "Confirm Delete";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConfirmDeleteEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "Are you sure that you want to delete the selected glossary entry?";
+ this.Title = "Confirm Delete";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmReplaceEntryDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmReplaceEntryDisplayMessage.cs
index d12f96ee..4e86dbc8 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmReplaceEntryDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/ConfirmReplaceEntryDisplayMessage.cs
@@ -7,65 +7,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.Linking.DisplayMessages
{
- ///
- /// Summary description for ConfirmReplaceEntryDisplayMessage.
- ///
- public class ConfirmReplaceEntryDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for ConfirmReplaceEntryDisplayMessage.
+ ///
+ public class ConfirmReplaceEntryDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ConfirmReplaceEntryDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ConfirmReplaceEntryDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public ConfirmReplaceEntryDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public ConfirmReplaceEntryDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConfirmReplaceEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "Are you sure you want to replace the current entry for that text?";
- this.Title = "Confirm Replace";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConfirmReplaceEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "Are you sure you want to replace the current entry for that text?";
+ this.Title = "Confirm Replace";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/EntryFoundDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/EntryFoundDisplayMessage.cs
index 939e0e2f..6de67b94 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/EntryFoundDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/EntryFoundDisplayMessage.cs
@@ -7,65 +7,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.Linking.DisplayMessages
{
- ///
- /// Summary description for EntryFoundDisplayMessage.
- ///
- public class EntryFoundDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for EntryFoundDisplayMessage.
+ ///
+ public class EntryFoundDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public EntryFoundDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public EntryFoundDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public EntryFoundDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public EntryFoundDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // EntryFoundDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "Found a matching entry with link text {0} and URL {1}. \r\n\r\nDo you want to use this link information?";
- this.Title = "Entry Found";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // EntryFoundDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "Found a matching entry with link text {0} and URL {1}. \r\n\r\nDo you want to use this link information?";
+ this.Title = "Entry Found";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/SelectEntryDisplayMessage.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/SelectEntryDisplayMessage.cs
index fbfc7350..e386a150 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/SelectEntryDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/DisplayMessages/SelectEntryDisplayMessage.cs
@@ -7,65 +7,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.HtmlEditor.Linking.DisplayMessages
{
- ///
- /// Summary description for EntryFoundDisplayMessage.
- ///
- public class SelectEntryDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for EntryFoundDisplayMessage.
+ ///
+ public class SelectEntryDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public SelectEntryDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public SelectEntryDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public SelectEntryDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public SelectEntryDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // SelectEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
- this.Text = "Please select a link from the glossary.";
- this.Title = "Select Link";
- this.Type = DisplayMessageType.Information;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // SelectEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
+ this.Text = "Please select a link from the glossary.";
+ this.Title = "Select Link";
+ this.Type = DisplayMessageType.Information;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManagementControl.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManagementControl.cs
index a0722aef..1c6cb343 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManagementControl.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManagementControl.cs
@@ -260,7 +260,6 @@ namespace OpenLiveWriter.HtmlEditor.Linking
}
-
private void DeleteSelectedEntry()
{
if (SelectedEntry == null)
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManager.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManager.cs
index 17c88a34..94d99700 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManager.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/GlossaryManager.cs
@@ -529,5 +529,4 @@ namespace OpenLiveWriter.HtmlEditor.Linking
}
}
-
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkForm.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkForm.cs
index 68483279..376b38b4 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkForm.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkForm.cs
@@ -411,7 +411,6 @@ namespace OpenLiveWriter.HtmlEditor.Linking
}
private const string HTTP_PREFIX = "http://";
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkingContextMenuDefinition.cs b/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkingContextMenuDefinition.cs
index b92d5d3b..f4241220 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkingContextMenuDefinition.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Linking/HyperlinkingContextMenuDefinition.cs
@@ -9,77 +9,77 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.HtmlEditor.Linking
{
- ///
- ///
- public class HyperlinkingContextMenuDefinition : CommandContextMenuDefinition
- {
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandRecentPost;
- private MenuDefinitionEntryCommand menuDefinitionEntryCommandGlossary;
+ ///
+ ///
+ public class HyperlinkingContextMenuDefinition : CommandContextMenuDefinition
+ {
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandRecentPost;
+ private MenuDefinitionEntryCommand menuDefinitionEntryCommandGlossary;
- private IContainer components;
+ private IContainer components;
- public HyperlinkingContextMenuDefinition(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
- }
+ public HyperlinkingContextMenuDefinition(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
+ }
- public HyperlinkingContextMenuDefinition()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public HyperlinkingContextMenuDefinition()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
- this.menuDefinitionEntryCommandRecentPost = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- this.menuDefinitionEntryCommandGlossary = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
- //
- // menuDefinitionEntryCommandRecentPost
- //
- this.menuDefinitionEntryCommandRecentPost.CommandIdentifier = "OpenLiveWriter.PostEditor.OpenPost.CommandRecentPost";
- this.menuDefinitionEntryCommandRecentPost.SeparatorAfter = false;
- this.menuDefinitionEntryCommandRecentPost.SeparatorBefore = false;
- //
- // menuDefinitionEntryCommandGlossary
- //
- this.menuDefinitionEntryCommandGlossary.CommandIdentifier = "OpenLiveWriter.HtmlEditor.Linking.Commands.CommandGlossary";
- this.menuDefinitionEntryCommandGlossary.SeparatorAfter = false;
- this.menuDefinitionEntryCommandGlossary.SeparatorBefore = false;
- //
- // LinkingContextMenuDefinition
- //
- this.Entries.AddRange(new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntry[] {
- this.menuDefinitionEntryCommandRecentPost,
- this.menuDefinitionEntryCommandGlossary});
- }
- #endregion
- }
+ this.menuDefinitionEntryCommandRecentPost = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ this.menuDefinitionEntryCommandGlossary = new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntryCommand(this.components);
+ //
+ // menuDefinitionEntryCommandRecentPost
+ //
+ this.menuDefinitionEntryCommandRecentPost.CommandIdentifier = "OpenLiveWriter.PostEditor.OpenPost.CommandRecentPost";
+ this.menuDefinitionEntryCommandRecentPost.SeparatorAfter = false;
+ this.menuDefinitionEntryCommandRecentPost.SeparatorBefore = false;
+ //
+ // menuDefinitionEntryCommandGlossary
+ //
+ this.menuDefinitionEntryCommandGlossary.CommandIdentifier = "OpenLiveWriter.HtmlEditor.Linking.Commands.CommandGlossary";
+ this.menuDefinitionEntryCommandGlossary.SeparatorAfter = false;
+ this.menuDefinitionEntryCommandGlossary.SeparatorBefore = false;
+ //
+ // LinkingContextMenuDefinition
+ //
+ this.Entries.AddRange(new OpenLiveWriter.ApplicationFramework.MenuDefinitionEntry[] {
+ this.menuDefinitionEntryCommandRecentPost,
+ this.menuDefinitionEntryCommandGlossary});
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandler.cs b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandler.cs
index d77c2d56..d1ad9add 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandler.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandler.cs
@@ -35,7 +35,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
}
-
///
/// Optional notification that we are beginning a drag operation
///
@@ -95,7 +94,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
return DragDropEffects.None;
}
-
///
/// Support copy as default with optional shift-key override to move
///
@@ -122,7 +120,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
return effects;
}
-
///
/// Support move as default with optional control-key override to copy
///
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandlerRegistry.cs b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandlerRegistry.cs
index 0bebd3a7..aba36d96 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandlerRegistry.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DataFormatHandlerRegistry.cs
@@ -78,13 +78,13 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
}
/*public void Register( Type dataFormatHandlerType, DataObjectFilter filter )
- {
- // register the data format handler
- lock(dataFormatHandlerFactories)
- {
- dataFormatHandlerFactories.Add(new DataObjectFilterFormatFactory(filter, dataFormatHandlerType));
- }
- }*/
+ {
+ // register the data format handler
+ lock(dataFormatHandlerFactories)
+ {
+ dataFormatHandlerFactories.Add(new DataObjectFilterFormatFactory(filter, dataFormatHandlerType));
+ }
+ }*/
public void Register(params IDataFormatHandlerFactory[] dataFormatFactories)
{
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FileHandler.cs b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FileHandler.cs
index 3375ffb4..aa79afd7 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FileHandler.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FileHandler.cs
@@ -44,7 +44,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling.Data_Handlers
}
}
-
///
/// Grabs HTML copied in the clipboard and pastes it into the document (pulls in a copy of embedded content too)
///
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FreeTextHandler.cs b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FreeTextHandler.cs
index b78e8c40..cd31cf39 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FreeTextHandler.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/Data_Handlers/FreeTextHandler.cs
@@ -88,7 +88,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling.Data_Handlers
}
}
-
///
/// Release any reference to HTML Caret
///
@@ -97,7 +96,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling.Data_Handlers
currentCaretLocation = null;
}
-
///
/// Notify the data format handler that data was dropped and should be inserted into
/// the document at whatever insert location the handler has internally tracked.
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DragDropTarget.cs b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DragDropTarget.cs
index ace79b5e..25f86826 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DragDropTarget.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/DragDropTarget.cs
@@ -125,7 +125,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
}
-
///
/// Handle the DragOver event for the presentation editor
///
@@ -202,7 +201,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
}
}
-
#endregion
#region Private Helper Methods
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/HtmlEditorDataFormatHandler.cs b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/HtmlEditorDataFormatHandler.cs
index 70c50fb8..f2880dcb 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/HtmlEditorDataFormatHandler.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/HtmlEditorDataFormatHandler.cs
@@ -29,7 +29,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
///
protected abstract bool DoInsertData(DataAction action, MarkupPointer begin, MarkupPointer end);
-
///
/// Presentation editor context for handling data
///
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/MshtmlEditorDragAndDropTarget.cs b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/MshtmlEditorDragAndDropTarget.cs
index 089cc0ce..3487f523 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/MshtmlEditorDragAndDropTarget.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/Marshalling/MshtmlEditorDragAndDropTarget.cs
@@ -88,7 +88,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
#endregion
-
#region Drag and Drop Event Handlers
///
@@ -126,7 +125,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
CallMshtmlDragEnter(e, false, false);
}
-
///
/// Handle the DragOver event for the presentation editor
///
@@ -190,7 +188,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
#endregion
-
#region Delegation of Drag and Drop Events to MSHTML
///
@@ -283,7 +280,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
}
}
-
///
/// Helper to cal the Mshtml DragDrop routine using .NET DragEventArgs
///
@@ -342,7 +338,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
return oleDataObject ?? emptyDataObject;
}
-
///
/// Helper to provide drop feedback
///
@@ -358,7 +353,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
return DragDropEffects.None;
}
-
///
/// Helper to convert .NET drop-effect into Win32 drop effect
///
@@ -422,7 +416,6 @@ namespace OpenLiveWriter.HtmlEditor.Marshalling
#endregion
-
#region Implementation of IDropTarget
// NOTE: while we do technically replace the MSHTML IDropTarget interface with our own,
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/PropertyEditingMiniForm.cs b/src/managed/OpenLiveWriter.HtmlEditor/PropertyEditingMiniForm.cs
index 4a65bc56..0ec725c4 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/PropertyEditingMiniForm.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/PropertyEditingMiniForm.cs
@@ -15,190 +15,188 @@ using Project31.ApplicationFramework;
namespace Onfolio.Core.HtmlEditor
{
- public class PropertyEditingMiniForm : MiniForm
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ public class PropertyEditingMiniForm : MiniForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- private BitmapButton _closeButton ;
+ private BitmapButton _closeButton ;
- private Bitmap _closeButtonEnabled = ResourceHelper.LoadAssemblyResourceBitmap("Images.CloseEnabled.png") ;
- private Bitmap _closeButtonSelected = ResourceHelper.LoadAssemblyResourceBitmap("Images.CloseSelected.png") ;
- private Bitmap _closeButtonPushed = ResourceHelper.LoadAssemblyResourceBitmap("Images.ClosePushed.png") ;
- private Bitmap _closeButtonDisabled = ResourceHelper.LoadAssemblyResourceBitmap(Images.CloseInactive.png") ;
+ private Bitmap _closeButtonEnabled = ResourceHelper.LoadAssemblyResourceBitmap("Images.CloseEnabled.png") ;
+ private Bitmap _closeButtonSelected = ResourceHelper.LoadAssemblyResourceBitmap("Images.CloseSelected.png") ;
+ private Bitmap _closeButtonPushed = ResourceHelper.LoadAssemblyResourceBitmap("Images.ClosePushed.png") ;
+ private Bitmap _closeButtonDisabled = ResourceHelper.LoadAssemblyResourceBitmap(Images.CloseInactive.png") ;
- public PropertyEditingMiniForm()
- : this(new DesignModeMainFrameWindow())
- {
- }
+ public PropertyEditingMiniForm()
+ : this(new DesignModeMainFrameWindow())
+ {
+ }
- public PropertyEditingMiniForm(IMainFrameWindow mainFrameWindow)
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ public PropertyEditingMiniForm(IMainFrameWindow mainFrameWindow)
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- // hide when user clicks away
- DismissOnDeactivate = true ;
+ // hide when user clicks away
+ DismissOnDeactivate = true ;
- // initialize close button
- _closeButton = new BitmapButton() ;
- _closeButton.BitmapDisabled = _closeButtonDisabled ;
- _closeButton.BitmapEnabled = _closeButtonEnabled ;
- _closeButton.BitmapPushed = _closeButtonPushed ;
- _closeButton.BitmapSelected = _closeButtonSelected ;
- _closeButton.ButtonStyle = ButtonStyle.Bitmap ;
- _closeButton.ToolTip = "Close" ;
- _closeButton.Width = _closeButtonEnabled.Width ;
- _closeButton.Height = _closeButtonEnabled.Height;
- _closeButton.Top = 2 ;
- _closeButton.Left = Width - _closeButton.Width - 1 ;
- _closeButton.Anchor = AnchorStyles.Top | AnchorStyles.Right ;
- _closeButton.Click +=new EventHandler(_closeButton_Click);
- Controls.Add(_closeButton) ;
+ // initialize close button
+ _closeButton = new BitmapButton() ;
+ _closeButton.BitmapDisabled = _closeButtonDisabled ;
+ _closeButton.BitmapEnabled = _closeButtonEnabled ;
+ _closeButton.BitmapPushed = _closeButtonPushed ;
+ _closeButton.BitmapSelected = _closeButtonSelected ;
+ _closeButton.ButtonStyle = ButtonStyle.Bitmap ;
+ _closeButton.ToolTip = "Close" ;
+ _closeButton.Width = _closeButtonEnabled.Width ;
+ _closeButton.Height = _closeButtonEnabled.Height;
+ _closeButton.Top = 2 ;
+ _closeButton.Left = Width - _closeButton.Width - 1 ;
+ _closeButton.Anchor = AnchorStyles.Top | AnchorStyles.Right ;
+ _closeButton.Click +=new EventHandler(_closeButton_Click);
+ Controls.Add(_closeButton) ;
- // subscribe to appearance changed
- ApplicationManager.ApplicationStyleChanged +=new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ // subscribe to appearance changed
+ ApplicationManager.ApplicationStyleChanged +=new EventHandler(ApplicationManager_ApplicationStyleChanged);
- // update appearance
- SyncAppearanceToApplicationStyle() ;
- }
+ // update appearance
+ SyncAppearanceToApplicationStyle() ;
+ }
- private void _closeButton_Click( object sender, EventArgs ea )
- {
- Close() ;
- }
+ private void _closeButton_Click( object sender, EventArgs ea )
+ {
+ Close() ;
+ }
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint (e);
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint (e);
+ // draw the background
+ e.Graphics.FillRectangle(_backgroundBrush, ClientRectangle);
- // draw the background
- e.Graphics.FillRectangle(_backgroundBrush, ClientRectangle);
+ // calculate title metrics
+ const int TEXT_LEFT_OFFSET = 2 ;
+ const int TEXT_TOP_OFFSET = 2 ;
+ float fontHeight = ApplicationManager.ApplicationStyle.NormalApplicationFont.GetHeight(e.Graphics) ;
+ int titleHeight = Convert.ToInt32(fontHeight) + TEXT_TOP_OFFSET + 1;
- // calculate title metrics
- const int TEXT_LEFT_OFFSET = 2 ;
- const int TEXT_TOP_OFFSET = 2 ;
- float fontHeight = ApplicationManager.ApplicationStyle.NormalApplicationFont.GetHeight(e.Graphics) ;
- int titleHeight = Convert.ToInt32(fontHeight) + TEXT_TOP_OFFSET + 1;
+ // draw the title area
+ e.Graphics.FillRectangle( _titleBarBrush, new Rectangle( 1, 1, Width-2, titleHeight ) );
- // draw the title area
- e.Graphics.FillRectangle( _titleBarBrush, new Rectangle( 1, 1, Width-2, titleHeight ) );
+ // draw the border
+ e.Graphics.DrawRectangle( _borderPen, new Rectangle(0,0, Width-1, Height-1) ) ;
+ e.Graphics.DrawLine( _borderPen, 1, titleHeight + 1, Width-2, titleHeight + 1 );
- // draw the border
- e.Graphics.DrawRectangle( _borderPen, new Rectangle(0,0, Width-1, Height-1) ) ;
- e.Graphics.DrawLine( _borderPen, 1, titleHeight + 1, Width-2, titleHeight + 1 );
+ // draw the text
+ e.Graphics.DrawString( Text, ApplicationManager.ApplicationStyle.NormalApplicationFont, _textBrush, new PointF(TEXT_LEFT_OFFSET,TEXT_TOP_OFFSET) ) ;
+ }
- // draw the text
- e.Graphics.DrawString( Text, ApplicationManager.ApplicationStyle.NormalApplicationFont, _textBrush, new PointF(TEXT_LEFT_OFFSET,TEXT_TOP_OFFSET) ) ;
- }
+ private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
+ {
+ SyncAppearanceToApplicationStyle() ;
+ PerformLayout() ;
+ Invalidate() ;
+ }
- private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
- {
- SyncAppearanceToApplicationStyle() ;
- PerformLayout() ;
- Invalidate() ;
- }
+ private void SyncAppearanceToApplicationStyle()
+ {
+ _closeButton.BackColor = ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor;
- private void SyncAppearanceToApplicationStyle()
- {
- _closeButton.BackColor = ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor;
+ if ( _backgroundBrush != null )
+ _backgroundBrush.Dispose();
+ _backgroundBrush = new SolidBrush(Color.FromArgb(246,243,240)) ;
- if ( _backgroundBrush != null )
- _backgroundBrush.Dispose();
- _backgroundBrush = new SolidBrush(Color.FromArgb(246,243,240)) ;
+ if ( _titleBarBrush != null )
+ _titleBarBrush.Dispose();
+ _titleBarBrush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor) ;
- if ( _titleBarBrush != null )
- _titleBarBrush.Dispose();
- _titleBarBrush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor) ;
+ if ( _borderPen != null )
+ _borderPen.Dispose();
+ _borderPen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) ;
- if ( _borderPen != null )
- _borderPen.Dispose();
- _borderPen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) ;
+ if ( _textBrush != null )
+ _textBrush.Dispose();
+ _textBrush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor) ;
+ }
+ private Brush _backgroundBrush ;
+ private Brush _titleBarBrush ;
+ private Pen _borderPen ;
+ private Brush _textBrush ;
- if ( _textBrush != null )
- _textBrush.Dispose();
- _textBrush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor) ;
- }
- private Brush _backgroundBrush ;
- private Brush _titleBarBrush ;
- private Pen _borderPen ;
- private Brush _textBrush ;
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if ( _backgroundBrush != null )
+ _backgroundBrush.Dispose();
+ if ( _titleBarBrush != null )
+ _titleBarBrush.Dispose();
+ if ( _borderPen != null )
+ _borderPen.Dispose();
+ if ( _textBrush != null )
+ _textBrush.Dispose();
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if ( _backgroundBrush != null )
- _backgroundBrush.Dispose();
- if ( _titleBarBrush != null )
- _titleBarBrush.Dispose();
- if ( _borderPen != null )
- _borderPen.Dispose();
- if ( _textBrush != null )
- _textBrush.Dispose();
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ /*
+ private class ParentFrameEventMonitor : NativeWindow, IDisposable
+ {
+ public ParentFrameEventMonitor( IWin32Window parentWindow )
+ {
+ AssignHandle(parentWindow.Handle);
+ }
- /*
- private class ParentFrameEventMonitor : NativeWindow, IDisposable
- {
- public ParentFrameEventMonitor( IWin32Window parentWindow )
- {
- AssignHandle(parentWindow.Handle);
- }
+ public void Dispose()
+ {
+ ReleaseHandle() ;
+ }
- public void Dispose()
- {
- ReleaseHandle() ;
- }
+ protected override void WndProc(ref Message m)
+ {
+ // always allow default processing
+ base.WndProc (ref m);
- protected override void WndProc(ref Message m)
- {
- // always allow default processing
- base.WndProc (ref m);
+ if ( m.Msg == WM.ACTIVATE )
+ {
- if ( m.Msg == WM.ACTIVATE )
- {
+ // detect switching between the two forms
+ if ( lParam == Handle )
+ switchedBetweenForms = true ;
+ else
+ switchedBetweenForms = false ;
- // detect switching between the two forms
- if ( lParam == Handle )
- switchedBetweenForms = true ;
- else
- switchedBetweenForms = false ;
+ }
- }
+ }
+ }
+ */
- }
- }
- */
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.Size = new System.Drawing.Size(300,300);
+ this.Text = "PropertyEditingMiniForm";
+ }
+ #endregion
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.Size = new System.Drawing.Size(300,300);
- this.Text = "PropertyEditingMiniForm";
- }
- #endregion
-
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.HtmlEditor/WordCountForm.cs b/src/managed/OpenLiveWriter.HtmlEditor/WordCountForm.cs
index ed2d5e11..56f0393b 100644
--- a/src/managed/OpenLiveWriter.HtmlEditor/WordCountForm.cs
+++ b/src/managed/OpenLiveWriter.HtmlEditor/WordCountForm.cs
@@ -54,7 +54,6 @@ namespace OpenLiveWriter.HtmlEditor
gbTableHeader.Text = Res.Get(StringId.Statistics);
}
-
}
protected override void OnLoad(EventArgs e)
@@ -77,7 +76,6 @@ namespace OpenLiveWriter.HtmlEditor
DisplayHelper.AutoFitSystemButton(buttonClose, buttonClose.Width, int.MaxValue);
}
-
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
diff --git a/src/managed/OpenLiveWriter.HtmlParser/Parser/HtmlExtractor.cs b/src/managed/OpenLiveWriter.HtmlParser/Parser/HtmlExtractor.cs
index aa19c35b..36f86f03 100644
--- a/src/managed/OpenLiveWriter.HtmlParser/Parser/HtmlExtractor.cs
+++ b/src/managed/OpenLiveWriter.HtmlParser/Parser/HtmlExtractor.cs
@@ -39,7 +39,7 @@ namespace OpenLiveWriter.HtmlParser.Parser
///
/// Returns the underlying parser that the HtmlExtractor is wrapping.
///
- public SimpleHtmlParser Parser
+ public SimpleHtmlParser Parser
{
get { return parser; }
}
@@ -47,7 +47,7 @@ namespace OpenLiveWriter.HtmlParser.Parser
///
/// Indicates whether the last match succeeded.
///
- public bool Success
+ public bool Success
{
get
{
@@ -59,7 +59,7 @@ namespace OpenLiveWriter.HtmlParser.Parser
/// Gets the element that was last matched. If the last
/// match failed, then returns null.
///
- public Element Element
+ public Element Element
{
get
{
@@ -76,7 +76,7 @@ namespace OpenLiveWriter.HtmlParser.Parser
///
/// if (ex.Seek(...).Success || ex.Reset().Seek(...).Success) { ... }
///
- public HtmlExtractor Reset()
+ public HtmlExtractor Reset()
{
lastMatch = null;
parser = new SimpleHtmlParser(html);
@@ -114,26 +114,26 @@ namespace OpenLiveWriter.HtmlParser.Parser
/// Seeks forward from the current position for the criterion.
///
/// If the seek fails, the parser will be positioned at the end of the file--all
- /// future seeks will also fail (until Reset() is called).
+ /// future seeks will also fail (until Reset() is called).
///
- ///
- /// Can be either a begin tag or end tag, or a run of text, or a comment.
- ///
- /// Examples of start tags:
- /// (any anchor tag)
- /// (any anchor tag that has at least one "name" attribute (with or without value)
- /// (any anchor tag that has a name attribute whose value is "title")
- ///
- /// Example of end tag:
- /// (any end anchor tag)
- ///
- /// Examples of invalid criteria:
- /// (only one criterion allowed per seek; chain Seek() calls if necessary)
- /// foo (only begin tags and end tags are allowed)
- ///
- /// TODO: Allow regular expression matching on attribute values, e.g.
- ///
- public HtmlExtractor Seek(string criterion)
+ ///
+ /// Can be either a begin tag or end tag, or a run of text, or a comment.
+ ///
+ /// Examples of start tags:
+ /// (any anchor tag)
+ /// (any anchor tag that has at least one "name" attribute (with or without value)
+ /// (any anchor tag that has a name attribute whose value is "title")
+ ///
+ /// Example of end tag:
+ /// (any end anchor tag)
+ ///
+ /// Examples of invalid criteria:
+ /// (only one criterion allowed per seek; chain Seek() calls if necessary)
+ /// foo (only begin tags and end tags are allowed)
+ ///
+ /// TODO: Allow regular expression matching on attribute values, e.g.
+ ///
+ public HtmlExtractor Seek(string criterion)
{
lastMatch = null;
@@ -188,12 +188,12 @@ namespace OpenLiveWriter.HtmlParser.Parser
return HtmlUtils.HTMLToPlainText(parser.CollectHtmlUntil(endTagName));
/*
- string text = parser.CollectTextUntil(endTagName);
- if (convertToPlainText && text != null)
- return HtmlUtils.HTMLToPlainText(text);
- else
- return text;
- */
+ string text = parser.CollectTextUntil(endTagName);
+ if (convertToPlainText && text != null)
+ return HtmlUtils.HTMLToPlainText(text);
+ else
+ return text;
+ */
}
///
diff --git a/src/managed/OpenLiveWriter.HtmlParser/Parser/JavascriptParser.cs b/src/managed/OpenLiveWriter.HtmlParser/Parser/JavascriptParser.cs
index f455f86d..775e9a1b 100644
--- a/src/managed/OpenLiveWriter.HtmlParser/Parser/JavascriptParser.cs
+++ b/src/managed/OpenLiveWriter.HtmlParser/Parser/JavascriptParser.cs
@@ -123,6 +123,5 @@ namespace OpenLiveWriter.HtmlParser.Parser
}
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.HtmlParser/Parser/SimpleHtmlParser.cs b/src/managed/OpenLiveWriter.HtmlParser/Parser/SimpleHtmlParser.cs
index 36099109..d3749d97 100644
--- a/src/managed/OpenLiveWriter.HtmlParser/Parser/SimpleHtmlParser.cs
+++ b/src/managed/OpenLiveWriter.HtmlParser/Parser/SimpleHtmlParser.cs
@@ -404,16 +404,16 @@ namespace OpenLiveWriter.HtmlParser.Parser
{
Match match = stopAt.Match(data, offset);
/*
- if (!match.Success)
- {
- // Failure. If an end tag is never encountered, the
- // begin tag does not count.
- // We can remove this whole clause if we want to behave
- // more like IE than Gecko.
- retval = string.Empty;
- return 0;
- }
- */
+ if (!match.Success)
+ {
+ // Failure. If an end tag is never encountered, the
+ // begin tag does not count.
+ // We can remove this whole clause if we want to behave
+ // more like IE than Gecko.
+ retval = string.Empty;
+ return 0;
+ }
+ */
int end = match.Success ? match.Index : data.Length;
@@ -459,11 +459,11 @@ namespace OpenLiveWriter.HtmlParser.Parser
public Match Match(int pos)
{
/* We need to reexecute the search under any of these three conditions:
- *
- * 1) The search has never been run
- * 2) The last search successfully matched before it got to the desired position
- * 3) The last search was started past the desired position
- */
+ *
+ * 1) The search has never been run
+ * 2) The last search successfully matched before it got to the desired position
+ * 3) The last search was started past the desired position
+ */
if (lastMatch == null || (lastMatch.Success && lastMatch.Index < pos) || lastStartOffset > pos)
{
#if DEBUG
@@ -503,7 +503,7 @@ namespace OpenLiveWriter.HtmlParser.Parser
/// String.Substring is very expensive, so we avoid calling it
/// until the caller demands it.
///
- internal class LazySubstring
+ internal class LazySubstring
{
private readonly string baseString;
private readonly int offset;
diff --git a/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapBirdsEyeZoomControl.cs b/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapBirdsEyeZoomControl.cs
index c9cff832..c5ce1fdc 100644
--- a/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapBirdsEyeZoomControl.cs
+++ b/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapBirdsEyeZoomControl.cs
@@ -192,4 +192,3 @@ namespace OpenLiveWriter.InternalWriterPlugin.Controls
}
}
-
diff --git a/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapPushpinForm.cs b/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapPushpinForm.cs
index 3b3d62c5..86210e5e 100644
--- a/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapPushpinForm.cs
+++ b/src/managed/OpenLiveWriter.InternalWriterPlugin/Controls/MapPushpinForm.cs
@@ -145,7 +145,6 @@ namespace OpenLiveWriter.InternalWriterPlugin.Controls
}
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.InternalWriterPlugin/MapContentSource.cs b/src/managed/OpenLiveWriter.InternalWriterPlugin/MapContentSource.cs
index 291aaa26..9129de62 100644
--- a/src/managed/OpenLiveWriter.InternalWriterPlugin/MapContentSource.cs
+++ b/src/managed/OpenLiveWriter.InternalWriterPlugin/MapContentSource.cs
@@ -81,7 +81,6 @@ namespace OpenLiveWriter.InternalWriterPlugin
}
}
-
private string GenerateHtml(ISmartContent content, bool editor, string blogId)
{
MapSettings settings = new MapSettings(content.Properties);
diff --git a/src/managed/OpenLiveWriter.InternalWriterPlugin/MapForm.cs b/src/managed/OpenLiveWriter.InternalWriterPlugin/MapForm.cs
index f381738e..3144c788 100644
--- a/src/managed/OpenLiveWriter.InternalWriterPlugin/MapForm.cs
+++ b/src/managed/OpenLiveWriter.InternalWriterPlugin/MapForm.cs
@@ -134,7 +134,6 @@ namespace OpenLiveWriter.InternalWriterPlugin
Size = _mapOptions.DefaultDialogSize;
-
using (LayoutHelper.SuspendAnchoring(mapControl, mapTipControl, buttonOK, buttonCancel))
{
LayoutHelper.FixupOKCancel(buttonOK, buttonCancel);
diff --git a/src/managed/OpenLiveWriter.InternalWriterPlugin/MapSidebarControl.cs b/src/managed/OpenLiveWriter.InternalWriterPlugin/MapSidebarControl.cs
index 063eed3e..454c580f 100644
--- a/src/managed/OpenLiveWriter.InternalWriterPlugin/MapSidebarControl.cs
+++ b/src/managed/OpenLiveWriter.InternalWriterPlugin/MapSidebarControl.cs
@@ -127,7 +127,6 @@ namespace OpenLiveWriter.InternalWriterPlugin
VirtualTransparency.VirtualPaint(this, pevent);
}
-
private void ShowCustomizeMapDialog()
{
using (new WaitCursor())
@@ -386,7 +385,6 @@ namespace OpenLiveWriter.InternalWriterPlugin
private static readonly string CUSTOM_MARGINS = Res.Get(StringId.MapCustomMargins);
}
-
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
@@ -702,6 +700,5 @@ namespace OpenLiveWriter.InternalWriterPlugin
upDown.Select(0, upDown.Text.Length);
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispDOMChildrenCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispDOMChildrenCollection.cs
index f3e153cc..4f33b533 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispDOMChildrenCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispDOMChildrenCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, DefaultMember("item"), TypeLibType((short) 0x1010), InterfaceType((short) 2), Guid("3050F577-98B5-11CF-BB82-00AA00BDCE0B")]
public interface DispDOMChildrenCollection
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAreasCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAreasCollection.cs
index 565cdd51..4f7bb8a6 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAreasCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAreasCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, Guid("3050F56A-98B5-11CF-BB82-00AA00BDCE0B"), InterfaceType((short) 2), TypeLibType((short) 0x1010), DefaultMember("item")]
public interface DispHTMLAreasCollection
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAttributeCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAttributeCollection.cs
index 3f2761bf..fb4d15e1 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAttributeCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLAttributeCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, InterfaceType((short) 2), TypeLibType((short) 0x1010), DefaultMember("item"), Guid("3050F56C-98B5-11CF-BB82-00AA00BDCE0B")]
public interface DispHTMLAttributeCollection
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLElementCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLElementCollection.cs
index e5a6c573..88c37806 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLElementCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLElementCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, Guid("3050F56B-98B5-11CF-BB82-00AA00BDCE0B"), InterfaceType((short) 2), DefaultMember("item"), TypeLibType((short) 0x1010)]
public interface DispHTMLElementCollection
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLFormElement.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLFormElement.cs
index dbe7bc9b..61debcfc 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLFormElement.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLFormElement.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, Guid("3050F510-98B5-11CF-BB82-00AA00BDCE0B"), InterfaceType((short) 2), DefaultMember("item"), TypeLibType((short) 0x1010)]
public interface DispHTMLFormElement
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLSelectElement.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLSelectElement.cs
index 6717de51..5341aaa7 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLSelectElement.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/DispHTMLSelectElement.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, TypeLibType((short) 0x1010), InterfaceType((short) 2), DefaultMember("item"), Guid("3050F531-98B5-11CF-BB82-00AA00BDCE0B")]
public interface DispHTMLSelectElement
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IBlockFormats.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IBlockFormats.cs
index fc0a2592..ab732660 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IBlockFormats.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IBlockFormats.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, DefaultMember("item"), Guid("3050F830-98B5-11CF-BB82-00AA00BDCE0B"), TypeLibType((short) 0x1000)]
public interface IBlockFormats : IEnumerable
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IFontNames.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IFontNames.cs
index 75be4a97..da1e9cef 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IFontNames.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IFontNames.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, TypeLibType((short) 0x1000), DefaultMember("item"), Guid("3050F839-98B5-11CF-BB82-00AA00BDCE0B")]
public interface IFontNames : IEnumerable
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLAreasCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLAreasCollection.cs
index 4fdca7bd..2b660b9a 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLAreasCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLAreasCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, Guid("3050F383-98B5-11CF-BB82-00AA00BDCE0B"), TypeLibType((short) 0x1040), DefaultMember("item")]
public interface IHTMLAreasCollection : IEnumerable
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontNamesCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontNamesCollection.cs
index 682bd4af..8f73004b 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontNamesCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontNamesCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, DefaultMember("item"), TypeLibType((short) 0x1040), Guid("3050F376-98B5-11CF-BB82-00AA00BDCE0B")]
public interface IHTMLFontNamesCollection : IEnumerable
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontSizesCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontSizesCollection.cs
index aa879f01..cb6f622d 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontSizesCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLFontSizesCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, Guid("3050F377-98B5-11CF-BB82-00AA00BDCE0B"), TypeLibType((short) 0x1040), DefaultMember("item")]
public interface IHTMLFontSizesCollection : IEnumerable
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLIPrintCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLIPrintCollection.cs
index b108966a..69783a4c 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLIPrintCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLIPrintCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, DefaultMember("item"), Guid("3050F6B5-98B5-11CF-BB82-00AA00BDCE0B"), TypeLibType((short) 0x1040)]
public interface IHTMLIPrintCollection : IEnumerable
diff --git a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLTxtRangeCollection.cs b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLTxtRangeCollection.cs
index 517fa300..de97a009 100644
--- a/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLTxtRangeCollection.cs
+++ b/src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLTxtRangeCollection.cs
@@ -8,7 +8,7 @@ namespace mshtml
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Runtime.InteropServices.CustomMarshalers;
+ using System.Runtime.InteropServices.CustomMarshalers;
[ComImport, TypeLibType((short) 0x1040), Guid("3050F7ED-98B5-11CF-BB82-00AA00BDCE0B"), DefaultMember("item")]
public interface IHTMLTxtRangeCollection : IEnumerable
diff --git a/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IContinueCallback.cs b/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IContinueCallback.cs
index 0373cf3a..b03bd054 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IContinueCallback.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IContinueCallback.cs
@@ -5,21 +5,21 @@ using System.Runtime.InteropServices;
namespace OpenLiveWriter.Interop.Com.ActiveDocuments
{
- ///
- ///
- ///
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("b722bcca-4e68-101b-a2bc-00aa00404770")]
- public interface IContinueCallback
- {
- [PreserveSig]
- int FContinue() ;
+ ///
+ ///
+ ///
+ [ComImport]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("b722bcca-4e68-101b-a2bc-00aa00404770")]
+ public interface IContinueCallback
+ {
+ [PreserveSig]
+ int FContinue() ;
[PreserveSig]
- int FContinuePrinting(
- [In] int nCntPrinted,
- [In] int nCurPage,
- [In, MarshalAs(UnmanagedType.LPWStr)] string pwszPrintStatus ) ;
- }
+ int FContinuePrinting(
+ [In] int nCntPrinted,
+ [In] int nCurPage,
+ [In, MarshalAs(UnmanagedType.LPWStr)] string pwszPrintStatus ) ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceFrame.cs b/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceFrame.cs
index 9b357cdb..4a151155 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceFrame.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceFrame.cs
@@ -60,7 +60,6 @@ namespace OpenLiveWriter.Interop.Com.ActiveDocuments
[In] UInt16 wID);
}
-
///
/// The OLEMENUGROUPWIDTHS structure is the mechanism for building a shared menu.
/// It indicates the number of menu items in each of the six menu groups of a menu
diff --git a/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceSite.cs b/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceSite.cs
index 952e0112..117fae5e 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceSite.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/ActiveDocuments/IOleInPlaceSite.cs
@@ -51,7 +51,6 @@ namespace OpenLiveWriter.Interop.Com.ActiveDocuments
[In] ref RECT lprcPosRect);
}
-
public struct OLEINPLACEFRAMEINFO
{
public uint cb;
diff --git a/src/managed/OpenLiveWriter.Interop/Com/ComHelper.cs b/src/managed/OpenLiveWriter.Interop/Com/ComHelper.cs
index dd23773b..1f53597c 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/ComHelper.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/ComHelper.cs
@@ -107,17 +107,17 @@ namespace OpenLiveWriter.Interop.Com
rkCategories.CreateSubKey(categoryIID.ToString("B"));
/*
- // "New school" COM-based method for registering as a category
- // implementor. Why don't we use this? First, it is incompatible
- // with Win95 and NT prior to SP3. Second, when trying to use it
- // to unregister a category we got a mysterious FileNotFound exception
- // that the ICatManager documentattion implies should never happen.
- // This was enough to scare us off of the bus.....
- //
- ICatRegister cr = (ICatRegister) new StdComponentCategoriesMgr();
- cr.RegisterClassImplCategories(
- ref guid, 1, new Guid[] { categoryIID } );
- */
+ // "New school" COM-based method for registering as a category
+ // implementor. Why don't we use this? First, it is incompatible
+ // with Win95 and NT prior to SP3. Second, when trying to use it
+ // to unregister a category we got a mysterious FileNotFound exception
+ // that the ICatManager documentattion implies should never happen.
+ // This was enough to scare us off of the bus.....
+ //
+ ICatRegister cr = (ICatRegister) new StdComponentCategoriesMgr();
+ cr.RegisterClassImplCategories(
+ ref guid, 1, new Guid[] { categoryIID } );
+ */
}
}
diff --git a/src/managed/OpenLiveWriter.Interop/Com/ComTypes.cs b/src/managed/OpenLiveWriter.Interop/Com/ComTypes.cs
index 688dffd5..8185966f 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/ComTypes.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/ComTypes.cs
@@ -61,7 +61,6 @@ namespace OpenLiveWriter.Interop.Com
public const int E_POINTER = unchecked((int)0x80004003);
}
-
///
/// Common OLE error codes
///
diff --git a/src/managed/OpenLiveWriter.Interop/Com/DragDropAlphaBlender.cs b/src/managed/OpenLiveWriter.Interop/Com/DragDropAlphaBlender.cs
index 4ffe4ecb..752bb228 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/DragDropAlphaBlender.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/DragDropAlphaBlender.cs
@@ -7,166 +7,163 @@ using OpenLiveWriter.Interop.Windows;
namespace OpenLiveWriter.Interop.Com
{
- ///
- /// Helper class that implements the IDropSourceHelper and IDropTargetHelper
- /// interfaces (cast the DragDropAlphaBlender) to these interfaces to get access
- /// to them). Note that this class is only useful when working with native Ole
- /// data objects (which .NET does not) so by and large it won't help us unless
- /// we bypass all of .NET's data objects and work 100% with native Ole data
- /// objects.
- ///
- [ComImport]
- [Guid("4657278A-411B-11d2-839A-00C04FD918D0")]
- public class DragDropAlphaBlender {} // implements IDropSourceHelper and IDropTargetHelper
+ ///
+ /// Helper class that implements the IDropSourceHelper and IDropTargetHelper
+ /// interfaces (cast the DragDropAlphaBlender) to these interfaces to get access
+ /// to them). Note that this class is only useful when working with native Ole
+ /// data objects (which .NET does not) so by and large it won't help us unless
+ /// we bypass all of .NET's data objects and work 100% with native Ole data
+ /// objects.
+ ///
+ [ComImport]
+ [Guid("4657278A-411B-11d2-839A-00C04FD918D0")]
+ public class DragDropAlphaBlender {} // implements IDropSourceHelper and IDropTargetHelper
- ///
- /// This interface allows drop targets to display a drag image while the image
- /// is over the target window. This interface is implemented by DragDropHelper.
- /// NOTE: The Data object must support IDataObject::SetData with multiple data
- /// types and GetData must implement data type cloning(Including HGLOBAL), not
- /// just aliasing. MFC does do this, not sure if .NET does....
- /// NOTE: Minimum OS requirements for this feature are Win2K and WinME.
- ///
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("4657278B-411B-11d2-839A-00C04FD918D0")]
- public interface IDropTargetHelper
- {
- ///
- /// Notifies the drag-image manager that the drop target's IDropTarget::DragEnter
- /// method has been called.
- ///
- /// [in] Target's window handle.
- /// [in] Pointer to the data object's IDataObject
- /// interface.
- /// [in] POINT structure pointer that was received in the
- /// IDropTarget::DragEnter method's pt parameter
- /// [in] Value pointed to by the IDropTarget::DragEnter
- /// method's pdwEffect parameter.
- void DragEnter(
- [In] IntPtr hwndTarget,
- [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject,
- [In] ref POINT ppt,
- [In] DROPEFFECT dwEffect ) ;
+ ///
+ /// This interface allows drop targets to display a drag image while the image
+ /// is over the target window. This interface is implemented by DragDropHelper.
+ /// NOTE: The Data object must support IDataObject::SetData with multiple data
+ /// types and GetData must implement data type cloning(Including HGLOBAL), not
+ /// just aliasing. MFC does do this, not sure if .NET does....
+ /// NOTE: Minimum OS requirements for this feature are Win2K and WinME.
+ ///
+ [ComImport]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("4657278B-411B-11d2-839A-00C04FD918D0")]
+ public interface IDropTargetHelper
+ {
+ ///
+ /// Notifies the drag-image manager that the drop target's IDropTarget::DragEnter
+ /// method has been called.
+ ///
+ /// [in] Target's window handle.
+ /// [in] Pointer to the data object's IDataObject
+ /// interface.
+ /// [in] POINT structure pointer that was received in the
+ /// IDropTarget::DragEnter method's pt parameter
+ /// [in] Value pointed to by the IDropTarget::DragEnter
+ /// method's pdwEffect parameter.
+ void DragEnter(
+ [In] IntPtr hwndTarget,
+ [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject,
+ [In] ref POINT ppt,
+ [In] DROPEFFECT dwEffect ) ;
- ///
- /// Notifies the drag-image manager that the drop target's
- /// IDropTarget::DragLeave method has been called.
- ///
- void DragLeave() ;
+ ///
+ /// Notifies the drag-image manager that the drop target's
+ /// IDropTarget::DragLeave method has been called.
+ ///
+ void DragLeave() ;
- ///
- /// Notifies the drag-image manager that the drop target's
- /// IDropTarget::DragOver method has been called.
- ///
- /// [in] POINT structure pointer that was received in the
- /// IDropTarget::DragOver method's pt parameter.
- /// [in] Value pointed to by the IDropTarget::DragOver
- /// method's pdwEffect parameter.
- void DragOver(
- [In] ref POINT ppt,
- [In] DROPEFFECT dwEffect );
+ ///
+ /// Notifies the drag-image manager that the drop target's
+ /// IDropTarget::DragOver method has been called.
+ ///
+ /// [in] POINT structure pointer that was received in the
+ /// IDropTarget::DragOver method's pt parameter.
+ /// [in] Value pointed to by the IDropTarget::DragOver
+ /// method's pdwEffect parameter.
+ void DragOver(
+ [In] ref POINT ppt,
+ [In] DROPEFFECT dwEffect );
- ///
- /// Notifies the drag-image manager that the drop target's IDropTarget::Drop
- /// method has been called.
- ///
- /// [in] Pointer to the data object's IDataObject
- /// interface.
- /// [in] POINT structure pointer that was received in the
- /// IDropTarget::Drop method's pt parameter
- /// [in] Value pointed to by the IDropTarget::Drop
- /// method's pdwEffect parameter.
- void Drop(
- [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject,
- [In] ref POINT ppt,
- [In] DROPEFFECT dwEffect ) ;
+ ///
+ /// Notifies the drag-image manager that the drop target's IDropTarget::Drop
+ /// method has been called.
+ ///
+ /// [in] Pointer to the data object's IDataObject
+ /// interface.
+ /// [in] POINT structure pointer that was received in the
+ /// IDropTarget::Drop method's pt parameter
+ /// [in] Value pointed to by the IDropTarget::Drop
+ /// method's pdwEffect parameter.
+ void Drop(
+ [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject,
+ [In] ref POINT ppt,
+ [In] DROPEFFECT dwEffect ) ;
- ///
- /// Notifies the drag-image manager to show or hide the drag image.
- /// This method is provided for showing/hiding the Drag image in low color
- /// depth video modes. When painting to a window that is currently being
- /// dragged over (i.e. For indicating a selection) you need to hide the
- /// drag image by calling this method passing FALSE. After the window is
- /// done painting, Show the image again by passing TRUE. ///
- ///
- /// [in] Boolean value that is set to TRUE to show the
- /// drag image, and FALSE to hide it.
- void Show(
- [In, MarshalAs(UnmanagedType.Bool)] bool fShow ) ;
- }
+ ///
+ /// Notifies the drag-image manager to show or hide the drag image.
+ /// This method is provided for showing/hiding the Drag image in low color
+ /// depth video modes. When painting to a window that is currently being
+ /// dragged over (i.e. For indicating a selection) you need to hide the
+ /// drag image by calling this method passing FALSE. After the window is
+ /// done painting, Show the image again by passing TRUE. ///
+ ///
+ /// [in] Boolean value that is set to TRUE to show the
+ /// drag image, and FALSE to hide it.
+ void Show(
+ [In, MarshalAs(UnmanagedType.Bool)] bool fShow ) ;
+ }
- ///
- /// This interface is exposed by the Shell to allow an application to specify
- /// the image that will be displayed during a Shell drag-and-drop operation.
- /// This interface is implemented by DragDropHelper.
- ///
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("DE5BF786-477A-11d2-839D-00C04FD918D0")]
- public interface IDragSourceHelper
- {
- ///
- /// Initializes the drag-image manager for a windowless control.
- ///
- /// [in] SHDRAGIMAGE structure that contains information
- /// about the bitmap.
- /// [in] Pointer to the data object's IDataObject
- /// interface.
- void InitializeFromBitmap(
- [In] ref SHDRAGIMAGE pshdi,
- [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject );
+ ///
+ /// This interface is exposed by the Shell to allow an application to specify
+ /// the image that will be displayed during a Shell drag-and-drop operation.
+ /// This interface is implemented by DragDropHelper.
+ ///
+ [ComImport]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("DE5BF786-477A-11d2-839D-00C04FD918D0")]
+ public interface IDragSourceHelper
+ {
+ ///
+ /// Initializes the drag-image manager for a windowless control.
+ ///
+ /// [in] SHDRAGIMAGE structure that contains information
+ /// about the bitmap.
+ /// [in] Pointer to the data object's IDataObject
+ /// interface.
+ void InitializeFromBitmap(
+ [In] ref SHDRAGIMAGE pshdi,
+ [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject );
+
+ ///
+ /// Initializes the drag-image manager for a control with a window.
+ /// DragDropHelper will send a DI_GETDRAGIMAGE message to the specified
+ /// window. DI_GETDRAGIMAGE is defined in DI.GETDRAGIMAGE and must be
+ /// registered with RegisterWindowMessage. When the window specified
+ /// by hwnd receives the DI_GETDRAGIMAGE message, the lParam value
+ /// will hold a pointer to an SHDRAGIMAGE structure. The handler should
+ /// fill the structure with the drag image bitmap information.
+ ///
+ /// [in] Handle to the window that will receive the
+ /// DI_GETDRAGIMAGE message.
+ /// [in] Pointer to a POINT structure that specifies
+ /// the location of the cursor within the drag image. The structure should
+ /// contain the offset from the upper-left corner of the drag image to the
+ /// location of the cursor.
+ /// [in] Pointer to the data object's IDataObject
+ /// interface
+ void InitializeFromWindow(
+ [In] IntPtr hwnd,
+ [In] ref POINT ppt,
+ [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject );
+ }
- ///
- /// Initializes the drag-image manager for a control with a window.
- /// DragDropHelper will send a DI_GETDRAGIMAGE message to the specified
- /// window. DI_GETDRAGIMAGE is defined in DI.GETDRAGIMAGE and must be
- /// registered with RegisterWindowMessage. When the window specified
- /// by hwnd receives the DI_GETDRAGIMAGE message, the lParam value
- /// will hold a pointer to an SHDRAGIMAGE structure. The handler should
- /// fill the structure with the drag image bitmap information.
- ///
- /// [in] Handle to the window that will receive the
- /// DI_GETDRAGIMAGE message.
- /// [in] Pointer to a POINT structure that specifies
- /// the location of the cursor within the drag image. The structure should
- /// contain the offset from the upper-left corner of the drag image to the
- /// location of the cursor.
- /// [in] Pointer to the data object's IDataObject
- /// interface
- void InitializeFromWindow(
- [In] IntPtr hwnd,
- [In] ref POINT ppt,
- [In, MarshalAs(UnmanagedType.IUnknown)] object pDataObject );
- }
+ ///
+ /// Structure used to define a drag image
+ ///
+ [StructLayout(LayoutKind.Sequential, Pack=8)] // corresponds to #include in ShObj.h
+ public struct SHDRAGIMAGE
+ {
+ SIZE sizeDragImage; // OUT - The length and Width of the rendered image
+ POINT ptOffset; // OUT - The Offset from the mouse cursor to the upper left corner of the image
+ IntPtr hbmpDragImage; // OUT - The Bitmap containing the rendered drag images
+ uint crColorKey; // OUT - The COLORREF that has been blitted to the background of the images
+ } ;
-
-
- ///
- /// Structure used to define a drag image
- ///
- [StructLayout(LayoutKind.Sequential, Pack=8)] // corresponds to #include in ShObj.h
- public struct SHDRAGIMAGE
- {
- SIZE sizeDragImage; // OUT - The length and Width of the rendered image
- POINT ptOffset; // OUT - The Offset from the mouse cursor to the upper left corner of the image
- IntPtr hbmpDragImage; // OUT - The Bitmap containing the rendered drag images
- uint crColorKey; // OUT - The COLORREF that has been blitted to the background of the images
- } ;
-
-
- ///
- /// Drag Image related window messages
- ///
- public struct DI
- {
- ///
- /// This is sent to a window to get the rendered images to a bitmap (used
- /// with IDragSourceHelper.InitializeFromWindow). Call RegisterWindowMessage
- /// to get the ID
- ///
- public const string GETDRAGIMAGE = "ShellGetDragImage" ;
- }
+ ///
+ /// Drag Image related window messages
+ ///
+ public struct DI
+ {
+ ///
+ /// This is sent to a window to get the rendered images to a bitmap (used
+ /// with IDragSourceHelper.InitializeFromWindow). Call RegisterWindowMessage
+ /// to get the ID
+ ///
+ public const string GETDRAGIMAGE = "ShellGetDragImage" ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.Interop/Com/IDeskBand.cs b/src/managed/OpenLiveWriter.Interop/Com/IDeskBand.cs
index 0abee22a..8ee36a07 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/IDeskBand.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/IDeskBand.cs
@@ -113,7 +113,6 @@ namespace OpenLiveWriter.Interop.Com
public Int32 crBkgnd;
};
-
///
/// Mask which determines which DESKBANDINFO fields are being requested
///
@@ -183,7 +182,6 @@ namespace OpenLiveWriter.Interop.Com
TRANSPARENT = 0x0004
}
-
///
/// Mode of operation for a band object
///
diff --git a/src/managed/OpenLiveWriter.Interop/Com/IEnumFORMATETC.cs b/src/managed/OpenLiveWriter.Interop/Com/IEnumFORMATETC.cs
index 806601cb..f97e5e1d 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/IEnumFORMATETC.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/IEnumFORMATETC.cs
@@ -20,12 +20,12 @@ namespace OpenLiveWriter.Interop.Com
IntPtr pceltFetched);
/*
- [PreserveSig]
- int Next(
- uint celt,
- IntPtr rgelt,
- IntPtr pceltFetched);
- */
+ [PreserveSig]
+ int Next(
+ uint celt,
+ IntPtr rgelt,
+ IntPtr pceltFetched);
+ */
[PreserveSig]
int Skip(uint celt);
@@ -37,4 +37,3 @@ namespace OpenLiveWriter.Interop.Com
}
-
diff --git a/src/managed/OpenLiveWriter.Interop/Com/IExtractImage.cs b/src/managed/OpenLiveWriter.Interop/Com/IExtractImage.cs
index 5edfb484..1bbdd848 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/IExtractImage.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/IExtractImage.cs
@@ -44,4 +44,3 @@ namespace OpenLiveWriter.Interop.Com
}
-
diff --git a/src/managed/OpenLiveWriter.Interop/Com/IInternetProtocol.cs b/src/managed/OpenLiveWriter.Interop/Com/IInternetProtocol.cs
index 6a19d374..00aa0ff0 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/IInternetProtocol.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/IInternetProtocol.cs
@@ -223,7 +223,6 @@ namespace OpenLiveWriter.Interop.Com
void UnlockRequest();
}
-
///
/// This interface receives the reports and binding data from the asynchronous
/// pluggable protocol. It is a free-threaded interface and can be called from
@@ -284,7 +283,6 @@ namespace OpenLiveWriter.Interop.Com
[In, MarshalAs(UnmanagedType.LPWStr)] string szStatusText);
}
-
///
/// This interface is implemented by the system and provides data that the protocol
/// might need to bind successfully.
@@ -417,7 +415,6 @@ namespace OpenLiveWriter.Interop.Com
[In] uint dwReserved);
}
-
///
/// Contains state information about the protocol that is transparent to the
/// transaction handler.
@@ -445,7 +442,6 @@ namespace OpenLiveWriter.Interop.Com
public uint cbData;
}
-
///
/// Contains additional information on the requested binding operation. The
/// meaning of this structure is specific to the type of asynchronous moniker.
@@ -553,7 +549,6 @@ namespace OpenLiveWriter.Interop.Com
public uint dwReserved;
}
-
///
/// Contains values that determine the use of URL encoding during the binding
/// operation.
@@ -573,7 +568,6 @@ namespace OpenLiveWriter.Interop.Com
URLENCODEDEXTRAINFO = 0x00000002
};
-
///
/// Contains values that specify an action, such as an HTTP request, to be
/// performed during the binding operation.
@@ -703,7 +697,6 @@ namespace OpenLiveWriter.Interop.Com
PTR_BIND_CONTEXT
}
-
///
/// Contains the flags that control the asynchronous pluggable protocol handler.
///
diff --git a/src/managed/OpenLiveWriter.Interop/Com/IOleCommandTarget.cs b/src/managed/OpenLiveWriter.Interop/Com/IOleCommandTarget.cs
index 865a3c6f..8438d754 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/IOleCommandTarget.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/IOleCommandTarget.cs
@@ -8,66 +8,65 @@ namespace OpenLiveWriter.Interop.Com
{
/*
- ///
- /// Generic COM/OLE command dispatching interface
- ///
- [ComImport]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [Guid("b722bccb-4e68-101b-a2bc-00aa00404770")]
- public interface IOleCommandTargetTest
- {
- ///
- /// Queries the object for the status of one or more commands generated by user
- /// interface events. Note that because we couldn't get COM interop to correctly
- /// marshall the array of OLECMDs, our declaration of this interface supports
- /// only querying for status on a single-command. This is not a problem as almost
- /// all instances where you would implement IOleCommandTarget are for a single
- /// command. Implementations should ASSERT that cCmds is 1
- ///
- /// Unique identifier of the command group; can be NULL to
- /// specify the standard group. All the commands that are passed in the prgCmds
- /// array must belong to the group specified by pguidCmdGroup
- /// The number of commands in the prgCmds array. For this
- /// interface declaration (which doesn't support arrays of OLECMD) this value
- /// MUST always be 1.
- /// Reference to the command that is being queried for
- /// its status -- this parameter should be filled in with the appropriate
- /// values.
- /// Pointer to an OLECMDTEXT structure in which to return
- /// name and/or status information of a single command. Can be NULL to indicate
- /// that the caller does not need this information. Note that because of
- /// marshalling issues w/ the OLECMDTEXT structure (can't figure out how to
- /// marshall it correctly) we required that this parameter be NULL (implementations
- /// should Assert on this). Note that IE currently passes NULL for this parameter
- /// for custom toolbar button implementations.
- void QueryStatus(
- IntPtr pguidCmdGroup,
- uint cCmds,
- IntPtr prgCmds,
- IntPtr pCmdText);
-
- ///
- /// Executes a specified command or displays help for a command
- ///
- /// Pointer to unique identifier of the command group; can be
- /// NULL to specify the standard group
- /// The command to be executed. This command must belong to the
- /// group specified with pguidCmdGroup
- /// Values taken from the OLECMDEXECOPT enumeration, which
- /// describe how the object should execute the command
- /// Pointer to a VARIANTARG structure containing input arguments.
- /// Can be NULL
- /// Pointer to a VARIANTARG structure to receive command output.
- /// Can be NULL.
- void Exec(
- IntPtr pguidCmdGroup,
- uint nCmdID,
- OLECMDEXECOPT nCmdexecopt,
- IntPtr pvaIn,
- IntPtr pvaOut ) ;
- }
- */
+ ///
+ /// Generic COM/OLE command dispatching interface
+ ///
+ [ComImport]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("b722bccb-4e68-101b-a2bc-00aa00404770")]
+ public interface IOleCommandTargetTest
+ {
+ ///
+ /// Queries the object for the status of one or more commands generated by user
+ /// interface events. Note that because we couldn't get COM interop to correctly
+ /// marshall the array of OLECMDs, our declaration of this interface supports
+ /// only querying for status on a single-command. This is not a problem as almost
+ /// all instances where you would implement IOleCommandTarget are for a single
+ /// command. Implementations should ASSERT that cCmds is 1
+ ///
+ /// Unique identifier of the command group; can be NULL to
+ /// specify the standard group. All the commands that are passed in the prgCmds
+ /// array must belong to the group specified by pguidCmdGroup
+ /// The number of commands in the prgCmds array. For this
+ /// interface declaration (which doesn't support arrays of OLECMD) this value
+ /// MUST always be 1.
+ /// Reference to the command that is being queried for
+ /// its status -- this parameter should be filled in with the appropriate
+ /// values.
+ /// Pointer to an OLECMDTEXT structure in which to return
+ /// name and/or status information of a single command. Can be NULL to indicate
+ /// that the caller does not need this information. Note that because of
+ /// marshalling issues w/ the OLECMDTEXT structure (can't figure out how to
+ /// marshall it correctly) we required that this parameter be NULL (implementations
+ /// should Assert on this). Note that IE currently passes NULL for this parameter
+ /// for custom toolbar button implementations.
+ void QueryStatus(
+ IntPtr pguidCmdGroup,
+ uint cCmds,
+ IntPtr prgCmds,
+ IntPtr pCmdText);
+ ///
+ /// Executes a specified command or displays help for a command
+ ///
+ /// Pointer to unique identifier of the command group; can be
+ /// NULL to specify the standard group
+ /// The command to be executed. This command must belong to the
+ /// group specified with pguidCmdGroup
+ /// Values taken from the OLECMDEXECOPT enumeration, which
+ /// describe how the object should execute the command
+ /// Pointer to a VARIANTARG structure containing input arguments.
+ /// Can be NULL
+ /// Pointer to a VARIANTARG structure to receive command output.
+ /// Can be NULL.
+ void Exec(
+ IntPtr pguidCmdGroup,
+ uint nCmdID,
+ OLECMDEXECOPT nCmdexecopt,
+ IntPtr pvaIn,
+ IntPtr pvaOut ) ;
+ }
+ */
///
/// Generic COM/OLE command dispatching interface
@@ -187,7 +186,6 @@ namespace OpenLiveWriter.Interop.Com
[In, Out] ref object pvaOut);
}
-
///
/// Generic COM/OLE command dispatching interface. This version of the declaration
/// allows for the passing of NULL for the input parmaeter and object for the
diff --git a/src/managed/OpenLiveWriter.Interop/Com/IOleDataObject.cs b/src/managed/OpenLiveWriter.Interop/Com/IOleDataObject.cs
index 9ad1474e..2360f932 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/IOleDataObject.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/IOleDataObject.cs
@@ -160,7 +160,6 @@ namespace OpenLiveWriter.Interop.Com
int EnumDAdvise(ref IntPtr ppEnumAdvise);
}
-
///
/// Clipboard format strings
///
@@ -174,7 +173,6 @@ namespace OpenLiveWriter.Interop.Com
public const short UNICODETEXT = 13;
}
-
///
/// EnumFormatEtc data-direction enumeration
///
@@ -195,7 +193,6 @@ namespace OpenLiveWriter.Interop.Com
public const int SAMEFORMATETC = unchecked((int)0x00040130L);
}
-
///
/// Error codes returned by IDataObject methods
///
@@ -214,7 +211,6 @@ namespace OpenLiveWriter.Interop.Com
public const int TYMED = unchecked((int)0x80040069);
}
-
///
/// The FORMATETC structure is a generalized Clipboard format. It is enhanced to
/// encompass a target device, the aspect or view of the data, and a storage
@@ -268,7 +264,6 @@ namespace OpenLiveWriter.Interop.Com
public TYMED tymed;
}
-
///
/// This structure is a generalized global memory handle used for data transfer
/// operations by the IAdviseSink, IDataObject, and IOleCache interfaces
diff --git a/src/managed/OpenLiveWriter.Interop/Com/IServiceProvider.cs b/src/managed/OpenLiveWriter.Interop/Com/IServiceProvider.cs
index d78f788e..bfd85d28 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/IServiceProvider.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/IServiceProvider.cs
@@ -28,7 +28,6 @@ namespace OpenLiveWriter.Interop.Com
[Out, MarshalAs(UnmanagedType.Interface)] out Object Obj);
}
-
///
/// Generic access mechanism to locate a GUID identified service.
///
diff --git a/src/managed/OpenLiveWriter.Interop/Com/StreamMarshaler.cs b/src/managed/OpenLiveWriter.Interop/Com/StreamMarshaler.cs
index 8887d2ac..04718e32 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/StreamMarshaler.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/StreamMarshaler.cs
@@ -68,7 +68,6 @@ namespace OpenLiveWriter.Interop.Com
return -1;
}
-
// Marshal Managed to Native
///
/// Marshals managed data to native
diff --git a/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/IStorage.cs b/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/IStorage.cs
index 1aee250f..239c5013 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/IStorage.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/IStorage.cs
@@ -46,7 +46,6 @@ namespace OpenLiveWriter.Interop.Com.StructuredStorage
out ComStream ppstm
);
-
///
/// Opens an existing stream object within this storage object in the specified access mode.
///
diff --git a/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/Storage.cs b/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/Storage.cs
index d817d8a2..8ed63ac1 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/Storage.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/Storage.cs
@@ -394,13 +394,13 @@ namespace OpenLiveWriter.Interop.Com.StructuredStorage
}
#if FALSE
- ///
- /// Storage finalizer
- ///
- ~Storage()
- {
- //Debug.Assert(storage == null, "Object not disposed properly - Use Close or Dispose!");
- }
+ ///
+ /// Storage finalizer
+ ///
+ ~Storage()
+ {
+ //Debug.Assert(storage == null, "Object not disposed properly - Use Close or Dispose!");
+ }
#endif
///
@@ -674,7 +674,6 @@ namespace OpenLiveWriter.Interop.Com.StructuredStorage
}
}
-
///
/// The storage's IStorage
///
@@ -779,11 +778,9 @@ namespace OpenLiveWriter.Interop.Com.StructuredStorage
return true;
}
-
private IStorage storage;
}
-
///
/// The IStorageOpener for compound files
///
@@ -899,7 +896,6 @@ namespace OpenLiveWriter.Interop.Com.StructuredStorage
}
}
-
///
/// The StorageModes used when getting Storage and streams.
///
diff --git a/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/StorageErrors.cs b/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/StorageErrors.cs
index 2bca0cda..772b2e5e 100644
--- a/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/StorageErrors.cs
+++ b/src/managed/OpenLiveWriter.Interop/Com/StructuredStorage/StorageErrors.cs
@@ -364,10 +364,10 @@ namespace OpenLiveWriter.Interop.Com.StructuredStorage
/*++
- MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE**
- copy protection errors.
+ MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE**
+ copy protection errors.
- --*/
+ --*/
//
// MessageId: STG_E_STATUS_COPY_PROTECTION_FAILURE
//
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Advapi32.cs b/src/managed/OpenLiveWriter.Interop/Windows/Advapi32.cs
index 4e0a25fa..a8a4338f 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Advapi32.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Advapi32.cs
@@ -24,7 +24,6 @@ namespace OpenLiveWriter.Interop.Windows
UIntPtr hKey
);
-
[DllImport("Advapi32.dll", SetLastError = true)]
public static extern int RegNotifyChangeKeyValue(
UIntPtr hKey,
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Crypt32.cs b/src/managed/OpenLiveWriter.Interop/Windows/Crypt32.cs
index 3a525a68..eb29b276 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Crypt32.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Crypt32.cs
@@ -139,7 +139,6 @@ namespace OpenLiveWriter.Interop.Windows
}
}
-
[DllImport("Crypt32.dll", SetLastError = true)]
public static extern bool CryptProtectData(
ref DATA_BLOB pDataIn,
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Kernel32.cs b/src/managed/OpenLiveWriter.Interop/Windows/Kernel32.cs
index 1ce656ed..83f69cc6 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Kernel32.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Kernel32.cs
@@ -67,7 +67,6 @@ namespace OpenLiveWriter.Interop.Windows
int dwMaximumWorkingSetSize
);
-
[DllImport("kernel32.dll")]
public static extern bool Beep(int frequency, int duration);
@@ -206,7 +205,6 @@ namespace OpenLiveWriter.Interop.Windows
IntPtr lpExclude,
IntPtr lpReserved);
-
///
/// Get an error code for the last error on this thread.
/// IntPtr can be converted to a 32 bit Int.
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Mapi32.cs b/src/managed/OpenLiveWriter.Interop/Windows/Mapi32.cs
index 61a753d9..9201143f 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Mapi32.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Mapi32.cs
@@ -6,176 +6,175 @@ using System.Runtime.InteropServices;
namespace OpenLiveWriter.Interop.Windows
{
- ///
- /// Summary description for Mapi32.
- ///
- public class Mapi32
- {
- // Mapi functions, structures, and constants (based on declarations found
- // in Microsoft Knowledge Base Article Q315653, SAMPLE: SimpleMAPIAssembly
- // Demonstrates Use of Simple MAPI from a .NET Application at:
- // http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q315653
+ ///
+ /// Summary description for Mapi32.
+ ///
+ public class Mapi32
+ {
+ // Mapi functions, structures, and constants (based on declarations found
+ // in Microsoft Knowledge Base Article Q315653, SAMPLE: SimpleMAPIAssembly
+ // Demonstrates Use of Simple MAPI from a .NET Application at:
+ // http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q315653
- ///
- /// DLL to load MAPI entry points from
- ///
- private const string MAPIDLL = "mapi32.dll";
+ ///
+ /// DLL to load MAPI entry points from
+ ///
+ private const string MAPIDLL = "mapi32.dll";
- ///
- /// Begins a Simple MAPI session, loading the default message store provider
- ///
- [DllImport(MAPIDLL, CharSet=CharSet.Ansi)]
- public static extern int MAPILogon(
- int ulUIParam,
- string lpszProfileName,
- string lpszPassword,
- int flFlags,
- int ulReserved,
- out int lplhSession);
+ ///
+ /// Begins a Simple MAPI session, loading the default message store provider
+ ///
+ [DllImport(MAPIDLL, CharSet=CharSet.Ansi)]
+ public static extern int MAPILogon(
+ int ulUIParam,
+ string lpszProfileName,
+ string lpszPassword,
+ int flFlags,
+ int ulReserved,
+ out int lplhSession);
- ///
- /// Ends a session with the messaging system.
- ///
- [DllImport(MAPIDLL, CharSet=CharSet.Ansi)]
- public static extern int MAPILogoff(
- int lhSession,
- int ulUIParam,
- int flFlags,
- int ulReserved);
+ ///
+ /// Ends a session with the messaging system.
+ ///
+ [DllImport(MAPIDLL, CharSet=CharSet.Ansi)]
+ public static extern int MAPILogoff(
+ int lhSession,
+ int ulUIParam,
+ int flFlags,
+ int ulReserved);
- ///
- /// Sends a message using the messaging system.
- ///
- [DllImport(MAPIDLL, CharSet=CharSet.Ansi)]
- public static extern int MAPISendMail(
- int lhSession,
- int ulUIParam,
- IntPtr /*MapiMessage*/ lpMessage,
- int flFlags,
- int ulReserved);
+ ///
+ /// Sends a message using the messaging system.
+ ///
+ [DllImport(MAPIDLL, CharSet=CharSet.Ansi)]
+ public static extern int MAPISendMail(
+ int lhSession,
+ int ulUIParam,
+ IntPtr /*MapiMessage*/ lpMessage,
+ int flFlags,
+ int ulReserved);
- }
+ }
- ///
- /// Structure that contains information about a MAPI mail messsage
- ///
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct MapiMessage
- {
- public int ulReserved;
- public String lpszSubject;
- public String lpszNoteText;
- public String lpszMessageType;
- public String lpszDateReceived;
- public String lpszConversationID;
- public int flFlags;
- public IntPtr lpOriginator;
- public int nRecipCount;
- public IntPtr lpRecips;
- public int nFileCount;
- public IntPtr /*MapiFileDesc[]*/ lpFiles;
- };
+ ///
+ /// Structure that contains information about a MAPI mail messsage
+ ///
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct MapiMessage
+ {
+ public int ulReserved;
+ public String lpszSubject;
+ public String lpszNoteText;
+ public String lpszMessageType;
+ public String lpszDateReceived;
+ public String lpszConversationID;
+ public int flFlags;
+ public IntPtr lpOriginator;
+ public int nRecipCount;
+ public IntPtr lpRecips;
+ public int nFileCount;
+ public IntPtr /*MapiFileDesc[]*/ lpFiles;
+ };
- ///
- /// Structure that contains the MAPI recipient descriptor
- ///
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct MapiRecipDesc
- {
- public int ulReserved;
- public int ulReciptClass;
- public String lpszName;
- public String lpszAddress;
- public int ulEIDSize;
- public IntPtr lpEntryID;
- }
+ ///
+ /// Structure that contains the MAPI recipient descriptor
+ ///
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct MapiRecipDesc
+ {
+ public int ulReserved;
+ public int ulReciptClass;
+ public String lpszName;
+ public String lpszAddress;
+ public int ulEIDSize;
+ public IntPtr lpEntryID;
+ }
- ///
- /// Structure that contains MAPI file attachment descriptor
- ///
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct MapiFileDesc
- {
- public int ulReserved;
- public int flFlags;
- public int nPosition;
- public String lpszPathName;
- public String lpszFileName;
- public IntPtr /*MapiFileTagExt*/ lpFileType;
- };
+ ///
+ /// Structure that contains MAPI file attachment descriptor
+ ///
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct MapiFileDesc
+ {
+ public int ulReserved;
+ public int flFlags;
+ public int nPosition;
+ public String lpszPathName;
+ public String lpszFileName;
+ public IntPtr /*MapiFileTagExt*/ lpFileType;
+ };
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct MapiFileTagExt
- {
- public int Reserved; /* Reserved, must be zero. */
- public int cbTag; /* Size (in bytes) of */
- public String szTag; /* X.400 OID for this attachment type */
- public int cbEncoding; /* Size (in bytes) of */
- public String szEncoding; /* X.400 OID for this attachment's encoding */
- };
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct MapiFileTagExt
+ {
+ public int Reserved; /* Reserved, must be zero. */
+ public int cbTag; /* Size (in bytes) of */
+ public String szTag; /* X.400 OID for this attachment type */
+ public int cbEncoding; /* Size (in bytes) of */
+ public String szEncoding; /* X.400 OID for this attachment's encoding */
+ };
- ///
- /// Structure containing MAPI error constants
- ///
- public struct MAPI
- {
- public const int SUCCESS_SUCCESS = 0;
+ ///
+ /// Structure containing MAPI error constants
+ ///
+ public struct MAPI
+ {
+ public const int SUCCESS_SUCCESS = 0;
- public const int E_USER_ABORT = 1;
- public const int E_FAILURE = 2;
- public const int E_LOGIN_FAILURE = 3;
- public const int E_DISK_FULL = 4;
- public const int E_INSUFFICIENT_MEMORY = 5;
- public const int E_BLK_TOO_SMALL = 6;
- public const int E_TOO_MANY_SESSIONS = 8;
- public const int E_TOO_MANY_FILES = 9;
- public const int E_TOO_MANY_RECIPIENTS = 10;
- public const int E_ATTACHMENT_NOT_FOUND = 11;
- public const int E_ATTACHMENT_OPEN_FAILURE = 12;
- public const int E_ATTACHMENT_WRITE_FAILURE = 13;
- public const int E_UNKNOWN_RECIPIENT = 14;
- public const int E_BAD_RECIPTYPE = 15;
- public const int E_NO_MESSAGES = 16;
- public const int E_INVALID_MESSAGE = 17;
- public const int E_TEXT_TOO_LARGE = 18;
- public const int E_INVALID_SESSION = 19;
- public const int E_TYPE_NOT_SUPPORTED = 20;
- public const int E_AMBIGUOUS_RECIPIENT = 21;
- public const int E_MESSAGE_IN_USE = 22;
- public const int E_NETWORK_FAILURE = 23;
- public const int E_INVALID_EDITFIELDS = 24;
- public const int E_INVALID_RECIPS = 25;
- public const int E_NOT_SUPPORTED = 26;
- public const int E_NO_LIBRARY = 999;
- public const int E_INVALID_PARAMETER = 998;
+ public const int E_USER_ABORT = 1;
+ public const int E_FAILURE = 2;
+ public const int E_LOGIN_FAILURE = 3;
+ public const int E_DISK_FULL = 4;
+ public const int E_INSUFFICIENT_MEMORY = 5;
+ public const int E_BLK_TOO_SMALL = 6;
+ public const int E_TOO_MANY_SESSIONS = 8;
+ public const int E_TOO_MANY_FILES = 9;
+ public const int E_TOO_MANY_RECIPIENTS = 10;
+ public const int E_ATTACHMENT_NOT_FOUND = 11;
+ public const int E_ATTACHMENT_OPEN_FAILURE = 12;
+ public const int E_ATTACHMENT_WRITE_FAILURE = 13;
+ public const int E_UNKNOWN_RECIPIENT = 14;
+ public const int E_BAD_RECIPTYPE = 15;
+ public const int E_NO_MESSAGES = 16;
+ public const int E_INVALID_MESSAGE = 17;
+ public const int E_TEXT_TOO_LARGE = 18;
+ public const int E_INVALID_SESSION = 19;
+ public const int E_TYPE_NOT_SUPPORTED = 20;
+ public const int E_AMBIGUOUS_RECIPIENT = 21;
+ public const int E_MESSAGE_IN_USE = 22;
+ public const int E_NETWORK_FAILURE = 23;
+ public const int E_INVALID_EDITFIELDS = 24;
+ public const int E_INVALID_RECIPS = 25;
+ public const int E_NOT_SUPPORTED = 26;
+ public const int E_NO_LIBRARY = 999;
+ public const int E_INVALID_PARAMETER = 998;
- public const int ORIG = 0;
- public const int TO = 1;
- public const int CC = 2;
- public const int BCC = 3;
+ public const int ORIG = 0;
+ public const int TO = 1;
+ public const int CC = 2;
+ public const int BCC = 3;
+ public const int UNREAD = 1;
+ public const int RECEIPT_REQUESTED = 2;
+ public const int SENT = 4;
- public const int UNREAD = 1;
- public const int RECEIPT_REQUESTED = 2;
- public const int SENT = 4;
+ public const int LOGON_UI = 0x1;
+ public const int NEW_SESSION = 0x2;
+ public const int DIALOG = 0x8;
- public const int LOGON_UI = 0x1;
- public const int NEW_SESSION = 0x2;
- public const int DIALOG = 0x8;
+ public const int UNREAD_ONLY = 0x20;
+ public const int EXTENDED = 0x20;
+ public const int ENVELOPE_ONLY = 0x40;
+ public const int PEEK = 0x80;
+ public const int GUARANTEE_FIFO = 0x100;
+ public const int BODY_AS_FILE = 0x200;
+ public const int AB_NOMODIFY = 0x400;
+ public const int SUPPRESS_ATTACH = 0x800;
+ public const int FORCE_DOWNLOAD = 0x1000;
+ public const int LONG_MSGID = 0x4000;
+ public const int PASSWORD_UI = 0x20000;
- public const int UNREAD_ONLY = 0x20;
- public const int EXTENDED = 0x20;
- public const int ENVELOPE_ONLY = 0x40;
- public const int PEEK = 0x80;
- public const int GUARANTEE_FIFO = 0x100;
- public const int BODY_AS_FILE = 0x200;
- public const int AB_NOMODIFY = 0x400;
- public const int SUPPRESS_ATTACH = 0x800;
- public const int FORCE_DOWNLOAD = 0x1000;
- public const int LONG_MSGID = 0x4000;
- public const int PASSWORD_UI = 0x20000;
-
- public const int OLE = 0x1;
- public const int OLE_STATIC = 0x2;
- }
+ public const int OLE = 0x1;
+ public const int OLE_STATIC = 0x2;
+ }
}
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Mpr.cs b/src/managed/OpenLiveWriter.Interop/Windows/Mpr.cs
index f42e6f54..b25cdbf3 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Mpr.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Mpr.cs
@@ -7,82 +7,82 @@ using System.Runtime.InteropServices;
namespace OpenLiveWriter.Interop.Windows
{
- public class Mpr
- {
- public const int UNIVERSAL_NAME_INFO_LEVEL = 0x00000001;
+ public class Mpr
+ {
+ public const int UNIVERSAL_NAME_INFO_LEVEL = 0x00000001;
- [DllImport("mpr.dll", CharSet=CharSet.Auto)]
- public static extern int WNetGetUniversalName(
- [In, MarshalAs(UnmanagedType.LPTStr)] string lpLocalPath,
- [In] int dwInfoLevel,
- [In] IntPtr buffer,
- [In, Out] ref int bufferSize);
+ [DllImport("mpr.dll", CharSet=CharSet.Auto)]
+ public static extern int WNetGetUniversalName(
+ [In, MarshalAs(UnmanagedType.LPTStr)] string lpLocalPath,
+ [In] int dwInfoLevel,
+ [In] IntPtr buffer,
+ [In, Out] ref int bufferSize);
- public struct UNIVERSAL_NAME_INFO
- {
- [MarshalAs(UnmanagedType.LPTStr)] public string lpUniversalName;
- }
+ public struct UNIVERSAL_NAME_INFO
+ {
+ [MarshalAs(UnmanagedType.LPTStr)] public string lpUniversalName;
+ }
- ///
- /// Get the UNC path of a file/dir on a locally mounted network share.
- /// Returns null if the path cannot be mapped to UNC for any reason.
- ///
- public static string GetUniversalName(string path)
- {
- return GetUniversalName(path, 100);
- }
+ ///
+ /// Get the UNC path of a file/dir on a locally mounted network share.
+ /// Returns null if the path cannot be mapped to UNC for any reason.
+ ///
+ public static string GetUniversalName(string path)
+ {
+ return GetUniversalName(path, 100);
+ }
- protected static string GetUniversalName(string path, int bufferSize)
- {
- IntPtr buffer = IntPtr.Zero ;
- try
- {
- buffer = Marshal.AllocHGlobal(bufferSize) ;
+ protected static string GetUniversalName(string path, int bufferSize)
+ {
+ IntPtr buffer = IntPtr.Zero ;
+ try
+ {
+ buffer = Marshal.AllocHGlobal(bufferSize) ;
- int oldBufferSize = bufferSize;
+ int oldBufferSize = bufferSize;
- int errorCode =
- WNetGetUniversalName(path, UNIVERSAL_NAME_INFO_LEVEL, buffer, ref bufferSize);
+ int errorCode =
+ WNetGetUniversalName(path, UNIVERSAL_NAME_INFO_LEVEL, buffer, ref bufferSize);
- if (errorCode == ERROR.SUCCESS)
- {
- // all clear
- UNIVERSAL_NAME_INFO uni =
- (UNIVERSAL_NAME_INFO) Marshal.PtrToStructure( buffer, typeof(UNIVERSAL_NAME_INFO) ) ;
+ if (errorCode == ERROR.SUCCESS)
+ {
+ // all clear
+ UNIVERSAL_NAME_INFO uni =
+ (UNIVERSAL_NAME_INFO) Marshal.PtrToStructure( buffer, typeof(UNIVERSAL_NAME_INFO) ) ;
- return uni.lpUniversalName ;
- }
- else if (errorCode == ERROR.MORE_DATA)
- {
- Debug.Assert( bufferSize > oldBufferSize ) ;
+ return uni.lpUniversalName ;
+ }
+ else if (errorCode == ERROR.MORE_DATA)
+ {
+ Debug.Assert( bufferSize > oldBufferSize ) ;
- // more data avilable....
- return GetUniversalName(path,bufferSize);
- }
- else
- {
- // error occurred... probably invalid path or device went away
+ // more data avilable....
+ return GetUniversalName(path,bufferSize);
+ }
+ else
+ {
+ // error occurred... probably invalid path or device went away
- // Call Debug.Fail on unexpected errors
- switch (errorCode)
- {
- // these two errors are expected
- case ERROR.BAD_DEVICE:
- case ERROR.NOT_CONNECTED:
- break;
- default:
- Debug.WriteLine("Encountered error " + errorCode + " while trying to get universal name for " + path);
- break;
- }
+ // Call Debug.Fail on unexpected errors
+ switch (errorCode)
+ {
+ // these two errors are expected
+ case ERROR.BAD_DEVICE:
+ case ERROR.NOT_CONNECTED:
+ break;
+ default:
+ Debug.WriteLine("Encountered error " + errorCode + " while trying to get universal name for " + path);
+ break;
+ }
- return null;
- }
- }
- finally
- {
- if (buffer != IntPtr.Zero)
- Marshal.FreeHGlobal(buffer);
- }
- }
- }
+ return null;
+ }
+ }
+ finally
+ {
+ if (buffer != IntPtr.Zero)
+ Marshal.FreeHGlobal(buffer);
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Psapi.cs b/src/managed/OpenLiveWriter.Interop/Windows/Psapi.cs
index 98705320..eadf0784 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Psapi.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Psapi.cs
@@ -23,7 +23,6 @@ namespace OpenLiveWriter.Interop.Windows
uint nSize
);
-
[DllImport("psapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool EnumProcessModules(
IntPtr hProcess,
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Shell32.cs b/src/managed/OpenLiveWriter.Interop/Windows/Shell32.cs
index f6aab3ae..0bec8455 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Shell32.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Shell32.cs
@@ -102,7 +102,6 @@ namespace OpenLiveWriter.Interop.Windows
public static extern void GetCurrentProcessExplicitAppUserModelID(
[Out(), MarshalAs(UnmanagedType.LPWStr)] out string AppID);
-
[DllImport("shell32.dll")]
public static extern int SHGetPropertyStoreForWindow(
IntPtr hwnd,
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/Shlwapi.cs b/src/managed/OpenLiveWriter.Interop/Windows/Shlwapi.cs
index 6cc2a304..a651d441 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/Shlwapi.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/Shlwapi.cs
@@ -85,7 +85,6 @@ namespace OpenLiveWriter.Interop.Windows
[In] uint dwReserved);
-
///
/// Searches for and retrieves a file association-related string from the registry.
///
@@ -226,5 +225,4 @@ namespace OpenLiveWriter.Interop.Windows
public const uint AUTOAPPEND_FORCE_OFF = 0x80000000; // Ignore the registry default and force the feature off. (Also know as AutoComplete)
}
-
}
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/User32.cs b/src/managed/OpenLiveWriter.Interop/Windows/User32.cs
index e18e92bc..f20cac83 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/User32.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/User32.cs
@@ -102,7 +102,6 @@ namespace OpenLiveWriter.Interop.Windows
bool bErase // erase state
);
-
[DllImport("User32.dll")]
public static extern bool UpdateWindow(
IntPtr hWnd // handle to window
@@ -132,7 +131,6 @@ namespace OpenLiveWriter.Interop.Windows
[DllImport("User32.dll")]
public static extern bool IsWindowVisible(IntPtr hWnd);
-
[DllImport("User32.dll", CharSet = CharSet.Auto)]
public static extern bool SetWindowText(
IntPtr hWnd,
@@ -310,7 +308,6 @@ namespace OpenLiveWriter.Interop.Windows
[DllImport("user32.dll", SetLastError = true)]
public static extern bool UnregisterHotKey(IntPtr hWnd, int id);
-
[DllImport("User32.dll")]
public static extern bool PeekMessage(out MSG lpMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax, uint wRemoveMsg);
@@ -418,7 +415,6 @@ namespace OpenLiveWriter.Interop.Windows
[DllImport("user32.dll")]
public static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable);
-
///
/// Registers a new clipboard format. This format can then be used as a valid
/// clipboard format. Return value is an integer id representing the format.
@@ -740,7 +736,6 @@ namespace OpenLiveWriter.Interop.Windows
///
public delegate IntPtr WndProcDelegate(IntPtr hWnd, uint uMsg, IntPtr wParam, IntPtr lParam);
-
public struct WINDOWPLACEMENT
{
public uint length;
@@ -778,7 +773,6 @@ namespace OpenLiveWriter.Interop.Windows
public const uint DISABLED = 0x00000002;
}
-
public struct PM
{
public const uint NOREMOVE = 0x0000;
@@ -979,7 +973,6 @@ namespace OpenLiveWriter.Interop.Windows
public const int HELP = 9;
}
-
public struct WPF
{
public const int RESTORETOMAXIMIZED = 0x0002;
@@ -1039,7 +1032,6 @@ namespace OpenLiveWriter.Interop.Windows
}
-
///
/// Window field offsets for GetWindowLong().
///
@@ -1335,7 +1327,6 @@ namespace OpenLiveWriter.Interop.Windows
public static readonly IntPtr MESSAGE = new IntPtr(-3);
}
-
///
/// Hook codes passed to HookDelegate
///
@@ -1675,5 +1666,4 @@ namespace OpenLiveWriter.Interop.Windows
public IntPtr ipFile;
};
-
}
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/WinInet.cs b/src/managed/OpenLiveWriter.Interop/Windows/WinInet.cs
index 56ceb86d..6b859cda 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/WinInet.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/WinInet.cs
@@ -523,7 +523,6 @@ namespace OpenLiveWriter.Interop.Windows
}
-
///
/// Enumeration of WinInet option flags
///
@@ -869,7 +868,6 @@ namespace OpenLiveWriter.Interop.Windows
public const int HTTP = 3;
}
-
///
/// Error codes that can be returned for WinInet Errors.
/// Use kernel32 GetLastError() to get the last error on the thread
diff --git a/src/managed/OpenLiveWriter.Interop/Windows/WinMm.cs b/src/managed/OpenLiveWriter.Interop/Windows/WinMm.cs
index 138743d6..d9aeff7e 100644
--- a/src/managed/OpenLiveWriter.Interop/Windows/WinMm.cs
+++ b/src/managed/OpenLiveWriter.Interop/Windows/WinMm.cs
@@ -5,46 +5,45 @@ using System.Runtime.InteropServices;
namespace OpenLiveWriter.Interop.Windows
{
- ///
- /// Summary description for WinMm.
- ///
- public class WinMm
- {
+ ///
+ /// Summary description for WinMm.
+ ///
+ public class WinMm
+ {
- public static void PlaySoundFile(string filePath)
- {
- PlaySound(filePath, 0, SND.ALIAS|SND.NOWAIT|SND.FILENAME);
- }
+ public static void PlaySoundFile(string filePath)
+ {
+ PlaySound(filePath, 0, SND.ALIAS|SND.NOWAIT|SND.FILENAME);
+ }
- public static void PlaySystemSound(string soundName)
- {
- PlaySound(soundName, 0, SND.ASYNC|SND.NOWAIT|SND.ALIAS);
- }
+ public static void PlaySystemSound(string soundName)
+ {
+ PlaySound(soundName, 0, SND.ASYNC|SND.NOWAIT|SND.ALIAS);
+ }
- [DllImport("WinMm.dll")]
- public static extern void PlaySound(
- string pszSound, uint hmod, uint fdwSound);
+ [DllImport("WinMm.dll")]
+ public static extern void PlaySound(
+ string pszSound, uint hmod, uint fdwSound);
+ ///
+ /// Enumeration of internet states
+ ///
+ public struct SND
+ {
+ public const uint SYNC = 0x0000; /* play synchronously (default) */
+ public const uint ASYNC = 0x0001; /* play asynchronously */
+ public const uint NODEFAULT = 0x0002; /* silence (!default) if sound not found */
+ public const uint MEMORY = 0x0004; /* pszSound points to a memory file */
+ public const uint LOOP = 0x0008; /* loop the sound until next sndPlaySound */
+ public const uint NOSTOP = 0x0010; /* don't stop any currently playing sound */
- ///
- /// Enumeration of internet states
- ///
- public struct SND
- {
- public const uint SYNC = 0x0000; /* play synchronously (default) */
- public const uint ASYNC = 0x0001; /* play asynchronously */
- public const uint NODEFAULT = 0x0002; /* silence (!default) if sound not found */
- public const uint MEMORY = 0x0004; /* pszSound points to a memory file */
- public const uint LOOP = 0x0008; /* loop the sound until next sndPlaySound */
- public const uint NOSTOP = 0x0010; /* don't stop any currently playing sound */
-
- public const uint NOWAIT = 0x00002000; /* don't wait if the driver is busy */
- public const uint ALIAS = 0x00010000; /* name is a registry alias */
- public const uint ALIAS_ID = 0x00110000; /* alias is a predefined ID */
- public const uint FILENAME = 0x00020000; /* name is file name */
- public const uint RESOURCE = 0x00040004; /* name is resource name or atom */
- public const uint PURGE = 0x0040; /* purge non-static events for task */
- public const uint APPLICATION = 0x0080; /* look for application specific association */
- }
- }
+ public const uint NOWAIT = 0x00002000; /* don't wait if the driver is busy */
+ public const uint ALIAS = 0x00010000; /* name is a registry alias */
+ public const uint ALIAS_ID = 0x00110000; /* alias is a predefined ID */
+ public const uint FILENAME = 0x00020000; /* name is file name */
+ public const uint RESOURCE = 0x00040004; /* name is resource name or atom */
+ public const uint PURGE = 0x0040; /* purge non-static events for task */
+ public const uint APPLICATION = 0x0080; /* look for application specific association */
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.Localization/Bidi/BidiHelper.cs b/src/managed/OpenLiveWriter.Localization/Bidi/BidiHelper.cs
index 9d178519..ecea1080 100644
--- a/src/managed/OpenLiveWriter.Localization/Bidi/BidiHelper.cs
+++ b/src/managed/OpenLiveWriter.Localization/Bidi/BidiHelper.cs
@@ -172,7 +172,6 @@ namespace OpenLiveWriter.Localization.Bidi
return mirrored;
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.Localization/CultureHelper.cs b/src/managed/OpenLiveWriter.Localization/CultureHelper.cs
index a08c3a2a..ef909e15 100644
--- a/src/managed/OpenLiveWriter.Localization/CultureHelper.cs
+++ b/src/managed/OpenLiveWriter.Localization/CultureHelper.cs
@@ -28,7 +28,7 @@ namespace OpenLiveWriter.Localization
/// Applies the given culture name to the current thread.
///
///
- public static void ApplyUICulture(string cultureName)
+ public static void ApplyUICulture(string cultureName)
{
if (cultureName == null)
{
diff --git a/src/managed/OpenLiveWriter.Mshtml/MarkupPointer.cs b/src/managed/OpenLiveWriter.Mshtml/MarkupPointer.cs
index 48f4e1ec..e52e4c58 100644
--- a/src/managed/OpenLiveWriter.Mshtml/MarkupPointer.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/MarkupPointer.cs
@@ -276,7 +276,6 @@ namespace OpenLiveWriter.Mshtml
PointerRaw.Left(move, out context.Context, out context.Element, IntPtr.Zero, IntPtr.Zero);
}
-
public IHTMLElement SeekElementLeft(IHTMLElementFilter filter)
{
return SeekElementLeft(filter, null);
@@ -330,7 +329,6 @@ namespace OpenLiveWriter.Mshtml
}
-
///
/// Moves the pointer adjacent to an element.
///
diff --git a/src/managed/OpenLiveWriter.Mshtml/MshtmlCommands.cs b/src/managed/OpenLiveWriter.Mshtml/MshtmlCommands.cs
index f35e6c1a..7748a4ef 100644
--- a/src/managed/OpenLiveWriter.Mshtml/MshtmlCommands.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/MshtmlCommands.cs
@@ -58,7 +58,6 @@ namespace OpenLiveWriter.Mshtml
/// output parameter
void Execute(OLECMDEXECOPT execOption, object input, ref object output);
-
///
/// Get the value of the command
///
@@ -66,7 +65,6 @@ namespace OpenLiveWriter.Mshtml
object GetValue();
}
-
///
/// Core command set exposed by MSHTML
///
@@ -195,7 +193,6 @@ namespace OpenLiveWriter.Mshtml
private IOleCommandTargetWithExecParams commandTarget;
}
-
///
/// Class which implements access to an MSHTML command that is defined as
/// part of the core command set
@@ -260,7 +257,6 @@ namespace OpenLiveWriter.Mshtml
}
}
-
///
/// Execute the command without parameters
///
@@ -325,7 +321,6 @@ namespace OpenLiveWriter.Mshtml
}
-
///
/// Get the value of the command
///
@@ -373,7 +368,6 @@ namespace OpenLiveWriter.Mshtml
}
-
///
/// Constant representing the Guid of the MSHTML core command set
///
diff --git a/src/managed/OpenLiveWriter.Mshtml/MshtmlControl.cs b/src/managed/OpenLiveWriter.Mshtml/MshtmlControl.cs
index e1e178b6..1364af0d 100644
--- a/src/managed/OpenLiveWriter.Mshtml/MshtmlControl.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/MshtmlControl.cs
@@ -164,7 +164,6 @@ namespace OpenLiveWriter.Mshtml
_editMode = editMode;
}
-
///
/// Load the contents of the Mshtml control from a URL
///
@@ -303,7 +302,6 @@ namespace OpenLiveWriter.Mshtml
}
bool _editMode = false;
-
///
/// Get or set the HTML text contents of the control
///
@@ -582,10 +580,8 @@ namespace OpenLiveWriter.Mshtml
#endregion
-
#region Command Execution
-
///
/// Execute an MSHTML command
///
@@ -625,10 +621,8 @@ namespace OpenLiveWriter.Mshtml
}
}
-
#endregion
-
#region Helpers for Initialization and Release of MSHTML
///
@@ -1176,7 +1170,6 @@ namespace OpenLiveWriter.Mshtml
ComHelper.Return(HRESULT.E_NOTIMPL);
}
-
///
/// Sets and displays status text about the in-place object in the container's
/// frame window status line.
@@ -1542,7 +1535,6 @@ namespace OpenLiveWriter.Mshtml
}
-
///
/// Handle OnGotFocus so that when the parent UserControl receives
/// input focus via the keyboard we can forward the focus on to the
diff --git a/src/managed/OpenLiveWriter.Mshtml/MshtmlDocumentEvents.cs b/src/managed/OpenLiveWriter.Mshtml/MshtmlDocumentEvents.cs
index 824de48b..54fcc3e1 100644
--- a/src/managed/OpenLiveWriter.Mshtml/MshtmlDocumentEvents.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/MshtmlDocumentEvents.cs
@@ -243,7 +243,6 @@ namespace OpenLiveWriter.Mshtml
}
private event HtmlEventHandler DoubleClickEventHandler;
-
///
/// Event raised when the mouse is pressed down.
///
@@ -463,7 +462,6 @@ namespace OpenLiveWriter.Mshtml
LostFocusEventHandler(this, EventArgs.Empty);
}
-
/////////////////////////////////////////////////////////////////////////////////
// HTMLDocumentEvents2 no-op event handlers -- As we need to handle the various
// events we will fill in the implementations. NOTE that even though the MSDN
diff --git a/src/managed/OpenLiveWriter.Mshtml/MshtmlEditor.cs b/src/managed/OpenLiveWriter.Mshtml/MshtmlEditor.cs
index b8486fee..14ed4ba3 100644
--- a/src/managed/OpenLiveWriter.Mshtml/MshtmlEditor.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/MshtmlEditor.cs
@@ -154,7 +154,6 @@ namespace OpenLiveWriter.Mshtml
base.Dispose(disposing);
}
-
///
/// Watch for document being complete to do the remainder of our
/// initialization (some initialization can only be done once the
@@ -332,7 +331,6 @@ editingOption.Key, editingOption.Value, ex.ToString()));
IsDirty = false;
}
-
#endregion
#region Public Properties
@@ -946,7 +944,6 @@ editingOption.Key, editingOption.Value, ex.ToString()));
ppDispatch = IntPtr.Zero;
}
-
///
/// Delegate to DragAndDropManager for GetDropTarget
///
@@ -993,7 +990,6 @@ editingOption.Key, editingOption.Value, ex.ToString()));
return HRESULT.S_FALSE;
}
-
#endregion
#region Implementation of IHTMLEditDesigner
@@ -1058,7 +1054,6 @@ editingOption.Key, editingOption.Value, ex.ToString()));
return false;
}
-
///
/// Custom processing for keyboard input
///
diff --git a/src/managed/OpenLiveWriter.Mshtml/MshtmlElementBehavior.cs b/src/managed/OpenLiveWriter.Mshtml/MshtmlElementBehavior.cs
index f2bfdd70..0c3b4bef 100644
--- a/src/managed/OpenLiveWriter.Mshtml/MshtmlElementBehavior.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/MshtmlElementBehavior.cs
@@ -108,7 +108,7 @@ namespace OpenLiveWriter.Mshtml
/// that methods that may be called after a behavior has been detached (i.e. event handlers) check to make
/// sure the behavior is still attached and the associated HTMLElement is not null before executing.
///
- public bool Attached
+ public bool Attached
{
get
{
diff --git a/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/ICustomDoc.cs b/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/ICustomDoc.cs
index f39d2719..e3403f1f 100644
--- a/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/ICustomDoc.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/ICustomDoc.cs
@@ -18,4 +18,3 @@ namespace OpenLiveWriter.Mshtml
}
}
-
diff --git a/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IDocHostShowUIBaseImpl.cs b/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IDocHostShowUIBaseImpl.cs
index 2b9beae6..ffc0cce3 100644
--- a/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IDocHostShowUIBaseImpl.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IDocHostShowUIBaseImpl.cs
@@ -30,4 +30,3 @@ namespace OpenLiveWriter.Mshtml
}
-
diff --git a/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IInternetSecurityManager.cs b/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IInternetSecurityManager.cs
index 92b17918..4e0c5291 100644
--- a/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IInternetSecurityManager.cs
+++ b/src/managed/OpenLiveWriter.Mshtml/Mshtml_Interop/IInternetSecurityManager.cs
@@ -223,7 +223,7 @@ namespace OpenLiveWriter.Mshtml.Mshtml_Interop
#endregion
#if false
- MIDL_INTERFACE("79eac9ee-baf9-11ce-8c82-00aa004ba90b")
+ MIDL_INTERFACE("79eac9ee-baf9-11ce-8c82-00aa004ba90b")
IInternetSecurityManager : public IUnknown
{
public:
diff --git a/src/managed/OpenLiveWriter.PostEditor/AboutForm.cs b/src/managed/OpenLiveWriter.PostEditor/AboutForm.cs
index bec6f17d..403b3379 100644
--- a/src/managed/OpenLiveWriter.PostEditor/AboutForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/AboutForm.cs
@@ -39,8 +39,8 @@ namespace OpenLiveWriter.PostEditor
// Copyright notices are not to be localized.
string[] credits = {
- /* XmpMetadata.cs */ "Portions Copyright © 2011 Omar Shahine, licensed under Creative Commons Attribution 3.0 Unported License.",
- /* Brian Lambert */ "Portions Copyright © 2003 Brian Lambert, used with permission of the author under the MIT License.",
+ /* XmpMetadata.cs */ "Portions Copyright © 2011 Omar Shahine, licensed under Creative Commons Attribution 3.0 Unported License.",
+ /* Brian Lambert */ "Portions Copyright © 2003 Brian Lambert, used with permission of the author under the MIT License.",
};
public AboutForm()
@@ -116,7 +116,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/AfterPublishFileUploadFailedForm.cs b/src/managed/OpenLiveWriter.PostEditor/AfterPublishFileUploadFailedForm.cs
index 0e988ef7..4569ca18 100644
--- a/src/managed/OpenLiveWriter.PostEditor/AfterPublishFileUploadFailedForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/AfterPublishFileUploadFailedForm.cs
@@ -152,6 +152,5 @@ namespace OpenLiveWriter.PostEditor
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplacePreferences.cs b/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplacePreferences.cs
index 6715715e..69ca7113 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplacePreferences.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplacePreferences.cs
@@ -99,6 +99,5 @@ namespace OpenLiveWriter.PostEditor.Autoreplace
AutoreplaceSettings.EnableEmoticonsReplacement = EnableEmoticonsReplacement;
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplaceSettings.cs b/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplaceSettings.cs
index 913ba3d7..ba2fe325 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplaceSettings.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Autoreplace/AutoreplaceSettings.cs
@@ -155,7 +155,6 @@ namespace OpenLiveWriter.PostEditor.Autoreplace
private const string EMOTICONS = "Emoticons";
}
-
public class AutoreplacePhrase
{
public AutoreplacePhrase(string phrase, string replaceValue)
diff --git a/src/managed/OpenLiveWriter.PostEditor/BlogPostEditingManager.cs b/src/managed/OpenLiveWriter.PostEditor/BlogPostEditingManager.cs
index 9d18bb6f..a705b643 100644
--- a/src/managed/OpenLiveWriter.PostEditor/BlogPostEditingManager.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/BlogPostEditingManager.cs
@@ -692,7 +692,6 @@ namespace OpenLiveWriter.PostEditor
#region Private Helpers
-
private void DispatchEditPost(BlogPost blogPost)
{
DispatchEditPost(new BlogPostEditingContext(BlogId, blogPost), true);
@@ -1362,7 +1361,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
private bool ValidateSupportingFileUsage()
{
if (Blog.SupportsImageUpload == SupportsFeature.No)
diff --git a/src/managed/OpenLiveWriter.PostEditor/BlogPostExtensionDataList.cs b/src/managed/OpenLiveWriter.PostEditor/BlogPostExtensionDataList.cs
index 3e40ad3e..928bbbb4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/BlogPostExtensionDataList.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/BlogPostExtensionDataList.cs
@@ -114,13 +114,11 @@ namespace OpenLiveWriter.PostEditor
RemoveExtensionData(removeId);
}
-
public IExtensionData GetOrCreateExtensionData(string id)
{
return GetExtensionData(id) ?? CreateExtensionData(id);
}
-
public int Count
{
get
@@ -149,7 +147,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
public interface IExtensionData
{
BlogPostSettingsBag Settings { get; }
diff --git a/src/managed/OpenLiveWriter.PostEditor/BlogPostSupportingFileStorage.cs b/src/managed/OpenLiveWriter.PostEditor/BlogPostSupportingFileStorage.cs
index f2ac1547..909312e8 100644
--- a/src/managed/OpenLiveWriter.PostEditor/BlogPostSupportingFileStorage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/BlogPostSupportingFileStorage.cs
@@ -146,5 +146,4 @@ namespace OpenLiveWriter.PostEditor
private DirectoryInfo _storageDirectory;
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButton.cs b/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButton.cs
index a6c5aaa9..7a093faa 100644
--- a/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButton.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButton.cs
@@ -146,7 +146,6 @@ namespace OpenLiveWriter.PostEditor.BlogProviderButtons
_settingsKey.SetDateTime(NOTIFICATION_POLLING_TIME, DateTimeHelper.UtcNow);
}
-
public Size ContentDisplaySize
{
get
@@ -220,7 +219,6 @@ namespace OpenLiveWriter.PostEditor.BlogProviderButtons
}
}
-
private string NotificationUrl
{
get
diff --git a/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonCommandBar.cs b/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonCommandBar.cs
index 256fc8bf..fee3cbea 100644
--- a/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonCommandBar.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonCommandBar.cs
@@ -12,80 +12,79 @@ using OpenLiveWriter.ApplicationFramework.Skinning;
namespace OpenLiveWriter.PostEditor.BlogProviderButtons
{
- internal sealed class BlogProviderButtonCommandBarInfo
- {
- public const int MaximumProviderCommands = 4 ;
- public const string ProviderCommandFormat = "BlogProviderButtonsProviderCommand{0}" ;
- }
+ internal sealed class BlogProviderButtonCommandBarInfo
+ {
+ public const int MaximumProviderCommands = 4 ;
+ public const string ProviderCommandFormat = "BlogProviderButtonsProviderCommand{0}" ;
+ }
// @RIBBON TODO: Remove obsolete code
[Obsolete]
- internal class BlogProviderButtonCommandBarControl : TransparentCommandBarControl
- {
- public BlogProviderButtonCommandBarControl()
- : base( new BlogProviderButtonCommandBarLightweightControl(), CommandBarDefinition.Create(_providerCommandIds.ToArray()))
- {
- }
+ internal class BlogProviderButtonCommandBarControl : TransparentCommandBarControl
+ {
+ public BlogProviderButtonCommandBarControl()
+ : base( new BlogProviderButtonCommandBarLightweightControl(), CommandBarDefinition.Create(_providerCommandIds.ToArray()))
+ {
+ }
- protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs pevent)
- {
- base.OnPaintBackground (pevent);
+ protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs pevent)
+ {
+ base.OnPaintBackground (pevent);
- Graphics g = pevent.Graphics;
- g.ResetClip();
- g.ResetTransform();
+ Graphics g = pevent.Graphics;
+ g.ResetClip();
+ g.ResetTransform();
- if(!ColorizedResources.UseSystemColors)
- {
- using (Brush b = new SolidBrush(Color.FromArgb(64, Color.White)))
- g.FillRectangle(b, ClientRectangle);
- }
- }
+ if(!ColorizedResources.UseSystemColors)
+ {
+ using (Brush b = new SolidBrush(Color.FromArgb(64, Color.White)))
+ g.FillRectangle(b, ClientRectangle);
+ }
+ }
- public Size DesiredSize
- {
- get
- {
- return _commandBar.DefaultVirtualSize ;
- }
- }
+ public Size DesiredSize
+ {
+ get
+ {
+ return _commandBar.DefaultVirtualSize ;
+ }
+ }
- public bool HasButtons
- {
- get
- {
- Command firstButtonCommand = ApplicationManager.CommandManager.Get(String.Format(CultureInfo.InvariantCulture, BlogProviderButtonCommandBarInfo.ProviderCommandFormat, 0)) ;
- return firstButtonCommand.On ;
- }
- }
+ public bool HasButtons
+ {
+ get
+ {
+ Command firstButtonCommand = ApplicationManager.CommandManager.Get(String.Format(CultureInfo.InvariantCulture, BlogProviderButtonCommandBarInfo.ProviderCommandFormat, 0)) ;
+ return firstButtonCommand.On ;
+ }
+ }
+ static BlogProviderButtonCommandBarControl()
+ {
+ for (int i=0; i
///
- private void ConnectToBlog(Blog blog)
+ private void ConnectToBlog(Blog blog)
{
items.Clear();
UpdateInvalidationState(PropertyKeys.ItemsSource, InvalidationState.Pending);
@@ -251,7 +250,7 @@ namespace OpenLiveWriter.PostEditor.BlogProviderButtons
/// Must be called under the protection of _commandsLock.
///
///
- private void DisableCommand(Command command)
+ private void DisableCommand(Command command)
{
command.On = false;
if (command.Tag != null)
@@ -272,7 +271,7 @@ namespace OpenLiveWriter.PostEditor.BlogProviderButtons
/// Must be called under the protection _commandsLock.
///
///
- private void RemoveDropDownMenu(Command command)
+ private void RemoveDropDownMenu(Command command)
{
command.CommandBarButtonContextMenuHandler = null;
command.CommandBarButtonContextMenuDropDown = false;
diff --git a/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonNotificationSink.cs b/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonNotificationSink.cs
index ef02ba08..770e9c89 100644
--- a/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonNotificationSink.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/BlogProviderButtons/BlogProviderButtonNotificationSink.cs
@@ -188,7 +188,6 @@ namespace OpenLiveWriter.PostEditor.BlogProviderButtons
private static Hashtable _buttonNotificationListeners = new Hashtable();
-
private string _blogId;
private string _hostBlogId;
private string _homepageUrl;
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandAddWeblog.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandAddWeblog.cs
index 71659912..eb558054 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandAddWeblog.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandAddWeblog.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandAddWeblog : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandAddWeblog : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandAddWeblog(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandAddWeblog(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandAddWeblog()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandAddWeblog()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewWeblog
+ //
+ this.ContextMenuPath = "&Add Weblog Account...@2000";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.AddWeblog";
+ this.MainMenuPath = "&Weblog@7/-&Add Weblog Account...@2000";
+ this.MenuText = "&Add Weblog Account...";
+ this.Text = "Add Weblog Account...";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewWeblog
- //
- this.ContextMenuPath = "&Add Weblog Account...@2000";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.AddWeblog";
- this.MainMenuPath = "&Weblog@7/-&Add Weblog Account...@2000";
- this.MenuText = "&Add Weblog Account...";
- this.Text = "Add Weblog Account...";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandConfigureWeblog.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandConfigureWeblog.cs
index 7cf817e9..e1c4c83a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandConfigureWeblog.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandConfigureWeblog.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandConfigureWeblog : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandConfigureWeblog : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandConfigureWeblog(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandConfigureWeblog(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandConfigureWeblog()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandConfigureWeblog()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandConfigureWeblog
+ //
+ this.ContextMenuPath = "&Edit Weblog Settings...@52";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.ConfigureWeblog";
+ this.MainMenuPath = "&Weblog@7/-&Edit Weblog Settings...-@52";
+ this.MenuText = "&Edit Weblog Settings...";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandConfigureWeblog
- //
- this.ContextMenuPath = "&Edit Weblog Settings...@52";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.ConfigureWeblog";
- this.MainMenuPath = "&Weblog@7/-&Edit Weblog Settings...-@52";
- this.MenuText = "&Edit Weblog Settings...";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDeleteDraft.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDeleteDraft.cs
index f4e531f2..66bb9fd8 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDeleteDraft.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDeleteDraft.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandDeleteDraft : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandDeleteDraft : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandDeleteDraft(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteDraft(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandDeleteDraft()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteDraft()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandSavePost
+ //
+ this.CommandBarButtonText = "Delete Draft";
+ this.Identifier = "OpenLiveWriter.PostEditor.DeleteDraft";
+ this.MainMenuPath = "&File@0/-Dele&te Draft...@40";
+ this.Text = "Delete Local Draft";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandSavePost
- //
- this.CommandBarButtonText = "Delete Draft";
- this.Identifier = "OpenLiveWriter.PostEditor.DeleteDraft";
- this.MainMenuPath = "&File@0/-Dele&te Draft...@40";
- this.Text = "Delete Local Draft";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDiagnosticsConsole.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDiagnosticsConsole.cs
index 2ed6aaf3..0fe4a8ca 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDiagnosticsConsole.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandDiagnosticsConsole.cs
@@ -6,71 +6,71 @@ using System.ComponentModel;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandDiagnosticsConsole.
- ///
- public class CommandDiagnosticsConsole : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandDiagnosticsConsole.
+ ///
+ public class CommandDiagnosticsConsole : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandDiagnosticsConsole(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public CommandDiagnosticsConsole(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandDiagnosticsConsole()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDiagnosticsConsole()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandDiagnosticsConsole
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.DiagnosticsConsole";
- this.MenuText = "Show Diagnostics Console";
- this.Text = "Show Diagnostics Console";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandDiagnosticsConsole
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.DiagnosticsConsole";
+ this.MenuText = "Show Diagnostics Console";
+ this.Text = "Show Diagnostics Console";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandForceWatson.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandForceWatson.cs
index 4c30011a..3662de55 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandForceWatson.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandForceWatson.cs
@@ -6,71 +6,71 @@ using System.ComponentModel;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandForceWatson.
- ///
- public class CommandForceWatson : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandForceWatson.
+ ///
+ public class CommandForceWatson : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandForceWatson(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public CommandForceWatson(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandForceWatson()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandForceWatson()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandForceWatson
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.ForceWatson";
- this.MenuText = "Force Watson";
- this.Text = "Force Watson";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandForceWatson
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.ForceWatson";
+ this.MenuText = "Force Watson";
+ this.Text = "Force Watson";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandInsertMenu.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandInsertMenu.cs
index 0eb0ffa0..f1ab6913 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandInsertMenu.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandInsertMenu.cs
@@ -9,55 +9,54 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandInsertMenu.
- ///
- public class CommandInsertMenu : Command
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for CommandInsertMenu.
+ ///
+ public class CommandInsertMenu : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public CommandInsertMenu(System.ComponentModel.IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertMenu(System.ComponentModel.IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- public CommandInsertMenu()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertMenu()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertMenu
- //
- this.CommandBarButtonText = "Insert";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.InsertMenu";
- this.Text = "Insert";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertMenu
+ //
+ this.CommandBarButtonText = "Insert";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.InsertMenu";
+ this.Text = "Insert";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandNewPage.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandNewPage.cs
index d2e9a744..01c4a184 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandNewPage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandNewPage.cs
@@ -7,56 +7,55 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- public class CommandNewPage : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class CommandNewPage : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandNewPage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandNewPage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandNewPage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandNewPage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandNewPost
+ //
+ this.CommandBarButtonText = "New";
+ this.Identifier = "OpenLiveWriter.PostEditor.NewPage";
+ this.MainMenuPath = "&File@0/New &Page@12";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlG;
+ this.MenuText = "New &Page";
+ this.Text = "New Page";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandNewPost
- //
- this.CommandBarButtonText = "New";
- this.Identifier = "OpenLiveWriter.PostEditor.NewPage";
- this.MainMenuPath = "&File@0/New &Page@12";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlG;
- this.MenuText = "New &Page";
- this.Text = "New Page";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenDrafts.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenDrafts.cs
index de713912..0087b235 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenDrafts.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenDrafts.cs
@@ -9,50 +9,49 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandOpenDrafts.
- ///
- public class CommandOpenDrafts : Command
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for CommandOpenDrafts.
+ ///
+ public class CommandOpenDrafts : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public CommandOpenDrafts(System.ComponentModel.IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenDrafts(System.ComponentModel.IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- public CommandOpenDrafts()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenDrafts()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Identifier = "OpenLiveWriter.PostEditor.OpenDrafts";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Identifier = "OpenLiveWriter.PostEditor.OpenDrafts";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenPost.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenPost.cs
index eaaaaf15..e31676d9 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenPost.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenPost.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandOpenPost : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandOpenPost : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandOpenPost(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenPost(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandOpenPost()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenPost()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandOpenPost
+ //
+ this.CommandBarButtonText = "Open";
+ this.Identifier = "OpenLiveWriter.PostEditor.OpenPost";
+ this.MainMenuPath = "&File@0/&Open...@15";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
+ this.Text = "Open";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandOpenPost
- //
- this.CommandBarButtonText = "Open";
- this.Identifier = "OpenLiveWriter.PostEditor.OpenPost";
- this.MainMenuPath = "&File@0/&Open...@15";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
- this.Text = "Open";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenRecentPosts.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenRecentPosts.cs
index d14cfa47..01e3dedf 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenRecentPosts.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandOpenRecentPosts.cs
@@ -9,50 +9,49 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandOpenRecentPosts.
- ///
- public class CommandOpenRecentPosts : Command
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for CommandOpenRecentPosts.
+ ///
+ public class CommandOpenRecentPosts : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public CommandOpenRecentPosts(System.ComponentModel.IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenRecentPosts(System.ComponentModel.IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- public CommandOpenRecentPosts()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenRecentPosts()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Identifier = "OpenLiveWriter.PostEditor.OpenRecentPosts";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Identifier = "OpenLiveWriter.PostEditor.OpenRecentPosts";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAndPublish.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAndPublish.cs
index f1d7f26d..14653de0 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAndPublish.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAndPublish.cs
@@ -6,60 +6,59 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandPostAndPublish : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandPostAndPublish : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandPostAndPublish(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostAndPublish(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandPostAndPublish()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostAndPublish()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandPostAndPublish
+ //
+ this.CommandBarButtonText = "Publish";
+ this.ContextMenuPath = "-P&ublish to Weblog@100";
+ this.Identifier = "OpenLiveWriter.PostAndPublish";
+ this.MainMenuPath = "&File@0/-P&ublish to Weblog@100";
+ this.MenuText = "P&ublish to Weblog";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlP;
+ this.Text = "Publish to Weblog";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandPostAndPublish
- //
- this.CommandBarButtonText = "Publish";
- this.ContextMenuPath = "-P&ublish to Weblog@100";
- this.Identifier = "OpenLiveWriter.PostAndPublish";
- this.MainMenuPath = "&File@0/-P&ublish to Weblog@100";
- this.MenuText = "P&ublish to Weblog";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlP;
- this.Text = "Publish to Weblog";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraft.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraft.cs
index ce901b1e..28e354ff 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraft.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraft.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandPostAsDraft : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandPostAsDraft : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandPostAsDraft(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostAsDraft(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandPostAsDraft()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostAsDraft()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandPostAsDraft
+ //
+ this.ContextMenuPath = "Post &Draft to Weblog@101";
+ this.Identifier = "OpenLiveWriter.PostAsDraft";
+ this.MainMenuPath = "&File@0/Post &Draft to Weblog@35";
+ this.MenuText = "Post &Draft to Weblog";
+ this.Text = "Post Draft to Weblog";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandPostAsDraft
- //
- this.ContextMenuPath = "Post &Draft to Weblog@101";
- this.Identifier = "OpenLiveWriter.PostAsDraft";
- this.MainMenuPath = "&File@0/Post &Draft to Weblog@35";
- this.MenuText = "Post &Draft to Weblog";
- this.Text = "Post Draft to Weblog";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraftAndEditOnline.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraftAndEditOnline.cs
index 626df83d..1a05628d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraftAndEditOnline.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostAsDraftAndEditOnline.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandPostAsDraftAndEditOnline : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandPostAsDraftAndEditOnline : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandPostAsDraftAndEditOnline(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostAsDraftAndEditOnline(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandPostAsDraftAndEditOnline()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostAsDraftAndEditOnline()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandPostAsDraft
+ //
+ this.ContextMenuPath = "Post Draft and &Edit Online@102";
+ this.Identifier = "OpenLiveWriter.PostAsDraftAndEditOnline";
+ this.MainMenuPath = "&File@0/Post &Draft and &Edit Online@36";
+ this.MenuText = "Post Draft and &Edit Online";
+ this.Text = "Post Draft and Edit Online";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandPostAsDraft
- //
- this.ContextMenuPath = "Post Draft and &Edit Online@102";
- this.Identifier = "OpenLiveWriter.PostAsDraftAndEditOnline";
- this.MainMenuPath = "&File@0/Post &Draft and &Edit Online@36";
- this.MenuText = "Post Draft and &Edit Online";
- this.Text = "Post Draft and Edit Online";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostProperties.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostProperties.cs
index 5b26de5d..6a86e9bd 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostProperties.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPostProperties.cs
@@ -6,59 +6,58 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandPostProperties : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandPostProperties : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandPostProperties(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostProperties(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandPostProperties()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPostProperties()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandPostProperties
- //
- this.ContextMenuPath = "-&Properties@300";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostProperties";
- this.MainMenuPath = "&View@2/&Properties@150";
- this.MenuText = "&Properties";
- this.Shortcut = System.Windows.Forms.Shortcut.F2;
- this.Text = "Properties";
- this.SuppressMenuBitmap = true;
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandPostProperties
+ //
+ this.ContextMenuPath = "-&Properties@300";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostProperties";
+ this.MainMenuPath = "&View@2/&Properties@150";
+ this.MenuText = "&Properties";
+ this.Shortcut = System.Windows.Forms.Shortcut.F2;
+ this.Text = "Properties";
+ this.SuppressMenuBitmap = true;
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPreferences.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPreferences.cs
index b90f2f81..98f15dc2 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPreferences.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandPreferences.cs
@@ -7,53 +7,52 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- public class CommandPreferences : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class CommandPreferences : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandPreferences(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPreferences(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandPreferences()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandPreferences()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandConfigureWeblog
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.Preferences";
+ this.MainMenuPath = "&Tools@7/-&Preferences...@900";
+ this.MenuText = "&Preferences...";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandConfigureWeblog
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.Preferences";
- this.MainMenuPath = "&Tools@7/-&Preferences...@900";
- this.MenuText = "&Preferences...";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandSavePost.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandSavePost.cs
index f269d2ac..b6345de8 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandSavePost.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandSavePost.cs
@@ -6,59 +6,58 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandSavePost : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandSavePost : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandSavePost(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandSavePost(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandSavePost()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandSavePost()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandSavePost
+ //
+ this.CommandBarButtonText = "Save Draft";
+ this.Identifier = "OpenLiveWriter.PostEditor.SavePost";
+ this.MainMenuPath = "&File@0/-&Save Local Draft@30";
+ this.MenuText = "&Save Local Draft";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
+ this.Text = "Save Local Draft";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandSavePost
- //
- this.CommandBarButtonText = "Save Draft";
- this.Identifier = "OpenLiveWriter.PostEditor.SavePost";
- this.MainMenuPath = "&File@0/-&Save Local Draft@30";
- this.MenuText = "&Save Local Draft";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
- this.Text = "Save Local Draft";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandToolsMenu.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandToolsMenu.cs
index 0434879b..29b9ded7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandToolsMenu.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandToolsMenu.cs
@@ -9,56 +9,55 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandToolsMenu.
- ///
- public class CommandToolsMenu : Command
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for CommandToolsMenu.
+ ///
+ public class CommandToolsMenu : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public CommandToolsMenu(System.ComponentModel.IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandToolsMenu(System.ComponentModel.IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- public CommandToolsMenu()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandToolsMenu()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandToolsMenu
+ //
+ this.CommandBarButtonText = "Tools";
+ this.Identifier = "OpenLiveWriter.PostEditor.ToolsMenu";
+ this.Text = "Tools";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandToolsMenu
- //
- this.CommandBarButtonText = "Tools";
- this.Identifier = "OpenLiveWriter.PostEditor.ToolsMenu";
- this.Text = "Tools";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUpdateWeblogStyle.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUpdateWeblogStyle.cs
index a62ce8ce..7fbf1485 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUpdateWeblogStyle.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUpdateWeblogStyle.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandUpdateWeblogStyle : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandUpdateWeblogStyle : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandUpdateWeblogStyle(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandUpdateWeblogStyle(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandUpdateWeblogStyle()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandUpdateWeblogStyle()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandConfigureWeblog
+ //
+ this.ContextMenuPath = "&Update Weblog Style@57";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.UpdateWeblogStyle";
+ this.MainMenuPath = "&View@2/-&Update Weblog Style-@120";
+ this.MenuText = "&Update Weblog Style";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandConfigureWeblog
- //
- this.ContextMenuPath = "&Update Weblog Style@57";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.UpdateWeblogStyle";
- this.MainMenuPath = "&View@2/-&Update Weblog Style-@120";
- this.MenuText = "&Update Weblog Style";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUseTemplateForEditting.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUseTemplateForEditting.cs
index e45fad43..11e6fd2f 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUseTemplateForEditting.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandUseTemplateForEditting.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandUseTemplateForEditting : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandUseTemplateForEditting : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandUseTemplateForEditting(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandUseTemplateForEditting(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandUseTemplateForEditting()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandUseTemplateForEditting()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandConfigureWeblog
+ //
+ this.ContextMenuPath = "Author in Weblog &Style@60";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.UseTemplateForEditting";
+ this.MainMenuPath = "&Weblog@7/Author in Weblog &Style-@60";
+ this.MenuText = "Author in Weblog &Style";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandConfigureWeblog
- //
- this.ContextMenuPath = "Author in Weblog &Style@60";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.UseTemplateForEditting";
- this.MainMenuPath = "&Weblog@7/Author in Weblog &Style-@60";
- this.MenuText = "Author in Weblog &Style";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewPostAfterPublish.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewPostAfterPublish.cs
index 0ffe5529..87b04099 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewPostAfterPublish.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewPostAfterPublish.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewPostAfterPublish : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewPostAfterPublish : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewPostAfterPublish(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewPostAfterPublish(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewPostAfterPublish()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewPostAfterPublish()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandPostAndPublish
+ //
+ this.Identifier = "OpenLiveWriter.ViewPostAfterPublish";
+ this.MenuText = "&View Post After Publishing";
+ this.Text = "View Post After Publishing";
+ this.MainMenuPath = "&File@0/-&View Post After Publishing@105";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandPostAndPublish
- //
- this.Identifier = "OpenLiveWriter.ViewPostAfterPublish";
- this.MenuText = "&View Post After Publishing";
- this.Text = "View Post After Publishing";
- this.MainMenuPath = "&File@0/-&View Post After Publishing@105";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblog.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblog.cs
index 321595b8..033f9fa4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblog.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblog.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewWeblog : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewWeblog : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewWeblog(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWeblog(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewWeblog()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWeblog()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewWeblog
+ //
+ this.ContextMenuPath = "&View Weblog@50";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.ViewWeblog";
+ this.MainMenuPath = "&Weblog@7/&View Weblog@50";
+ this.MenuText = "&View Weblog";
+ this.Text = "View Weblog";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewWeblog
- //
- this.ContextMenuPath = "&View Weblog@50";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.ViewWeblog";
- this.MainMenuPath = "&Weblog@7/&View Weblog@50";
- this.MenuText = "&View Weblog";
- this.Text = "View Weblog";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblogAdmin.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblogAdmin.cs
index e2190df7..c3195f91 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblogAdmin.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandViewWeblogAdmin.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewWeblogAdmin : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewWeblogAdmin : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewWeblogAdmin(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWeblogAdmin(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewWeblogAdmin()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWeblogAdmin()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewWeblog
+ //
+ this.ContextMenuPath = "&Manage Weblog@51";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.ViewWeblogAdmin";
+ this.MainMenuPath = "&Weblog@7/&Manage Weblog@51";
+ this.MenuText = "&Manage Weblog";
+ this.Text = "Manage Weblog";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewWeblog
- //
- this.ContextMenuPath = "&Manage Weblog@51";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.ViewWeblogAdmin";
- this.MainMenuPath = "&Weblog@7/&Manage Weblog@51";
- this.MenuText = "&Manage Weblog";
- this.Text = "Manage Weblog";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandWeblogMenu.cs b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandWeblogMenu.cs
index ce5c7efd..52fc07c9 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Commands/CommandWeblogMenu.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Commands/CommandWeblogMenu.cs
@@ -11,60 +11,58 @@ using OpenLiveWriter.ApplicationFramework.Skinning;
namespace OpenLiveWriter.PostEditor.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandWeblogMenu : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandWeblogMenu : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandWeblogMenu(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandWeblogMenu(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandWeblogMenu()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandWeblogMenu()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandWeblogMenu
+ //
+ this.CommandBarButtonText = "Weblog";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.WeblogMenu";
+ this.MenuText = "";
+ this.Text = "Weblog";
+
+ }
+ #endregion
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandWeblogMenu
- //
- this.CommandBarButtonText = "Weblog";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.WeblogMenu";
- this.MenuText = "";
- this.Text = "Weblog";
-
- }
- #endregion
-
-
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/DisplayMessages/ConfirmRemoveWeblogDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/DisplayMessages/ConfirmRemoveWeblogDisplayMessage.cs
index 16e1f905..0c8d669d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/DisplayMessages/ConfirmRemoveWeblogDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/DisplayMessages/ConfirmRemoveWeblogDisplayMessage.cs
@@ -6,65 +6,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Accounts.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class ConfirmRemoveWeblogDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class ConfirmRemoveWeblogDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ConfirmRemoveWeblogDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ConfirmRemoveWeblogDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public ConfirmRemoveWeblogDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public ConfirmRemoveWeblogDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConfirmRemoveWeblogDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "Are you sure that you want to delete the selected weblog?";
- this.Title = "Confirm Delete";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConfirmRemoveWeblogDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "Are you sure that you want to delete the selected weblog?";
+ this.Title = "Confirm Delete";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountListView.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountListView.cs
index dd474284..295beb2d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountListView.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountListView.cs
@@ -125,7 +125,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Accounts
}
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementControl.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementControl.cs
index f3deb20e..20ad6977 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementControl.cs
@@ -119,7 +119,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Accounts
EditSelectedWeblog();
}
-
private void buttonView_Click(object sender, EventArgs e)
{
try
@@ -194,7 +193,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Accounts
}
-
private void DeleteSelectedWeblog()
{
if (SelectedWeblog == null)
@@ -220,7 +218,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Accounts
}
}
-
private BlogSettings SelectedWeblog
{
get
@@ -348,7 +345,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Accounts
}
#endregion
-
///
/// Hook that allows for processing just after a new blog has been created.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementForm.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementForm.cs
index 51db101a..1c050dd4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountManagementForm.cs
@@ -11,90 +11,90 @@ using OpenLiveWriter.PostEditor;
namespace OpenLiveWriter.PostEditor.Configuration.Accounts
{
- ///
- /// Summary description for WeblogAccountManagementForm.
- ///
- public class WeblogAccountManagementForm : ApplicationDialog
- {
- private System.Windows.Forms.Button buttonClose;
- private OpenLiveWriter.PostEditor.Configuration.Accounts.WeblogAccountManagementControl weblogAccountManagementControl1;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for WeblogAccountManagementForm.
+ ///
+ public class WeblogAccountManagementForm : ApplicationDialog
+ {
+ private System.Windows.Forms.Button buttonClose;
+ private OpenLiveWriter.PostEditor.Configuration.Accounts.WeblogAccountManagementControl weblogAccountManagementControl1;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public WeblogAccountManagementForm(IBlogPostEditingSite editingSite)
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ public WeblogAccountManagementForm(IBlogPostEditingSite editingSite)
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- weblogAccountManagementControl1.EditingSite = editingSite ;
- }
+ weblogAccountManagementControl1.EditingSite = editingSite ;
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.buttonClose = new System.Windows.Forms.Button();
- this.weblogAccountManagementControl1 = new OpenLiveWriter.PostEditor.Configuration.Accounts.WeblogAccountManagementControl();
- this.SuspendLayout();
- //
- // buttonClose
- //
- this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonClose.Location = new System.Drawing.Point(279, 264);
- this.buttonClose.Name = "buttonClose";
- this.buttonClose.TabIndex = 1;
- this.buttonClose.Text = "Close";
- //
- // weblogAccountManagementControl1
- //
- this.weblogAccountManagementControl1.BlogSettingsEditors = null;
- this.weblogAccountManagementControl1.EditingSite = null;
- this.weblogAccountManagementControl1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
- this.weblogAccountManagementControl1.Location = new System.Drawing.Point(9, 10);
- this.weblogAccountManagementControl1.Name = "weblogAccountManagementControl1";
- this.weblogAccountManagementControl1.Size = new System.Drawing.Size(345, 245);
- this.weblogAccountManagementControl1.TabIndex = 0;
- //
- // WeblogAccountManagementForm
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.CancelButton = this.buttonClose;
- this.ClientSize = new System.Drawing.Size(362, 294);
- this.ControlBox = false;
- this.Controls.Add(this.weblogAccountManagementControl1);
- this.Controls.Add(this.buttonClose);
- this.Location = new System.Drawing.Point(0, 0);
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "WeblogAccountManagementForm";
- this.Text = "Accounts";
- this.ResumeLayout(false);
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.buttonClose = new System.Windows.Forms.Button();
+ this.weblogAccountManagementControl1 = new OpenLiveWriter.PostEditor.Configuration.Accounts.WeblogAccountManagementControl();
+ this.SuspendLayout();
+ //
+ // buttonClose
+ //
+ this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonClose.Location = new System.Drawing.Point(279, 264);
+ this.buttonClose.Name = "buttonClose";
+ this.buttonClose.TabIndex = 1;
+ this.buttonClose.Text = "Close";
+ //
+ // weblogAccountManagementControl1
+ //
+ this.weblogAccountManagementControl1.BlogSettingsEditors = null;
+ this.weblogAccountManagementControl1.EditingSite = null;
+ this.weblogAccountManagementControl1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+ this.weblogAccountManagementControl1.Location = new System.Drawing.Point(9, 10);
+ this.weblogAccountManagementControl1.Name = "weblogAccountManagementControl1";
+ this.weblogAccountManagementControl1.Size = new System.Drawing.Size(345, 245);
+ this.weblogAccountManagementControl1.TabIndex = 0;
+ //
+ // WeblogAccountManagementForm
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.CancelButton = this.buttonClose;
+ this.ClientSize = new System.Drawing.Size(362, 294);
+ this.ControlBox = false;
+ this.Controls.Add(this.weblogAccountManagementControl1);
+ this.Controls.Add(this.buttonClose);
+ this.Location = new System.Drawing.Point(0, 0);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "WeblogAccountManagementForm";
+ this.Text = "Accounts";
+ this.ResumeLayout(false);
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountPreferencesPanel.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountPreferencesPanel.cs
index f6e63bca..4ecd22c3 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountPreferencesPanel.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Accounts/WeblogAccountPreferencesPanel.cs
@@ -177,7 +177,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Accounts
}
#endregion
-
#region IBlogPostEditingSitePreferences Members
public IBlogPostEditingSite EditingSite
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AccountPanel.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AccountPanel.cs
index 28c038e1..26fa7644 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AccountPanel.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AccountPanel.cs
@@ -102,7 +102,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
textBoxPassword.Text = TemporaryBlogSettings.Credentials.Password;
}
-
public override bool PrepareSave(SwitchToPanel switchToPanel)
{
// validate that we have a post api url
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AdvancedPanel.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AdvancedPanel.cs
index af4ec636..1369f83f 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AdvancedPanel.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/AdvancedPanel.cs
@@ -116,7 +116,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
string userOverride = (string)TemporaryBlogSettings.UserOptionOverrides[BlogClientOptions.CHARACTER_SET];
string homepageOverride = (string)TemporaryBlogSettings.HomePageOverrides[BlogClientOptions.CHARACTER_SET];
-
if (!String.IsNullOrEmpty(blogOverride))
defaultEncoding = String.Format(CultureInfo.CurrentCulture, defaultEncoding, blogOverride);
else if (!String.IsNullOrEmpty(homepageOverride))
@@ -225,7 +224,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
? StringHelper.ToBool(TemporaryBlogSettings.OptionOverrides[BlogClientOptions.REQUIRES_XHTML].ToString(), optionOverride)
: optionOverride;
-
int currentOption = 0; // default: unspecified, use OptionOverride
if (TemporaryBlogSettings.UserOptionOverrides.Contains(BlogClientOptions.REQUIRES_XHTML))
{
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/DisplayMessages/FtpSettingsRequiredDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/DisplayMessages/FtpSettingsRequiredDisplayMessage.cs
index 530e82ac..70215e3d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/DisplayMessages/FtpSettingsRequiredDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/DisplayMessages/FtpSettingsRequiredDisplayMessage.cs
@@ -7,59 +7,59 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Settings.DisplayMessages
{
- public class FtpSettingsRequiredDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class FtpSettingsRequiredDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public FtpSettingsRequiredDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public FtpSettingsRequiredDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public FtpSettingsRequiredDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public FtpSettingsRequiredDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Text = "If you choose to upload images to an FTP server you must speicfy the settings for the destination server.";
- this.Title = "FTP Settings Required";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Text = "If you choose to upload images to an FTP server you must speicfy the settings for the destination server.";
+ this.Title = "FTP Settings Required";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/FTPSettingsForm.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/FTPSettingsForm.cs
index e0b4e262..8477b2ed 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/FTPSettingsForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/FTPSettingsForm.cs
@@ -87,7 +87,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
// save reference to settings
_ftpSettings = ftpSettings;
-
// populate controls
_originalHostname = ftpSettings.FtpServer;
textBoxHostName.Text = ftpSettings.FtpServer;
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/ImagesPanel.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/ImagesPanel.cs
index 587fed70..9db52a9c 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/ImagesPanel.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/ImagesPanel.cs
@@ -115,7 +115,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
}
-
private FileUploadSupport FileUploadSupport
{
get
@@ -263,6 +262,5 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/WeblogSettingsPanel.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/WeblogSettingsPanel.cs
index beecee6e..097c30ba 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/WeblogSettingsPanel.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Settings/WeblogSettingsPanel.cs
@@ -16,7 +16,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
///
private System.ComponentModel.Container components = null;
-
private TemporaryBlogSettings _targetBlogSettings;
private TemporaryBlogSettings _editableBlogSettings;
@@ -68,7 +67,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Settings
}
private bool _settingsModified = false;
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/TemporaryBlogSettings.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/TemporaryBlogSettings.cs
index b8c65212..81199f81 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/TemporaryBlogSettings.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/TemporaryBlogSettings.cs
@@ -78,7 +78,6 @@ namespace OpenLiveWriter.PostEditor.Configuration
}
}
-
public void Save(BlogSettings settings)
{
settings.HostBlogId = this.HostBlogId;
@@ -373,7 +372,6 @@ namespace OpenLiveWriter.PostEditor.Configuration
}
}
-
public string ProviderId
{
get { return _providerId; }
@@ -435,7 +433,6 @@ namespace OpenLiveWriter.PostEditor.Configuration
}
}
-
public BlogPostCategory[] Categories
{
get
@@ -898,7 +895,6 @@ namespace OpenLiveWriter.PostEditor.Configuration
private Hashtable _values = new Hashtable();
-
public object Clone()
{
TemporaryFileUploadSettings newSettings = new TemporaryFileUploadSettings();
@@ -913,4 +909,3 @@ namespace OpenLiveWriter.PostEditor.Configuration
}
-
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/BlogProviderAccountWizard.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/BlogProviderAccountWizard.cs
index b5fa7250..e9a4af79 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/BlogProviderAccountWizard.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/BlogProviderAccountWizard.cs
@@ -317,5 +317,4 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingDisplayMessage.cs
index 02aa2b94..bde0786a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingDisplayMessage.cs
@@ -7,62 +7,62 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class ErrorConnectingDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class ErrorConnectingDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ErrorConnectingDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ErrorConnectingDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public ErrorConnectingDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public ErrorConnectingDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // UsernameAndPasswordRequiredDisplayMessage
- //
- this.Text = "An error occurred while attempting to connect to the remote server.";
- this.Title = "Error Connecting";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // UsernameAndPasswordRequiredDisplayMessage
+ //
+ this.Text = "An error occurred while attempting to connect to the remote server.";
+ this.Title = "Error Connecting";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingPromptContinueDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingPromptContinueDisplayMessage.cs
index 7c307b8c..533f632b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingPromptContinueDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ErrorConnectingPromptContinueDisplayMessage.cs
@@ -7,64 +7,64 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class ErrorConnectingPromptContinueDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class ErrorConnectingPromptContinueDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ErrorConnectingPromptContinueDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ErrorConnectingPromptContinueDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public ErrorConnectingPromptContinueDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public ErrorConnectingPromptContinueDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // MappingVerificationFailedDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2;
- this.Text = "The remote server could not be contacted to verify the settings. Do you want to continue anyway?";
- this.Title = "Error Connecting";
- this.Type = OpenLiveWriter.Controls.DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // MappingVerificationFailedDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2;
+ this.Text = "The remote server could not be contacted to verify the settings. Do you want to continue anyway?";
+ this.Title = "Error Connecting";
+ this.Type = OpenLiveWriter.Controls.DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HomepageUrlRequiredDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HomepageUrlRequiredDisplayMessage.cs
index 3a181d0f..bf9c5502 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HomepageUrlRequiredDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HomepageUrlRequiredDisplayMessage.cs
@@ -6,65 +6,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class HomepageUrlRequiredDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class HomepageUrlRequiredDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public HomepageUrlRequiredDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public HomepageUrlRequiredDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public HomepageUrlRequiredDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public HomepageUrlRequiredDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // HomepageUrlRequiredDisplayMessage
- //
- this.Text = "Please enter your Weblog\'s Homepage URL to continue.";
- this.Title = "Homepage Url Required";
- this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // HomepageUrlRequiredDisplayMessage
+ //
+ this.Text = "Please enter your Weblog\'s Homepage URL to continue.";
+ this.Title = "Homepage Url Required";
+ this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HostNameRequiredDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HostNameRequiredDisplayMessage.cs
index 860ad290..20ce172b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HostNameRequiredDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/HostNameRequiredDisplayMessage.cs
@@ -7,62 +7,62 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class HostNameRequiredDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class HostNameRequiredDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public HostNameRequiredDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public HostNameRequiredDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public HostNameRequiredDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public HostNameRequiredDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // UsernameAndPasswordRequiredDisplayMessage
- //
- this.Text = "Please enter a hostname to continue.";
- this.Title = "Hostname Required";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // UsernameAndPasswordRequiredDisplayMessage
+ //
+ this.Text = "Please enter a hostname to continue.";
+ this.Title = "Hostname Required";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/LoginFailedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/LoginFailedDisplayMessage.cs
index fd97b448..64544ad1 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/LoginFailedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/LoginFailedDisplayMessage.cs
@@ -7,62 +7,62 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class LoginFailedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class LoginFailedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public LoginFailedDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public LoginFailedDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public LoginFailedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public LoginFailedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // UsernameAndPasswordRequiredDisplayMessage
- //
- this.Text = "{0} was not able to login to the remote server using the username and password.\r\n\r\nPlease check that the information is correct and try again.";
- this.Title = "Login Failed";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // UsernameAndPasswordRequiredDisplayMessage
+ //
+ this.Text = "{0} was not able to login to the remote server using the username and password.\r\n\r\nPlease check that the information is correct and try again.";
+ this.Title = "Login Failed";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/MappingVerificationFailedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/MappingVerificationFailedDisplayMessage.cs
index ac83e7e4..4b5efbd6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/MappingVerificationFailedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/MappingVerificationFailedDisplayMessage.cs
@@ -7,64 +7,64 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class MappingVerificationFailedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class MappingVerificationFailedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public MappingVerificationFailedDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public MappingVerificationFailedDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public MappingVerificationFailedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public MappingVerificationFailedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // MappingVerificationFailedDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2;
- this.Text = "The URL mapping could not be verified. Do you want to continue anyway?";
- this.Title = "Mapping Verification Failed";
- this.Type = OpenLiveWriter.Controls.DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // MappingVerificationFailedDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2;
+ this.Text = "The URL mapping could not be verified. Do you want to continue anyway?";
+ this.Title = "Mapping Verification Failed";
+ this.Type = OpenLiveWriter.Controls.DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/RequiredFieldOmittedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/RequiredFieldOmittedDisplayMessage.cs
index f2e8d079..78ee9b16 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/RequiredFieldOmittedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/RequiredFieldOmittedDisplayMessage.cs
@@ -11,69 +11,69 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class RequiredFieldOmittedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ public class RequiredFieldOmittedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public RequiredFieldOmittedDisplayMessage(System.ComponentModel.IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public RequiredFieldOmittedDisplayMessage(System.ComponentModel.IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- public RequiredFieldOmittedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public RequiredFieldOmittedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // RequiredFieldOmittedDisplayMessage
- //
- this.Text = "You must enter a value for the {0} field in order{1}to configure weblog publishin" +
- "g.";
- this.Title = "Required Field Missing";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // RequiredFieldOmittedDisplayMessage
+ //
+ this.Text = "You must enter a value for the {0} field in order{1}to configure weblog publishin" +
+ "g.";
+ this.Title = "Required Field Missing";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ServerParameterNotSpecifiedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ServerParameterNotSpecifiedDisplayMessage.cs
index 2e4e0aa6..4a9b22ed 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ServerParameterNotSpecifiedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/ServerParameterNotSpecifiedDisplayMessage.cs
@@ -6,66 +6,66 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class ServerParameterNotSpecifiedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class ServerParameterNotSpecifiedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ServerParameterNotSpecifiedDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ServerParameterNotSpecifiedDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public ServerParameterNotSpecifiedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public ServerParameterNotSpecifiedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ServerParameterNotSpecifiedDisplayMessage
- //
- this.Text = "You need to customize the Weblog API URL before proceeding.{0}The following value" +
- "s were not customized:{0}{0}{1}{0}{0}Please change these values to whatever is a" +
- "ppropriate for{0}your weblog server.";
- this.Title = "Weblog API URL Requires Customization";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ServerParameterNotSpecifiedDisplayMessage
+ //
+ this.Text = "You need to customize the Weblog API URL before proceeding.{0}The following value" +
+ "s were not customized:{0}{0}{1}{0}{0}Please change these values to whatever is a" +
+ "ppropriate for{0}your weblog server.";
+ this.Title = "Weblog API URL Requires Customization";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesBlogNotFoundDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesBlogNotFoundDisplayMessage.cs
index 0c307bed..09b42824 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesBlogNotFoundDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesBlogNotFoundDisplayMessage.cs
@@ -7,63 +7,63 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class SpacesBlogNotFoundDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class SpacesBlogNotFoundDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public SpacesBlogNotFoundDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public SpacesBlogNotFoundDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public SpacesBlogNotFoundDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public SpacesBlogNotFoundDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // SpacesBlogNotFoundDisplayMessage
- //
- this.Text = "{0} could not locate a Windows Live Space for this user.\r\nPlease set up a Wind" +
- "ows Live Space before continuing.";
- this.Title = "No Space Found";
- this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // SpacesBlogNotFoundDisplayMessage
+ //
+ this.Text = "{0} could not locate a Windows Live Space for this user.\r\nPlease set up a Wind" +
+ "ows Live Space before continuing.";
+ this.Title = "No Space Found";
+ this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlInvalidDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlInvalidDisplayMessage.cs
index 43dca808..6236ee39 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlInvalidDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlInvalidDisplayMessage.cs
@@ -7,63 +7,63 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class SpacesHomepageUrlInvalidDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class SpacesHomepageUrlInvalidDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public SpacesHomepageUrlInvalidDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public SpacesHomepageUrlInvalidDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public SpacesHomepageUrlInvalidDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public SpacesHomepageUrlInvalidDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // SpacesHomepageUrlInvalidDisplayMessage
- //
- this.Text = "The specified URL does not appear to be valid Spaces homepage.\r\nPlease enter a va" +
- "lid Spaces URL or set up a Windows Live Space before continuing.";
- this.Title = "Invalid Spaces URL Found";
- this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // SpacesHomepageUrlInvalidDisplayMessage
+ //
+ this.Text = "The specified URL does not appear to be valid Spaces homepage.\r\nPlease enter a va" +
+ "lid Spaces URL or set up a Windows Live Space before continuing.";
+ this.Title = "Invalid Spaces URL Found";
+ this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlRequiredDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlRequiredDisplayMessage.cs
index 06eb6b6f..a0c2f53c 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlRequiredDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/SpacesHomepageUrlRequiredDisplayMessage.cs
@@ -6,65 +6,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class SpacesHomepageUrlRequiredDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class SpacesHomepageUrlRequiredDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public SpacesHomepageUrlRequiredDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public SpacesHomepageUrlRequiredDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public SpacesHomepageUrlRequiredDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public SpacesHomepageUrlRequiredDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // SpacesHomepageUrlRequiredDisplayMessage
- //
- this.Text = "Please enter your Spaces\' Homepage URL to continue.";
- this.Title = "Homepage Url Required";
- this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // SpacesHomepageUrlRequiredDisplayMessage
+ //
+ this.Text = "Please enter your Spaces\' Homepage URL to continue.";
+ this.Title = "Homepage Url Required";
+ this.Type = OpenLiveWriter.Controls.DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UnknownLoginErrorDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UnknownLoginErrorDisplayMessage.cs
index bdf2a8bd..3476086b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UnknownLoginErrorDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UnknownLoginErrorDisplayMessage.cs
@@ -7,69 +7,69 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class UnknownLoginErrrorDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class UnknownLoginErrrorDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public UnknownLoginErrrorDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public UnknownLoginErrrorDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- InitMessage();
- }
+ InitMessage();
+ }
- public UnknownLoginErrrorDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public UnknownLoginErrrorDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- InitMessage();
- }
+ InitMessage();
+ }
- private void InitMessage()
- {
- Text =
- "An unexpected error occurred while trying to login to the remote server.\r\n\r\nIf you have a proxy or firewall configured, please make sure your system\r\nis properly configured to allow this program to connect to the remote\r\nserver.";
- }
+ private void InitMessage()
+ {
+ Text =
+ "An unexpected error occurred while trying to login to the remote server.\r\n\r\nIf you have a proxy or firewall configured, please make sure your system\r\nis properly configured to allow this program to connect to the remote\r\nserver.";
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // UnknownLoginErrrorDisplayMessage
- //
- this.Text = "";
- this.Title = "Login Failed";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // UnknownLoginErrrorDisplayMessage
+ //
+ this.Text = "";
+ this.Title = "Login Failed";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UrlMappingRequiredDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UrlMappingRequiredDisplayMessage.cs
index 11fdf43a..3f4d7ea2 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UrlMappingRequiredDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UrlMappingRequiredDisplayMessage.cs
@@ -7,62 +7,62 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class UrlMappingRequiredDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class UrlMappingRequiredDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public UrlMappingRequiredDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public UrlMappingRequiredDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public UrlMappingRequiredDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public UrlMappingRequiredDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // UsernameAndPasswordRequiredDisplayMessage
- //
- this.Text = "Please enter a URL mapping to continue.";
- this.Title = "URL Mapping Required";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // UsernameAndPasswordRequiredDisplayMessage
+ //
+ this.Text = "Please enter a URL mapping to continue.";
+ this.Title = "URL Mapping Required";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UsernameAndPasswordRequiredDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UsernameAndPasswordRequiredDisplayMessage.cs
index b3a71838..b0ef1071 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UsernameAndPasswordRequiredDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/DisplayMessages/UsernameAndPasswordRequiredDisplayMessage.cs
@@ -7,62 +7,62 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Configuration.Wizard.DisplayMessages
{
- public class UsernameAndPasswordRequiredDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class UsernameAndPasswordRequiredDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public UsernameAndPasswordRequiredDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public UsernameAndPasswordRequiredDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public UsernameAndPasswordRequiredDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public UsernameAndPasswordRequiredDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // UsernameAndPasswordRequiredDisplayMessage
- //
- this.Text = "Please enter a username and password to continue.";
- this.Title = "Username and Password Required";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // UsernameAndPasswordRequiredDisplayMessage
+ //
+ this.Text = "Please enter a username and password to continue.";
+ this.Title = "Username and Password Required";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardController.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardController.cs
index 7c03f69d..acb9f70d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardController.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardController.cs
@@ -79,7 +79,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
return controller.EditWeblogTemporarySettings(owner);
}
-
private WeblogConfigurationWizardController(TemporaryBlogSettings settings)
: base()
{
@@ -228,7 +227,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
_authenticationRequired = showAuthenticationStep;
}
-
private void AddConfirmationStep()
{
addWizardStep(
@@ -588,7 +586,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
_temporarySettings.Credentials);
}
-
void OnSelectProviderCompleted(Object stepControl)
{
// get reference to panel
@@ -616,7 +613,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
}
-
#endregion
#region Select Blog Panel
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBasicInfo.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBasicInfo.cs
index 720c8143..e03b0adf 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBasicInfo.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBasicInfo.cs
@@ -348,7 +348,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBlogType.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBlogType.cs
index 48ed8f92..22eb0fed 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBlogType.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelBlogType.cs
@@ -213,7 +213,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
}
-
private class WeblogType
{
public WeblogType(IBlogProviderAccountWizardDescription providerAccountWizard)
@@ -268,7 +267,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
private IBlogProviderAccountWizardDescription _providerAccountWizard;
}
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelConfirmation.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelConfirmation.cs
index 038c8cb8..12a4a08f 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelConfirmation.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelConfirmation.cs
@@ -166,7 +166,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
return true;
}
-
private void buttonEditWeblogSettings_Click(object sender, System.EventArgs e)
{
try
@@ -181,9 +180,9 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
///
- /// Clean up any resources being used.
- ///
- protected override void Dispose(bool disposing)
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose(bool disposing)
{
if (disposing)
{
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSelectProvider.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSelectProvider.cs
index 78ac12bb..5d7e0de4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSelectProvider.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSelectProvider.cs
@@ -316,7 +316,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
#endregion
-
private class BlogProviderDescriptionProxy : IBlogProviderDescription
{
public BlogProviderDescriptionProxy(IBlogProviderDescription provider)
@@ -423,7 +422,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSharePointAuthentication.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSharePointAuthentication.cs
index fc0995bf..6c84291b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSharePointAuthentication.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelSharePointAuthentication.cs
@@ -183,16 +183,16 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
#endregion
/*public string Username
- {
- get{ return textBoxUsername.Text.Trim(); }
- set{ textBoxUsername.Text = value; }
- }
+ {
+ get{ return textBoxUsername.Text.Trim(); }
+ set{ textBoxUsername.Text = value; }
+ }
- public string Password
- {
- get{ return textBoxPassword.Text.Trim(); }
- set{ textBoxPassword.Text = value; }
- }*/
+ public string Password
+ {
+ get{ return textBoxPassword.Text.Trim(); }
+ set{ textBoxPassword.Text = value; }
+ }*/
public override bool ValidatePanel()
{
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelWelcome.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelWelcome.cs
index 797e76b1..95918c09 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelWelcome.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelWelcome.cs
@@ -134,6 +134,5 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogHomepageUrlControl.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogHomepageUrlControl.cs
index 843ef832..0db0effb 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogHomepageUrlControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogHomepageUrlControl.cs
@@ -85,7 +85,6 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
public event EventHandler Changed;
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WizardAutoDetectionOperations.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WizardAutoDetectionOperations.cs
index 44065bab..741b7607 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WizardAutoDetectionOperations.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WizardAutoDetectionOperations.cs
@@ -288,6 +288,5 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditor.cs b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditor.cs
index 30c2f3b3..8b3612bd 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditor.cs
@@ -415,7 +415,6 @@ namespace OpenLiveWriter.PostEditor
CommandManager.Add(commandInsertFile);
#endif
-
CommandManager.Add(new CommandRecentPost());
CommandManager.Add(CommandId.WordCount, new EventHandler(WordCount_Execute));
if (ApplicationDiagnostics.TestMode)
@@ -956,7 +955,6 @@ namespace OpenLiveWriter.PostEditor
{
FixCommands((e as EditableRegionFocusChangedEventArgs).IsFullyEditable);
-
Debug.Assert(_textEditingCommandDispatcher != null, "ContentEditor was not setup correctly, an editor got focus before command were created.");
_textEditingCommandDispatcher.TitleFocusChanged();
@@ -1586,7 +1584,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
public void InsertLink(string url, string linkText, string linkTitle, string rel, bool newWindow)
{
_currentEditor.InsertLink(url, linkText, linkTitle, rel, newWindow);
@@ -2194,7 +2191,6 @@ namespace OpenLiveWriter.PostEditor
_insertImageDialogWin7.InitialDirectory = null;
}
-
// Check to see if the user actually selected anything
if (imageFiles != null && imageFiles.Length > 0)
{
@@ -2284,7 +2280,6 @@ namespace OpenLiveWriter.PostEditor
ShellHelper.LaunchUrl(GLink.Instance.DownloadPlugins);
}
-
private void _normalHtmlContentEditor_HelpRequest(object sender, EventArgs e)
{
// execute the system help command
@@ -2355,7 +2350,6 @@ namespace OpenLiveWriter.PostEditor
FixCommandEvent(fullyEditableActive);
}
-
public bool FullyEditableRegionActive
{
get
@@ -2897,13 +2891,11 @@ namespace OpenLiveWriter.PostEditor
private Panel _editorContainer;
private bool _focusedRegionSupportsFormattingCommands;
-
private IContainer components = new Container();
private Timer wordCountTimer;
private RefreshableContentManager _refreshSmartContentManager;
-
private BlogEditingTemplate GetSurroundingContent()
{
// surrounding content based on standard header and footer
@@ -3207,7 +3199,6 @@ namespace OpenLiveWriter.PostEditor
element = null;
}
-
// If we found an image or smart content, try to get the alignment off of it
if (element != null)
{
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditorProxy.cs b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditorProxy.cs
index 5d1cfdfb..47d3bff7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditorProxy.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/ContentEditorProxy.cs
@@ -433,7 +433,6 @@ namespace OpenLiveWriter.PostEditor
return publishDocument;
}
-
public void SetSize(int width, int height)
{
panel.Size = new Size(width, height);
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditor.cs b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditor.cs
index 81283b26..5232064a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditor.cs
@@ -140,7 +140,7 @@ namespace OpenLiveWriter.PostEditor
///
/// Turns off spelling checking--for example, user selected "None" for dictionary
///
- void DisableSpelling();
+ void DisableSpelling();
///
/// Releases resources and shuts down the editor.
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditorFactory.cs b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditorFactory.cs
index c137b1f3..6fa7c239 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditorFactory.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentEditor/IContentEditorFactory.cs
@@ -130,7 +130,6 @@ namespace OpenLiveWriter.PostEditor
PlainText = 8
}
-
[Flags]
[Guid("ac667254-1b9d-4db8-83da-b026c730eff2")]
[ComVisible(true)]
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/MediaInsertForm.cs b/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/MediaInsertForm.cs
index be2fbb6d..2dd63e39 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/MediaInsertForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/MediaInsertForm.cs
@@ -40,7 +40,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources.Common
public const string EventName = "Inserting Media";
-
public MediaInsertForm(List sources, string blogID, int selectedTab, MediaSmartContent content, string title, bool showCopyright) :
this(sources, blogID, selectedTab, content, title, showCopyright, false)
{
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/PanelLoginControl.cs b/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/PanelLoginControl.cs
index 0e238fc2..01ecacc9 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/PanelLoginControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentSources/Common/PanelLoginControl.cs
@@ -166,7 +166,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources.Common
LayoutHelper.NaturalizeHeightAndDistribute(15, ckBoxSavePassword, btnLogin);
}
-
if (BidiHelper.IsRightToLeft)
{
btnLogin.Left = txtPassword.Left;
@@ -442,7 +441,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources.Common
Refresh();
}
-
private void Login()
{
string username = txtUsername.Text.Trim();
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentSources/ContentSourceManager.cs b/src/managed/OpenLiveWriter.PostEditor/ContentSources/ContentSourceManager.cs
index 01a847bc..ef78431a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentSources/ContentSourceManager.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentSources/ContentSourceManager.cs
@@ -345,7 +345,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources
internal const int IMAGE_WIDTH = 16;
internal const int IMAGE_HEIGHT = 16;
-
private string VerifyAttributeValue(Type pluginType, object attribute, string attributeField, string attributeValue)
{
if (attributeValue != null && attributeValue != String.Empty)
@@ -732,7 +731,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources
}
}
-
public static string MakeContainingElementId(string sourceId, string contentBlockId)
{
return String.Format(CultureInfo.InvariantCulture, "{0}:{1}:{2}", SMART_CONTENT_ID_PREFIX, sourceId, contentBlockId);
@@ -820,7 +818,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources
}
}
-
///
/// Returns true if the element className is a structured block.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentSources/SmartContentInsertionHelper.cs b/src/managed/OpenLiveWriter.PostEditor/ContentSources/SmartContentInsertionHelper.cs
index ef702e9c..f9fdcdf6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentSources/SmartContentInsertionHelper.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentSources/SmartContentInsertionHelper.cs
@@ -143,7 +143,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources
MarkupRange stagingRange = MarkupServices.CreateMarkupRange(sc1, sc2);
stagingRange.MoveToElement(doc.body, false);
-
//IE7 hack: fixes bug 305512. Note that this will destroy the inner content of the element,
//so make sure it is called before the refreshed content is inserted.
BeforeInsertInvalidateHackForIE7(element);
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgress.cs b/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgress.cs
index e24aaa70..49579f75 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgress.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgress.cs
@@ -249,4 +249,3 @@ namespace OpenLiveWriter.PostEditor.ContentSources
}
}
-
diff --git a/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgressDialog.cs b/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgressDialog.cs
index 7c4f6ea1..af829601 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgressDialog.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ContentSources/UrlContentRetreivalWithProgressDialog.cs
@@ -27,7 +27,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources
///
private System.ComponentModel.Container components = null;
-
public UrlContentRetreivalWithProgressDialog(ContentSourceInfo contentSourceInfo)
{
//
@@ -88,7 +87,6 @@ namespace OpenLiveWriter.PostEditor.ContentSources
Close();
}
-
protected override void OnActivated(EventArgs e)
{
base.OnActivated(e);
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/ConfirmDeletePostDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/ConfirmDeletePostDisplayMessage.cs
index 897f30e6..f1f3895a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/ConfirmDeletePostDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/ConfirmDeletePostDisplayMessage.cs
@@ -6,69 +6,69 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- public class ConfirmDeletePostDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class ConfirmDeletePostDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ConfirmDeletePostDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ConfirmDeletePostDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public ConfirmDeletePostDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public ConfirmDeletePostDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConfirmDeletePostDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "Are you sure you want to delete the {0} \"{1}\"?";
- this.Title = "Confirm Delete";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConfirmDeletePostDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "Are you sure you want to delete the {0} \"{1}\"?";
+ this.Title = "Confirm Delete";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/IncompatiblePostInfoTypeDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/IncompatiblePostInfoTypeDisplayMessage.cs
index 5603ee37..2e6dc72f 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/IncompatiblePostInfoTypeDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/IncompatiblePostInfoTypeDisplayMessage.cs
@@ -6,71 +6,71 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class IncompatiblePostInfoTypeDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class IncompatiblePostInfoTypeDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public IncompatiblePostInfoTypeDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public IncompatiblePostInfoTypeDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public IncompatiblePostInfoTypeDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public IncompatiblePostInfoTypeDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // IncompatiblePostInfoTypeDisplayMessage
- //
- this.Text = "An internal error occurred (incompatible blog post info type). Unable to " +
- "open the selected post.";
- this.Title = "Internal Error";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // IncompatiblePostInfoTypeDisplayMessage
+ //
+ this.Text = "An internal error occurred (incompatible blog post info type). Unable to " +
+ "open the selected post.";
+ this.Title = "Internal Error";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoPostSelectedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoPostSelectedDisplayMessage.cs
index 0c35d927..57acfad7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoPostSelectedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoPostSelectedDisplayMessage.cs
@@ -6,71 +6,71 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class NoPostSelectedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class NoPostSelectedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public NoPostSelectedDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public NoPostSelectedDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public NoPostSelectedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public NoPostSelectedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // NoPostSelectedDisplayMessage
- //
- this.Text = "You must select a post to open before proceeding.";
- this.Title = "No Post Selected";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // NoPostSelectedDisplayMessage
+ //
+ this.Text = "You must select a post to open before proceeding.";
+ this.Title = "No Post Selected";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoTitleSpecifiedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoTitleSpecifiedDisplayMessage.cs
index 4a63ebc2..e77e8df7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoTitleSpecifiedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NoTitleSpecifiedDisplayMessage.cs
@@ -6,71 +6,71 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class NoTitleSpecifiedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class NoTitleSpecifiedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public NoTitleSpecifiedDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public NoTitleSpecifiedDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public NoTitleSpecifiedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public NoTitleSpecifiedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // NoTitleSpecifiedDisplayMessage
- //
- this.Text = "You must provide a title for the post before saving or publishing it.";
- this.Title = "No Title Specified";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // NoTitleSpecifiedDisplayMessage
+ //
+ this.Text = "You must provide a title for the post before saving or publishing it.";
+ this.Title = "No Title Specified";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NonImageTypeFileSelectedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NonImageTypeFileSelectedDisplayMessage.cs
index bfeadae1..def48bf7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NonImageTypeFileSelectedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/NonImageTypeFileSelectedDisplayMessage.cs
@@ -6,68 +6,68 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- public class NonImageTypeFileSelectedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ public class NonImageTypeFileSelectedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public NonImageTypeFileSelectedDisplayMessage(System.ComponentModel.IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public NonImageTypeFileSelectedDisplayMessage(System.ComponentModel.IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- public NonImageTypeFileSelectedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public NonImageTypeFileSelectedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // NonImageTypeFileSelectedDisplayMessage
- //
- this.Text = "The file {0} is not an image. Only image file types can be inserted.";
- this.Title = "File Is Not An Image";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // NonImageTypeFileSelectedDisplayMessage
+ //
+ this.Text = "The file {0} is not an image. Only image file types can be inserted.";
+ this.Title = "File Is Not An Image";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PluginStatusChangedDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PluginStatusChangedDisplayMessage.cs
index cd999788..0ff5bc5f 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PluginStatusChangedDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PluginStatusChangedDisplayMessage.cs
@@ -7,69 +7,69 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- public class PluginStatusChangedDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class PluginStatusChangedDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public PluginStatusChangedDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public PluginStatusChangedDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public PluginStatusChangedDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public PluginStatusChangedDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // PluginStatusChangedDisplayMessage
- //
- this.Text = "You have chosen to enable or disable plugins. For these changes\nto take effect yo" +
- "u need to restart the application.";
- this.Title = "Plugin Status";
- this.Type = OpenLiveWriter.Controls.DisplayMessageType.Information;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // PluginStatusChangedDisplayMessage
+ //
+ this.Text = "You have chosen to enable or disable plugins. For these changes\nto take effect yo" +
+ "u need to restart the application.";
+ this.Title = "Plugin Status";
+ this.Type = OpenLiveWriter.Controls.DisplayMessageType.Information;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileInvalidDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileInvalidDisplayMessage.cs
index 5793ddd5..aa60ca31 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileInvalidDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileInvalidDisplayMessage.cs
@@ -6,70 +6,70 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class PostFileInvalidDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class PostFileInvalidDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public PostFileInvalidDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public PostFileInvalidDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public PostFileInvalidDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public PostFileInvalidDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // IncompatiblePostInfoTypeDisplayMessage
- //
- this.Text = "The specified post file ({0}) is not a valid weblog post so it could not be opened.";
- this.Title = "Post File Invalid";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // IncompatiblePostInfoTypeDisplayMessage
+ //
+ this.Text = "The specified post file ({0}) is not a valid weblog post so it could not be opened.";
+ this.Title = "Post File Invalid";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileNoExistDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileNoExistDisplayMessage.cs
index 73fb3eae..89a015bb 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileNoExistDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/PostFileNoExistDisplayMessage.cs
@@ -6,70 +6,70 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class PostFileNoExistDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class PostFileNoExistDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public PostFileNoExistDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public PostFileNoExistDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public PostFileNoExistDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public PostFileNoExistDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // IncompatiblePostInfoTypeDisplayMessage
- //
- this.Text = "The specified post file ({0}) does not exist.";
- this.Title = "Post File Does Not Exist";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // IncompatiblePostInfoTypeDisplayMessage
+ //
+ this.Text = "The specified post file ({0}) does not exist.";
+ this.Title = "Post File Does Not Exist";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForCreateEditorTemplateDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForCreateEditorTemplateDisplayMessage.cs
index db558a8d..1b3d0514 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForCreateEditorTemplateDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForCreateEditorTemplateDisplayMessage.cs
@@ -6,73 +6,73 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class QueryForCreateEditorTemplateDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class QueryForCreateEditorTemplateDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public QueryForCreateEditorTemplateDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public QueryForCreateEditorTemplateDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public QueryForCreateEditorTemplateDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public QueryForCreateEditorTemplateDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // QueryForCreateEditorTemplateDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "Would you like to generate an authoring template that matches the style of your b" +
- "log?";
- this.Title = "Generate Authoring Template";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // QueryForCreateEditorTemplateDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "Would you like to generate an authoring template that matches the style of your b" +
+ "log?";
+ this.Title = "Generate Authoring Template";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpostedEntryDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpostedEntryDisplayMessage.cs
index d980e613..ab43d795 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpostedEntryDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpostedEntryDisplayMessage.cs
@@ -6,73 +6,73 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class QueryForUnpostedEntryDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class QueryForUnpostedEntryDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public QueryForUnpostedEntryDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public QueryForUnpostedEntryDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public QueryForUnpostedEntryDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public QueryForUnpostedEntryDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // QueryForUnpostedEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNoCancel;
- this.Text = "The weblog entry you are editing has not been posted.{0}{0}Do you want to post a " +
- "draft of the entry now?";
- this.Title = "Post Entry as Draft";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // QueryForUnpostedEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNoCancel;
+ this.Text = "The weblog entry you are editing has not been posted.{0}{0}Do you want to post a " +
+ "draft of the entry now?";
+ this.Title = "Post Entry as Draft";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpublishedEntryDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpublishedEntryDisplayMessage.cs
index 9ff1800b..08ee461a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpublishedEntryDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnpublishedEntryDisplayMessage.cs
@@ -6,73 +6,73 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class QueryForUnpublishedEntryDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class QueryForUnpublishedEntryDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public QueryForUnpublishedEntryDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public QueryForUnpublishedEntryDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public QueryForUnpublishedEntryDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public QueryForUnpublishedEntryDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // QueryForUnpublishedEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNoCancel;
- this.Text = "You have posted this weblog entry as a draft.{0}{0}Do you want to publish it now?" +
- "";
- this.Title = "Publish Entry";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // QueryForUnpublishedEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNoCancel;
+ this.Text = "You have posted this weblog entry as a draft.{0}{0}Do you want to publish it now?" +
+ "";
+ this.Title = "Publish Entry";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnsavedChangesDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnsavedChangesDisplayMessage.cs
index 510dd6ef..8c952156 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnsavedChangesDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/QueryForUnsavedChangesDisplayMessage.cs
@@ -6,73 +6,73 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class QueryForUnsavedChangesDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class QueryForUnsavedChangesDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public QueryForUnsavedChangesDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public QueryForUnsavedChangesDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public QueryForUnsavedChangesDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public QueryForUnsavedChangesDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // QueryForUnsavedChangesDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNoCancel;
- this.Text = "There are unsaved changes to this post.{0}Do you want to save the changes before " +
- "proceeding?";
- this.Title = "Save Changes";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // QueryForUnsavedChangesDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNoCancel;
+ this.Text = "There are unsaved changes to this post.{0}Do you want to save the changes before " +
+ "proceeding?";
+ this.Title = "Save Changes";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/SpellCheckCancelledStillPostDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/SpellCheckCancelledStillPostDisplayMessage.cs
index 304e6d0e..d4910114 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/SpellCheckCancelledStillPostDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/SpellCheckCancelledStillPostDisplayMessage.cs
@@ -6,72 +6,72 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class SpellCheckCancelledStillPostDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class SpellCheckCancelledStillPostDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public SpellCheckCancelledStillPostDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public SpellCheckCancelledStillPostDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public SpellCheckCancelledStillPostDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public SpellCheckCancelledStillPostDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // QueryForUnsavedChangesDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "The spell check was cancelled.{0}Do you still want to publish this post?";
- this.Title = "Spell Check Cancelled";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // QueryForUnsavedChangesDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "The spell check was cancelled.{0}Do you still want to publish this post?";
+ this.Title = "Spell Check Cancelled";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/TagReminderDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/TagReminderDisplayMessage.cs
index 3bdb2939..1c88d5ec 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/TagReminderDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/TagReminderDisplayMessage.cs
@@ -8,63 +8,63 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- public class TagReminderDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class TagReminderDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public TagReminderDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public TagReminderDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public TagReminderDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public TagReminderDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConfirmDeleteEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2 ;
- this.Text = "You have not added tags to this post.{0}Do you still want to continue with publishing?";
- this.Title = "Tagging Reminder";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConfirmDeleteEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2 ;
+ this.Text = "You have not added tags to this post.{0}Do you still want to continue with publishing?";
+ this.Title = "Tagging Reminder";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/UnsupportedFileUploadsMessage.cs b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/UnsupportedFileUploadsMessage.cs
index 959177bd..71706d4b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/UnsupportedFileUploadsMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/DisplayMessages/UnsupportedFileUploadsMessage.cs
@@ -9,173 +9,170 @@ using OpenLiveWriter.Localization.Bidi;
namespace OpenLiveWriter.PostEditor.DisplayMessages
{
- ///
- /// Summary description for UnsupportedFileUploadsMessage.
- ///
- public class UnsupportedFileUploadsMessage : BaseForm
- {
- private PictureBox pictureBox1;
- private Label label1;
- private ColumnHeader columnHeaderFile;
- private Button buttonCancel;
- private Button buttonOK;
- private ListView listViewFiles;
- private System.Windows.Forms.Label label2;
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for UnsupportedFileUploadsMessage.
+ ///
+ public class UnsupportedFileUploadsMessage : BaseForm
+ {
+ private PictureBox pictureBox1;
+ private Label label1;
+ private ColumnHeader columnHeaderFile;
+ private Button buttonCancel;
+ private Button buttonOK;
+ private ListView listViewFiles;
+ private System.Windows.Forms.Label label2;
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public UnsupportedFileUploadsMessage(string[] files)
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ public UnsupportedFileUploadsMessage(string[] files)
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- this.label1.Text = Res.Get(StringId.NoFileUploadText);
- this.buttonCancel.Text = Res.Get(StringId.No);
- this.buttonOK.Text = Res.Get(StringId.Yes);
- this.label2.Text = Res.Get(StringId.NoFileUploadPrompt);
- this.Text = Res.Get(StringId.NoFileUploadTitle);
+ this.label1.Text = Res.Get(StringId.NoFileUploadText);
+ this.buttonCancel.Text = Res.Get(StringId.No);
+ this.buttonOK.Text = Res.Get(StringId.Yes);
+ this.label2.Text = Res.Get(StringId.NoFileUploadPrompt);
+ this.Text = Res.Get(StringId.NoFileUploadTitle);
- listViewFiles.BeginUpdate();
- listViewFiles.Items.Clear();
- foreach(string file in files)
- listViewFiles.Items.Add(file);
- listViewFiles.EndUpdate();
- }
+ listViewFiles.BeginUpdate();
+ listViewFiles.Items.Clear();
+ foreach(string file in files)
+ listViewFiles.Items.Add(file);
+ listViewFiles.EndUpdate();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(UnsupportedFileUploadsMessage));
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.listViewFiles = new System.Windows.Forms.ListView();
+ this.columnHeaderFile = new System.Windows.Forms.ColumnHeader();
+ this.buttonCancel = new System.Windows.Forms.Button();
+ this.buttonOK = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
+ this.pictureBox1.Location = new System.Drawing.Point(8, 12);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(44, 40);
+ this.pictureBox1.TabIndex = 0;
+ this.pictureBox1.TabStop = false;
+ //
+ // label1
+ //
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.label1.Location = new System.Drawing.Point(52, 16);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(286, 28);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "The following images cannot be published because image uploading has not been con" +
+ "figured for this weblog:";
+ //
+ // listViewFiles
+ //
+ this.listViewFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.listViewFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.columnHeaderFile});
+ this.listViewFiles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+ this.listViewFiles.Location = new System.Drawing.Point(52, 52);
+ this.listViewFiles.Name = "listViewFiles";
+ this.listViewFiles.RightToLeftLayout = BidiHelper.IsRightToLeft;
+ this.listViewFiles.Size = new System.Drawing.Size(286, 120);
+ this.listViewFiles.TabIndex = 2;
+ this.listViewFiles.View = System.Windows.Forms.View.List;
+ //
+ // columnHeaderFile
+ //
+ this.columnHeaderFile.Text = "";
+ this.columnHeaderFile.Width = 328;
+ //
+ // buttonCancel
+ //
+ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.buttonCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonCancel.Location = new System.Drawing.Point(262, 214);
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.TabIndex = 4;
+ this.buttonCancel.Text = "No";
+ //
+ // buttonOK
+ //
+ this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.buttonOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonOK.Location = new System.Drawing.Point(182, 214);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.TabIndex = 3;
+ this.buttonOK.Text = "Yes";
+ //
+ // label2
+ //
+ this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.label2.Location = new System.Drawing.Point(52, 182);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(282, 28);
+ this.label2.TabIndex = 5;
+ this.label2.Text = "Would you like to configure the image upload settings for your weblog now?";
+ //
+ // UnsupportedFileUploadsMessage
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.ClientSize = new System.Drawing.Size(346, 244);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.buttonCancel);
+ this.Controls.Add(this.buttonOK);
+ this.Controls.Add(this.listViewFiles);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.pictureBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "UnsupportedFileUploadsMessage";
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Image Upload Not Configured";
+ this.ResumeLayout(false);
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(UnsupportedFileUploadsMessage));
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.label1 = new System.Windows.Forms.Label();
- this.listViewFiles = new System.Windows.Forms.ListView();
- this.columnHeaderFile = new System.Windows.Forms.ColumnHeader();
- this.buttonCancel = new System.Windows.Forms.Button();
- this.buttonOK = new System.Windows.Forms.Button();
- this.label2 = new System.Windows.Forms.Label();
- this.SuspendLayout();
- //
- // pictureBox1
- //
- this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
- this.pictureBox1.Location = new System.Drawing.Point(8, 12);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(44, 40);
- this.pictureBox1.TabIndex = 0;
- this.pictureBox1.TabStop = false;
- //
- // label1
- //
- this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.label1.Location = new System.Drawing.Point(52, 16);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(286, 28);
- this.label1.TabIndex = 1;
- this.label1.Text = "The following images cannot be published because image uploading has not been con" +
- "figured for this weblog:";
- //
- // listViewFiles
- //
- this.listViewFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.listViewFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeaderFile});
- this.listViewFiles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
- this.listViewFiles.Location = new System.Drawing.Point(52, 52);
- this.listViewFiles.Name = "listViewFiles";
- this.listViewFiles.RightToLeftLayout = BidiHelper.IsRightToLeft;
- this.listViewFiles.Size = new System.Drawing.Size(286, 120);
- this.listViewFiles.TabIndex = 2;
- this.listViewFiles.View = System.Windows.Forms.View.List;
- //
- // columnHeaderFile
- //
- this.columnHeaderFile.Text = "";
- this.columnHeaderFile.Width = 328;
- //
- // buttonCancel
- //
- this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonCancel.Location = new System.Drawing.Point(262, 214);
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.TabIndex = 4;
- this.buttonCancel.Text = "No";
- //
- // buttonOK
- //
- this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.buttonOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonOK.Location = new System.Drawing.Point(182, 214);
- this.buttonOK.Name = "buttonOK";
- this.buttonOK.TabIndex = 3;
- this.buttonOK.Text = "Yes";
- //
- // label2
- //
- this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.label2.Location = new System.Drawing.Point(52, 182);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(282, 28);
- this.label2.TabIndex = 5;
- this.label2.Text = "Would you like to configure the image upload settings for your weblog now?";
- //
- // UnsupportedFileUploadsMessage
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.ClientSize = new System.Drawing.Size(346, 244);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.buttonCancel);
- this.Controls.Add(this.buttonOK);
- this.Controls.Add(this.listViewFiles);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.pictureBox1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "UnsupportedFileUploadsMessage";
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Image Upload Not Configured";
- this.ResumeLayout(false);
-
- }
- #endregion
+ }
+ #endregion
-
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/FileUploadFailedForm.cs b/src/managed/OpenLiveWriter.PostEditor/FileUploadFailedForm.cs
index 12946ef5..3469bc04 100644
--- a/src/managed/OpenLiveWriter.PostEditor/FileUploadFailedForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/FileUploadFailedForm.cs
@@ -203,6 +203,5 @@ namespace OpenLiveWriter.PostEditor
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/IBlogPostEditor.cs b/src/managed/OpenLiveWriter.PostEditor/IBlogPostEditor.cs
index 4f620ace..9bb58f8e 100644
--- a/src/managed/OpenLiveWriter.PostEditor/IBlogPostEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/IBlogPostEditor.cs
@@ -67,12 +67,12 @@ namespace OpenLiveWriter.PostEditor
///
/// Notification that the application is now closed
///
- void OnClosed();
+ void OnClosed();
///
/// Notification that current blog post is closed
///
- void OnPostClosed();
+ void OnPostClosed();
}
public class BlogPostSaveOptions
@@ -92,11 +92,11 @@ namespace OpenLiveWriter.PostEditor
}
///
- /// This class is a dummy that is put into the list of editors so that when a change is made
- /// external to any editor inside the manager, the manager has an editor to put the dirty flag to
- /// true.
- ///
- internal class ForceDirtyPostEditor : IBlogPostEditor
+ /// This class is a dummy that is put into the list of editors so that when a change is made
+ /// external to any editor inside the manager, the manager has an editor to put the dirty flag to
+ /// true.
+ ///
+ internal class ForceDirtyPostEditor : IBlogPostEditor
{
void IBlogPostEditor.Initialize(IBlogPostEditingContext editingContext, IBlogClientOptions clientOptions)
{
diff --git a/src/managed/OpenLiveWriter.PostEditor/ImageInsertion/DisplayMessages/NoPreviewAvailableDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/ImageInsertion/DisplayMessages/NoPreviewAvailableDisplayMessage.cs
index 28495e84..252c2724 100644
--- a/src/managed/OpenLiveWriter.PostEditor/ImageInsertion/DisplayMessages/NoPreviewAvailableDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/ImageInsertion/DisplayMessages/NoPreviewAvailableDisplayMessage.cs
@@ -6,65 +6,65 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.ImageInsertion.DisplayMessages
{
- ///
- /// Summary description for NoPreviewAvailableDisplayMessage.
- ///
- public class NoPreviewAvailableDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for NoPreviewAvailableDisplayMessage.
+ ///
+ public class NoPreviewAvailableDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public NoPreviewAvailableDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public NoPreviewAvailableDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public NoPreviewAvailableDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public NoPreviewAvailableDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // NoPreviewAvailableDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
- this.Text = "Preview is currently unavailable. Please check the entered URL and your network connection.";
- this.Title = "Preview Unavailable";
- this.Type = DisplayMessageType.Information;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // NoPreviewAvailableDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.OK;
+ this.Text = "Preview is currently unavailable. Please check the entered URL and your network connection.";
+ this.Title = "Preview Unavailable";
+ this.Type = DisplayMessageType.Information;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/InlineEditField.cs b/src/managed/OpenLiveWriter.PostEditor/InlineEditField.cs
index 18f4d908..907905c7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/InlineEditField.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/InlineEditField.cs
@@ -36,7 +36,6 @@ namespace OpenLiveWriter.PostEditor
_undoRedoCheck = undoRedoCheck;
}
-
public string TextValue
{
// The innerText may contain a shortened form of the title
diff --git a/src/managed/OpenLiveWriter.PostEditor/JumpList/JumpListCustomCategory.cs b/src/managed/OpenLiveWriter.PostEditor/JumpList/JumpListCustomCategory.cs
index e129cdf7..75d8ae85 100644
--- a/src/managed/OpenLiveWriter.PostEditor/JumpList/JumpListCustomCategory.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/JumpList/JumpListCustomCategory.cs
@@ -59,7 +59,6 @@ namespace OpenLiveWriter.PostEditor.JumpList
}
}
-
///
/// Add JumpList items for this category
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardManager.cs b/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardManager.cs
index eb1a8278..30473431 100644
--- a/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardManager.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardManager.cs
@@ -219,7 +219,6 @@ namespace OpenLiveWriter.PostEditor.LiveClipboard
}
}
-
public static ContentSourceInfo[] GetContentSourcesForFormat(LiveClipboardFormat format)
{
ArrayList contentSources = new ArrayList();
diff --git a/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferences.cs b/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferences.cs
index 2eccee55..709c4066 100644
--- a/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferences.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferences.cs
@@ -23,6 +23,5 @@ namespace OpenLiveWriter.PostEditor.LiveClipboard
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferencesPanel.cs b/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferencesPanel.cs
index c6fd6e9b..a01d67ea 100644
--- a/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferencesPanel.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/LiveClipboard/LiveClipboardPreferencesPanel.cs
@@ -485,6 +485,5 @@ namespace OpenLiveWriter.PostEditor.LiveClipboard
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Mail/WindowsLiveMailContentTarget.cs b/src/managed/OpenLiveWriter.PostEditor/Mail/WindowsLiveMailContentTarget.cs
index f914c45d..ca068c0e 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Mail/WindowsLiveMailContentTarget.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Mail/WindowsLiveMailContentTarget.cs
@@ -108,5 +108,4 @@ namespace OpenLiveWriter.Mail
}
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostListBox.cs b/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostListBox.cs
index a456c67e..a3d5e8e7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostListBox.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostListBox.cs
@@ -116,7 +116,6 @@ namespace OpenLiveWriter.PostEditor.OpenPost
}
private bool _showPages = false;
-
public PostInfo SelectedPost
{
get
diff --git a/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListBox.cs b/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListBox.cs
index f81eb5bd..88436d2d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListBox.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListBox.cs
@@ -239,7 +239,6 @@ namespace OpenLiveWriter.PostEditor.OpenPost
}
}
-
#endregion
#region Accessibility
@@ -411,7 +410,6 @@ namespace OpenLiveWriter.PostEditor.OpenPost
private const int ELEMENT_PADDING = 3;
private const int TITLE_LINES = 2;
-
// view mode
private bool _showLargeIcons;
diff --git a/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListView.cs b/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListView.cs
index 459356c0..437f9781 100644
--- a/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListView.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/OpenPost/BlogPostSourceListView.cs
@@ -11,117 +11,112 @@ using OpenLiveWriter.Interop.Windows;
namespace OpenLiveWriter.PostEditor.OpenPost
{
- public class BlogPostSourceListView : ListView
- {
- public BlogPostSourceListView()
- {
- }
+ public class BlogPostSourceListView : ListView
+ {
+ public BlogPostSourceListView()
+ {
+ }
+ // separate initialize to prevent this code from executing in the designer
+ public void Initialize()
+ {
+ View = View.LargeIcon ;
+ MultiSelect = false ;
+ HideSelection = false ;
+ LabelEdit = false ;
+ LabelWrap = true ;
- // separate initialize to prevent this code from executing in the designer
- public void Initialize()
- {
- View = View.LargeIcon ;
- MultiSelect = false ;
- HideSelection = false ;
- LabelEdit = false ;
- LabelWrap = true ;
+ _imageList = new ImageList();
+ _imageList.ImageSize = new Size(IMAGE_HEIGHT,IMAGE_WIDTH);
+ _imageList.ColorDepth = ColorDepth.Depth32Bit ;
+ _imageList.Images.Add( ResourceHelper.LoadAssemblyResourceBitmap("OpenPost.Images.SelectDraftPostings.png") ) ;
+ _imageList.Images.Add( ResourceHelper.LoadAssemblyResourceBitmap("OpenPost.Images.SelectRecentPostings.png") ) ;
+ _imageList.Images.Add( ResourceHelper.LoadAssemblyResourceBitmap("OpenPost.Images.SelectWebLogPostings.png") ) ;
+ LargeImageList = _imageList ;
- _imageList = new ImageList();
- _imageList.ImageSize = new Size(IMAGE_HEIGHT,IMAGE_WIDTH);
- _imageList.ColorDepth = ColorDepth.Depth32Bit ;
- _imageList.Images.Add( ResourceHelper.LoadAssemblyResourceBitmap("OpenPost.Images.SelectDraftPostings.png") ) ;
- _imageList.Images.Add( ResourceHelper.LoadAssemblyResourceBitmap("OpenPost.Images.SelectRecentPostings.png") ) ;
- _imageList.Images.Add( ResourceHelper.LoadAssemblyResourceBitmap("OpenPost.Images.SelectWebLogPostings.png") ) ;
- LargeImageList = _imageList ;
+ // apply initial sizing
+ UpdateIconSize() ;
- // apply initial sizing
- UpdateIconSize() ;
+ AddPostSource( new LocalDraftsPostSource(), DRAFT_IMAGE_INDEX ) ;
+ AddPostSource( new LocalRecentPostsPostSource(), RECENT_POSTS_IMAGE_INDEX ) ;
- AddPostSource( new LocalDraftsPostSource(), DRAFT_IMAGE_INDEX ) ;
- AddPostSource( new LocalRecentPostsPostSource(), RECENT_POSTS_IMAGE_INDEX ) ;
+ foreach ( string blogId in BlogSettings.GetBlogIds() )
+ AddPostSource( new RemoteWeblogBlogPostSource(blogId), WEBLOG_IMAGE_INDEX ) ;
- foreach ( string blogId in BlogSettings.GetBlogIds() )
- AddPostSource( new RemoteWeblogBlogPostSource(blogId), WEBLOG_IMAGE_INDEX ) ;
+ // call again to reflect scrollbars that may now exist
+ UpdateIconSize() ;
+ }
- // call again to reflect scrollbars that may now exist
- UpdateIconSize() ;
- }
+ protected override void OnSizeChanged(EventArgs e)
+ {
+ base.OnSizeChanged (e);
+ UpdateIconSize() ;
+ }
+ private void UpdateIconSize()
+ {
+ int width = Width - 8 ; // prevent horizontal scrollbar
+ if ( ControlHelper.ControlHasVerticalScrollbar(this) )
+ width -= SystemInformation.VerticalScrollBarWidth ;
- protected override void OnSizeChanged(EventArgs e)
- {
- base.OnSizeChanged (e);
- UpdateIconSize() ;
- }
+ const int ICON_PADDING = 10;
+ int height = Convert.ToInt32(IMAGE_HEIGHT + (Font.GetHeight() * 2)) + ICON_PADDING ;
+ const uint LVM_FIRST = 0x1000 ;
+ const uint LVM_SETICONSPACING = (LVM_FIRST + 53) ;
+ User32.SendMessage( Handle, LVM_SETICONSPACING, UIntPtr.Zero, MessageHelper.MAKELONG(width,height) ) ;
+ }
- private void UpdateIconSize()
- {
- int width = Width - 8 ; // prevent horizontal scrollbar
- if ( ControlHelper.ControlHasVerticalScrollbar(this) )
- width -= SystemInformation.VerticalScrollBarWidth ;
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ _imageList.Dispose() ;
- const int ICON_PADDING = 10;
- int height = Convert.ToInt32(IMAGE_HEIGHT + (Font.GetHeight() * 2)) + ICON_PADDING ;
+ }
+ base.Dispose (disposing);
+ }
- const uint LVM_FIRST = 0x1000 ;
- const uint LVM_SETICONSPACING = (LVM_FIRST + 53) ;
- User32.SendMessage( Handle, LVM_SETICONSPACING, UIntPtr.Zero, MessageHelper.MAKELONG(width,height) ) ;
- }
+ public void SelectDrafts()
+ {
+ Items[0].Selected = true ;
+ }
+ public void SelectRecentPosts()
+ {
+ Items[1].Selected = true ;
+ }
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- _imageList.Dispose() ;
+ public IPostEditorPostSource SelectedPostSource
+ {
+ get
+ {
+ IPostEditorPostSource postSource = null ;
+ foreach ( ListViewItem item in SelectedItems )
+ {
+ postSource = item.Tag as IPostEditorPostSource ;
+ break;
+ }
+ return postSource ;
+ }
+ }
- }
- base.Dispose (disposing);
- }
+ private void AddPostSource( IPostEditorPostSource postSource, int imageIndex )
+ {
+ ListViewItem item = new ListViewItem();
+ item.Text = postSource.Name ;
+ item.Tag = postSource ;
+ item.ImageIndex = imageIndex ;
+ Items.Add(item) ;
+ }
+ private ImageList _imageList ;
+ private const int DRAFT_IMAGE_INDEX = 0 ;
+ private const int RECENT_POSTS_IMAGE_INDEX = 1;
+ private const int WEBLOG_IMAGE_INDEX = 2 ;
- public void SelectDrafts()
- {
- Items[0].Selected = true ;
- }
+ private const int IMAGE_WIDTH = 32 ;
+ private const int IMAGE_HEIGHT = 32 ;
- public void SelectRecentPosts()
- {
- Items[1].Selected = true ;
- }
-
- public IPostEditorPostSource SelectedPostSource
- {
- get
- {
- IPostEditorPostSource postSource = null ;
- foreach ( ListViewItem item in SelectedItems )
- {
- postSource = item.Tag as IPostEditorPostSource ;
- break;
- }
- return postSource ;
- }
- }
-
- private void AddPostSource( IPostEditorPostSource postSource, int imageIndex )
- {
- ListViewItem item = new ListViewItem();
- item.Text = postSource.Name ;
- item.Tag = postSource ;
- item.ImageIndex = imageIndex ;
- Items.Add(item) ;
- }
-
- private ImageList _imageList ;
- private const int DRAFT_IMAGE_INDEX = 0 ;
- private const int RECENT_POSTS_IMAGE_INDEX = 1;
- private const int WEBLOG_IMAGE_INDEX = 2 ;
-
- private const int IMAGE_WIDTH = 32 ;
- private const int IMAGE_HEIGHT = 32 ;
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/OpenPost/MissingPostLinkForm.cs b/src/managed/OpenLiveWriter.PostEditor/OpenPost/MissingPostLinkForm.cs
index 940726da..88a9a737 100644
--- a/src/managed/OpenLiveWriter.PostEditor/OpenPost/MissingPostLinkForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/OpenPost/MissingPostLinkForm.cs
@@ -15,136 +15,136 @@ using OpenLiveWriter.PostEditor ;
namespace OpenLiveWriter.PostEditor.OpenPost
{
- ///
- /// Summary description for MissingPostLinkForm.
- ///
- public class MissingPostLinkForm : ApplicationDialog
- {
- private System.Windows.Forms.Button buttonOK;
- private System.Windows.Forms.PictureBox pictureBoxError;
- private System.Windows.Forms.Label labelTitle;
- private System.Windows.Forms.Label labelExplanation;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for MissingPostLinkForm.
+ ///
+ public class MissingPostLinkForm : ApplicationDialog
+ {
+ private System.Windows.Forms.Button buttonOK;
+ private System.Windows.Forms.PictureBox pictureBoxError;
+ private System.Windows.Forms.Label labelTitle;
+ private System.Windows.Forms.Label labelExplanation;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public MissingPostLinkForm(PostInfo postInfo)
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ public MissingPostLinkForm(PostInfo postInfo)
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- this.buttonOK.Text = Res.Get(StringId.OKButtonText);
- this.labelTitle.Text = Res.Get(StringId.MissingPostLinkCaption);
- this.labelExplanation.Text = Res.Get(StringId.MissingPostLinkExplanation);
- this.Text = Res.Get(StringId.MissingPostLinkTitle);
+ this.buttonOK.Text = Res.Get(StringId.OKButtonText);
+ this.labelTitle.Text = Res.Get(StringId.MissingPostLinkCaption);
+ this.labelExplanation.Text = Res.Get(StringId.MissingPostLinkExplanation);
+ this.Text = Res.Get(StringId.MissingPostLinkTitle);
- this.labelTitle.Font = Res.GetFont(FontSize.XLarge, FontStyle.Bold);
- string entityName = postInfo.IsPage ? Res.Get(StringId.Page) : Res.Get(StringId.Post) ;
- string entityNameLower = postInfo.IsPage ? Res.Get(StringId.PageLower) : Res.Get(StringId.PostLower) ;
+ this.labelTitle.Font = Res.GetFont(FontSize.XLarge, FontStyle.Bold);
+ string entityName = postInfo.IsPage ? Res.Get(StringId.Page) : Res.Get(StringId.Post) ;
+ string entityNameLower = postInfo.IsPage ? Res.Get(StringId.PageLower) : Res.Get(StringId.PostLower) ;
- labelTitle.Text = String.Format(CultureInfo.CurrentCulture, labelTitle.Text, entityName ) ;
- labelExplanation.Text = String.Format(CultureInfo.CurrentCulture, labelExplanation.Text, entityNameLower, ApplicationEnvironment.ProductName) ;
- }
+ labelTitle.Text = String.Format(CultureInfo.CurrentCulture, labelTitle.Text, entityName ) ;
+ labelExplanation.Text = String.Format(CultureInfo.CurrentCulture, labelExplanation.Text, entityNameLower, ApplicationEnvironment.ProductName) ;
+ }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad (e);
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad (e);
- using (new AutoGrow(this, AnchorStyles.Bottom, true))
- {
- LayoutHelper.NaturalizeHeightAndDistribute(8, labelTitle, labelExplanation);
- LayoutHelper.FitControlsBelow(12, labelExplanation);
- }
- }
+ using (new AutoGrow(this, AnchorStyles.Bottom, true))
+ {
+ LayoutHelper.NaturalizeHeightAndDistribute(8, labelTitle, labelExplanation);
+ LayoutHelper.FitControlsBelow(12, labelExplanation);
+ }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MissingPostLinkForm));
- this.buttonOK = new System.Windows.Forms.Button();
- this.pictureBoxError = new System.Windows.Forms.PictureBox();
- this.labelTitle = new System.Windows.Forms.Label();
- this.labelExplanation = new System.Windows.Forms.Label();
- this.SuspendLayout();
- //
- // buttonOK
- //
- this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.buttonOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonOK.Location = new System.Drawing.Point(130, 152);
- this.buttonOK.Name = "buttonOK";
- this.buttonOK.TabIndex = 4;
- this.buttonOK.Text = "OK";
- //
- // pictureBoxError
- //
- this.pictureBoxError.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxError.Image")));
- this.pictureBoxError.Location = new System.Drawing.Point(10, 10);
- this.pictureBoxError.Name = "pictureBoxError";
- this.pictureBoxError.Size = new System.Drawing.Size(39, 40);
- this.pictureBoxError.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
- this.pictureBoxError.TabIndex = 5;
- this.pictureBoxError.TabStop = false;
- //
- // labelTitle
- //
- this.labelTitle.Font = Res.GetFont(FontSize.XLarge, FontStyle.Bold);
- this.labelTitle.Location = new System.Drawing.Point(61, 21);
- this.labelTitle.Name = "labelTitle";
- this.labelTitle.Size = new System.Drawing.Size(237, 23);
- this.labelTitle.TabIndex = 6;
- this.labelTitle.Text = "No Link Available for {0}";
- //
- // labelExplanation
- //
- this.labelExplanation.Location = new System.Drawing.Point(61, 48);
- this.labelExplanation.Name = "labelExplanation";
- this.labelExplanation.Size = new System.Drawing.Size(260, 96);
- this.labelExplanation.TabIndex = 7;
- this.labelExplanation.Text = @"There is no link available for the selected {0}. This may be because your weblog service does not make {0} links available to {1}. You may be able to resolve this problem by redetecting your weblog account configuration using the Accounts panel of the Weblog Settings dialog.";
- //
- // MissingPostLinkForm
- //
- this.AcceptButton = this.buttonOK;
- this.CancelButton = this.buttonOK;
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.ClientSize = new System.Drawing.Size(335, 184);
- this.ControlBox = false;
- this.Controls.Add(this.labelExplanation);
- this.Controls.Add(this.labelTitle);
- this.Controls.Add(this.pictureBoxError);
- this.Controls.Add(this.buttonOK);
- this.Location = new System.Drawing.Point(0, 0);
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "MissingPostLinkForm";
- this.Text = "No Link Available";
- this.ResumeLayout(false);
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MissingPostLinkForm));
+ this.buttonOK = new System.Windows.Forms.Button();
+ this.pictureBoxError = new System.Windows.Forms.PictureBox();
+ this.labelTitle = new System.Windows.Forms.Label();
+ this.labelExplanation = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // buttonOK
+ //
+ this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.buttonOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonOK.Location = new System.Drawing.Point(130, 152);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.TabIndex = 4;
+ this.buttonOK.Text = "OK";
+ //
+ // pictureBoxError
+ //
+ this.pictureBoxError.Image = ((System.Drawing.Image)(resources.GetObject("pictureBoxError.Image")));
+ this.pictureBoxError.Location = new System.Drawing.Point(10, 10);
+ this.pictureBoxError.Name = "pictureBoxError";
+ this.pictureBoxError.Size = new System.Drawing.Size(39, 40);
+ this.pictureBoxError.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+ this.pictureBoxError.TabIndex = 5;
+ this.pictureBoxError.TabStop = false;
+ //
+ // labelTitle
+ //
+ this.labelTitle.Font = Res.GetFont(FontSize.XLarge, FontStyle.Bold);
+ this.labelTitle.Location = new System.Drawing.Point(61, 21);
+ this.labelTitle.Name = "labelTitle";
+ this.labelTitle.Size = new System.Drawing.Size(237, 23);
+ this.labelTitle.TabIndex = 6;
+ this.labelTitle.Text = "No Link Available for {0}";
+ //
+ // labelExplanation
+ //
+ this.labelExplanation.Location = new System.Drawing.Point(61, 48);
+ this.labelExplanation.Name = "labelExplanation";
+ this.labelExplanation.Size = new System.Drawing.Size(260, 96);
+ this.labelExplanation.TabIndex = 7;
+ this.labelExplanation.Text = @"There is no link available for the selected {0}. This may be because your weblog service does not make {0} links available to {1}. You may be able to resolve this problem by redetecting your weblog account configuration using the Accounts panel of the Weblog Settings dialog.";
+ //
+ // MissingPostLinkForm
+ //
+ this.AcceptButton = this.buttonOK;
+ this.CancelButton = this.buttonOK;
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.ClientSize = new System.Drawing.Size(335, 184);
+ this.ControlBox = false;
+ this.Controls.Add(this.labelExplanation);
+ this.Controls.Add(this.labelTitle);
+ this.Controls.Add(this.pictureBoxError);
+ this.Controls.Add(this.buttonOK);
+ this.Location = new System.Drawing.Point(0, 0);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "MissingPostLinkForm";
+ this.Text = "No Link Available";
+ this.ResumeLayout(false);
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/OpenPost/OpenPostForm.cs b/src/managed/OpenLiveWriter.PostEditor/OpenPost/OpenPostForm.cs
index 5da1fded..bb89e86b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/OpenPost/OpenPostForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/OpenPost/OpenPostForm.cs
@@ -437,7 +437,6 @@ namespace OpenLiveWriter.PostEditor.OpenPost
// This width depends on the contents of the combo, which are dynamic
DisplayHelper.AutoFitSystemCombo(comboBoxPosts, 0, int.MaxValue, false);
-
int HPADDING = GetHpadding();
int x;
@@ -530,7 +529,6 @@ namespace OpenLiveWriter.PostEditor.OpenPost
PostEditorSettings.OpenPostFormSize = Size;
}
-
private void SaveNumberOfPostsSettings()
{
// get post data/context to save
@@ -857,7 +855,6 @@ namespace OpenLiveWriter.PostEditor.OpenPost
}
#endregion
-
private Button buttonOK;
private Button buttonCancel;
private BlogPostSourceListBox listBoxPostSources;
@@ -896,4 +893,3 @@ namespace OpenLiveWriter.PostEditor.OpenPost
}
}
-
diff --git a/src/managed/OpenLiveWriter.PostEditor/OpenPost/SelectPostLinkForm.cs b/src/managed/OpenLiveWriter.PostEditor/OpenPost/SelectPostLinkForm.cs
index d3672a11..cc312b73 100644
--- a/src/managed/OpenLiveWriter.PostEditor/OpenPost/SelectPostLinkForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/OpenPost/SelectPostLinkForm.cs
@@ -84,7 +84,6 @@ namespace OpenLiveWriter.PostEditor.OpenPost
}
}
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/PluginSettingsAdaptor.cs b/src/managed/OpenLiveWriter.PostEditor/PluginSettingsAdaptor.cs
index 1be03f83..87995843 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PluginSettingsAdaptor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PluginSettingsAdaptor.cs
@@ -95,7 +95,6 @@ namespace OpenLiveWriter.PostEditor
RemoveSubProperties(subPropertyName);
}
-
public string[] Names
{
get { return SettingsHelper.GetNames(); }
@@ -114,7 +113,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
public IProperties GetSubProperties(string key)
{
return new PluginSettingsAdaptor(SettingsHelper.GetSubSettings(key));
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostDeleteHelper.cs b/src/managed/OpenLiveWriter.PostEditor/PostDeleteHelper.cs
index 59ae9391..fb11605a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostDeleteHelper.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostDeleteHelper.cs
@@ -69,7 +69,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
public static bool SafeDeleteLocalPost(string blogId, string postId)
{
try
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorFile.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorFile.cs
index 1fac8f83..6f9199a2 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorFile.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorFile.cs
@@ -206,7 +206,6 @@ namespace OpenLiveWriter.PostEditor
#region Initialization Helpers
-
private PostEditorFile(DirectoryInfo targetDirectory)
{
TargetDirectory = targetDirectory;
@@ -617,7 +616,6 @@ namespace OpenLiveWriter.PostEditor
return TargetFile.GetHashCode();
}
-
#endregion
#region Helpers for managing post file names, etc.
@@ -913,7 +911,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
private void WritePingUrls(XmlTextWriter writer, object pingUrls)
{
writer.WriteStartElement(PING_URLS_ELEMENT);
@@ -1642,7 +1639,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
private static void WriteBlogPostSettingsBag(XmlTextWriter writer, BlogPostSettingsBag settings, string name)
{
writer.WriteStartElement(SETTINGS_BAG_ELEMENT);
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition.cs
index 69a68ffc..9410be07 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition.cs
@@ -6,78 +6,78 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor
{
- public class PostEditorFormCommandBarDefinition : CommandBarDefinition
- {
- public PostEditorFormCommandBarDefinition()
+ public class PostEditorFormCommandBarDefinition : CommandBarDefinition
+ {
+ public PostEditorFormCommandBarDefinition()
- {
- // required for designer support
- InitializeComponent() ;
+ {
+ // required for designer support
+ InitializeComponent() ;
- }
- private CommandBarButtonEntry commandBarButtonEntryPostAndPublish;
- private CommandBarButtonEntry commandBarButtonEntrySavePost;
- private CommandBarButtonEntry commandBarButtonEntryNewPost;
- private CommandBarButtonEntry commandBarButtonEntryOpenPost;
- private CommandBarButtonEntry commandBarButtonEntryWeblogMenu;
- private CommandBarSeparatorEntry commandBarSeparatorEntry3;
- private CommandBarSeparatorEntry commandBarSeparatorEntry4;
- private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryHtmlView;
+ }
+ private CommandBarButtonEntry commandBarButtonEntryPostAndPublish;
+ private CommandBarButtonEntry commandBarButtonEntrySavePost;
+ private CommandBarButtonEntry commandBarButtonEntryNewPost;
+ private CommandBarButtonEntry commandBarButtonEntryOpenPost;
+ private CommandBarButtonEntry commandBarButtonEntryWeblogMenu;
+ private CommandBarSeparatorEntry commandBarSeparatorEntry3;
+ private CommandBarSeparatorEntry commandBarSeparatorEntry4;
+ private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryHtmlView;
- private IContainer components;
+ private IContainer components;
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.commandBarButtonEntryPostAndPublish = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntrySavePost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryNewPost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryOpenPost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryWeblogMenu = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarSeparatorEntry3 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
- this.commandBarSeparatorEntry4 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
- this.commandBarButtonEntryHtmlView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- //
- // commandBarButtonEntryPostAndPublish
- //
- this.commandBarButtonEntryPostAndPublish.CommandIdentifier = "OpenLiveWriter.PostAndPublish";
- //
- // commandBarButtonEntrySavePost
- //
- this.commandBarButtonEntrySavePost.CommandIdentifier = "OpenLiveWriter.PostEditor.SavePost";
- //
- // commandBarButtonEntryNewPost
- //
- this.commandBarButtonEntryNewPost.CommandIdentifier = "OpenLiveWriter.PostEditor.NewPost";
- //
- // commandBarButtonEntryOpenPost
- //
- this.commandBarButtonEntryOpenPost.CommandIdentifier = "OpenLiveWriter.PostEditor.OpenPost";
- //
- // commandBarButtonEntryWeblogMenu
- //
- this.commandBarButtonEntryWeblogMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.WeblogMenu";
- //
- // commandBarButtonEntryHtmlView
- //
- this.commandBarButtonEntryHtmlView.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.HtmlViewMenu";
- //
- // PostEditorFormCommandBarDefinition
- //
- this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
- this.commandBarButtonEntryNewPost,
- //this.commandBarSeparatorEntry1,
- this.commandBarButtonEntryOpenPost,
- //this.commandBarSeparatorEntry2,
- this.commandBarButtonEntrySavePost,
- this.commandBarSeparatorEntry3,
- this.commandBarButtonEntryHtmlView,
- this.commandBarSeparatorEntry4,
- this.commandBarButtonEntryPostAndPublish});
- this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
- this.commandBarButtonEntryWeblogMenu});
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.commandBarButtonEntryPostAndPublish = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntrySavePost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryNewPost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryOpenPost = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryWeblogMenu = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarSeparatorEntry3 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ this.commandBarSeparatorEntry4 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ this.commandBarButtonEntryHtmlView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ //
+ // commandBarButtonEntryPostAndPublish
+ //
+ this.commandBarButtonEntryPostAndPublish.CommandIdentifier = "OpenLiveWriter.PostAndPublish";
+ //
+ // commandBarButtonEntrySavePost
+ //
+ this.commandBarButtonEntrySavePost.CommandIdentifier = "OpenLiveWriter.PostEditor.SavePost";
+ //
+ // commandBarButtonEntryNewPost
+ //
+ this.commandBarButtonEntryNewPost.CommandIdentifier = "OpenLiveWriter.PostEditor.NewPost";
+ //
+ // commandBarButtonEntryOpenPost
+ //
+ this.commandBarButtonEntryOpenPost.CommandIdentifier = "OpenLiveWriter.PostEditor.OpenPost";
+ //
+ // commandBarButtonEntryWeblogMenu
+ //
+ this.commandBarButtonEntryWeblogMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.WeblogMenu";
+ //
+ // commandBarButtonEntryHtmlView
+ //
+ this.commandBarButtonEntryHtmlView.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.HtmlViewMenu";
+ //
+ // PostEditorFormCommandBarDefinition
+ //
+ this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
+ this.commandBarButtonEntryNewPost,
+ //this.commandBarSeparatorEntry1,
+ this.commandBarButtonEntryOpenPost,
+ //this.commandBarSeparatorEntry2,
+ this.commandBarButtonEntrySavePost,
+ this.commandBarSeparatorEntry3,
+ this.commandBarButtonEntryHtmlView,
+ this.commandBarSeparatorEntry4,
+ this.commandBarButtonEntryPostAndPublish});
+ this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
+ this.commandBarButtonEntryWeblogMenu});
- }
+ }
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition2.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition2.cs
index 7f528cb6..7d8b0fa7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition2.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorFormCommandBarDefinition2.cs
@@ -6,176 +6,175 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor
{
- public class PostEditorFormCommandBarDefinition2 : CommandBarDefinition
- {
- public PostEditorFormCommandBarDefinition2()
- {
- // required for designer support
- InitializeComponent() ;
+ public class PostEditorFormCommandBarDefinition2 : CommandBarDefinition
+ {
+ public PostEditorFormCommandBarDefinition2()
+ {
+ // required for designer support
+ InitializeComponent() ;
- }
+ }
- private CommandBarButtonEntry commandBarButtonEntryBold;
- private CommandBarButtonEntry commandBarButtonEntryItalic;
- private CommandBarButtonEntry commandBarButtonEntryUnderline;
- private CommandBarSeparatorEntry commandBarSeparatorEntry1;
- private CommandBarButtonEntry commandBarButtonEntryBullets;
- private CommandBarButtonEntry commandBarButtonEntryNumbers;
- private CommandBarSeparatorEntry commandBarSeparatorEntry3;
- private CommandBarButtonEntry commandBarButtonEntryInsertLink;
- private CommandBarButtonEntry commandBarButtonEntryNormalView ;
- private CommandBarButtonEntry commandBarButtonEntryCodeView ;
+ private CommandBarButtonEntry commandBarButtonEntryBold;
+ private CommandBarButtonEntry commandBarButtonEntryItalic;
+ private CommandBarButtonEntry commandBarButtonEntryUnderline;
+ private CommandBarSeparatorEntry commandBarSeparatorEntry1;
+ private CommandBarButtonEntry commandBarButtonEntryBullets;
+ private CommandBarButtonEntry commandBarButtonEntryNumbers;
+ private CommandBarSeparatorEntry commandBarSeparatorEntry3;
+ private CommandBarButtonEntry commandBarButtonEntryInsertLink;
+ private CommandBarButtonEntry commandBarButtonEntryNormalView ;
+ private CommandBarButtonEntry commandBarButtonEntryCodeView ;
// private CommandBarButtonEntry commandBarButtonEntryPostProperties ;
- private CommandBarSeparatorEntry commandBarSeparatorEntry2;
- private CommandBarSeparatorEntry commandBarSeparatorEntry4;
- private CommandBarSeparatorEntry commandBarSeparatorEntry5;
+ private CommandBarSeparatorEntry commandBarSeparatorEntry2;
+ private CommandBarSeparatorEntry commandBarSeparatorEntry4;
+ private CommandBarSeparatorEntry commandBarSeparatorEntry5;
// internal CommandBarControlEntry commandBarControlEntryCategories;
- internal CommandBarControlEntry commandBarControlEntryStyle;
+ internal CommandBarControlEntry commandBarControlEntryStyle;
// private CommandBarButtonEntry commandBarButtonEntryInsertPicture;
- private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryStrikethrough;
- private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryBlockquote;
- private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryRemoveLink;
- private CommandBarButtonEntry commandBarButtonEntrySpellCheck;
+ private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryStrikethrough;
+ private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryBlockquote;
+ private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryRemoveLink;
+ private CommandBarButtonEntry commandBarButtonEntrySpellCheck;
// private CommandBarSeparatorEntry commandBarSeparatorEntry6;
- private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryTableMenu;
- private OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry commandBarSeparatorEntry7;
+ private OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry commandBarButtonEntryTableMenu;
+ private OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry commandBarSeparatorEntry7;
- private IContainer components;
+ private IContainer components;
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.commandBarButtonEntryBold = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryItalic = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryUnderline = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarSeparatorEntry1 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
- this.commandBarButtonEntryBullets = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryNumbers = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryBlockquote = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarSeparatorEntry3 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.commandBarButtonEntryBold = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryItalic = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryUnderline = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarSeparatorEntry1 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ this.commandBarButtonEntryBullets = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryNumbers = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryBlockquote = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarSeparatorEntry3 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
// this.commandBarButtonEntryFontColor = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryInsertLink = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryNormalView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryCodeView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryInsertLink = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryNormalView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryCodeView = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
// this.commandBarButtonEntryPostProperties = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarSeparatorEntry2 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
- this.commandBarSeparatorEntry4 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
- this.commandBarSeparatorEntry5 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ this.commandBarSeparatorEntry2 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ this.commandBarSeparatorEntry4 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ this.commandBarSeparatorEntry5 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
// this.commandBarControlEntryCategories = new OpenLiveWriter.ApplicationFramework.CommandBarControlEntry(this.components);
- this.commandBarControlEntryStyle = new OpenLiveWriter.ApplicationFramework.CommandBarControlEntry(this.components);
+ this.commandBarControlEntryStyle = new OpenLiveWriter.ApplicationFramework.CommandBarControlEntry(this.components);
// this.commandBarButtonEntryInsertPicture = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryStrikethrough = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntryRemoveLink = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarButtonEntrySpellCheck = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryStrikethrough = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntryRemoveLink = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarButtonEntrySpellCheck = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
// this.commandBarSeparatorEntry6 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
- this.commandBarButtonEntryTableMenu = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
- this.commandBarSeparatorEntry7 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
- //
- // commandBarButtonEntryBold
- //
- this.commandBarButtonEntryBold.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bold";
- //
- // commandBarButtonEntryItalic
- //
- this.commandBarButtonEntryItalic.CommandIdentifier = "MindShare.ApplicationCore.Commands.Italic";
- //
- // commandBarButtonEntryUnderline
- //
- this.commandBarButtonEntryUnderline.CommandIdentifier = "MindShare.ApplicationCore.Commands.Underline";
- //
- // commandBarButtonEntryBullets
- //
- this.commandBarButtonEntryBullets.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bullets";
- //
- // commandBarButtonEntryNumbers
- //
- this.commandBarButtonEntryNumbers.CommandIdentifier = "MindShare.ApplicationCore.Commands.Numbers";
- //
- // commandBarButtonEntryBlockquote
- //
- this.commandBarButtonEntryBlockquote.CommandIdentifier = "MindShare.ApplicationCore.Commands.Blockquote";
- //
- // commandBarButtonEntryFontColor
- //
+ this.commandBarButtonEntryTableMenu = new OpenLiveWriter.ApplicationFramework.CommandBarButtonEntry(this.components);
+ this.commandBarSeparatorEntry7 = new OpenLiveWriter.ApplicationFramework.CommandBarSeparatorEntry(this.components);
+ //
+ // commandBarButtonEntryBold
+ //
+ this.commandBarButtonEntryBold.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bold";
+ //
+ // commandBarButtonEntryItalic
+ //
+ this.commandBarButtonEntryItalic.CommandIdentifier = "MindShare.ApplicationCore.Commands.Italic";
+ //
+ // commandBarButtonEntryUnderline
+ //
+ this.commandBarButtonEntryUnderline.CommandIdentifier = "MindShare.ApplicationCore.Commands.Underline";
+ //
+ // commandBarButtonEntryBullets
+ //
+ this.commandBarButtonEntryBullets.CommandIdentifier = "MindShare.ApplicationCore.Commands.Bullets";
+ //
+ // commandBarButtonEntryNumbers
+ //
+ this.commandBarButtonEntryNumbers.CommandIdentifier = "MindShare.ApplicationCore.Commands.Numbers";
+ //
+ // commandBarButtonEntryBlockquote
+ //
+ this.commandBarButtonEntryBlockquote.CommandIdentifier = "MindShare.ApplicationCore.Commands.Blockquote";
+ //
+ // commandBarButtonEntryFontColor
+ //
// this.commandBarButtonEntryFontColor.CommandIdentifier = "MindShare.ApplicationCore.Commands.FontColor";
- //
- // commandBarButtonEntryInsertLink
- //
- this.commandBarButtonEntryInsertLink.CommandIdentifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
- //
- // commandBarButtonEntryNormalView
- //
- this.commandBarButtonEntryNormalView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewNormal";
- //
- // commandBarButtonEntryCodeView
- //
- this.commandBarButtonEntryCodeView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewCode";
- //
- // commandBarButtonEntryPostProperties
- //
+ //
+ // commandBarButtonEntryInsertLink
+ //
+ this.commandBarButtonEntryInsertLink.CommandIdentifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
+ //
+ // commandBarButtonEntryNormalView
+ //
+ this.commandBarButtonEntryNormalView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewNormal";
+ //
+ // commandBarButtonEntryCodeView
+ //
+ this.commandBarButtonEntryCodeView.CommandIdentifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewCode";
+ //
+ // commandBarButtonEntryPostProperties
+ //
// this.commandBarButtonEntryPostProperties.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostProperties";
- //
- // commandBarControlEntryCategories
- //
+ //
+ // commandBarControlEntryCategories
+ //
// this.commandBarControlEntryCategories.Control = null;
- //
- // commandBarControlEntryStyle
- //
- this.commandBarControlEntryStyle.Control = null;
- //
- // commandBarButtonEntryInsertPicture
- //
+ //
+ // commandBarControlEntryStyle
+ //
+ this.commandBarControlEntryStyle.Control = null;
+ //
+ // commandBarButtonEntryInsertPicture
+ //
// this.commandBarButtonEntryInsertPicture.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertPicture";
- //
- // commandBarButtonEntryStrikethrough
- //
- this.commandBarButtonEntryStrikethrough.CommandIdentifier = "MindShare.ApplicationCore.Commands.Strikethrough";
- //
- // commandBarButtonEntryRemoveLink
- //
- this.commandBarButtonEntryRemoveLink.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandRemoveLink";
- //
- // commandBarButtonEntrySpellCheck
- //
- this.commandBarButtonEntrySpellCheck.CommandIdentifier = "MindShare.ApplicationCore.Commands.CheckSpelling";
- //
- // commandBarButtonEntryTableMenu
- //
- this.commandBarButtonEntryTableMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableMenu";
- //
- // PostEditorFormCommandBarDefinition2
- //
- this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
- this.commandBarControlEntryStyle,
- this.commandBarButtonEntryBold,
- this.commandBarButtonEntryItalic,
- this.commandBarButtonEntryUnderline,
- this.commandBarButtonEntryStrikethrough,
+ //
+ // commandBarButtonEntryStrikethrough
+ //
+ this.commandBarButtonEntryStrikethrough.CommandIdentifier = "MindShare.ApplicationCore.Commands.Strikethrough";
+ //
+ // commandBarButtonEntryRemoveLink
+ //
+ this.commandBarButtonEntryRemoveLink.CommandIdentifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandRemoveLink";
+ //
+ // commandBarButtonEntrySpellCheck
+ //
+ this.commandBarButtonEntrySpellCheck.CommandIdentifier = "MindShare.ApplicationCore.Commands.CheckSpelling";
+ //
+ // commandBarButtonEntryTableMenu
+ //
+ this.commandBarButtonEntryTableMenu.CommandIdentifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableMenu";
+ //
+ // PostEditorFormCommandBarDefinition2
+ //
+ this.LeftCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
+ this.commandBarControlEntryStyle,
+ this.commandBarButtonEntryBold,
+ this.commandBarButtonEntryItalic,
+ this.commandBarButtonEntryUnderline,
+ this.commandBarButtonEntryStrikethrough,
// this.commandBarButtonEntryFontColor,
- this.commandBarSeparatorEntry1,
- this.commandBarButtonEntryNumbers,
- this.commandBarButtonEntryBullets,
- this.commandBarSeparatorEntry2,
- this.commandBarButtonEntryBlockquote,
- this.commandBarSeparatorEntry3,
- this.commandBarButtonEntryInsertLink,
- this.commandBarButtonEntryRemoveLink,
+ this.commandBarSeparatorEntry1,
+ this.commandBarButtonEntryNumbers,
+ this.commandBarButtonEntryBullets,
+ this.commandBarSeparatorEntry2,
+ this.commandBarButtonEntryBlockquote,
+ this.commandBarSeparatorEntry3,
+ this.commandBarButtonEntryInsertLink,
+ this.commandBarButtonEntryRemoveLink,
// this.commandBarButtonEntryInsertPicture,
- this.commandBarSeparatorEntry7,
- this.commandBarButtonEntryTableMenu,
- this.commandBarSeparatorEntry5,
- this.commandBarButtonEntrySpellCheck,
+ this.commandBarSeparatorEntry7,
+ this.commandBarButtonEntryTableMenu,
+ this.commandBarSeparatorEntry5,
+ this.commandBarButtonEntrySpellCheck,
// this.commandBarSeparatorEntry6,
// this.commandBarButtonEntryPostProperties,
- });
+ });
/*
- this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
- this.commandBarControlEntryCategories});
+ this.RightCommandBarEntries.AddRange(new OpenLiveWriter.ApplicationFramework.CommandBarEntry[] {
+ this.commandBarControlEntryCategories});
*/
- }
+ }
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorInitializer.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorInitializer.cs
index 05592a71..3844af1c 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorInitializer.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorInitializer.cs
@@ -7,18 +7,18 @@ using OpenLiveWriter.PostEditor.ContentSources;
namespace OpenLiveWriter.PostEditor
{
- public sealed class PostEditorInitializer
- {
- ///
- /// global initializaiton which may show error dialogs or cause
- /// failure of the entire product to load
- ///
- public static bool Initialize()
- {
- // can show error dialog if plugin has missing or incorrect attributes
- ContentSourceManager.Initialize();
+ public sealed class PostEditorInitializer
+ {
+ ///
+ /// global initializaiton which may show error dialogs or cause
+ /// failure of the entire product to load
+ ///
+ public static bool Initialize()
+ {
+ // can show error dialog if plugin has missing or incorrect attributes
+ ContentSourceManager.Initialize();
- return true ;
- }
- }
+ return true ;
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorMainControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorMainControl.cs
index a9e53cfd..138677b1 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorMainControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorMainControl.cs
@@ -100,7 +100,6 @@ namespace OpenLiveWriter.PostEditor
private Container components = new Container();
#endregion
-
#region Initialization/Disposal
public PostEditorMainControl(IMainFrameWindow mainFrameWindow, IBlogPostEditingContext editingContext)
@@ -572,7 +571,6 @@ namespace OpenLiveWriter.PostEditor
private PostEditorMainControl _parent;
}
-
private void InitializePostPropertyEditors()
{
_styleComboControl = new HtmlStylePicker(this._htmlEditor);
@@ -1204,7 +1202,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
void IBlogPostEditingSite.ConfigureWeblogFtpUpload(string blogId)
{
if (WeblogSettingsManager.EditFtpImageUpload(FindForm(), blogId))
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorPluginManager.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorPluginManager.cs
index 0df2041f..b89da8fb 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorPluginManager.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorPluginManager.cs
@@ -25,8 +25,8 @@ namespace OpenLiveWriter.PostEditor
///
private Type[] SupportedPluginTypes = new Type[]
{
- // Note to developers: add a type here for each plugin interface type supported.
- typeof(WriterPlugin)
+ // Note to developers: add a type here for each plugin interface type supported.
+ typeof(WriterPlugin)
};
#region Public Methods
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorPostSource.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorPostSource.cs
index af74b660..4331a413 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorPostSource.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorPostSource.cs
@@ -195,7 +195,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
public class RemoteWeblogBlogPostSource : IPostEditorPostSource
{
public RemoteWeblogBlogPostSource(string blogId)
@@ -248,7 +247,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
public bool SupportsDelete
{
get
@@ -422,7 +420,6 @@ namespace OpenLiveWriter.PostEditor
private BlogPost[] _blogPosts;
}
-
///
/// Chooser source for local blog storage
///
@@ -649,7 +646,6 @@ namespace OpenLiveWriter.PostEditor
}
private static readonly RecentPostRequest _all = new RecentPostRequest(ALL_POSTS);
-
public string DisplayName
{
get { return _displayName; }
@@ -686,5 +682,4 @@ namespace OpenLiveWriter.PostEditor
public const int ALL_POSTS = Int32.MaxValue;
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostEditorPreferencesPanel.cs b/src/managed/OpenLiveWriter.PostEditor/PostEditorPreferencesPanel.cs
index a5629975..7ddb3e59 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostEditorPreferencesPanel.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostEditorPreferencesPanel.cs
@@ -138,7 +138,6 @@ namespace OpenLiveWriter.PostEditor
_wordCountPreferences.Save();
}
-
private void checkBoxViewWeblog_CheckedChanged(object sender, EventArgs e)
{
_postEditorPreferences.ViewPostAfterPublish = checkBoxViewWeblog.Checked;
@@ -404,6 +403,5 @@ namespace OpenLiveWriter.PostEditor
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Behaviors/BehaviorDragDropSource.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Behaviors/BehaviorDragDropSource.cs
index f96234f5..19eda5ed 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Behaviors/BehaviorDragDropSource.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Behaviors/BehaviorDragDropSource.cs
@@ -105,7 +105,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors
return false;
}
-
//
/// Pre-process mouse messages to detect drag-and-drop of selections
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditor.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditor.cs
index 3e042953..bc71a6c6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditor.cs
@@ -457,7 +457,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
private Command _commandClosePreview;
-
protected override void ManageCommandsForEditingMode()
{
base.ManageCommandsForEditingMode();
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorControl.cs
index 7c2c9fdc..8f38787e 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorControl.cs
@@ -671,7 +671,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
InvalidatePostBodyElement();
}
-
///
/// Removes editing styles that are known to cause buggy editing.
///
@@ -1200,7 +1199,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
}
}
-
public string GetEditedTitleHtml()
{
if (_titleBehavior != null && TitleBehavior.ElementBehaviorAttached)
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditor.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditor.cs
index 407db2e6..a292e109 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditor.cs
@@ -8,78 +8,78 @@ using OpenLiveWriter.PostEditor.Configuration;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- ///
- /// Summary description for ImageServiceSettingsEditor.
- ///
- public class BlogPostHtmlEditorSettingsEditor : IBlogSettingsEditor
- {
- public BlogPostHtmlEditorSettingsEditor()
- {
- }
+ ///
+ /// Summary description for ImageServiceSettingsEditor.
+ ///
+ public class BlogPostHtmlEditorSettingsEditor : IBlogSettingsEditor
+ {
+ public BlogPostHtmlEditorSettingsEditor()
+ {
+ }
- private BlogPostHtmlEditorSettingsEditorControl HtmlEditorSettingsControl
- {
- get
- {
- if(_htmlEditorSettingsControl == null)
- {
- _htmlEditorSettingsControl = new BlogPostHtmlEditorSettingsEditorControl();
- _htmlEditorSettingsControl.SettingsChanged += new EventHandler(_htmlEditorSettingsControl_SettingsChanged);
- }
- return _htmlEditorSettingsControl;
- }
- }
- private BlogPostHtmlEditorSettingsEditorControl _htmlEditorSettingsControl;
+ private BlogPostHtmlEditorSettingsEditorControl HtmlEditorSettingsControl
+ {
+ get
+ {
+ if(_htmlEditorSettingsControl == null)
+ {
+ _htmlEditorSettingsControl = new BlogPostHtmlEditorSettingsEditorControl();
+ _htmlEditorSettingsControl.SettingsChanged += new EventHandler(_htmlEditorSettingsControl_SettingsChanged);
+ }
+ return _htmlEditorSettingsControl;
+ }
+ }
+ private BlogPostHtmlEditorSettingsEditorControl _htmlEditorSettingsControl;
- public event EventHandler SettingsChanged;
- protected void OnSettingsChanged(EventArgs evt)
- {
- if(SettingsChanged != null)
- {
- SettingsChanged(this, evt);
- }
- }
+ public event EventHandler SettingsChanged;
+ protected void OnSettingsChanged(EventArgs evt)
+ {
+ if(SettingsChanged != null)
+ {
+ SettingsChanged(this, evt);
+ }
+ }
- private BlogSettings _settings;
- bool _initing;
- public void Init(BlogSettings settings)
- {
- _initing = true;
- _settings = settings;
- HtmlEditorSettingsControl.LoadSettings(settings);
- _initing = false;
- }
+ private BlogSettings _settings;
+ bool _initing;
+ public void Init(BlogSettings settings)
+ {
+ _initing = true;
+ _settings = settings;
+ HtmlEditorSettingsControl.LoadSettings(settings);
+ _initing = false;
+ }
- public Control EditorControl
- {
- get { return HtmlEditorSettingsControl; }
- }
+ public Control EditorControl
+ {
+ get { return HtmlEditorSettingsControl; }
+ }
- public void ApplySettings()
- {
- HtmlEditorSettingsControl.ApplySettings(_settings);
- }
+ public void ApplySettings()
+ {
+ HtmlEditorSettingsControl.ApplySettings(_settings);
+ }
- public string Title
- {
- get { return "Editor"; }
- }
+ public string Title
+ {
+ get { return "Editor"; }
+ }
- public virtual void Dispose()
- {
- if(_htmlEditorSettingsControl != null)
- {
- _htmlEditorSettingsControl.SettingsChanged -= new EventHandler(_htmlEditorSettingsControl_SettingsChanged);
- _htmlEditorSettingsControl.Dispose();
- _htmlEditorSettingsControl = null;
- }
- _settings = null;
- }
+ public virtual void Dispose()
+ {
+ if(_htmlEditorSettingsControl != null)
+ {
+ _htmlEditorSettingsControl.SettingsChanged -= new EventHandler(_htmlEditorSettingsControl_SettingsChanged);
+ _htmlEditorSettingsControl.Dispose();
+ _htmlEditorSettingsControl = null;
+ }
+ _settings = null;
+ }
- private void _htmlEditorSettingsControl_SettingsChanged(object sender, EventArgs e)
- {
- if(!_initing)
- OnSettingsChanged(e);
- }
- }
+ private void _htmlEditorSettingsControl_SettingsChanged(object sender, EventArgs e)
+ {
+ if(!_initing)
+ OnSettingsChanged(e);
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditorControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditorControl.cs
index 420115d2..183d3f42 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditorControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/BlogPostHtmlEditorSettingsEditorControl.cs
@@ -12,173 +12,173 @@ using OpenLiveWriter.CoreServices.Progress;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- ///
- /// Summary description for ImageServiceSettingsEditorControl.
- ///
- public class BlogPostHtmlEditorSettingsEditorControl : UserControl
- {
- private Button buttonLoadTemplate;
- private Label label2;
- private Label label1;
- private TextBox textBoxTemplate;
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for ImageServiceSettingsEditorControl.
+ ///
+ public class BlogPostHtmlEditorSettingsEditorControl : UserControl
+ {
+ private Button buttonLoadTemplate;
+ private Label label2;
+ private Label label1;
+ private TextBox textBoxTemplate;
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public BlogPostHtmlEditorSettingsEditorControl()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public BlogPostHtmlEditorSettingsEditorControl()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.buttonLoadTemplate = new System.Windows.Forms.Button();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.textBoxTemplate = new System.Windows.Forms.TextBox();
- this.SuspendLayout();
- //
- // buttonLoadTemplate
- //
- this.buttonLoadTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonLoadTemplate.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonLoadTemplate.Location = new System.Drawing.Point(232, 196);
- this.buttonLoadTemplate.Name = "buttonLoadTemplate";
- this.buttonLoadTemplate.Size = new System.Drawing.Size(112, 23);
- this.buttonLoadTemplate.TabIndex = 19;
- this.buttonLoadTemplate.Text = "Download template";
- this.buttonLoadTemplate.Click += new System.EventHandler(this.buttonLoadTemplate_Click);
- //
- // label2
- //
- this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.label2.Location = new System.Drawing.Point(0, 0);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(104, 16);
- this.label2.TabIndex = 20;
- this.label2.Text = "Template:";
- //
- // label1
- //
- this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.label1.Location = new System.Drawing.Point(0, 160);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(344, 48);
- this.label1.TabIndex = 23;
- this.label1.Text = "Download an editing template based on your weblog. This will post a temporary it" +
- "em to your blog that can be used to detect the editing styles for items posted t" +
- "o your blog.";
- //
- // textBoxTemplate
- //
- this.textBoxTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxTemplate.Location = new System.Drawing.Point(0, 16);
- this.textBoxTemplate.Multiline = true;
- this.textBoxTemplate.Name = "textBoxTemplate";
- this.textBoxTemplate.ScrollBars = System.Windows.Forms.ScrollBars.Both;
- this.textBoxTemplate.Size = new System.Drawing.Size(344, 136);
- this.textBoxTemplate.TabIndex = 24;
- this.textBoxTemplate.Text = "";
- this.textBoxTemplate.TextChanged += new System.EventHandler(this.textBoxTemplate_TextChanged);
- //
- // BlogPostHtmlEditorSettingsEditorControl
- //
- this.Controls.Add(this.textBoxTemplate);
- this.Controls.Add(this.buttonLoadTemplate);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Name = "BlogPostHtmlEditorSettingsEditorControl";
- this.Size = new System.Drawing.Size(344, 252);
- this.ResumeLayout(false);
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.buttonLoadTemplate = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.textBoxTemplate = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // buttonLoadTemplate
+ //
+ this.buttonLoadTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonLoadTemplate.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonLoadTemplate.Location = new System.Drawing.Point(232, 196);
+ this.buttonLoadTemplate.Name = "buttonLoadTemplate";
+ this.buttonLoadTemplate.Size = new System.Drawing.Size(112, 23);
+ this.buttonLoadTemplate.TabIndex = 19;
+ this.buttonLoadTemplate.Text = "Download template";
+ this.buttonLoadTemplate.Click += new System.EventHandler(this.buttonLoadTemplate_Click);
+ //
+ // label2
+ //
+ this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.label2.Location = new System.Drawing.Point(0, 0);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(104, 16);
+ this.label2.TabIndex = 20;
+ this.label2.Text = "Template:";
+ //
+ // label1
+ //
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.label1.Location = new System.Drawing.Point(0, 160);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(344, 48);
+ this.label1.TabIndex = 23;
+ this.label1.Text = "Download an editing template based on your weblog. This will post a temporary it" +
+ "em to your blog that can be used to detect the editing styles for items posted t" +
+ "o your blog.";
+ //
+ // textBoxTemplate
+ //
+ this.textBoxTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBoxTemplate.Location = new System.Drawing.Point(0, 16);
+ this.textBoxTemplate.Multiline = true;
+ this.textBoxTemplate.Name = "textBoxTemplate";
+ this.textBoxTemplate.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+ this.textBoxTemplate.Size = new System.Drawing.Size(344, 136);
+ this.textBoxTemplate.TabIndex = 24;
+ this.textBoxTemplate.Text = "";
+ this.textBoxTemplate.TextChanged += new System.EventHandler(this.textBoxTemplate_TextChanged);
+ //
+ // BlogPostHtmlEditorSettingsEditorControl
+ //
+ this.Controls.Add(this.textBoxTemplate);
+ this.Controls.Add(this.buttonLoadTemplate);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Name = "BlogPostHtmlEditorSettingsEditorControl";
+ this.Size = new System.Drawing.Size(344, 252);
+ this.ResumeLayout(false);
- }
- #endregion
+ }
+ #endregion
- public event EventHandler SettingsChanged;
- public void OnSettingsChanged(EventArgs evt)
- {
- if(SettingsChanged != null)
- SettingsChanged(this, evt);
- }
+ public event EventHandler SettingsChanged;
+ public void OnSettingsChanged(EventArgs evt)
+ {
+ if(SettingsChanged != null)
+ SettingsChanged(this, evt);
+ }
- internal void LoadSettings(BlogSettings settings)
- {
- //blog template
- _id = settings.Id;
- using(PostHtmlEditingSettings blogTemplate = new PostHtmlEditingSettings(settings.Id))
- {
- _templateFile = blogTemplate.EditorTemplateHtmlFile;
- textBoxTemplate.Text = blogTemplate.EditorTemplateHtml;
- }
- }
+ internal void LoadSettings(BlogSettings settings)
+ {
+ //blog template
+ _id = settings.Id;
+ using(PostHtmlEditingSettings blogTemplate = new PostHtmlEditingSettings(settings.Id))
+ {
+ _templateFile = blogTemplate.EditorTemplateHtmlFile;
+ textBoxTemplate.Text = blogTemplate.EditorTemplateHtml;
+ }
+ }
- public void ApplySettings(BlogSettings settings)
- {
- //blog template
- using(PostHtmlEditingSettings editingSettings = new PostHtmlEditingSettings(settings.Id))
- {
- editingSettings.EditorTemplateHtmlFile = _templateFile;
- editingSettings.EditorTemplateHtml = textBoxTemplate.Text;
- }
- }
+ public void ApplySettings(BlogSettings settings)
+ {
+ //blog template
+ using(PostHtmlEditingSettings editingSettings = new PostHtmlEditingSettings(settings.Id))
+ {
+ editingSettings.EditorTemplateHtmlFile = _templateFile;
+ editingSettings.EditorTemplateHtml = textBoxTemplate.Text;
+ }
+ }
- private string _id;
- private string _templateFile;
- private void buttonLoadTemplate_Click(object sender, EventArgs e)
- {
- BlogSettings settings = BlogSettings.ForBlogId(_id);
+ private string _id;
+ private string _templateFile;
+ private void buttonLoadTemplate_Click(object sender, EventArgs e)
+ {
+ BlogSettings settings = BlogSettings.ForBlogId(_id);
- try
- {
- _templateFile = BlogTemplateDetector.DetectTemplate(this, settings ) ;
+ try
+ {
+ _templateFile = BlogTemplateDetector.DetectTemplate(this, settings ) ;
- using(TextReader reader = new StreamReader(_templateFile, Encoding.UTF8))
- textBoxTemplate.Text = reader.ReadToEnd();
- }
- catch(OperationCancelledException)
- {
- //user cancelled call.
- }
- catch(Exception ex)
- {
- MessageBox.Show("Error: " + ex.Message ) ;
- }
+ using(TextReader reader = new StreamReader(_templateFile, Encoding.UTF8))
+ textBoxTemplate.Text = reader.ReadToEnd();
+ }
+ catch(OperationCancelledException)
+ {
+ //user cancelled call.
+ }
+ catch(Exception ex)
+ {
+ MessageBox.Show("Error: " + ex.Message ) ;
+ }
- }
+ }
- private void textBoxTemplate_TextChanged(object sender, EventArgs e)
- {
- OnSettingsChanged(EventArgs.Empty) ;
- }
+ private void textBoxTemplate_TextChanged(object sender, EventArgs e)
+ {
+ OnSettingsChanged(EventArgs.Empty) ;
+ }
- private void cbAllowMaximizedEditing_CheckedChanged(object sender, EventArgs e)
- {
- OnSettingsChanged(EventArgs.Empty) ;
- }
- }
+ private void cbAllowMaximizedEditing_CheckedChanged(object sender, EventArgs e)
+ {
+ OnSettingsChanged(EventArgs.Empty) ;
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandClipboardMenu.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandClipboardMenu.cs
index 93c30968..156dc08a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandClipboardMenu.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandClipboardMenu.cs
@@ -9,54 +9,53 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClipboardMenu.
- ///
- public class CommandClipboardMenu : Command
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for CommandClipboardMenu.
+ ///
+ public class CommandClipboardMenu : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public CommandClipboardMenu(System.ComponentModel.IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandClipboardMenu(System.ComponentModel.IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
- public CommandClipboardMenu()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandClipboardMenu()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandClipboardMenu
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ClipboardMenu";
- this.Text = "Clipboard";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandClipboardMenu
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ClipboardMenu";
+ this.Text = "Clipboard";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandEditLink.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandEditLink.cs
index bf8eb6ca..ae140aa4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandEditLink.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandEditLink.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandEditLink : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandEditLink : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandEditLink(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandEditLink(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandEditLink()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandEditLink()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandCut
+ //
+ this.ContextMenuPath = "&Edit Link@101";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandEditLink";
+ this.Text = "Edit Link";
+ this.MenuText = "&Edit Link";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandCut
- //
- this.ContextMenuPath = "&Edit Link@101";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandEditLink";
- this.Text = "Edit Link";
- this.MenuText = "&Edit Link";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandHtmlViewMenu.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandHtmlViewMenu.cs
index 24f2e054..8ef45ec2 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandHtmlViewMenu.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandHtmlViewMenu.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandHtmlViewMenu : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandHtmlViewMenu : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandHtmlViewMenu(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandHtmlViewMenu(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandHtmlViewMenu()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandHtmlViewMenu()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandHtmlViewMenu
+ //
+ this.CommandBarButtonText = "View";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.HtmlViewMenu";
+ this.MenuText = "View";
+ this.Text = "Change View Mode";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandHtmlViewMenu
- //
- this.CommandBarButtonText = "View";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.HtmlViewMenu";
- this.MenuText = "View";
- this.Text = "Change View Mode";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageBrightness.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageBrightness.cs
index 2eeead5a..de7f201d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageBrightness.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageBrightness.cs
@@ -6,52 +6,51 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandImageBrightness : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandImageBrightness : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandImageBrightness(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageBrightness(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- public CommandImageBrightness()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageBrightness()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandImageBrightness
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageBrightness";
+ this.MainMenuPath = "";
+ this.Text = "Adjust image brightness";
+ this.VisibleOnMainMenu = false;
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandImageBrightness
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageBrightness";
- this.MainMenuPath = "";
- this.Text = "Adjust image brightness";
- this.VisibleOnMainMenu = false;
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorAddMenu.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorAddMenu.cs
index e428dee2..52f3b9ea 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorAddMenu.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorAddMenu.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandImageDecoratorAddMenu.
- ///
- public class CommandImageDecoratorAddMenu : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandImageDecoratorAddMenu.
+ ///
+ public class CommandImageDecoratorAddMenu : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandImageDecoratorAddMenu(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageDecoratorAddMenu(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandImageDecoratorAddMenu()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageDecoratorAddMenu()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandImageDecoratorAddMenu
+ //
+ this.CommandBarButtonText = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageEditing.AddDecorator";
+ this.MenuText = "";
+ this.Text = "Add Effect";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandImageDecoratorAddMenu
- //
- this.CommandBarButtonText = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageEditing.AddDecorator";
- this.MenuText = "";
- this.Text = "Add Effect";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorApply.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorApply.cs
index 09e33a8e..94c8ec5f 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorApply.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorApply.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandImageDecoratorApply.
- ///
- public class CommandImageDecoratorApply : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandImageDecoratorApply.
+ ///
+ public class CommandImageDecoratorApply : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandImageDecoratorApply(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageDecoratorApply(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandImageDecoratorApply()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageDecoratorApply()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandImageDecoratorApply
+ //
+ this.CommandBarButtonText = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageEditing.ImageDecoratorApp" +
+ "ly";
+ this.MenuText = "";
+ this.Text = "Apply Effect";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandImageDecoratorApply
- //
- this.CommandBarButtonText = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageEditing.ImageDecoratorApp" +
- "ly";
- this.MenuText = "";
- this.Text = "Apply Effect";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorRemove.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorRemove.cs
index 8e618797..8f6e24ab 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorRemove.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageDecoratorRemove.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandImageDecoratorRemove.
- ///
- public class CommandImageDecoratorRemove : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandImageDecoratorRemove.
+ ///
+ public class CommandImageDecoratorRemove : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandImageDecoratorRemove(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageDecoratorRemove(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandImageDecoratorRemove()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageDecoratorRemove()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandImageDecoratorRemove
+ //
+ this.CommandBarButtonText = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageEditing.RemoveDecorator";
+ this.MenuText = "";
+ this.Text = "Remove Effect";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandImageDecoratorRemove
- //
- this.CommandBarButtonText = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageEditing.RemoveDecorator";
- this.MenuText = "";
- this.Text = "Remove Effect";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageReset.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageReset.cs
index 90c0bf27..0ec379f6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageReset.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageReset.cs
@@ -6,52 +6,51 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandImageReset : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandImageReset : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandImageReset(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageReset(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- public CommandImageReset()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageReset()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandImageReset
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageReset";
+ this.MainMenuPath = "";
+ this.Text = "Reset image";
+ this.VisibleOnMainMenu = false;
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandImageReset
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageReset";
- this.MainMenuPath = "";
- this.Text = "Reset image";
- this.VisibleOnMainMenu = false;
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageRotate.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageRotate.cs
index 9038f5ff..23d76361 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageRotate.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageRotate.cs
@@ -6,52 +6,51 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandImageRotate : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandImageRotate : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandImageRotate(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageRotate(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- public CommandImageRotate()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageRotate()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandImageRotate
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageRotate";
+ this.MainMenuPath = "";
+ this.Text = "Rotate";
+ this.VisibleOnMainMenu = false;
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandImageRotate
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageRotate";
- this.MainMenuPath = "";
- this.Text = "Rotate";
- this.VisibleOnMainMenu = false;
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageSaveDefaults.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageSaveDefaults.cs
index 81f286ea..4240b8d7 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageSaveDefaults.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandImageSaveDefaults.cs
@@ -6,52 +6,51 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandImageSaveDefaults : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandImageSaveDefaults : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandImageSaveDefaults(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageSaveDefaults(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- public CommandImageSaveDefaults()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandImageSaveDefaults()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandImageSaveDefaults
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageSaveDefaults";
+ this.MainMenuPath = "";
+ this.Text = "Save image settings as defaults";
+ this.VisibleOnMainMenu = false;
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandImageSaveDefaults
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.ImageSaveDefaults";
- this.MainMenuPath = "";
- this.Text = "Save image settings as defaults";
- this.VisibleOnMainMenu = false;
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertExtendedEntry.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertExtendedEntry.cs
index 3ae471f4..2c638a1d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertExtendedEntry.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertExtendedEntry.cs
@@ -7,51 +7,50 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertExtendedEntry : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertExtendedEntry : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertExtendedEntry(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public CommandInsertExtendedEntry(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- public CommandInsertExtendedEntry()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public CommandInsertExtendedEntry()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertExtendedEntry
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertExtendedEntry";
+ this.MainMenuPath = "F&ormat@5/-&Split Post@600";
+ this.MenuText = "Split Post";
+ this.Text = "Split Post";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertExtendedEntry
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertExtendedEntry";
- this.MainMenuPath = "F&ormat@5/-&Split Post@600";
- this.MenuText = "Split Post";
- this.Text = "Split Post";
+ }
+ #endregion
- }
- #endregion
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertFile.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertFile.cs
index cae4ecb5..13d7d3da 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertFile.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertFile.cs
@@ -6,52 +6,51 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertFile : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertFile : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertFile(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertFile(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- public CommandInsertFile()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertFile()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertFile
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertFile";
+ this.MainMenuPath = "&Insert@4/&File...@125";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlM;
+ this.Text = "Insert File";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertFile
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertFile";
- this.MainMenuPath = "&Insert@4/&File...@125";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlM;
- this.Text = "Insert File";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertLinkToOnfolioItem.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertLinkToOnfolioItem.cs
index 7a60d2c5..6d6164c0 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertLinkToOnfolioItem.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertLinkToOnfolioItem.cs
@@ -6,67 +6,67 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandInsertLinkToOnfolioItem.
- ///
- public class CommandInsertLinkToOnfolioItem : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandInsertLinkToOnfolioItem.
+ ///
+ public class CommandInsertLinkToOnfolioItem : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertLinkToOnfolioItem(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public CommandInsertLinkToOnfolioItem(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public CommandInsertLinkToOnfolioItem()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertLinkToOnfolioItem()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertLinkToOnfolioItem
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.InsertLinkToOnfolioItem";
- this.MainMenuPath = "&Insert@4/Link to &Onfolio Item...@200";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlL;
- this.Text = "Insert Link to Onfolio Item";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertLinkToOnfolioItem
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.InsertLinkToOnfolioItem";
+ this.MainMenuPath = "&Insert@4/Link to &Onfolio Item...@200";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlL;
+ this.Text = "Insert Link to Onfolio Item";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertOnfolioItem.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertOnfolioItem.cs
index 8b4414ac..6cdba277 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertOnfolioItem.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertOnfolioItem.cs
@@ -6,68 +6,68 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandInsertOnfolioItem.
- ///
- public class CommandInsertOnfolioItem : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandInsertOnfolioItem.
+ ///
+ public class CommandInsertOnfolioItem : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertOnfolioItem(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public CommandInsertOnfolioItem(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public CommandInsertOnfolioItem()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertOnfolioItem()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertOnfolioItem
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.InsertOnfolioItem";
- this.MainMenuPath = "&Insert@4/Onfolio &Item...@150";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlJ;
- this.Text = "Insert Onfolio Item";
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertOnfolioItem
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.InsertOnfolioItem";
+ this.MainMenuPath = "&Insert@4/Onfolio &Item...@150";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlJ;
+ this.Text = "Insert Onfolio Item";
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPicture.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPicture.cs
index 2ffc6107..ec87c620 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPicture.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPicture.cs
@@ -6,52 +6,51 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertPicture : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertPicture : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertPicture(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertPicture(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- public CommandInsertPicture()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertPicture()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertPicture
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertPicture";
- this.MainMenuPath = "&Insert@4/&Picture...-@150";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlL;
- this.Text = "Insert Picture";
- this.MenuText = "Picture...";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertPicture
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertPicture";
+ this.MainMenuPath = "&Insert@4/&Picture...-@150";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlL;
+ this.Text = "Insert Picture";
+ this.MenuText = "Picture...";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPictureUrl.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPictureUrl.cs
index ceff31b4..ee07be96 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPictureUrl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandInsertPictureUrl.cs
@@ -6,51 +6,50 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertPictureUrl : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertPictureUrl : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertPictureUrl(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertPictureUrl(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
- public CommandInsertPictureUrl()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertPictureUrl()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- }
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertPictureUrl
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertPictureUrl";
+ this.MainMenuPath = "&Insert@4/Picture From &Web...@101";
+ this.Text = "Insert Picture From Web";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertPictureUrl
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.InsertPictureUrl";
- this.MainMenuPath = "&Insert@4/Picture From &Web...@101";
- this.Text = "Insert Picture From Web";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandOpenLink.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandOpenLink.cs
index e3c4eccc..47b014f2 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandOpenLink.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandOpenLink.cs
@@ -6,56 +6,55 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandOpenLink : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandOpenLink : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandOpenLink(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenLink(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandOpenLink()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenLink()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandCut
- //
- this.ContextMenuPath = "&Open Link@100";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandOpenLink";
- this.Text = "Open Link";
- this.MenuText = "&Open Link";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandCut
+ //
+ this.ContextMenuPath = "&Open Link@100";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandOpenLink";
+ this.Text = "Open Link";
+ this.MenuText = "&Open Link";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandRemoveLink.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandRemoveLink.cs
index 5379bd3c..479fac55 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandRemoveLink.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandRemoveLink.cs
@@ -6,60 +6,59 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandRemoveLink : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandRemoveLink : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandRemoveLink(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandRemoveLink(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandRemoveLink()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandRemoveLink()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandRemoveLink
+ //
+ this.ContextMenuPath = "&Remove Link@102";
+ this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandRemoveLink";
+ this.MainMenuPath = "&Insert@4/&Remove Link-@300";
+ this.MenuText = "&Remove Link";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
+ this.Text = "Remove Link";
+ this.VisibleOnMainMenu = false;
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandRemoveLink
- //
- this.ContextMenuPath = "&Remove Link@102";
- this.Identifier = "OpenLiveWriter.PostEditor.Commands.PostHtmlEditing.CommandRemoveLink";
- this.MainMenuPath = "&Insert@4/&Remove Link-@300";
- this.MenuText = "&Remove Link";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
- this.Text = "Remove Link";
- this.VisibleOnMainMenu = false;
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewCode.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewCode.cs
index 201e8e60..1f9d730d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewCode.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewCode.cs
@@ -6,60 +6,59 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewCode : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewCode : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewCode(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewCode(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewCode()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewCode()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewCode
+ //
+ this.ContextMenuPath = "&HTML Code@105";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewCode";
+ this.MainMenuPath = "&View@2/&HTML Code@105";
+ this.MenuText = "&HTML Code";
+ this.Shortcut = System.Windows.Forms.Shortcut.ShiftF11 ;
+ this.Text = "HTML Code View";
+ this.SuppressMenuBitmap = true;
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewCode
- //
- this.ContextMenuPath = "&HTML Code@105";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewCode";
- this.MainMenuPath = "&View@2/&HTML Code@105";
- this.MenuText = "&HTML Code";
- this.Shortcut = System.Windows.Forms.Shortcut.ShiftF11 ;
- this.Text = "HTML Code View";
- this.SuppressMenuBitmap = true;
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewImageProperties.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewImageProperties.cs
index ccaa37d0..61a6a80b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewImageProperties.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewImageProperties.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewImageProperties : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewImageProperties : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewImageProperties(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewImageProperties(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewImageProperties()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewImageProperties()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewImageProperties
+ //
+ this.ContextMenuPath = "P&roperties@310";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ImageProperties";
+ this.MainMenuPath = "&View@2/P&roperties@310";
+ this.MenuText = "Show P&roperties";
+ this.Text = "Properties";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewImageProperties
- //
- this.ContextMenuPath = "P&roperties@310";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ImageProperties";
- this.MainMenuPath = "&View@2/P&roperties@310";
- this.MenuText = "Show P&roperties";
- this.Text = "Properties";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewNormal.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewNormal.cs
index 20e0e55d..81617c43 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewNormal.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewNormal.cs
@@ -6,59 +6,58 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewNormal : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewNormal : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewNormal(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewNormal(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewNormal()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewNormal()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewNormal
- //
- this.ContextMenuPath = "&Normal@100";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewNormal";
- this.MainMenuPath = "&View@2/&Normal@100";
- this.MenuText = "&Normal";
- this.Shortcut = System.Windows.Forms.Shortcut.CtrlF11 ;
- this.Text = "Normal View";
- this.SuppressMenuBitmap = true;
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewNormal
+ //
+ this.ContextMenuPath = "&Normal@100";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewNormal";
+ this.MainMenuPath = "&View@2/&Normal@100";
+ this.MenuText = "&Normal";
+ this.Shortcut = System.Windows.Forms.Shortcut.CtrlF11 ;
+ this.Text = "Normal View";
+ this.SuppressMenuBitmap = true;
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewSidebar.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewSidebar.cs
index 2868e47c..955093a2 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewSidebar.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewSidebar.cs
@@ -7,58 +7,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewSidebar : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewSidebar : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewSidebar(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewSidebar(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewSidebar()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewSidebar()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewSidebar
- //
- this.ContextMenuPath = "Side&bar@100";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewSidebar";
- this.MainMenuPath = "&View@2/Side&bar@140";
- this.MenuText = "Side&bar";
- this.Text = "Normal View";
- this.Shortcut = Shortcut.F9;
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewSidebar
+ //
+ this.ContextMenuPath = "Side&bar@100";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewSidebar";
+ this.MainMenuPath = "&View@2/Side&bar@140";
+ this.MenuText = "Side&bar";
+ this.Text = "Normal View";
+ this.Shortcut = Shortcut.F9;
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebLayout.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebLayout.cs
index 542ba100..5d0c729e 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebLayout.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebLayout.cs
@@ -6,59 +6,58 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewWebLayout : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewWebLayout : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewWebLayout(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWebLayout(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewWebLayout()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWebLayout()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewWebpage
+ //
+ this.ContextMenuPath = "";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewWebLayout";
+ this.MainMenuPath = "&View@2/Web &Layout@101";
+ this.MenuText = "Web &Layout";
+ this.Shortcut = System.Windows.Forms.Shortcut.F11 ;
+ this.Text = "Web Layout";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewWebpage
- //
- this.ContextMenuPath = "";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewWebLayout";
- this.MainMenuPath = "&View@2/Web &Layout@101";
- this.MenuText = "Web &Layout";
- this.Shortcut = System.Windows.Forms.Shortcut.F11 ;
- this.Text = "Web Layout";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebPreview.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebPreview.cs
index 9f1bea65..6f59d9d9 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebPreview.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Commands/CommandViewWebPreview.cs
@@ -6,59 +6,58 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Commands
{
- ///
- /// Summary description for CommandClose.
- ///
- public class CommandViewWebPreview : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandClose.
+ ///
+ public class CommandViewWebPreview : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandViewWebPreview(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWebPreview(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandViewWebPreview()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandViewWebPreview()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandViewPreview
+ //
+ this.ContextMenuPath = "&Web Preview@100";
+ this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewPreview";
+ this.MainMenuPath = "&View@2/&Web Preview@103";
+ this.MenuText = "&Web Preview";
+ this.Shortcut = System.Windows.Forms.Shortcut.F12 ;
+ this.Text = "Web Preview";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandViewPreview
- //
- this.ContextMenuPath = "&Web Preview@100";
- this.Identifier = "OpenLiveWriter.PostEditor.PostHtmlEditing.Commands.ViewPreview";
- this.MainMenuPath = "&View@2/&Web Preview@103";
- this.MenuText = "&Web Preview";
- this.Shortcut = System.Windows.Forms.Shortcut.F12 ;
- this.Text = "Web Preview";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/DebugElementBehavior.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/DebugElementBehavior.cs
index 7a19f36f..e9472d56 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/DebugElementBehavior.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/DebugElementBehavior.cs
@@ -10,41 +10,41 @@ using OpenLiveWriter.Interop.Windows;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- internal class DebugElementBehavior : EditableRegionElementBehavior
- {
- public DebugElementBehavior(IHtmlEditorComponentContext editorContext, IHTMLElement prevEditableRegion, IHTMLElement nextEditableRegion)
- : base(editorContext, prevEditableRegion, nextEditableRegion)
- {
- }
+ internal class DebugElementBehavior : EditableRegionElementBehavior
+ {
+ public DebugElementBehavior(IHtmlEditorComponentContext editorContext, IHTMLElement prevEditableRegion, IHTMLElement nextEditableRegion)
+ : base(editorContext, prevEditableRegion, nextEditableRegion)
+ {
+ }
- protected override void OnElementAttached()
- {
- //PaintRegionBorder = Color.Blue;
- base.OnElementAttached ();
- }
+ protected override void OnElementAttached()
+ {
+ //PaintRegionBorder = Color.Blue;
+ base.OnElementAttached ();
+ }
- protected override void OnElementDetached()
- {
- base.OnElementDetached ();
- }
+ protected override void OnElementDetached()
+ {
+ base.OnElementDetached ();
+ }
- public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
- {
- base.GetPainterInfo(ref pInfo);
- }
+ public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
+ {
+ base.GetPainterInfo(ref pInfo);
+ }
- public override void OnDraw(Graphics g, Rectangle drawBounds, RECT rcBounds, RECT rcUpdate, int lDrawFlags, IntPtr hdc, IntPtr pvDrawObject)
- {
- IHTMLElement2 element2 = HTMLElement as IHTMLElement2;
- //g.DrawRectangle(new Pen(Color.Red, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.CONTENT), rcBounds));
- //g.DrawRectangle(new Pen(Color.Orange, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.BORDER), rcBounds));
- //g.DrawRectangle(new Pen(Color.Blue, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.PADDING), rcBounds));
- //g.DrawRectangle(new Pen(Color.Gold, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.MARGIN), rcBounds));
+ public override void OnDraw(Graphics g, Rectangle drawBounds, RECT rcBounds, RECT rcUpdate, int lDrawFlags, IntPtr hdc, IntPtr pvDrawObject)
+ {
+ IHTMLElement2 element2 = HTMLElement as IHTMLElement2;
+ //g.DrawRectangle(new Pen(Color.Red, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.CONTENT), rcBounds));
+ //g.DrawRectangle(new Pen(Color.Orange, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.BORDER), rcBounds));
+ //g.DrawRectangle(new Pen(Color.Blue, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.PADDING), rcBounds));
+ //g.DrawRectangle(new Pen(Color.Gold, 1), GetPaintRectangle(GetClientRectangle(ELEMENT_REGION.MARGIN), rcBounds));
- //highlight the line that the caret is currently placed on.
- //Rectangle lineRect = GetPaintRectangle(GetLineClientRectangle(EditorContext.SelectedMarkupRange.Start), rcBounds);
- //g.DrawRectangle(new Pen(Color.Violet, 1), lineRect);
- }
- }
+ //highlight the line that the caret is currently placed on.
+ //Rectangle lineRect = GetPaintRectangle(GetLineClientRectangle(EditorContext.SelectedMarkupRange.Start), rcBounds);
+ //g.DrawRectangle(new Pen(Color.Violet, 1), lineRect);
+ }
+ }
}
#endif
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableRegionElementBehavior.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableRegionElementBehavior.cs
index 713a0930..5ed0e1f3 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableRegionElementBehavior.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableRegionElementBehavior.cs
@@ -625,7 +625,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
return GetLineClientRectangle(pointer);
}
-
///
/// Returns the bounds of line that the pointer is positioned within in client-based coordinates.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableSmartContent.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableSmartContent.cs
index 5f24eac8..5748b119 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableSmartContent.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/EditableSmartContent.cs
@@ -87,7 +87,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
_smartContentElement.id = ContentSourceManager.MakeContainingElementId(_contentSourceId, _smartContentId);
SmartContentInsertionHelper.InsertEditorHtmlIntoElement(_contentSourceContext, _contentSource, _smartContent, _smartContentElement);
-
//reinit the smart content so it is re-cloned
MakeSmartContentEditable();
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ElementBehaviorManager.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ElementBehaviorManager.cs
index 0aecbf26..2b58b6c8 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ElementBehaviorManager.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ElementBehaviorManager.cs
@@ -117,12 +117,12 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
// HTML required to make runtime bound behaviors work (GUID value is irrelevant)
/*
-
+
-
- */
+
+ */
private LazyLoader _getBehaviorStyles;
public string BehaviorStyles
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ExtendedHtmlEditorMashallingHandler.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ExtendedHtmlEditorMashallingHandler.cs
index 1290516d..f016a957 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ExtendedHtmlEditorMashallingHandler.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ExtendedHtmlEditorMashallingHandler.cs
@@ -60,7 +60,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
_unhandledDropTarget = unhandledDropTarget;
}
-
protected override IDataFormatHandlerFactory[] CreateDataFormatFactories()
{
if (IsPlainTextOnly)
@@ -69,7 +68,7 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
new DelegateBasedDataFormatHandlerFactory(CreateInternalSmartContentFormatHandler, InternalSmartContentFormatHandler.CanCreateFrom),
new DelegateBasedDataFormatHandlerFactory(CreateTextDataFormatHandler, CanCreateFromTextFilter),
new DelegateBasedDataFormatHandlerFactory(CreateUnhandledFormatHandler, UnhandledDropTarget.CanCreateFrom) // This always needs to be the last handler
- };
+ };
return new IDataFormatHandlerFactory[]{
new DelegateBasedDataFormatHandlerFactory(CreateEmlMessageFormatHandler, EmlMessageHandler.CanCreateFrom),
@@ -82,16 +81,16 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
new DelegateBasedDataFormatHandlerFactory(CreateImageFileFormatHandler, data => !_blogEditor.ShouldComposeHostHandlePhotos() && ImageFileFormatHandler.CanCreateFrom(data)),
new DelegateBasedDataFormatHandlerFactory(CreateTableDataFormatHandler, CanCreateTableDataFormatHandler),
#if SUPPORT_FILES
- new DelegateBasedDataFormatHandlerFactory(CreateFileDataFormatHandler, new DataObjectFilter(CanCreateFileFormatHandler)),
+ new DelegateBasedDataFormatHandlerFactory(CreateFileDataFormatHandler, new DataObjectFilter(CanCreateFileFormatHandler)),
#endif
- new DelegateBasedDataFormatHandlerFactory(CreateHtmlDataFormatHandler, CanCreateHtmlFormatHandler),
+ new DelegateBasedDataFormatHandlerFactory(CreateHtmlDataFormatHandler, CanCreateHtmlFormatHandler),
new DelegateBasedDataFormatHandlerFactory(CreateImageClipboardFormatHandler, CanCreateImageDataFormatHandler),
new DelegateBasedDataFormatHandlerFactory(CreateEmbedDataFormatHandler, CanCreateEmbedFormatHandler ),
new DelegateBasedDataFormatHandlerFactory(CreateVideoFileFormatHandler, VideoFileFormatHandler.CanCreateFrom),
new DelegateBasedDataFormatHandlerFactory(CreateImageFolderFormatHandler, data => !_blogEditor.ShouldComposeHostHandlePhotos() && ImageFolderFormatHandler.CanCreateFrom(data)),
new DelegateBasedDataFormatHandlerFactory(CreateTextDataFormatHandler, CanCreateFromTextFilter),
new DelegateBasedDataFormatHandlerFactory(CreateUnhandledFormatHandler, UnhandledDropTarget.CanCreateFrom) // This always needs to be the last handler
- };
+ };
}
// special text filter that screens out LiveClipboard data
@@ -458,7 +457,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
}
}
-
internal class InternalSmartContentFormatHandler : FreeTextHandler
{
IContentSourceSite _contentSourceSite;
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/HtmlSourceEditorSettings.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/HtmlSourceEditorSettings.cs
index 850c8751..30346e50 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/HtmlSourceEditorSettings.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/HtmlSourceEditorSettings.cs
@@ -8,7 +8,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
public sealed class HtmlSourceEditorSettings
{
-
internal static SettingsPersisterHelper SettingsKey = PostEditorSettings.SettingsKey.GetSubSettings("HtmlSourceEditor");
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/IBlogPostSpellCheckingContext.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/IBlogPostSpellCheckingContext.cs
index bd4c5f8b..6901afe4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/IBlogPostSpellCheckingContext.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/IBlogPostSpellCheckingContext.cs
@@ -5,11 +5,11 @@ using System;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- ///
- /// Spelling checking services for the HTML Editor.
- ///
- public interface IBlogPostSpellCheckingContext
- {
- string PostSpellingContextDirectory { get; }
- }
+ ///
+ /// Spelling checking services for the HTML Editor.
+ ///
+ public interface IBlogPostSpellCheckingContext
+ {
+ string PostSpellingContextDirectory { get; }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/CropEditor.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/CropEditor.cs
index d714446d..166bfcf9 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/CropEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/CropEditor.cs
@@ -134,7 +134,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing.ImageEditing.Decorators
imageCropControl.Select();
-
//int minWidth = buttonRotate.Right + width + (form.ClientSize.Width - buttonOK.Left) + SystemInformation.FrameBorderSize.Width * 2;
//form.MinimumSize = new Size(minWidth, form.MinimumSize.Height);
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/WarmEditor.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/WarmEditor.cs
index f0024c0a..2d0a7f95 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/WarmEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/Decorators/WarmEditor.cs
@@ -13,141 +13,140 @@ using OpenLiveWriter.Localization.Bidi;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.ImageEditing.Decorators
{
public class WarmEditor : ImageDecoratorEditor, ISupportsRightAndLeftArrows
- {
- private TrackBar trackBarWarmth;
- private Label label1;
- private Label label2;
+ {
+ private TrackBar trackBarWarmth;
+ private Label label1;
+ private Label label2;
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public WarmEditor()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public WarmEditor()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- this.label1.Text = Res.Get(StringId.ColorTempCooler);
- this.label2.Text = Res.Get(StringId.ColorTempWarmer);
- }
+ this.label1.Text = Res.Get(StringId.ColorTempCooler);
+ this.label2.Text = Res.Get(StringId.ColorTempWarmer);
+ }
- protected override void LoadEditor()
- {
- base.LoadEditor ();
- WarmSettings = new WarmDecorator.WarmDecoratorSettings(Settings);
+ protected override void LoadEditor()
+ {
+ base.LoadEditor ();
+ WarmSettings = new WarmDecorator.WarmDecoratorSettings(Settings);
- this.trackBarWarmth.Value = (int) (WarmSettings.WarmthPosition * 500f);
- trackBarWarmth.SmallChange = trackBarWarmth.Maximum/20;
+ this.trackBarWarmth.Value = (int) (WarmSettings.WarmthPosition * 500f);
+ trackBarWarmth.SmallChange = trackBarWarmth.Maximum/20;
trackBarWarmth.LargeChange = trackBarWarmth.Maximum / 5;
-
BidiHelper.RtlLayoutFixup(this);
- label1.Top = label2.Top = trackBarWarmth.Bottom ;
+ label1.Top = label2.Top = trackBarWarmth.Bottom ;
AccessibleName = ControlHelper.ToAccessibleName(Res.Get(StringId.DecoratorColorTemp));
- trackBarWarmth.AccessibleName = ControlHelper.ToAccessibleName(Res.Get(StringId.DecoratorColorTemp));
- }
+ trackBarWarmth.AccessibleName = ControlHelper.ToAccessibleName(Res.Get(StringId.DecoratorColorTemp));
+ }
- private WarmDecorator.WarmDecoratorSettings WarmSettings;
+ private WarmDecorator.WarmDecoratorSettings WarmSettings;
- protected override void OnSaveSettings()
- {
- base.OnSaveSettings();
- float newWarmth = trackBarWarmth.Value/500f;
- if(WarmSettings.WarmthPosition != newWarmth)
- {
- WarmSettings.WarmthPosition = newWarmth;
- }
- }
+ protected override void OnSaveSettings()
+ {
+ base.OnSaveSettings();
+ float newWarmth = trackBarWarmth.Value/500f;
+ if(WarmSettings.WarmthPosition != newWarmth)
+ {
+ WarmSettings.WarmthPosition = newWarmth;
+ }
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.trackBarWarmth = new System.Windows.Forms.TrackBar();
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.trackBarWarmth)).BeginInit();
- this.SuspendLayout();
- //
- // trackBarWarmth
- //
- this.trackBarWarmth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.trackBarWarmth.Location = new System.Drawing.Point(0, 16);
- this.trackBarWarmth.Maximum = 100;
- this.trackBarWarmth.Minimum = -100;
- this.trackBarWarmth.Name = "trackBarWarmth";
- this.trackBarWarmth.Size = new System.Drawing.Size(215, 45);
- this.trackBarWarmth.TabIndex = 1;
- this.trackBarWarmth.TickFrequency = 50;
+ #region Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.trackBarWarmth = new System.Windows.Forms.TrackBar();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ ((System.ComponentModel.ISupportInitialize)(this.trackBarWarmth)).BeginInit();
+ this.SuspendLayout();
+ //
+ // trackBarWarmth
+ //
+ this.trackBarWarmth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.trackBarWarmth.Location = new System.Drawing.Point(0, 16);
+ this.trackBarWarmth.Maximum = 100;
+ this.trackBarWarmth.Minimum = -100;
+ this.trackBarWarmth.Name = "trackBarWarmth";
+ this.trackBarWarmth.Size = new System.Drawing.Size(215, 45);
+ this.trackBarWarmth.TabIndex = 1;
+ this.trackBarWarmth.TickFrequency = 50;
this.trackBarWarmth.KeyUp += new System.Windows.Forms.KeyEventHandler(this.trackBarWarmth_KeyUp);
- this.trackBarWarmth.ValueChanged += new System.EventHandler(this.trackBarWarmth_ValueChanged);
- //
- // label1
- //
- this.label1.Location = new System.Drawing.Point(0, 61);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(100, 43);
- this.label1.TabIndex = 2;
- this.label1.Text = "Cooler";
- //
- // label2
- //
- this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.label2.Location = new System.Drawing.Point(120, 61);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(88, 43);
- this.label2.TabIndex = 3;
- this.label2.Text = "Warmer";
- this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
- //
- // WarmEditor
- //
- this.Controls.Add(this.trackBarWarmth);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.label2);
- this.Name = "WarmEditor";
+ this.trackBarWarmth.ValueChanged += new System.EventHandler(this.trackBarWarmth_ValueChanged);
+ //
+ // label1
+ //
+ this.label1.Location = new System.Drawing.Point(0, 61);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(100, 43);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "Cooler";
+ //
+ // label2
+ //
+ this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.label2.Location = new System.Drawing.Point(120, 61);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(88, 43);
+ this.label2.TabIndex = 3;
+ this.label2.Text = "Warmer";
+ this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
+ //
+ // WarmEditor
+ //
+ this.Controls.Add(this.trackBarWarmth);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.label2);
+ this.Name = "WarmEditor";
this.RightToLeft = BidiHelper.IsRightToLeft ? RightToLeft.Yes : RightToLeft.No;
- this.Size = new System.Drawing.Size(216, 160);
- ((System.ComponentModel.ISupportInitialize)(this.trackBarWarmth)).EndInit();
- this.ResumeLayout(false);
+ this.Size = new System.Drawing.Size(216, 160);
+ ((System.ComponentModel.ISupportInitialize)(this.trackBarWarmth)).EndInit();
+ this.ResumeLayout(false);
- }
- #endregion
+ }
+ #endregion
- private void trackBarWarmth_KeyUp(object sender, KeyEventArgs e)
- {
+ private void trackBarWarmth_KeyUp(object sender, KeyEventArgs e)
+ {
if(e.KeyCode == Keys.Left)
{
trackBarWarmth.Value =
Math.Max(trackBarWarmth.Value - trackBarWarmth.SmallChange, trackBarWarmth.Minimum);
}
- }
+ }
- private void trackBarWarmth_ValueChanged(object sender, EventArgs e)
- {
- SaveSettingsAndApplyDecorator();
- }
+ private void trackBarWarmth_ValueChanged(object sender, EventArgs e)
+ {
+ SaveSettingsAndApplyDecorator();
+ }
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageBorderPickerControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageBorderPickerControl.cs
index 09a2f5d6..03afcce5 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageBorderPickerControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageBorderPickerControl.cs
@@ -63,7 +63,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
borderImage = comboItem.Image;
}
-
// determine state
bool selected = (e.State & DrawItemState.Selected) > 0;
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorEditorForm.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorEditorForm.cs
index 5a623eb8..a7ba3c77 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorEditorForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorEditorForm.cs
@@ -25,8 +25,8 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
///
private Container components = null;
/*
- private Size offsetFromOwner;
- */
+ private Size offsetFromOwner;
+ */
public ImageDecoratorEditorForm()
{
@@ -49,9 +49,9 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
}
/*
- (this.Owner as MainFrameSatelliteWindow).LocationFixed -=new EventHandler(Owner_LocationChanged);
- (this.Owner as MainFrameSatelliteWindow).CloseFixed -=new EventHandler(Owner_Closed);
- */
+ (this.Owner as MainFrameSatelliteWindow).LocationFixed -=new EventHandler(Owner_LocationChanged);
+ (this.Owner as MainFrameSatelliteWindow).CloseFixed -=new EventHandler(Owner_Closed);
+ */
}
base.Dispose(disposing);
}
@@ -132,61 +132,60 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
}
/*
- public void SetOwner(Form owner)
- {
- this.Owner = owner;
- this.Location = new Point(owner.Location.X + 100, owner.Location.Y + 100);
- (owner as MainFrameSatelliteWindow).LocationFixed +=new EventHandler(Owner_LocationChanged);
- (owner as MainFrameSatelliteWindow).CloseFixed +=new EventHandler(Owner_Closed);
- }
+ public void SetOwner(Form owner)
+ {
+ this.Owner = owner;
+ this.Location = new Point(owner.Location.X + 100, owner.Location.Y + 100);
+ (owner as MainFrameSatelliteWindow).LocationFixed +=new EventHandler(Owner_LocationChanged);
+ (owner as MainFrameSatelliteWindow).CloseFixed +=new EventHandler(Owner_Closed);
+ }
+ protected override void OnLocationChanged(EventArgs e)
+ {
+ // update frame offset
+ Point frameTopRight = GetFrameTopRight() ;
+ offsetFromOwner = new Size(Left - frameTopRight.X, Top - frameTopRight.Y );
+ }
- protected override void OnLocationChanged(EventArgs e)
- {
- // update frame offset
- Point frameTopRight = GetFrameTopRight() ;
- offsetFromOwner = new Size(Left - frameTopRight.X, Top - frameTopRight.Y );
- }
+ private Point GetFrameTopRight()
+ {
+ Point frameTopRight = this.Owner.Location ;
+ frameTopRight.Offset(this.Owner.Size.Width,0) ;
+ return frameTopRight ;
+ }
- private Point GetFrameTopRight()
- {
- Point frameTopRight = this.Owner.Location ;
- frameTopRight.Offset(this.Owner.Size.Width,0) ;
- return frameTopRight ;
- }
+ private void Owner_Closed(object sender, EventArgs e)
+ {
+ this.Close();
+ }
- private void Owner_Closed(object sender, EventArgs e)
- {
- this.Close();
- }
+ private void Owner_LocationChanged(object sender, EventArgs e)
+ {
+ Point location = GetFrameTopRight() ;
+ Size frameOffset = offsetFromOwner ;
+ location.Offset(frameOffset.Width, frameOffset.Height);
- private void Owner_LocationChanged(object sender, EventArgs e)
- {
- Point location = GetFrameTopRight() ;
- Size frameOffset = offsetFromOwner ;
- location.Offset(frameOffset.Width, frameOffset.Height);
+ Location = EnsureOnScreen(location) ;
+ }
- Location = EnsureOnScreen(location) ;
- }
+ private Point EnsureOnScreen(Point location)
+ {
+ int left = 0;
+ int right = 0;
+ foreach (Screen currentScreen in Screen.AllScreens)
+ {
+ Rectangle currentScreenBounds = currentScreen.Bounds;
+ left = Math.Min(left, currentScreenBounds.Left);
+ right = Math.Max(right, currentScreenBounds.Right);
+ }
- private Point EnsureOnScreen(Point location)
- {
- int left = 0;
- int right = 0;
- foreach (Screen currentScreen in Screen.AllScreens)
- {
- Rectangle currentScreenBounds = currentScreen.Bounds;
- left = Math.Min(left, currentScreenBounds.Left);
- right = Math.Max(right, currentScreenBounds.Right);
- }
+ if (location.X > right)
+ location.X = right - Width;
+ else if (location.X < left)
+ location.X = left;
- if (location.X > right)
- location.X = right - Width;
- else if (location.X < left)
- location.X = left;
-
- return location;
- }
- */
+ return location;
+ }
+ */
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorsManager.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorsManager.cs
index efcec994..2e548d61 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorsManager.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageDecoratorsManager.cs
@@ -50,8 +50,8 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
new ImageDecorator(PhotoBorderDecorator.Id, Res.Get(StringId.DecoratorPhotopaper), typeof(PhotoBorderDecorator), BORDER_GROUP, true, false, true, false),
new ImageDecorator(ReflectionBorderDecorator.Id, Res.Get(StringId.DecoratorReflection), typeof(ReflectionBorderDecorator), BORDER_GROUP, true, false, true, false),
new ImageDecorator(RoundedCornersBorderDecorator.Id, Res.Get(StringId.DecoratorRoundedCorners), typeof(RoundedCornersBorderDecorator), BORDER_GROUP, true, false, true, false),
- //new ImageDecorator(SoftShadowBorderDecorator.Id, "Soft Shadow", typeof(SoftShadowBorderDecorator), true, false, true, false),
- new ImageDecorator(ThinSolidBorderDecorator.Id, Res.Get(StringId.DecoratorSolid1px), typeof(ThinSolidBorderDecorator), BORDER_GROUP, true, false, true, false),
+ //new ImageDecorator(SoftShadowBorderDecorator.Id, "Soft Shadow", typeof(SoftShadowBorderDecorator), true, false, true, false),
+ new ImageDecorator(ThinSolidBorderDecorator.Id, Res.Get(StringId.DecoratorSolid1px), typeof(ThinSolidBorderDecorator), BORDER_GROUP, true, false, true, false),
new ImageDecorator(ThickSolidBorderDecorator.Id, Res.Get(StringId.DecoratorSolid3px), typeof(ThickSolidBorderDecorator), BORDER_GROUP, true, false, true, false),
});
ImageDecoratorGroup colors = new ImageDecoratorGroup(ADJUST_COLOR_GROUP, false,
@@ -166,23 +166,23 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
private void RegisterImageDecoratorPlugins()
{
#if SUPPORT_PLUGINS
- Type[] pluginImplTypes = PostEditorPluginManager.Instance.GetPlugins(typeof(IImageDecorator));
- foreach(Type pluginImplType in pluginImplTypes)
- {
- object[] attrs = pluginImplType.GetCustomAttributes(typeof(ImageDecoratorAttribute), true);
- if(attrs.Length > 0)
- {
- ImageDecoratorAttribute decAttr = (ImageDecoratorAttribute)attrs[0];
- AddDecorator(
- decAttr.Group != null ? decAttr.Group : DefaultGroupName,
- new ImageDecorator(
- decAttr.Id != null ? decAttr.Id : pluginImplType.FullName,
- decAttr.Name,
- pluginImplType, false));
- }
- else
- AddDecorator(DefaultGroupName, new ImageDecorator(pluginImplType.FullName, pluginImplType.Name, pluginImplType, false));
- }
+ Type[] pluginImplTypes = PostEditorPluginManager.Instance.GetPlugins(typeof(IImageDecorator));
+ foreach(Type pluginImplType in pluginImplTypes)
+ {
+ object[] attrs = pluginImplType.GetCustomAttributes(typeof(ImageDecoratorAttribute), true);
+ if(attrs.Length > 0)
+ {
+ ImageDecoratorAttribute decAttr = (ImageDecoratorAttribute)attrs[0];
+ AddDecorator(
+ decAttr.Group != null ? decAttr.Group : DefaultGroupName,
+ new ImageDecorator(
+ decAttr.Id != null ? decAttr.Id : pluginImplType.FullName,
+ decAttr.Name,
+ pluginImplType, false));
+ }
+ else
+ AddDecorator(DefaultGroupName, new ImageDecorator(pluginImplType.FullName, pluginImplType.Name, pluginImplType, false));
+ }
#endif
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyForm.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyForm.cs
index 6d86e0e2..d2e64b3b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyForm.cs
@@ -14,320 +14,319 @@ using Project31.ApplicationFramework;
namespace Onfolio.Writer.PostEditor.PostHtmlEditing
{
- public class ImageEditingPropertyForm : MainFrameSatelliteWindow, IImagePropertyEditingContext
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = new Container();
+ public class ImageEditingPropertyForm : MainFrameSatelliteWindow, IImagePropertyEditingContext
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = new Container();
- private IHtmlEditorComponentContext _editorContext ;
- private IBlogPostImageDataContext _imageDataContext;
- private Onfolio.Writer.PostEditor.PostHtmlEditing.ImagePropertyEditorControl imagePropertyEditorControl1;
- private Onfolio.Writer.PostEditor.PostHtmlEditing.ImageEditingPropertyStatusbar imageEditingPropertyStatusbar1;
- private CreateFileCallback _createFileCallback ;
+ private IHtmlEditorComponentContext _editorContext ;
+ private IBlogPostImageDataContext _imageDataContext;
+ private Onfolio.Writer.PostEditor.PostHtmlEditing.ImagePropertyEditorControl imagePropertyEditorControl1;
+ private Onfolio.Writer.PostEditor.PostHtmlEditing.ImageEditingPropertyStatusbar imageEditingPropertyStatusbar1;
+ private CreateFileCallback _createFileCallback ;
+ #region Initialization/Singleton
- #region Initialization/Singleton
+ public static void Initialize(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
+ {
+ // initialize one form per-thread
+ if ( _imagePropertyForm == null )
+ {
+ _imagePropertyForm = new ImageEditingPropertyForm() ;
+ _imagePropertyForm.Init(editorContext, dataContext, callback);
+ }
+ }
- public static void Initialize(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
- {
- // initialize one form per-thread
- if ( _imagePropertyForm == null )
- {
- _imagePropertyForm = new ImageEditingPropertyForm() ;
- _imagePropertyForm.Init(editorContext, dataContext, callback);
- }
- }
+ public static ImageEditingPropertyForm Instance
+ {
+ get
+ {
+ return _imagePropertyForm ;
+ }
+ }
- public static ImageEditingPropertyForm Instance
- {
- get
- {
- return _imagePropertyForm ;
- }
- }
+ [ThreadStatic]
+ private static ImageEditingPropertyForm _imagePropertyForm ;
- [ThreadStatic]
- private static ImageEditingPropertyForm _imagePropertyForm ;
+ public ImageEditingPropertyForm()
+ {
+ InitializeComponent() ;
+ }
- public ImageEditingPropertyForm()
- {
- InitializeComponent() ;
- }
+ #endregion
- #endregion
+ #region Interaction with base (MainFrameSatelliteWindow)
- #region Interaction with base (MainFrameSatelliteWindow)
+ private void Init(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
+ {
+ _editorContext = editorContext ;
+ _editorContext.SelectionChanged +=new EventHandler(_editorContext_SelectionChanged);
+ _imageDataContext = dataContext;
- private void Init(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
- {
- _editorContext = editorContext ;
- _editorContext.SelectionChanged +=new EventHandler(_editorContext_SelectionChanged);
- _imageDataContext = dataContext;
+ _createFileCallback = callback ;
- _createFileCallback = callback ;
+ this.imagePropertyEditorControl1.Init(dataContext);
- this.imagePropertyEditorControl1.Init(dataContext);
+ base.Init(editorContext.MainFrameWindow, typeof(CommandViewImageProperties)) ;
+ }
- base.Init(editorContext.MainFrameWindow, typeof(CommandViewImageProperties)) ;
- }
+ protected override void OnBeforeShow()
+ {
+ base.OnBeforeShow();
+ ImagePropertyHandler.RefreshView();
+ }
- protected override void OnBeforeShow()
- {
- base.OnBeforeShow();
- ImagePropertyHandler.RefreshView();
- }
+ protected override bool AutoUpdateActivationSetting
+ {
+ get { return ImageEditingSettings.AutoSavePropertiesActivationState ; }
+ }
- protected override bool AutoUpdateActivationSetting
- {
- get { return ImageEditingSettings.AutoSavePropertiesActivationState ; }
- }
+ protected override bool ShowWhenEditContextActivated
+ {
+ get { return ImageEditingSettings.ShowPropertiesOnImageSelection ; }
+ set { ImageEditingSettings.ShowPropertiesOnImageSelection = value ; }
+ }
- protected override bool ShowWhenEditContextActivated
- {
- get { return ImageEditingSettings.ShowPropertiesOnImageSelection ; }
- set { ImageEditingSettings.ShowPropertiesOnImageSelection = value ; }
- }
+ protected override Size MainFrameTopRightOffset
+ {
+ get { return ImageEditingSettings.PropertiesMainFrameTopRightOffset ; }
+ set { ImageEditingSettings.PropertiesMainFrameTopRightOffset = value ; }
+ }
- protected override Size MainFrameTopRightOffset
- {
- get { return ImageEditingSettings.PropertiesMainFrameTopRightOffset ; }
- set { ImageEditingSettings.PropertiesMainFrameTopRightOffset = value ; }
- }
+ #endregion
- #endregion
+ private ImageEditingTabPageControl[] TabPages
+ {
+ get
+ {
+ return this.imagePropertyEditorControl1.TabPages;
+ }
+ }
- private ImageEditingTabPageControl[] TabPages
- {
- get
- {
- return this.imagePropertyEditorControl1.TabPages;
- }
- }
+ private void _editorContext_SelectionChanged(object sender, EventArgs e)
+ {
+ RefreshImage();
+ }
- private void _editorContext_SelectionChanged(object sender, EventArgs e)
- {
- RefreshImage();
- }
+ public IHTMLImgElement SelectedImage
+ {
+ get { return _selectedImage; }
+ }
+ private IHTMLImgElement _selectedImage ;
- public IHTMLImgElement SelectedImage
- {
- get { return _selectedImage; }
- }
- private IHTMLImgElement _selectedImage ;
+ private bool SelectionIsImage
+ {
+ get
+ {
+ return _selectedImage != null ;
+ }
+ }
- private bool SelectionIsImage
- {
- get
- {
- return _selectedImage != null ;
- }
- }
+ private ImageEditingPropertyHandler ImagePropertyHandler
+ {
+ get
+ {
+ if (_imagePropertyHandler == null)
+ {
+ Debug.Assert(SelectedImage != null, "No image selected!");
+ _imagePropertyHandler = new ImageEditingPropertyHandler(
+ this, _createFileCallback, _imageDataContext );
+ }
+ return _imagePropertyHandler ;
+ }
+ }
+ private ImageEditingPropertyHandler _imagePropertyHandler ;
- private ImageEditingPropertyHandler ImagePropertyHandler
- {
- get
- {
- if (_imagePropertyHandler == null)
- {
- Debug.Assert(SelectedImage != null, "No image selected!");
- _imagePropertyHandler = new ImageEditingPropertyHandler(
- this, _createFileCallback, _imageDataContext );
- }
- return _imagePropertyHandler ;
- }
- }
- private ImageEditingPropertyHandler _imagePropertyHandler ;
+ public ImagePropertiesInfo ImagePropertiesInfo
+ {
+ get
+ {
+ return _imageInfo;
+ }
+ set
+ {
+ _imageInfo = value;
- public ImagePropertiesInfo ImagePropertiesInfo
- {
- get
- {
- return _imageInfo;
- }
- set
- {
- _imageInfo = value;
+ //unsubscribe from change event while the image info is being updated.
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ tabPage.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ imagePropertyEditorControl1.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
- //unsubscribe from change event while the image info is being updated.
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- tabPage.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
- imagePropertyEditorControl1.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ ManageCommands();
- ManageCommands();
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ tabPage.ImageInfo = _imageInfo;
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- tabPage.ImageInfo = _imageInfo;
+ imagePropertyEditorControl1.ImageInfo = _imageInfo;
- imagePropertyEditorControl1.ImageInfo = _imageInfo;
+ //re-subscribe to change events so they can be rebroadcast
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ tabPage.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ imagePropertyEditorControl1.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
- //re-subscribe to change events so they can be rebroadcast
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- tabPage.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
- imagePropertyEditorControl1.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ imageEditingPropertyStatusbar1.SetImageStatus(_imageInfo.ImageSourceUri.ToString(),
+ _imageInfo.ImageSourceUri.IsFile ? ImageEditingPropertyStatusbar.IMAGE_TYPE.LOCAL_IMAGE :
+ ImageEditingPropertyStatusbar.IMAGE_TYPE.WEB_IMAGE
+ );
- imageEditingPropertyStatusbar1.SetImageStatus(_imageInfo.ImageSourceUri.ToString(),
- _imageInfo.ImageSourceUri.IsFile ? ImageEditingPropertyStatusbar.IMAGE_TYPE.LOCAL_IMAGE :
- ImageEditingPropertyStatusbar.IMAGE_TYPE.WEB_IMAGE
- );
+ }
+ }
+ private ImagePropertiesInfo _imageInfo;
- }
- }
- private ImagePropertiesInfo _imageInfo;
+ ///
+ /// Manages the commands assocatiated with image editing.
+ ///
+ private void ManageCommands()
+ {
+ if(_imageDataContext != null)
+ {
+ for(int i=0; i<_imageDataContext.DecoratorsManager.ImageDecoratorGroups.Length; i++)
+ {
+ ImageDecoratorGroup imageDecoratorGroup = _imageDataContext.DecoratorsManager.ImageDecoratorGroups[i];
+ foreach(ImageDecorator imageDecorator in imageDecoratorGroup.ImageDecorators)
+ {
+ if(_imageInfo == null || _imageInfo.ImageSourceUri.IsFile || imageDecorator.IsWebImageSupported)
+ imageDecorator.Command.Enabled = true;
+ else
+ imageDecorator.Command.Enabled = false;
+ }
+ }
+ }
+ }
- ///
- /// Manages the commands assocatiated with image editing.
- ///
- private void ManageCommands()
- {
- if(_imageDataContext != null)
- {
- for(int i=0; i<_imageDataContext.DecoratorsManager.ImageDecoratorGroups.Length; i++)
- {
- ImageDecoratorGroup imageDecoratorGroup = _imageDataContext.DecoratorsManager.ImageDecoratorGroups[i];
- foreach(ImageDecorator imageDecorator in imageDecoratorGroup.ImageDecorators)
- {
- if(_imageInfo == null || _imageInfo.ImageSourceUri.IsFile || imageDecorator.IsWebImageSupported)
- imageDecorator.Command.Enabled = true;
- else
- imageDecorator.Command.Enabled = false;
- }
- }
- }
- }
+ ///
+ /// Forces a reload of the image's properties. This is useful for refreshing the form when the image
+ /// properties have been changed externally.
+ ///
+ public void RefreshImage()
+ {
+ // update selected image (null if none is selected)
+ _selectedImage = _editorContext.SelectedImage ;
- ///
- /// Forces a reload of the image's properties. This is useful for refreshing the form when the image
- /// properties have been changed externally.
- ///
- public void RefreshImage()
- {
- // update selected image (null if none is selected)
- _selectedImage = _editorContext.SelectedImage ;
+ // update display
+ EditContextActivated = SelectionIsImage ;
+ }
- // update display
- EditContextActivated = SelectionIsImage ;
- }
+ public event EventHandler SaveDefaultsRequested
+ {
+ add
+ {
+ imagePropertyEditorControl1.SaveDefaultsRequested += value;
+ }
+ remove
+ {
+ imagePropertyEditorControl1.SaveDefaultsRequested -= value;
+ }
+ }
+ public event EventHandler ResetToDefaultsRequested
+ {
+ add
+ {
+ imagePropertyEditorControl1.ResetToDefaultsRequested += value;
+ }
+ remove
+ {
+ imagePropertyEditorControl1.ResetToDefaultsRequested -= value;
+ }
+ }
- public event EventHandler SaveDefaultsRequested
- {
- add
- {
- imagePropertyEditorControl1.SaveDefaultsRequested += value;
- }
- remove
- {
- imagePropertyEditorControl1.SaveDefaultsRequested -= value;
- }
- }
- public event EventHandler ResetToDefaultsRequested
- {
- add
- {
- imagePropertyEditorControl1.ResetToDefaultsRequested += value;
- }
- remove
- {
- imagePropertyEditorControl1.ResetToDefaultsRequested -= value;
- }
- }
+ public event ImagePropertyEventHandler ImagePropertyChanged;
+ protected virtual void OnImagePropertyChanged(ImagePropertyEvent evt)
+ {
+ if(ImagePropertyChanged != null)
+ {
+ ImagePropertyChanged(this, evt);
+ }
- public event ImagePropertyEventHandler ImagePropertyChanged;
- protected virtual void OnImagePropertyChanged(ImagePropertyEvent evt)
- {
- if(ImagePropertyChanged != null)
- {
- ImagePropertyChanged(this, evt);
- }
+ //notify the tabs that the image properties have changed so that they can update themselves.
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ {
+ tabPage.HandleImagePropertyChangedEvent(evt);
+ }
+ }
- //notify the tabs that the image properties have changed so that they can update themselves.
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- {
- tabPage.HandleImagePropertyChangedEvent(evt);
- }
- }
+ private void tabPage_ImagePropertyChanged(object source, ImagePropertyEvent evt)
+ {
+ OnImagePropertyChanged(evt);
+ }
- private void tabPage_ImagePropertyChanged(object source, ImagePropertyEvent evt)
- {
- OnImagePropertyChanged(evt);
- }
+ public void UpdateInlineImageSize(Size newSize, ImageDecoratorInvocationSource invocationSource)
+ {
+ if(!Visible)
+ {
+ //refresh the ImagePropertiesInfo object since it doesn't get refreshed automatically when
+ //the form is hidden.
+ ImagePropertyHandler.RefreshView();
+ }
- public void UpdateInlineImageSize(Size newSize, ImageDecoratorInvocationSource invocationSource)
- {
- if(!Visible)
- {
- //refresh the ImagePropertiesInfo object since it doesn't get refreshed automatically when
- //the form is hidden.
- ImagePropertyHandler.RefreshView();
- }
+ ImagePropertiesInfo.InlineImageSize = newSize;
+ ImagePropertyChanged(this, new ImagePropertyEvent(ImagePropertyType.InlineSize, ImagePropertiesInfo, invocationSource));
+ RefreshImage();
+ }
- ImagePropertiesInfo.InlineImageSize = newSize;
- ImagePropertyChanged(this, new ImagePropertyEvent(ImagePropertyType.InlineSize, ImagePropertiesInfo, invocationSource));
- RefreshImage();
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ #region Designer Generated Code
- #region Designer Generated Code
+ private void InitializeComponent()
+ {
+ this.imagePropertyEditorControl1 = new Onfolio.Writer.PostEditor.PostHtmlEditing.ImagePropertyEditorControl();
+ this.imageEditingPropertyStatusbar1 = new Onfolio.Writer.PostEditor.PostHtmlEditing.ImageEditingPropertyStatusbar();
+ ((System.ComponentModel.ISupportInitialize)(this.imagePropertyEditorControl1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // imagePropertyEditorControl1
+ //
+ this.imagePropertyEditorControl1.AllowDragDropAutoScroll = false;
+ this.imagePropertyEditorControl1.AllPaintingInWmPaint = true;
+ this.imagePropertyEditorControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.imagePropertyEditorControl1.BackColor = System.Drawing.SystemColors.Control;
+ this.imagePropertyEditorControl1.ImageInfo = null;
+ this.imagePropertyEditorControl1.Location = new System.Drawing.Point(0, 0);
+ this.imagePropertyEditorControl1.Name = "imagePropertyEditorControl1";
+ this.imagePropertyEditorControl1.Size = new System.Drawing.Size(236, 335);
+ this.imagePropertyEditorControl1.TabIndex = 0;
+ this.imagePropertyEditorControl1.TopLayoutMargin = 2;
+ //
+ // imageEditingPropertyStatusbar1
+ //
+ this.imageEditingPropertyStatusbar1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.imageEditingPropertyStatusbar1.Location = new System.Drawing.Point(0, 334);
+ this.imageEditingPropertyStatusbar1.Name = "imageEditingPropertyStatusbar1";
+ this.imageEditingPropertyStatusbar1.Size = new System.Drawing.Size(236, 24);
+ this.imageEditingPropertyStatusbar1.TabIndex = 1;
+ this.imageEditingPropertyStatusbar1.TabStop = false;
+ //
+ // ImageEditingPropertyForm
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.ClientSize = new System.Drawing.Size(236, 358);
+ this.Controls.Add(this.imageEditingPropertyStatusbar1);
+ this.Controls.Add(this.imagePropertyEditorControl1);
+ this.Name = "ImageEditingPropertyForm";
+ this.Text = "Image Properties";
+ ((System.ComponentModel.ISupportInitialize)(this.imagePropertyEditorControl1)).EndInit();
+ this.ResumeLayout(false);
- private void InitializeComponent()
- {
- this.imagePropertyEditorControl1 = new Onfolio.Writer.PostEditor.PostHtmlEditing.ImagePropertyEditorControl();
- this.imageEditingPropertyStatusbar1 = new Onfolio.Writer.PostEditor.PostHtmlEditing.ImageEditingPropertyStatusbar();
- ((System.ComponentModel.ISupportInitialize)(this.imagePropertyEditorControl1)).BeginInit();
- this.SuspendLayout();
- //
- // imagePropertyEditorControl1
- //
- this.imagePropertyEditorControl1.AllowDragDropAutoScroll = false;
- this.imagePropertyEditorControl1.AllPaintingInWmPaint = true;
- this.imagePropertyEditorControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.imagePropertyEditorControl1.BackColor = System.Drawing.SystemColors.Control;
- this.imagePropertyEditorControl1.ImageInfo = null;
- this.imagePropertyEditorControl1.Location = new System.Drawing.Point(0, 0);
- this.imagePropertyEditorControl1.Name = "imagePropertyEditorControl1";
- this.imagePropertyEditorControl1.Size = new System.Drawing.Size(236, 335);
- this.imagePropertyEditorControl1.TabIndex = 0;
- this.imagePropertyEditorControl1.TopLayoutMargin = 2;
- //
- // imageEditingPropertyStatusbar1
- //
- this.imageEditingPropertyStatusbar1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.imageEditingPropertyStatusbar1.Location = new System.Drawing.Point(0, 334);
- this.imageEditingPropertyStatusbar1.Name = "imageEditingPropertyStatusbar1";
- this.imageEditingPropertyStatusbar1.Size = new System.Drawing.Size(236, 24);
- this.imageEditingPropertyStatusbar1.TabIndex = 1;
- this.imageEditingPropertyStatusbar1.TabStop = false;
- //
- // ImageEditingPropertyForm
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.ClientSize = new System.Drawing.Size(236, 358);
- this.Controls.Add(this.imageEditingPropertyStatusbar1);
- this.Controls.Add(this.imagePropertyEditorControl1);
- this.Name = "ImageEditingPropertyForm";
- this.Text = "Image Properties";
- ((System.ComponentModel.ISupportInitialize)(this.imagePropertyEditorControl1)).EndInit();
- this.ResumeLayout(false);
+ }
- }
-
- #endregion
- }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyHandler.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyHandler.cs
index 1e11a64c..6fad3cc3 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyHandler.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyHandler.cs
@@ -135,7 +135,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
return info;
}
-
private IHTMLElement ImgElement
{
get
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertySidebar.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertySidebar.cs
index 7465b2a1..88cd5478 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertySidebar.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertySidebar.cs
@@ -14,379 +14,373 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- public class ImageEditingPropertySidebar : Panel, IImagePropertyEditingContext
- {
- ///
- /// Required designer variable.
- ///
- private Container components = new Container();
+ public class ImageEditingPropertySidebar : Panel, IImagePropertyEditingContext
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = new Container();
- private IHtmlEditorComponentContext _editorContext ;
- private IBlogPostImageDataContext _imageDataContext;
- private ImageEditingPropertyTitlebar imageEditingPropertyTitlebar;
- private ImagePropertyEditorControl imagePropertyEditorControl;
- private ImageEditingPropertyStatusbar imageEditingPropertyStatusbar;
- private CreateFileCallback _createFileCallback ;
+ private IHtmlEditorComponentContext _editorContext ;
+ private IBlogPostImageDataContext _imageDataContext;
+ private ImageEditingPropertyTitlebar imageEditingPropertyTitlebar;
+ private ImagePropertyEditorControl imagePropertyEditorControl;
+ private ImageEditingPropertyStatusbar imageEditingPropertyStatusbar;
+ private CreateFileCallback _createFileCallback ;
- #region Initialization/Singleton
+ #region Initialization/Singleton
- public static void Initialize(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
- {
- // initialize one form per-thread
- if ( _imagePropertySidebar == null )
- {
- _imagePropertySidebar = new ImageEditingPropertySidebar() ;
- _imagePropertySidebar.Init(editorContext, dataContext, callback);
- }
- }
+ public static void Initialize(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
+ {
+ // initialize one form per-thread
+ if ( _imagePropertySidebar == null )
+ {
+ _imagePropertySidebar = new ImageEditingPropertySidebar() ;
+ _imagePropertySidebar.Init(editorContext, dataContext, callback);
+ }
+ }
- public static ImageEditingPropertySidebar Instance
- {
- get
- {
- return _imagePropertySidebar ;
- }
- }
+ public static ImageEditingPropertySidebar Instance
+ {
+ get
+ {
+ return _imagePropertySidebar ;
+ }
+ }
- [ThreadStatic]
- private static ImageEditingPropertySidebar _imagePropertySidebar ;
+ [ThreadStatic]
+ private static ImageEditingPropertySidebar _imagePropertySidebar ;
- public ImageEditingPropertySidebar()
- {
- InitializeDockPadding() ;
- InitializeControls();
- AdjustLayoutForLargeFonts() ;
- }
+ public ImageEditingPropertySidebar()
+ {
+ InitializeDockPadding() ;
+ InitializeControls();
+ AdjustLayoutForLargeFonts() ;
+ }
- private void InitializeControls()
- {
- SuspendLayout() ;
+ private void InitializeControls()
+ {
+ SuspendLayout() ;
- Size = new Size(236, 400) ;
+ Size = new Size(236, 400) ;
- imageEditingPropertyTitlebar = new ImageEditingPropertyTitlebar();
- imageEditingPropertyTitlebar.Dock = DockStyle.Top;
- imageEditingPropertyTitlebar.TabIndex = 0;
- imageEditingPropertyTitlebar.TabStop = false;
- imageEditingPropertyTitlebar.HideTitleBarClicked +=new EventHandler(imageEditingPropertyTitlebar_HideTitleBarClicked);
+ imageEditingPropertyTitlebar = new ImageEditingPropertyTitlebar();
+ imageEditingPropertyTitlebar.Dock = DockStyle.Top;
+ imageEditingPropertyTitlebar.TabIndex = 0;
+ imageEditingPropertyTitlebar.TabStop = false;
+ imageEditingPropertyTitlebar.HideTitleBarClicked +=new EventHandler(imageEditingPropertyTitlebar_HideTitleBarClicked);
- imagePropertyEditorControl = new ImagePropertyEditorControl();
- imagePropertyEditorControl.AllowDragDropAutoScroll = false;
- imagePropertyEditorControl.AllPaintingInWmPaint = true;
- imagePropertyEditorControl.Dock = DockStyle.Fill ;
- imagePropertyEditorControl.ImageInfo = null;
- imagePropertyEditorControl.Location = new Point(0, 25);
- imagePropertyEditorControl.Size = new Size(236, 335);
- imagePropertyEditorControl.TabIndex = 1;
- imagePropertyEditorControl.TopLayoutMargin = 2;
+ imagePropertyEditorControl = new ImagePropertyEditorControl();
+ imagePropertyEditorControl.AllowDragDropAutoScroll = false;
+ imagePropertyEditorControl.AllPaintingInWmPaint = true;
+ imagePropertyEditorControl.Dock = DockStyle.Fill ;
+ imagePropertyEditorControl.ImageInfo = null;
+ imagePropertyEditorControl.Location = new Point(0, 25);
+ imagePropertyEditorControl.Size = new Size(236, 335);
+ imagePropertyEditorControl.TabIndex = 1;
+ imagePropertyEditorControl.TopLayoutMargin = 2;
- imageEditingPropertyStatusbar = new ImageEditingPropertyStatusbar();
- imageEditingPropertyStatusbar.Dock = DockStyle.Bottom;
- imageEditingPropertyStatusbar.Size = new Size(236, 24);
- imageEditingPropertyStatusbar.TabIndex = 2;
- imageEditingPropertyStatusbar.TabStop = false;
+ imageEditingPropertyStatusbar = new ImageEditingPropertyStatusbar();
+ imageEditingPropertyStatusbar.Dock = DockStyle.Bottom;
+ imageEditingPropertyStatusbar.Size = new Size(236, 24);
+ imageEditingPropertyStatusbar.TabIndex = 2;
+ imageEditingPropertyStatusbar.TabStop = false;
- Controls.Add(imagePropertyEditorControl);
- Controls.Add(imageEditingPropertyTitlebar);
- Controls.Add(imageEditingPropertyStatusbar);
+ Controls.Add(imagePropertyEditorControl);
+ Controls.Add(imageEditingPropertyTitlebar);
+ Controls.Add(imageEditingPropertyStatusbar);
- ResumeLayout(false);
- }
+ ResumeLayout(false);
+ }
+ #endregion
- #endregion
+ #region Public Interface
- #region Public Interface
+ ///
+ /// Make the form visible / update its appearance based on current selection
+ ///
+ public void ShowSidebar()
+ {
+ // refresh the view
+ RefreshImage();
- ///
- /// Make the form visible / update its appearance based on current selection
- ///
- public void ShowSidebar()
- {
- // refresh the view
- RefreshImage();
+ // manage UI
+ ManageVisibilityOfEditingUI() ;
- // manage UI
- ManageVisibilityOfEditingUI() ;
+ if ( !Visible )
+ {
+ // show the form
+ Show() ;
+ }
+ }
- if ( !Visible )
- {
- // show the form
- Show() ;
- }
- }
+ private void _editorContext_SelectionChanged(object sender, EventArgs e)
+ {
+ RefreshImage();
- private void _editorContext_SelectionChanged(object sender, EventArgs e)
- {
- RefreshImage();
+ // manage UI
+ ManageVisibilityOfEditingUI() ;
+ }
- // manage UI
- ManageVisibilityOfEditingUI() ;
- }
+ private void ManageVisibilityOfEditingUI()
+ {
+ // show/hide property UI as appropriate
+ SuspendLayout() ;
+ imagePropertyEditorControl.Visible = SelectionIsImage ;
+ imageEditingPropertyStatusbar.Visible = SelectionIsImage ;
+ ResumeLayout(true) ;
+ }
- private void ManageVisibilityOfEditingUI()
- {
- // show/hide property UI as appropriate
- SuspendLayout() ;
- imagePropertyEditorControl.Visible = SelectionIsImage ;
- imageEditingPropertyStatusbar.Visible = SelectionIsImage ;
- ResumeLayout(true) ;
- }
+ public void HideSidebar()
+ {
+ Visible = false ;
+ }
+
+ private void imageEditingPropertyTitlebar_HideTitleBarClicked(object sender, EventArgs e)
+ {
+ HideSidebar() ;
+ }
+
+ #endregion
+
+ private void Init(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
+ {
+ _editorContext = editorContext ;
+ _editorContext.SelectionChanged +=new EventHandler(_editorContext_SelectionChanged);
+ _imageDataContext = dataContext;
+
+ _createFileCallback = callback ;
+
+ this.imagePropertyEditorControl.Init(dataContext);
+ }
+
+ private ImageEditingTabPageControl[] TabPages
+ {
+ get
+ {
+ return this.imagePropertyEditorControl.TabPages;
+ }
+ }
- public void HideSidebar()
- {
- Visible = false ;
- }
+ IHTMLImgElement IImagePropertyEditingContext.SelectedImage
+ {
+ get { return _selectedImage; }
+ }
+ private IHTMLImgElement _selectedImage ;
- private void imageEditingPropertyTitlebar_HideTitleBarClicked(object sender, EventArgs e)
- {
- HideSidebar() ;
- }
+ private bool SelectionIsImage
+ {
+ get
+ {
+ return _selectedImage != null ;
+ }
+ }
- #endregion
+ private ImageEditingPropertyHandler ImagePropertyHandler
+ {
+ get
+ {
+ if (_imagePropertyHandler == null)
+ {
+ Debug.Assert(_selectedImage != null, "No image selected!");
+ _imagePropertyHandler = new ImageEditingPropertyHandler(
+ this, _createFileCallback, _imageDataContext );
+ }
+ return _imagePropertyHandler ;
+ }
+ }
+ private ImageEditingPropertyHandler _imagePropertyHandler ;
- private void Init(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
- {
- _editorContext = editorContext ;
- _editorContext.SelectionChanged +=new EventHandler(_editorContext_SelectionChanged);
- _imageDataContext = dataContext;
+ public ImagePropertiesInfo ImagePropertiesInfo
+ {
+ get
+ {
+ return _imageInfo;
+ }
+ set
+ {
+ _imageInfo = value;
- _createFileCallback = callback ;
+ //unsubscribe from change event while the image info is being updated.
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ tabPage.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ imagePropertyEditorControl.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
- this.imagePropertyEditorControl.Init(dataContext);
- }
+ ManageCommands();
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ tabPage.ImageInfo = _imageInfo;
- private ImageEditingTabPageControl[] TabPages
- {
- get
- {
- return this.imagePropertyEditorControl.TabPages;
- }
- }
+ imagePropertyEditorControl.ImageInfo = _imageInfo;
+ //re-subscribe to change events so they can be rebroadcast
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ tabPage.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ imagePropertyEditorControl.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ imageEditingPropertyStatusbar.SetImageStatus(_imageInfo.ImageSourceUri.ToString(),
+ _imageInfo.ImageSourceUri.IsFile ? ImageEditingPropertyStatusbar.IMAGE_TYPE.LOCAL_IMAGE :
+ ImageEditingPropertyStatusbar.IMAGE_TYPE.WEB_IMAGE
+ );
+ }
+ }
+ private ImagePropertiesInfo _imageInfo;
- IHTMLImgElement IImagePropertyEditingContext.SelectedImage
- {
- get { return _selectedImage; }
- }
- private IHTMLImgElement _selectedImage ;
+ ///
+ /// Manages the commands assocatiated with image editing.
+ ///
+ private void ManageCommands()
+ {
+ if(_imageDataContext != null)
+ {
+ for(int i=0; i<_imageDataContext.DecoratorsManager.ImageDecoratorGroups.Length; i++)
+ {
+ ImageDecoratorGroup imageDecoratorGroup = _imageDataContext.DecoratorsManager.ImageDecoratorGroups[i];
+ foreach(ImageDecorator imageDecorator in imageDecoratorGroup.ImageDecorators)
+ {
+ if(_imageInfo == null || _imageInfo.ImageSourceUri.IsFile || imageDecorator.IsWebImageSupported)
+ imageDecorator.Command.Enabled = true;
+ else
+ imageDecorator.Command.Enabled = false;
+ }
+ }
+ }
+ }
- private bool SelectionIsImage
- {
- get
- {
- return _selectedImage != null ;
- }
- }
+ ///
+ /// Forces a reload of the image's properties. This is useful for refreshing the form when the image
+ /// properties have been changed externally.
+ ///
+ private void RefreshImage()
+ {
+ // update selected image (null if none is selected)
+ _selectedImage = _editorContext.SelectedImage ;
- private ImageEditingPropertyHandler ImagePropertyHandler
- {
- get
- {
- if (_imagePropertyHandler == null)
- {
- Debug.Assert(_selectedImage != null, "No image selected!");
- _imagePropertyHandler = new ImageEditingPropertyHandler(
- this, _createFileCallback, _imageDataContext );
- }
- return _imagePropertyHandler ;
- }
- }
- private ImageEditingPropertyHandler _imagePropertyHandler ;
+ // refresh the view
+ if ( SelectionIsImage )
+ ImagePropertyHandler.RefreshView();
+ }
- public ImagePropertiesInfo ImagePropertiesInfo
- {
- get
- {
- return _imageInfo;
- }
- set
- {
- _imageInfo = value;
+ public event EventHandler SaveDefaultsRequested
+ {
+ add
+ {
+ imagePropertyEditorControl.SaveDefaultsRequested += value;
+ }
+ remove
+ {
+ imagePropertyEditorControl.SaveDefaultsRequested -= value;
+ }
+ }
+ public event EventHandler ResetToDefaultsRequested
+ {
+ add
+ {
+ imagePropertyEditorControl.ResetToDefaultsRequested += value;
+ }
+ remove
+ {
+ imagePropertyEditorControl.ResetToDefaultsRequested -= value;
+ }
+ }
- //unsubscribe from change event while the image info is being updated.
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- tabPage.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
- imagePropertyEditorControl.ImagePropertyChanged -= new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ public event ImagePropertyEventHandler ImagePropertyChanged;
+ protected virtual void OnImagePropertyChanged(ImagePropertyEvent evt)
+ {
+ if(ImagePropertyChanged != null)
+ {
+ ImagePropertyChanged(this, evt);
+ }
- ManageCommands();
+ //notify the tabs that the image properties have changed so that they can update themselves.
+ foreach(ImageEditingTabPageControl tabPage in TabPages)
+ {
+ tabPage.HandleImagePropertyChangedEvent(evt);
+ }
+ }
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- tabPage.ImageInfo = _imageInfo;
+ private void tabPage_ImagePropertyChanged(object source, ImagePropertyEvent evt)
+ {
+ OnImagePropertyChanged(evt);
+ }
- imagePropertyEditorControl.ImageInfo = _imageInfo;
+ public void UpdateInlineImageSize(Size newSize, ImageDecoratorInvocationSource invocationSource)
+ {
+ ImagePropertiesInfo imagePropertiesInfo = (this as IImagePropertyEditingContext).ImagePropertiesInfo ;
+ imagePropertiesInfo.InlineImageSize = newSize;
+ ImagePropertyChanged(this, new ImagePropertyEvent(ImagePropertyType.InlineSize, imagePropertiesInfo, invocationSource));
+ RefreshImage();
+ }
- //re-subscribe to change events so they can be rebroadcast
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- tabPage.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
- imagePropertyEditorControl.ImagePropertyChanged += new ImagePropertyEventHandler(tabPage_ImagePropertyChanged);
+ private const int TOP_INSET = 1 ;
+ private const int LEFT_INSET = 5 ;
+ private const int RIGHT_INSET = 1 ;
+ private const int BOTTOM_INSET = 1 ;
- imageEditingPropertyStatusbar.SetImageStatus(_imageInfo.ImageSourceUri.ToString(),
- _imageInfo.ImageSourceUri.IsFile ? ImageEditingPropertyStatusbar.IMAGE_TYPE.LOCAL_IMAGE :
- ImageEditingPropertyStatusbar.IMAGE_TYPE.WEB_IMAGE
- );
+ private void InitializeDockPadding()
+ {
+ DockPadding.Top = TOP_INSET ;
+ DockPadding.Left = LEFT_INSET ;
+ DockPadding.Right = RIGHT_INSET ;
+ DockPadding.Bottom = BOTTOM_INSET ;
+ }
- }
- }
- private ImagePropertiesInfo _imageInfo;
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint (e);
- ///
- /// Manages the commands assocatiated with image editing.
- ///
- private void ManageCommands()
- {
- if(_imageDataContext != null)
- {
- for(int i=0; i<_imageDataContext.DecoratorsManager.ImageDecoratorGroups.Length; i++)
- {
- ImageDecoratorGroup imageDecoratorGroup = _imageDataContext.DecoratorsManager.ImageDecoratorGroups[i];
- foreach(ImageDecorator imageDecorator in imageDecoratorGroup.ImageDecorators)
- {
- if(_imageInfo == null || _imageInfo.ImageSourceUri.IsFile || imageDecorator.IsWebImageSupported)
- imageDecorator.Command.Enabled = true;
- else
- imageDecorator.Command.Enabled = false;
- }
- }
- }
- }
+ // draw the border
+ Rectangle borderRectangle = new Rectangle(
+ ClientRectangle.Left + LEFT_INSET - 1,
+ ClientRectangle.Top + TOP_INSET - 1,
+ ClientRectangle.Width - LEFT_INSET - RIGHT_INSET + 1,
+ ClientRectangle.Height - TOP_INSET - BOTTOM_INSET + 1) ;
+ using ( Pen pen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) )
+ e.Graphics.DrawRectangle( pen, borderRectangle ) ;
- ///
- /// Forces a reload of the image's properties. This is useful for refreshing the form when the image
- /// properties have been changed externally.
- ///
- private void RefreshImage()
- {
- // update selected image (null if none is selected)
- _selectedImage = _editorContext.SelectedImage ;
+ // draw the no image selected message
+ Font textFont = ApplicationManager.ApplicationStyle.NormalApplicationFont ;
+ string noImageSelected = "No image selected" ;
+ SizeF textSize = e.Graphics.MeasureString(noImageSelected, textFont) ;
+ Color textColor = Color.FromArgb(200, ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor);
+ using ( Brush brush = new SolidBrush(textColor) )
+ e.Graphics.DrawString( "No image selected", textFont, brush, new PointF((Width/2)-(textSize.Width/2),100));
+ }
- // refresh the view
- if ( SelectionIsImage )
- ImagePropertyHandler.RefreshView();
- }
+ private void AdjustLayoutForLargeFonts()
+ {
+ // see if we need to adjust our width for non-standard DPI (large fonts)
+ const double DESIGNTIME_DPI = 96 ;
+ double dpiX = Convert.ToDouble(DisplayHelper.PixelsPerLogicalInchX) ;
+ if ( dpiX > DESIGNTIME_DPI )
+ {
+ // adjust scale ration for percentage of toolbar containing text
+ const double TEXT_PERCENT = 0.0 ; // currently has no text
+ double scaleRatio = (1-TEXT_PERCENT) + ((TEXT_PERCENT*dpiX)/DESIGNTIME_DPI) ;
- public event EventHandler SaveDefaultsRequested
- {
- add
- {
- imagePropertyEditorControl.SaveDefaultsRequested += value;
- }
- remove
- {
- imagePropertyEditorControl.SaveDefaultsRequested -= value;
- }
- }
- public event EventHandler ResetToDefaultsRequested
- {
- add
- {
- imagePropertyEditorControl.ResetToDefaultsRequested += value;
- }
- remove
- {
- imagePropertyEditorControl.ResetToDefaultsRequested -= value;
- }
- }
+ // change width as appropriate
+ Width = Convert.ToInt32( Convert.ToDouble(Width) * scaleRatio ) ;
+ }
+ }
- public event ImagePropertyEventHandler ImagePropertyChanged;
- protected virtual void OnImagePropertyChanged(ImagePropertyEvent evt)
- {
- if(ImagePropertyChanged != null)
- {
- ImagePropertyChanged(this, evt);
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- //notify the tabs that the image properties have changed so that they can update themselves.
- foreach(ImageEditingTabPageControl tabPage in TabPages)
- {
- tabPage.HandleImagePropertyChangedEvent(evt);
- }
- }
-
- private void tabPage_ImagePropertyChanged(object source, ImagePropertyEvent evt)
- {
- OnImagePropertyChanged(evt);
- }
-
- public void UpdateInlineImageSize(Size newSize, ImageDecoratorInvocationSource invocationSource)
- {
- ImagePropertiesInfo imagePropertiesInfo = (this as IImagePropertyEditingContext).ImagePropertiesInfo ;
- imagePropertiesInfo.InlineImageSize = newSize;
- ImagePropertyChanged(this, new ImagePropertyEvent(ImagePropertyType.InlineSize, imagePropertiesInfo, invocationSource));
- RefreshImage();
- }
-
- private const int TOP_INSET = 1 ;
- private const int LEFT_INSET = 5 ;
- private const int RIGHT_INSET = 1 ;
- private const int BOTTOM_INSET = 1 ;
-
- private void InitializeDockPadding()
- {
- DockPadding.Top = TOP_INSET ;
- DockPadding.Left = LEFT_INSET ;
- DockPadding.Right = RIGHT_INSET ;
- DockPadding.Bottom = BOTTOM_INSET ;
- }
-
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint (e);
-
- // draw the border
- Rectangle borderRectangle = new Rectangle(
- ClientRectangle.Left + LEFT_INSET - 1,
- ClientRectangle.Top + TOP_INSET - 1,
- ClientRectangle.Width - LEFT_INSET - RIGHT_INSET + 1,
- ClientRectangle.Height - TOP_INSET - BOTTOM_INSET + 1) ;
- using ( Pen pen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) )
- e.Graphics.DrawRectangle( pen, borderRectangle ) ;
-
- // draw the no image selected message
- Font textFont = ApplicationManager.ApplicationStyle.NormalApplicationFont ;
- string noImageSelected = "No image selected" ;
- SizeF textSize = e.Graphics.MeasureString(noImageSelected, textFont) ;
- Color textColor = Color.FromArgb(200, ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor);
- using ( Brush brush = new SolidBrush(textColor) )
- e.Graphics.DrawString( "No image selected", textFont, brush, new PointF((Width/2)-(textSize.Width/2),100));
- }
-
- private void AdjustLayoutForLargeFonts()
- {
- // see if we need to adjust our width for non-standard DPI (large fonts)
- const double DESIGNTIME_DPI = 96 ;
- double dpiX = Convert.ToDouble(DisplayHelper.PixelsPerLogicalInchX) ;
- if ( dpiX > DESIGNTIME_DPI )
- {
- // adjust scale ration for percentage of toolbar containing text
- const double TEXT_PERCENT = 0.0 ; // currently has no text
- double scaleRatio = (1-TEXT_PERCENT) + ((TEXT_PERCENT*dpiX)/DESIGNTIME_DPI) ;
-
- // change width as appropriate
- Width = Convert.ToInt32( Convert.ToDouble(Width) * scaleRatio ) ;
- }
- }
-
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyStatusbar.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyStatusbar.cs
index c2d74df3..8b1569d6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyStatusbar.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyStatusbar.cs
@@ -12,144 +12,144 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- ///
- /// Summary description for ImageEditingPropertyStatusbar.
- ///
- internal class ImageEditingPropertyStatusbar : UserControl
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for ImageEditingPropertyStatusbar.
+ ///
+ internal class ImageEditingPropertyStatusbar : UserControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ImageEditingPropertyStatusbar()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public ImageEditingPropertyStatusbar()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- // enable double buffered painting.
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.DoubleBuffer, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ // enable double buffered painting.
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.DoubleBuffer, true);
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- // set height
- Height = SystemInformation.ToolWindowCaptionHeight ;
+ // set height
+ Height = SystemInformation.ToolWindowCaptionHeight ;
- // does not accept tab
- TabStop = false ;
+ // does not accept tab
+ TabStop = false ;
- _stringFormat = new StringFormat(StringFormatFlags.NoWrap);
- _stringFormat.Trimming = StringTrimming.EllipsisPath;
+ _stringFormat = new StringFormat(StringFormatFlags.NoWrap);
+ _stringFormat.Trimming = StringTrimming.EllipsisPath;
- // set the background color
- //BackColor = ApplicationManager.ApplicationStyle.ActiveTabTopColor ;
- ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
- }
+ // set the background color
+ //BackColor = ApplicationManager.ApplicationStyle.ActiveTabTopColor ;
+ ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- }
- #endregion
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+ #endregion
- internal enum IMAGE_TYPE { LOCAL_IMAGE, WEB_IMAGE };
- public void SetImageStatus(string imagePath, IMAGE_TYPE imageType)
- {
- imagePath = Path.GetFileName(imagePath.Replace("/", "\\"));
- _statusText = String.Format("{0}: {1}", imageType == IMAGE_TYPE.LOCAL_IMAGE ? "Local image": "Web image", imagePath);
- PerformLayout();
- Invalidate();
- }
+ internal enum IMAGE_TYPE { LOCAL_IMAGE, WEB_IMAGE };
+ public void SetImageStatus(string imagePath, IMAGE_TYPE imageType)
+ {
+ imagePath = Path.GetFileName(imagePath.Replace("/", "\\"));
+ _statusText = String.Format("{0}: {1}", imageType == IMAGE_TYPE.LOCAL_IMAGE ? "Local image": "Web image", imagePath);
+ PerformLayout();
+ Invalidate();
+ }
- protected override void OnLayout(LayoutEventArgs levent)
- {
- base.OnLayout (levent);
+ protected override void OnLayout(LayoutEventArgs levent)
+ {
+ base.OnLayout (levent);
- // calculate the rectangle we will paint within
- _controlRectangle = new Rectangle(0,0,Width, Height) ;
+ // calculate the rectangle we will paint within
+ _controlRectangle = new Rectangle(0,0,Width, Height) ;
- _image = localImage;
- int IMAGE_TOP_OFFSET = TOP_OFFSET ;
- int IMAGE_LEFT_OFFSET = TOP_OFFSET ;
- _imageRectangle = new Rectangle(IMAGE_LEFT_OFFSET, IMAGE_TOP_OFFSET, _image.Width, _image.Height );
+ _image = localImage;
+ int IMAGE_TOP_OFFSET = TOP_OFFSET ;
+ int IMAGE_LEFT_OFFSET = TOP_OFFSET ;
+ _imageRectangle = new Rectangle(IMAGE_LEFT_OFFSET, IMAGE_TOP_OFFSET, _image.Width, _image.Height );
- //calculate the text rectangle
- int TEXT_TOP_OFFSET = TOP_OFFSET+2 ;
- int TEXT_LEFT_MARGIN = 0 ;
- int TEXT_LEFT_OFFSET = _imageRectangle.Right + TEXT_LEFT_MARGIN ;
+ //calculate the text rectangle
+ int TEXT_TOP_OFFSET = TOP_OFFSET+2 ;
+ int TEXT_LEFT_MARGIN = 0 ;
+ int TEXT_LEFT_OFFSET = _imageRectangle.Right + TEXT_LEFT_MARGIN ;
- _textRectangle = new Rectangle(TEXT_LEFT_OFFSET, TEXT_TOP_OFFSET, _controlRectangle.Width-TEXT_LEFT_OFFSET,_controlRectangle.Height-TEXT_TOP_OFFSET);
+ _textRectangle = new Rectangle(TEXT_LEFT_OFFSET, TEXT_TOP_OFFSET, _controlRectangle.Width-TEXT_LEFT_OFFSET,_controlRectangle.Height-TEXT_TOP_OFFSET);
- // make sure the control is repainted
- Invalidate() ;
- }
+ // make sure the control is repainted
+ Invalidate() ;
+ }
- protected override void OnPaint(PaintEventArgs e)
- {
+ protected override void OnPaint(PaintEventArgs e)
+ {
- Color backgroundColor = ApplicationManager.ApplicationStyle.ActiveTabBottomColor ;
- using ( Brush brush = new SolidBrush(backgroundColor) )
- e.Graphics.FillRectangle( brush, _controlRectangle ) ;
+ Color backgroundColor = ApplicationManager.ApplicationStyle.ActiveTabBottomColor ;
+ using ( Brush brush = new SolidBrush(backgroundColor) )
+ e.Graphics.FillRectangle( brush, _controlRectangle ) ;
- // draw the border
- using ( Pen pen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) )
- {
- e.Graphics.DrawLine(pen, _controlRectangle.Left, _controlRectangle.Top, _controlRectangle.Width, _controlRectangle.Top);
- e.Graphics.DrawLine(pen, _controlRectangle.Left, _controlRectangle.Bottom, _controlRectangle.Width, _controlRectangle.Bottom);
- //e.Graphics.DrawRectangle( pen, _controlRectangle ) ;
- }
+ // draw the border
+ using ( Pen pen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) )
+ {
+ e.Graphics.DrawLine(pen, _controlRectangle.Left, _controlRectangle.Top, _controlRectangle.Width, _controlRectangle.Top);
+ e.Graphics.DrawLine(pen, _controlRectangle.Left, _controlRectangle.Bottom, _controlRectangle.Width, _controlRectangle.Bottom);
+ //e.Graphics.DrawRectangle( pen, _controlRectangle ) ;
+ }
- // draw the image
- e.Graphics.DrawImage( _image, _imageRectangle.Left, _imageRectangle.Top ) ;
+ // draw the image
+ e.Graphics.DrawImage( _image, _imageRectangle.Left, _imageRectangle.Top ) ;
- // draw the text
- using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor) )
- e.Graphics.DrawString( _statusText ,ApplicationManager.ApplicationStyle.NormalApplicationFont, brush,
- new RectangleF(_textRectangle.X, _textRectangle.Y, _textRectangle.Width, _textRectangle.Height),
- _stringFormat);
- }
- private string _statusText = "Local image: ";
- private StringFormat _stringFormat;
- private Rectangle _controlRectangle ;
- private Rectangle _imageRectangle ;
- private Rectangle _textRectangle ;
- private Image _image;
- private static readonly int TOP_OFFSET = SatelliteApplicationForm.WorkspaceInset;
+ // draw the text
+ using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor) )
+ e.Graphics.DrawString( _statusText ,ApplicationManager.ApplicationStyle.NormalApplicationFont, brush,
+ new RectangleF(_textRectangle.X, _textRectangle.Y, _textRectangle.Width, _textRectangle.Height),
+ _stringFormat);
+ }
+ private string _statusText = "Local image: ";
+ private StringFormat _stringFormat;
+ private Rectangle _controlRectangle ;
+ private Rectangle _imageRectangle ;
+ private Rectangle _textRectangle ;
+ private Image _image;
+ private static readonly int TOP_OFFSET = SatelliteApplicationForm.WorkspaceInset;
- //status bar image
- private const string IMAGE_PATH = "PostHtmlEditing.ImageEditing.Images." ;
- private Bitmap localImage = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_PATH + "LocalImage.png") ;
- private Bitmap webImage = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_PATH + "WebImage.png") ;
+ //status bar image
+ private const string IMAGE_PATH = "PostHtmlEditing.ImageEditing.Images." ;
+ private Bitmap localImage = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_PATH + "LocalImage.png") ;
+ private Bitmap webImage = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_PATH + "WebImage.png") ;
- private void UpdateAppearance()
- {
- PerformLayout();
- Invalidate();
- }
+ private void UpdateAppearance()
+ {
+ PerformLayout();
+ Invalidate();
+ }
- private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
- {
- UpdateAppearance();
- }
- }
+ private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
+ {
+ UpdateAppearance();
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyTitlebar.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyTitlebar.cs
index 507bb595..c7c37fe5 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyTitlebar.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImageEditingPropertyTitlebar.cs
@@ -12,145 +12,141 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- public class ImageEditingPropertyTitlebar : Panel
- {
- private const int TOP_INSET = 2;
+ public class ImageEditingPropertyTitlebar : Panel
+ {
+ private const int TOP_INSET = 2;
- public ImageEditingPropertyTitlebar()
- {
- // enable double buffered painting.
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.DoubleBuffer, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ public ImageEditingPropertyTitlebar()
+ {
+ // enable double buffered painting.
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.DoubleBuffer, true);
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- // set height based on system metrics
- Height = SystemInformation.ToolWindowCaptionHeight ;
+ // set height based on system metrics
+ Height = SystemInformation.ToolWindowCaptionHeight ;
- // initialize down button
- closeButton = new BitmapButton() ;
- closeButton.BitmapDisabled = closeButtonDisabled ;
- closeButton.BitmapEnabled = closeButtonEnabled ;
- closeButton.BitmapPushed = closeButtonPushed ;
- closeButton.BitmapSelected = closeButtonSelected ;
- closeButton.ButtonStyle = ButtonStyle.Bitmap ;
- closeButton.ToolTip = "Hide Image Properties" ;
- closeButton.Width = closeButtonEnabled.Width ;
- closeButton.Height = closeButtonEnabled.Height;
- closeButton.Top = TOP_INSET - 1;
- closeButton.Left = Width - closeButton.Width - TOP_INSET ;
- closeButton.Anchor = AnchorStyles.Top | AnchorStyles.Right ;
- closeButton.Click +=new EventHandler(closeButton_Click);
- Controls.Add(closeButton) ;
+ // initialize down button
+ closeButton = new BitmapButton() ;
+ closeButton.BitmapDisabled = closeButtonDisabled ;
+ closeButton.BitmapEnabled = closeButtonEnabled ;
+ closeButton.BitmapPushed = closeButtonPushed ;
+ closeButton.BitmapSelected = closeButtonSelected ;
+ closeButton.ButtonStyle = ButtonStyle.Bitmap ;
+ closeButton.ToolTip = "Hide Image Properties" ;
+ closeButton.Width = closeButtonEnabled.Width ;
+ closeButton.Height = closeButtonEnabled.Height;
+ closeButton.Top = TOP_INSET - 1;
+ closeButton.Left = Width - closeButton.Width - TOP_INSET ;
+ closeButton.Anchor = AnchorStyles.Top | AnchorStyles.Right ;
+ closeButton.Click +=new EventHandler(closeButton_Click);
+ Controls.Add(closeButton) ;
- // manage appearance
- ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
- UpdateAppearance() ;
- }
+ // manage appearance
+ ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ UpdateAppearance() ;
+ }
- private void UpdateAppearance()
- {
- closeButton.BackColor = ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor ;
+ private void UpdateAppearance()
+ {
+ closeButton.BackColor = ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor ;
- PerformLayout();
- Invalidate();
- }
+ PerformLayout();
+ Invalidate();
+ }
- /*
- protected override void OnPaintBackground(PaintEventArgs pevent)
- {
+ /*
+ protected override void OnPaintBackground(PaintEventArgs pevent)
+ {
- }
- */
+ }
+ */
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint (e);
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint (e);
+ // draw the background
+ using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor) )
+ e.Graphics.FillRectangle( brush, ClientRectangle ) ;
- // draw the background
- using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor) )
- e.Graphics.FillRectangle( brush, ClientRectangle ) ;
+ // draw the border
+ using ( Pen pen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) )
+ e.Graphics.DrawLine(pen, 0, Height-1, Width-1, Height-1);
- // draw the border
- using ( Pen pen = new Pen(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor) )
- e.Graphics.DrawLine(pen, 0, Height-1, Width-1, Height-1);
+ // draw the text
+ int TEXT_TOP_INSET = TOP_INSET ;
+ using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor) )
+ e.Graphics.DrawString( "Image Properties",ApplicationManager.ApplicationStyle.NormalApplicationFont, brush, new PointF(1,TEXT_TOP_INSET) ) ;
- // draw the text
- int TEXT_TOP_INSET = TOP_INSET ;
- using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTextColor) )
- e.Graphics.DrawString( "Image Properties",ApplicationManager.ApplicationStyle.NormalApplicationFont, brush, new PointF(1,TEXT_TOP_INSET) ) ;
+ }
- }
+ ///
+ /// Close event (indicates that the user has hit the close button and wants
+ /// the tray hidden)
+ ///
+ public event EventHandler HideTitleBarClicked ;
+ ///
+ /// Fires the Close event
+ ///
+ /// event args
+ protected virtual void OnHideTitleBarClicked( EventArgs ea )
+ {
+ if ( HideTitleBarClicked != null )
+ HideTitleBarClicked( this, ea ) ;
+ }
- ///
- /// Close event (indicates that the user has hit the close button and wants
- /// the tray hidden)
- ///
- public event EventHandler HideTitleBarClicked ;
+ ///
+ /// Handle close button click event
+ ///
+ /// sender
+ /// event args
+ private void closeButton_Click(object sender, EventArgs e)
+ {
+ OnHideTitleBarClicked( EventArgs.Empty ) ;
+ }
+ ///
+ /// Handle appearance preference changes.
+ ///
+ ///
+ ///
+ private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
+ {
+ UpdateAppearance() ;
+ }
- ///
- /// Fires the Close event
- ///
- /// event args
- protected virtual void OnHideTitleBarClicked( EventArgs ea )
- {
- if ( HideTitleBarClicked != null )
- HideTitleBarClicked( this, ea ) ;
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ ApplicationStyleManager.ApplicationStyleChanged -= new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ }
+ base.Dispose( disposing );
+ }
- ///
- /// Handle close button click event
- ///
- /// sender
- /// event args
- private void closeButton_Click(object sender, EventArgs e)
- {
- OnHideTitleBarClicked( EventArgs.Empty ) ;
- }
+ // tray compontents
+ private BitmapButton closeButton ;
- ///
- /// Handle appearance preference changes.
- ///
- ///
- ///
- private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
- {
- UpdateAppearance() ;
- }
+ ///
+ /// Embedded components
+ ///
+ private Container components = new Container();
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- ApplicationStyleManager.ApplicationStyleChanged -= new EventHandler(ApplicationManager_ApplicationStyleChanged);
- }
- base.Dispose( disposing );
- }
-
-
- // tray compontents
- private BitmapButton closeButton ;
-
- ///
- /// Embedded components
- ///
- private Container components = new Container();
-
- // close button images
- private const string TRAY_IMAGE_PATH = "Images." ;
- private Bitmap closeButtonDisabled = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonDisabled.png") ;
- private Bitmap closeButtonEnabled = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonEnabled.png") ;
- private Bitmap closeButtonPushed = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonPushed.png") ;
- private Bitmap closeButtonSelected = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonSelected.png") ;
- }
+ // close button images
+ private const string TRAY_IMAGE_PATH = "Images." ;
+ private Bitmap closeButtonDisabled = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonDisabled.png") ;
+ private Bitmap closeButtonEnabled = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonEnabled.png") ;
+ private Bitmap closeButtonPushed = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonPushed.png") ;
+ private Bitmap closeButtonSelected = ResourceHelper.LoadAssemblyResourceBitmap( TRAY_IMAGE_PATH + "CloseButtonSelected.png") ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImagePropertyEditorControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImagePropertyEditorControl.cs
index 4ae5c2af..8cdc0428 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImagePropertyEditorControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/ImageEditing/ImagePropertyEditorControl.cs
@@ -14,282 +14,281 @@ using OpenLiveWriter.ApplicationFramework.ApplicationStyles;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- ///
- /// Hosts the tab control for the image property editing form.
- ///
- public class ImagePropertyEditorControl : PrimaryWorkspaceControl
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
- private PrimaryWorkspaceWorkspaceCommandBarLightweightControl commandBarLightweightControl;
+ ///
+ /// Hosts the tab control for the image property editing form.
+ ///
+ public class ImagePropertyEditorControl : PrimaryWorkspaceControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
+ private PrimaryWorkspaceWorkspaceCommandBarLightweightControl commandBarLightweightControl;
- private TabLightweightControl tabLightweightControl;
- private ImageTabPageImageControl imageTabPageImage;
- private ImageTabPageLayoutControl imageTabPageLayout;
- private ImageTabPageEffectsControl imageTabPageEffects;
- private ImageTabPageUploadControl imageTabPageUpload;
+ private TabLightweightControl tabLightweightControl;
+ private ImageTabPageImageControl imageTabPageImage;
+ private ImageTabPageLayoutControl imageTabPageLayout;
+ private ImageTabPageEffectsControl imageTabPageEffects;
+ private ImageTabPageUploadControl imageTabPageUpload;
- public ImagePropertyEditorControl()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public ImagePropertyEditorControl()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- // configure look and behavior
- AllowDragDropAutoScroll = false;
- AllPaintingInWmPaint = true;
- TopLayoutMargin = 2;
+ // configure look and behavior
+ AllowDragDropAutoScroll = false;
+ AllPaintingInWmPaint = true;
+ TopLayoutMargin = 2;
- ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ ApplicationStyleManager.ApplicationStyleChanged += new EventHandler(ApplicationManager_ApplicationStyleChanged);
- // initialize tab lightweight control
- tabLightweightControl = new TabLightweightControl(this.components) ;
- tabLightweightControl.DrawSideAndBottomTabPageBorders = false ;
- tabLightweightControl.SmallTabs = true ;
- }
+ // initialize tab lightweight control
+ tabLightweightControl = new TabLightweightControl(this.components) ;
+ tabLightweightControl.DrawSideAndBottomTabPageBorders = false ;
+ tabLightweightControl.SmallTabs = true ;
+ }
- public void Init(IBlogPostImageDataContext dataContext)
- {
+ public void Init(IBlogPostImageDataContext dataContext)
+ {
- _imageDataContext = dataContext;
- // initialization constants
- const int TOP_INSET = 2;
+ _imageDataContext = dataContext;
+ // initialization constants
+ const int TOP_INSET = 2;
- imageTabPageImage = new ImageTabPageImageControl() ;
- imageTabPageLayout = new ImageTabPageLayoutControl() ;
- imageTabPageEffects = new ImageTabPageEffectsControl() ;
- imageTabPageUpload = new ImageTabPageUploadControl() ;
+ imageTabPageImage = new ImageTabPageImageControl() ;
+ imageTabPageLayout = new ImageTabPageLayoutControl() ;
+ imageTabPageEffects = new ImageTabPageEffectsControl() ;
+ imageTabPageUpload = new ImageTabPageUploadControl() ;
- _tabPages = new ImageEditingTabPageControl[]{imageTabPageLayout, imageTabPageImage, imageTabPageEffects, imageTabPageUpload};
- for(int i=0; i<_tabPages.Length; i++)
- {
- ImageEditingTabPageControl tabPage = _tabPages[i];
- tabPage.DecoratorsManager = dataContext.DecoratorsManager;
- tabPage.TabStop = false ;
- tabPage.TabIndex = i ;
- Controls.Add( tabPage ) ;
- tabLightweightControl.SetTab( i, tabPage ) ;
- }
+ _tabPages = new ImageEditingTabPageControl[]{imageTabPageLayout, imageTabPageImage, imageTabPageEffects, imageTabPageUpload};
+ for(int i=0; i<_tabPages.Length; i++)
+ {
+ ImageEditingTabPageControl tabPage = _tabPages[i];
+ tabPage.DecoratorsManager = dataContext.DecoratorsManager;
+ tabPage.TabStop = false ;
+ tabPage.TabIndex = i ;
+ Controls.Add( tabPage ) ;
+ tabLightweightControl.SetTab( i, tabPage ) ;
+ }
- // initial appearance of editor
- tabLightweightControl.SelectedTabNumber = 0 ;
+ // initial appearance of editor
+ tabLightweightControl.SelectedTabNumber = 0 ;
- InitializeCommands();
- InitializeToolbar();
+ InitializeCommands();
+ InitializeToolbar();
- _imageDataContext.DecoratorsManager.GetImageDecorator(BrightnessDecorator.Id).Command.StateChanged += new EventHandler(Command_StateChanged);
+ _imageDataContext.DecoratorsManager.GetImageDecorator(BrightnessDecorator.Id).Command.StateChanged += new EventHandler(Command_StateChanged);
- // configure primary workspace
- // configure primary workspace
- SuspendLayout() ;
- TopLayoutMargin = TOP_INSET;
- LeftColumn.UpperPane.LightweightControl = tabLightweightControl;
- CenterColumn.Visible = false;
- RightColumn.Visible = false;
- ResumeLayout() ;
- }
- IBlogPostImageDataContext _imageDataContext;
+ // configure primary workspace
+ // configure primary workspace
+ SuspendLayout() ;
+ TopLayoutMargin = TOP_INSET;
+ LeftColumn.UpperPane.LightweightControl = tabLightweightControl;
+ CenterColumn.Visible = false;
+ RightColumn.Visible = false;
+ ResumeLayout() ;
+ }
+ IBlogPostImageDataContext _imageDataContext;
+ private void InitializeCommands()
+ {
+ commandContextManager = new CommandContextManager(ApplicationManager.CommandManager);
+ commandContextManager.BeginUpdate() ;
- private void InitializeCommands()
- {
- commandContextManager = new CommandContextManager(ApplicationManager.CommandManager);
- commandContextManager.BeginUpdate() ;
+ commandImageBrightness = new CommandImageBrightness(components) ;
+ commandImageBrightness.Tag = _imageDataContext.DecoratorsManager.GetImageDecorator(BrightnessDecorator.Id);
+ commandImageBrightness.Execute += new EventHandler(commandImageDecorator_Execute);
+ commandContextManager.AddCommand( commandImageBrightness, CommandContext.Normal) ;
- commandImageBrightness = new CommandImageBrightness(components) ;
- commandImageBrightness.Tag = _imageDataContext.DecoratorsManager.GetImageDecorator(BrightnessDecorator.Id);
- commandImageBrightness.Execute += new EventHandler(commandImageDecorator_Execute);
- commandContextManager.AddCommand( commandImageBrightness, CommandContext.Normal) ;
+ commandImageRotate = new CommandImageRotate(components) ;
+ commandImageRotate.Execute += new EventHandler(commandImageRotate_Execute);
+ commandContextManager.AddCommand( commandImageRotate, CommandContext.Normal) ;
- commandImageRotate = new CommandImageRotate(components) ;
- commandImageRotate.Execute += new EventHandler(commandImageRotate_Execute);
- commandContextManager.AddCommand( commandImageRotate, CommandContext.Normal) ;
+ commandImageReset = new CommandImageReset(components) ;
+ commandImageReset.Execute += new EventHandler(commandImageReset_Execute);
+ commandContextManager.AddCommand( commandImageReset, CommandContext.Normal) ;
- commandImageReset = new CommandImageReset(components) ;
- commandImageReset.Execute += new EventHandler(commandImageReset_Execute);
- commandContextManager.AddCommand( commandImageReset, CommandContext.Normal) ;
+ commandImageSaveDefaults = new CommandImageSaveDefaults(components) ;
+ commandImageSaveDefaults.Execute += new EventHandler(commandImageSaveDefaults_Execute);
+ commandContextManager.AddCommand( commandImageSaveDefaults, CommandContext.Normal) ;
- commandImageSaveDefaults = new CommandImageSaveDefaults(components) ;
- commandImageSaveDefaults.Execute += new EventHandler(commandImageSaveDefaults_Execute);
- commandContextManager.AddCommand( commandImageSaveDefaults, CommandContext.Normal) ;
+ commandContextManager.EndUpdate() ;
+ }
+ CommandContextManager commandContextManager;
+ Command commandImageBrightness;
+ Command commandImageRotate;
+ Command commandImageReset;
+ Command commandImageSaveDefaults;
- commandContextManager.EndUpdate() ;
- }
- CommandContextManager commandContextManager;
- Command commandImageBrightness;
- Command commandImageRotate;
- Command commandImageReset;
- Command commandImageSaveDefaults;
+ private void InitializeToolbar()
+ {
+ CommandBarButtonEntry commandBarButtonEntryImageBrightness = new CommandBarButtonEntry(components) ;
+ commandBarButtonEntryImageBrightness.CommandIdentifier = commandImageBrightness.Identifier ;
- private void InitializeToolbar()
- {
- CommandBarButtonEntry commandBarButtonEntryImageBrightness = new CommandBarButtonEntry(components) ;
- commandBarButtonEntryImageBrightness.CommandIdentifier = commandImageBrightness.Identifier ;
+ CommandBarButtonEntry commandBarButtonEntryImageRotate = new CommandBarButtonEntry(components) ;
+ commandBarButtonEntryImageRotate.CommandIdentifier = commandImageRotate.Identifier ;
- CommandBarButtonEntry commandBarButtonEntryImageRotate = new CommandBarButtonEntry(components) ;
- commandBarButtonEntryImageRotate.CommandIdentifier = commandImageRotate.Identifier ;
+ CommandBarButtonEntry commandBarButtonEntryImageReset = new CommandBarButtonEntry(components) ;
+ commandBarButtonEntryImageReset.CommandIdentifier = commandImageReset.Identifier ;
- CommandBarButtonEntry commandBarButtonEntryImageReset = new CommandBarButtonEntry(components) ;
- commandBarButtonEntryImageReset.CommandIdentifier = commandImageReset.Identifier ;
+ CommandBarButtonEntry commandBarButtonEntryImageSaveDefaults = new CommandBarButtonEntry(components) ;
+ commandBarButtonEntryImageSaveDefaults.CommandIdentifier = commandImageSaveDefaults.Identifier ;
- CommandBarButtonEntry commandBarButtonEntryImageSaveDefaults = new CommandBarButtonEntry(components) ;
- commandBarButtonEntryImageSaveDefaults.CommandIdentifier = commandImageSaveDefaults.Identifier ;
+ CommandBarDefinition commandBarDefinition = new CommandBarDefinition(components) ;
+ commandBarDefinition.LeftCommandBarEntries.Add( commandBarButtonEntryImageRotate ) ;
+ commandBarDefinition.LeftCommandBarEntries.Add( commandBarButtonEntryImageBrightness ) ;
- CommandBarDefinition commandBarDefinition = new CommandBarDefinition(components) ;
- commandBarDefinition.LeftCommandBarEntries.Add( commandBarButtonEntryImageRotate ) ;
- commandBarDefinition.LeftCommandBarEntries.Add( commandBarButtonEntryImageBrightness ) ;
+ commandBarDefinition.RightCommandBarEntries.Add( commandBarButtonEntryImageReset ) ;
+ commandBarDefinition.RightCommandBarEntries.Add( commandBarButtonEntryImageSaveDefaults ) ;
- commandBarDefinition.RightCommandBarEntries.Add( commandBarButtonEntryImageReset ) ;
- commandBarDefinition.RightCommandBarEntries.Add( commandBarButtonEntryImageSaveDefaults ) ;
+ commandBarLightweightControl = new PrimaryWorkspaceWorkspaceCommandBarLightweightControl(components) ;
+ commandBarLightweightControl.LightweightControlContainerControl = this ;
- commandBarLightweightControl = new PrimaryWorkspaceWorkspaceCommandBarLightweightControl(components) ;
- commandBarLightweightControl.LightweightControlContainerControl = this ;
+ commandBarLightweightControl.CommandManager = ApplicationManager.CommandManager ;
+ commandBarLightweightControl.CommandBarDefinition = commandBarDefinition ;
+ }
- commandBarLightweightControl.CommandManager = ApplicationManager.CommandManager ;
- commandBarLightweightControl.CommandBarDefinition = commandBarDefinition ;
- }
+ public override CommandBarLightweightControl FirstCommandBarLightweightControl
+ {
+ get
+ {
+ return commandBarLightweightControl;
+ }
+ }
- public override CommandBarLightweightControl FirstCommandBarLightweightControl
- {
- get
- {
- return commandBarLightweightControl;
- }
- }
+ public event EventHandler SaveDefaultsRequested;
+ public event EventHandler ResetToDefaultsRequested;
- public event EventHandler SaveDefaultsRequested;
- public event EventHandler ResetToDefaultsRequested;
+ public event ImagePropertyEventHandler ImagePropertyChanged;
+ private void ApplyImageDecorations()
+ {
+ ApplyImageDecorations(ImageDecoratorInvocationSource.ImagePropertiesEditor);
+ }
+ private void ApplyImageDecorations(ImageDecoratorInvocationSource source)
+ {
+ if(ImagePropertyChanged != null)
+ {
+ ImagePropertyChanged(this, new ImagePropertyEvent(ImagePropertyType.Decorators, this.ImageInfo, source));
+ }
+ }
+ public ImagePropertiesInfo ImageInfo
+ {
+ get
+ {
+ return imageInfo;
+ }
+ set
+ {
+ if(imageInfo != value)
+ {
+ imageInfo = value;
- public event ImagePropertyEventHandler ImagePropertyChanged;
- private void ApplyImageDecorations()
- {
- ApplyImageDecorations(ImageDecoratorInvocationSource.ImagePropertiesEditor);
- }
- private void ApplyImageDecorations(ImageDecoratorInvocationSource source)
- {
- if(ImagePropertyChanged != null)
- {
- ImagePropertyChanged(this, new ImagePropertyEvent(ImagePropertyType.Decorators, this.ImageInfo, source));
- }
- }
- public ImagePropertiesInfo ImageInfo
- {
- get
- {
- return imageInfo;
- }
- set
- {
- if(imageInfo != value)
- {
- imageInfo = value;
+ //disable the image rotate command if the image is not a local image.
+ commandImageRotate.Enabled = imageInfo != null && imageInfo.ImageSourceUri.IsFile;
- //disable the image rotate command if the image is not a local image.
- commandImageRotate.Enabled = imageInfo != null && imageInfo.ImageSourceUri.IsFile;
+ imageTabPageUpload.Visible = (this._imageDataContext != null) && (this._imageDataContext.ImageServiceId != null);
+ }
+ }
+ }
+ public ImagePropertiesInfo imageInfo;
- imageTabPageUpload.Visible = (this._imageDataContext != null) && (this._imageDataContext.ImageServiceId != null);
- }
- }
- }
- public ImagePropertiesInfo imageInfo;
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
+ ApplicationStyleManager.ApplicationStyleChanged -= new EventHandler(ApplicationManager_ApplicationStyleChanged);
+ }
+ base.Dispose( disposing );
+ }
- ApplicationStyleManager.ApplicationStyleChanged -= new EventHandler(ApplicationManager_ApplicationStyleChanged);
- }
- base.Dispose( disposing );
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+ #endregion
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- }
- #endregion
+ internal ImageEditingTabPageControl[] TabPages
+ {
+ get
+ {
+ return _tabPages;
+ }
+ }
+ private ImageEditingTabPageControl[] _tabPages = new ImageEditingTabPageControl[0];
- internal ImageEditingTabPageControl[] TabPages
- {
- get
- {
- return _tabPages;
- }
- }
- private ImageEditingTabPageControl[] _tabPages = new ImageEditingTabPageControl[0];
+ private void UpdateAppearance()
+ {
+ PerformLayout();
+ Invalidate();
+ }
- private void UpdateAppearance()
- {
- PerformLayout();
- Invalidate();
- }
+ protected override void OnPaintBackground(PaintEventArgs pevent)
+ {
+ using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor) )
+ pevent.Graphics.FillRectangle( brush, ClientRectangle ) ;
+ }
- protected override void OnPaintBackground(PaintEventArgs pevent)
- {
- using ( Brush brush = new SolidBrush(ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor) )
- pevent.Graphics.FillRectangle( brush, ClientRectangle ) ;
- }
+ ///
+ /// Handle appearance preference changes.
+ ///
+ ///
+ ///
+ private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
+ {
+ UpdateAppearance() ;
+ }
- ///
- /// Handle appearance preference changes.
- ///
- ///
- ///
- private void ApplicationManager_ApplicationStyleChanged(object sender, EventArgs e)
- {
- UpdateAppearance() ;
- }
+ private void commandImageDecorator_Execute(object sender, EventArgs e)
+ {
+ ImageDecorator imageDecorator = ((ImageDecorator)((Command)sender).Tag);
- private void commandImageDecorator_Execute(object sender, EventArgs e)
- {
- ImageDecorator imageDecorator = ((ImageDecorator)((Command)sender).Tag);
+ //perform the execution so that the decorator is added to the list of active decorators
+ imageDecorator.Command.PerformExecute();
- //perform the execution so that the decorator is added to the list of active decorators
- imageDecorator.Command.PerformExecute();
+ //since this command was invoked explicitly via a command button, display the editor dialog.
+ ImageDecoratorHelper.ShowImageDecoratorEditorDialog( FindForm(), imageDecorator, ImageInfo, new ApplyDecoratorCallback(ApplyImageDecorations) );
+ }
- //since this command was invoked explicitly via a command button, display the editor dialog.
- ImageDecoratorHelper.ShowImageDecoratorEditorDialog( FindForm(), imageDecorator, ImageInfo, new ApplyDecoratorCallback(ApplyImageDecorations) );
- }
+ private void commandImageRotate_Execute(object sender, EventArgs e)
+ {
+ ImageInfo.ImageRotation = ImageDecoratorUtils.GetFlipTypeRotated90(ImageInfo.ImageRotation);
+ ApplyImageDecorations();
+ }
- private void commandImageRotate_Execute(object sender, EventArgs e)
- {
- ImageInfo.ImageRotation = ImageDecoratorUtils.GetFlipTypeRotated90(ImageInfo.ImageRotation);
- ApplyImageDecorations();
- }
+ private void commandImageReset_Execute(object sender, EventArgs e)
+ {
+ if(ResetToDefaultsRequested != null)
+ {
+ ResetToDefaultsRequested(this, EventArgs.Empty);
+ }
+ ApplyImageDecorations(ImageDecoratorInvocationSource.Reset);
+ }
- private void commandImageReset_Execute(object sender, EventArgs e)
- {
- if(ResetToDefaultsRequested != null)
- {
- ResetToDefaultsRequested(this, EventArgs.Empty);
- }
- ApplyImageDecorations(ImageDecoratorInvocationSource.Reset);
- }
+ private void commandImageSaveDefaults_Execute(object sender, EventArgs e)
+ {
+ if(SaveDefaultsRequested != null)
+ {
+ SaveDefaultsRequested(this, EventArgs.Empty);
+ }
+ }
- private void commandImageSaveDefaults_Execute(object sender, EventArgs e)
- {
- if(SaveDefaultsRequested != null)
- {
- SaveDefaultsRequested(this, EventArgs.Empty);
- }
- }
-
- private void Command_StateChanged(object sender, EventArgs e)
- {
- commandImageBrightness.Enabled = _imageDataContext.DecoratorsManager.GetImageDecorator(BrightnessDecorator.Id).Command.Enabled;
- }
- }
+ private void Command_StateChanged(object sender, EventArgs e)
+ {
+ commandImageBrightness.Enabled = _imageDataContext.DecoratorsManager.GetImageDecorator(BrightnessDecorator.Id).Command.Enabled;
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PostTitleEditingElementBehavior.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PostTitleEditingElementBehavior.cs
index ce60eaac..8ad78734 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PostTitleEditingElementBehavior.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PostTitleEditingElementBehavior.cs
@@ -87,7 +87,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
}
}
-
public event EventHandler TitleChanged;
protected virtual void OnTitleChanged(EventArgs evt)
{
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PropertiesEditingElementBehavior.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PropertiesEditingElementBehavior.cs
index 01c800e0..f2cd5ea5 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PropertiesEditingElementBehavior.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/PropertiesEditingElementBehavior.cs
@@ -14,156 +14,152 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing
{
- public abstract class PropertiesEditingElementBehavior : HtmlEditorElementBehavior
- {
+ public abstract class PropertiesEditingElementBehavior : HtmlEditorElementBehavior
+ {
- public PropertiesEditingElementBehavior(IHtmlEditorComponentContext editorContext)
- : base(editorContext)
- {
- }
+ public PropertiesEditingElementBehavior(IHtmlEditorComponentContext editorContext)
+ : base(editorContext)
+ {
+ }
- protected override void OnElementAttached()
- {
- base.OnElementAttached ();
+ protected override void OnElementAttached()
+ {
+ base.OnElementAttached ();
- EditorContext.PreHandleEvent +=new HtmlEditDesignerEventHandler(EditorContext_PreHandleEvent);
- }
+ EditorContext.PreHandleEvent +=new HtmlEditDesignerEventHandler(EditorContext_PreHandleEvent);
+ }
- protected override void OnSelectedChanged()
- {
- // make sure we paint the dongle
- Invalidate(_widgetArea) ;
- }
+ protected override void OnSelectedChanged()
+ {
+ // make sure we paint the dongle
+ Invalidate(_widgetArea) ;
+ }
- public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
- {
- // ensure we paint above everything (including selection handles)
- pInfo.lFlags = (int)_HTML_PAINTER.HTMLPAINTER_OPAQUE ;
- pInfo.lZOrder = (int)_HTML_PAINT_ZORDER.HTMLPAINT_ZORDER_WINDOW_TOP ;
+ public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
+ {
+ // ensure we paint above everything (including selection handles)
+ pInfo.lFlags = (int)_HTML_PAINTER.HTMLPAINTER_OPAQUE ;
+ pInfo.lZOrder = (int)_HTML_PAINT_ZORDER.HTMLPAINT_ZORDER_WINDOW_TOP ;
- // expand to the right to accomodate our widget
- pInfo.rcExpand.top = 0 ;
- pInfo.rcExpand.bottom = 0 ;
- pInfo.rcExpand.left = 0 ;
- pInfo.rcExpand.right = _widgetEnabled.Width - WIDGET_HORIZONTAL_OVERLAY ;
- }
+ // expand to the right to accomodate our widget
+ pInfo.rcExpand.top = 0 ;
+ pInfo.rcExpand.bottom = 0 ;
+ pInfo.rcExpand.left = 0 ;
+ pInfo.rcExpand.right = _widgetEnabled.Width - WIDGET_HORIZONTAL_OVERLAY ;
+ }
- protected virtual bool WidgetActive
- {
- get
- {
- return Selected;
- }
- }
+ protected virtual bool WidgetActive
+ {
+ get
+ {
+ return Selected;
+ }
+ }
+ private int EditorContext_PreHandleEvent(int inEvtDispId, IHTMLEventObj pIEventObj)
+ {
+ if ( Selected )
+ {
+ if ( inEvtDispId == DISPID_HTMLELEMENTEVENTS2.ONMOUSEMOVE )
+ {
+ MouseInWidget = ClientPointInWidget(pIEventObj.clientX, pIEventObj.clientY) ;
+ }
- private int EditorContext_PreHandleEvent(int inEvtDispId, IHTMLEventObj pIEventObj)
- {
- if ( Selected )
- {
- if ( inEvtDispId == DISPID_HTMLELEMENTEVENTS2.ONMOUSEMOVE )
- {
- MouseInWidget = ClientPointInWidget(pIEventObj.clientX, pIEventObj.clientY) ;
- }
+ else if ( inEvtDispId == DISPID_HTMLELEMENTEVENTS2.ONMOUSEDOWN )
+ {
+ if ( WidgetActive && MouseInWidget )
+ {
+ // show the properties form
+ ShowProperties() ;
- else if ( inEvtDispId == DISPID_HTMLELEMENTEVENTS2.ONMOUSEDOWN )
- {
- if ( WidgetActive && MouseInWidget )
- {
- // show the properties form
- ShowProperties() ;
+ // eat the click
+ return HRESULT.S_OK ;
+ }
+ }
+ }
- // eat the click
- return HRESULT.S_OK ;
- }
- }
- }
+ return HRESULT.S_FALSE;
+ }
- return HRESULT.S_FALSE;
- }
+ protected virtual void ShowProperties()
+ {
+ Invalidate(_widgetArea);
+ }
+ private Rectangle CalculateWidgetScreenBounds()
+ {
+ // translate local location to client location
+ POINT localLocation = new POINT();
+ localLocation.x = _widgetLocation.X ;
+ localLocation.y = _widgetLocation.Y ;
+ POINT clientLocation = new POINT();
+ HTMLPaintSite.TransformLocalToGlobal(localLocation, ref clientLocation);
- protected virtual void ShowProperties()
- {
- Invalidate(_widgetArea);
- }
+ Point screenLocation = EditorContext.PointToScreen(new Point(clientLocation.x, clientLocation.y)) ;
+ return new Rectangle(screenLocation, new Size(_widgetArea.Width, _widgetArea.Height) );
+ }
- private Rectangle CalculateWidgetScreenBounds()
- {
- // translate local location to client location
- POINT localLocation = new POINT();
- localLocation.x = _widgetLocation.X ;
- localLocation.y = _widgetLocation.Y ;
- POINT clientLocation = new POINT();
- HTMLPaintSite.TransformLocalToGlobal(localLocation, ref clientLocation);
+ private bool MouseInWidget
+ {
+ get
+ {
+ return _mouseInWidget ;
+ }
+ set
+ {
+ if ( _mouseInWidget != value )
+ {
+ _mouseInWidget = value ;
- Point screenLocation = EditorContext.PointToScreen(new Point(clientLocation.x, clientLocation.y)) ;
- return new Rectangle(screenLocation, new Size(_widgetArea.Width, _widgetArea.Height) );
- }
+ Invalidate(_widgetArea) ;
+ }
- private bool MouseInWidget
- {
- get
- {
- return _mouseInWidget ;
- }
- set
- {
- if ( _mouseInWidget != value )
- {
- _mouseInWidget = value ;
+ // set the arrow if the mouse in the widget
+ if ( _mouseInWidget )
+ Cursor.Current = Cursors.Arrow ;
- Invalidate(_widgetArea) ;
- }
+ // toggle cursor override appropriately
+ EditorContext.OverrideCursor = _mouseInWidget ;
+ }
+ }
+ private bool _mouseInWidget ;
- // set the arrow if the mouse in the widget
- if ( _mouseInWidget )
- Cursor.Current = Cursors.Arrow ;
+ private bool ClientPointInWidget( int x, int y )
+ {
+ // calculate mouse position in local coordinates
+ POINT clientMouseLocation = new POINT();
+ clientMouseLocation.x = x ;
+ clientMouseLocation.y = y ;
+ POINT localMouseLocation = new POINT();
+ HTMLPaintSite.TransformGlobalToLocal( clientMouseLocation, ref localMouseLocation ) ;
- // toggle cursor override appropriately
- EditorContext.OverrideCursor = _mouseInWidget ;
- }
- }
- private bool _mouseInWidget ;
+ // is the mouse in the widget?
+ return _widgetArea.Contains( localMouseLocation.x, localMouseLocation.y ) ;
+ }
+ public override void OnResize(SIZE size)
+ {
+ _elementSize = new Size(size.cx, size.cy) ;
+ _widgetLocation = new Point(_elementSize.Width - _widgetEnabled.Width, WIDGET_VERTICAL_OFFSET) ;
+ _widgetArea = new Rectangle( _widgetLocation, _widgetEnabled.Size );
+ }
- private bool ClientPointInWidget( int x, int y )
- {
- // calculate mouse position in local coordinates
- POINT clientMouseLocation = new POINT();
- clientMouseLocation.x = x ;
- clientMouseLocation.y = y ;
- POINT localMouseLocation = new POINT();
- HTMLPaintSite.TransformGlobalToLocal( clientMouseLocation, ref localMouseLocation ) ;
+ public override void Draw(RECT rcBounds, RECT rcUpdate, int lDrawFlags, IntPtr hdc, IntPtr pvDrawObject)
+ {
+ if ( WidgetActive )
+ {
+ using ( Graphics g = Graphics.FromHdc(hdc) )
+ {
+ g.DrawImage( MouseInWidget ? _widgetSelected : _widgetEnabled,
+ rcBounds.right-_widgetEnabled.Width, rcBounds.top + WIDGET_VERTICAL_OFFSET );
+ }
+ }
+ }
- // is the mouse in the widget?
- return _widgetArea.Contains( localMouseLocation.x, localMouseLocation.y ) ;
- }
-
-
- public override void OnResize(SIZE size)
- {
- _elementSize = new Size(size.cx, size.cy) ;
- _widgetLocation = new Point(_elementSize.Width - _widgetEnabled.Width, WIDGET_VERTICAL_OFFSET) ;
- _widgetArea = new Rectangle( _widgetLocation, _widgetEnabled.Size );
- }
-
- public override void Draw(RECT rcBounds, RECT rcUpdate, int lDrawFlags, IntPtr hdc, IntPtr pvDrawObject)
- {
- if ( WidgetActive )
- {
- using ( Graphics g = Graphics.FromHdc(hdc) )
- {
- g.DrawImage( MouseInWidget ? _widgetSelected : _widgetEnabled,
- rcBounds.right-_widgetEnabled.Width, rcBounds.top + WIDGET_VERTICAL_OFFSET );
- }
- }
- }
-
- protected void InvalidateWidget()
- {
- Invalidate(_widgetArea) ;
- }
+ protected void InvalidateWidget()
+ {
+ Invalidate(_widgetArea) ;
+ }
protected override void Dispose(bool disposeManagedResources)
{
@@ -181,14 +177,14 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
base.Dispose(disposeManagedResources);
}
- private Size _elementSize ;
- private Point _widgetLocation ;
- private Rectangle _widgetArea ;
+ private Size _elementSize ;
+ private Point _widgetLocation ;
+ private Rectangle _widgetArea ;
private bool _disposed;
- private const int WIDGET_HORIZONTAL_OVERLAY = 5 ;
- private const int WIDGET_VERTICAL_OFFSET = 5 ;
- private Bitmap _widgetEnabled = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Images.PropertiesHandleEnabled.png", true) ;
- private Bitmap _widgetSelected = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Images.PropertiesHandleSelected.png", true) ;
- }
+ private const int WIDGET_HORIZONTAL_OVERLAY = 5 ;
+ private const int WIDGET_VERTICAL_OFFSET = 5 ;
+ private Bitmap _widgetEnabled = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Images.PropertiesHandleEnabled.png", true) ;
+ private Bitmap _widgetSelected = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Images.PropertiesHandleSelected.png", true) ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/ContentSourceSidebarControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/ContentSourceSidebarControl.cs
index 69b9384c..9cbcb23f 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/ContentSourceSidebarControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/ContentSourceSidebarControl.cs
@@ -56,7 +56,6 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Sidebar
}
}
-
public override void UpdateView(object htmlSelection, bool force)
{
if (htmlSelection == null) //true when the a non-smartcontent element is selected
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/DefaultSidebarControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/DefaultSidebarControl.cs
index b74a9fd0..b764dbff 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/DefaultSidebarControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/DefaultSidebarControl.cs
@@ -27,69 +27,69 @@ using OpenLiveWriter.PostEditor.ImageInsertion.WebImages;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Sidebar
{
- public class DefaultSidebarControl : SidebarControl
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ public class DefaultSidebarControl : SidebarControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public DefaultSidebarControl(ISidebarContext sidebarContext, IBlogPostEditingSite postEditingSite)
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public DefaultSidebarControl(ISidebarContext sidebarContext, IBlogPostEditingSite postEditingSite)
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- // record the post management context and subscribe to the post list changed event
- _postEditingSite = postEditingSite ;
+ // record the post management context and subscribe to the post list changed event
+ _postEditingSite = postEditingSite ;
- // subscribe to changes that require us to re-layout the sidebar
- _postEditingSite.WeblogChanged +=new WeblogHandler(_postEditingSite_WeblogChanged);
- _postEditingSite.WeblogSettingsChanged +=new WeblogSettingsChangedHandler(_postEditingSite_WeblogSettingsChanged);
- _postEditingSite.FrameWindow.Layout +=new LayoutEventHandler(FrameWindow_Layout);
- _postEditingSite.PostListChanged +=new EventHandler(_postEditingSite_PostListChanged);
- ContentSourceManager.GlobalContentSourceListChanged +=new EventHandler(ContentSourceManager_GlobalContentSourceListChanged);
+ // subscribe to changes that require us to re-layout the sidebar
+ _postEditingSite.WeblogChanged +=new WeblogHandler(_postEditingSite_WeblogChanged);
+ _postEditingSite.WeblogSettingsChanged +=new WeblogSettingsChangedHandler(_postEditingSite_WeblogSettingsChanged);
+ _postEditingSite.FrameWindow.Layout +=new LayoutEventHandler(FrameWindow_Layout);
+ _postEditingSite.PostListChanged +=new EventHandler(_postEditingSite_PostListChanged);
+ ContentSourceManager.GlobalContentSourceListChanged +=new EventHandler(ContentSourceManager_GlobalContentSourceListChanged);
- // add the tooltip
- _toolTip = new ToolTip2(components);
- _toolTip.InitialDelay = 750 ;
+ // add the tooltip
+ _toolTip = new ToolTip2(components);
+ _toolTip.InitialDelay = 750 ;
- // set the caption
- Text = ApplicationEnvironment.ProductName;
- AccessibleName = Res.Get(StringId.SidebarPanel) ;
+ // set the caption
+ Text = ApplicationEnvironment.ProductName;
+ AccessibleName = Res.Get(StringId.SidebarPanel) ;
- // Turn on double buffered painting.
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.DoubleBuffer, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ // Turn on double buffered painting.
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.DoubleBuffer, true);
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- // initialize components
- //_weblogPanelHeader = new PanelHeader(this, WEBLOG_PANEL_CAPTION);
- // _weblogPanelBody = new PanelBody();
- // _weblogHeader = new WeblogHeader(this, _weblogPanelBody) ;
- // _viewWeblogCommand = new LinkCommand(this, _toolTip, CommandId.ViewWeblog.ToString());
- // _viewWeblogCommand.Name = "ViewWeblog";
- // _viewWeblogAdminCommand = new LinkCommand(this, _toolTip, CommandId.ViewWeblogAdmin.ToString());
- // _viewWeblogAdminCommand.Name = "ViewWeblogAdmin";
+ // initialize components
+ //_weblogPanelHeader = new PanelHeader(this, WEBLOG_PANEL_CAPTION);
+ // _weblogPanelBody = new PanelBody();
+ // _weblogHeader = new WeblogHeader(this, _weblogPanelBody) ;
+ // _viewWeblogCommand = new LinkCommand(this, _toolTip, CommandId.ViewWeblog.ToString());
+ // _viewWeblogCommand.Name = "ViewWeblog";
+ // _viewWeblogAdminCommand = new LinkCommand(this, _toolTip, CommandId.ViewWeblogAdmin.ToString());
+ // _viewWeblogAdminCommand.Name = "ViewWeblogAdmin";
_headerControl = new SidebarHeaderControl();
- _openPanelHeader = new PanelHeader(this, OPEN_PANEL_CAPTION) ;
- _openPanelBody = new PanelBody();
- _draftsSectionHeader = new SectionHeader(this, DRAFTS_SECTION_CAPTION, SidebarColors.FirstSectionBottomColor );
- _draftsPostList = new DraftPostList(this, _toolTip, DRAFTS_SECTION_CAPTION);
- _draftsPostList.PostSelected +=new PostEventHandler(_draftsPostList_PostSelected);
- _draftsPostList.PostDeleteRequested +=new PostEventHandler(_draftsPostList_PostDeleteRequested);
- _openDraftCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.OpenPost.png", MORE_DRAFTS_CAPTION, MORE_DRAFTS_ACCNAME, _toolTip, MORE_DRAFTS_TOOLTIP, CommandId.OpenDrafts.ToString());
- _recentPostsSectionHeader = new SectionHeader(this, RECENT_POSTS_SECTION_CAPTION, SidebarColors.SecondSectionBottomColor );
- _recentPostList = new RecentPostList(this, _toolTip, RECENT_POSTS_SECTION_CAPTION);
- _recentPostList.PostSelected +=new PostEventHandler(_recentPostList_PostSelected);
- _openPostCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.OpenPost.png", MORE_POSTS_CAPTION, MORE_POSTS_ACCNAME, _toolTip, MORE_POSTS_TOOLTIP, CommandId.OpenRecentPosts.ToString());
- _insertPanelHeader = new PanelHeader(this, INSERT_PANEL_CAPTION);
- _insertPanelBody = new PanelBody();
- _insertLinkCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.InsertLink.png", INSERT_LINK_CAPTION, INSERT_LINK_ACCNAME, _toolTip, INSERT_LINK_TOOLTIP, CommandId.InsertLink.ToString());
- _insertPictureCommand = new LinkCommand(this, "BlogThis.ItemTypes.Images.ImageItem.png", INSERT_PICTURE_CAPTION, INSERT_PICTURE_ACCNAME, _toolTip, INSERT_PICTURE_TOOLTIP, CommandId.InsertPictureFromFile.ToString());
+ _openPanelHeader = new PanelHeader(this, OPEN_PANEL_CAPTION) ;
+ _openPanelBody = new PanelBody();
+ _draftsSectionHeader = new SectionHeader(this, DRAFTS_SECTION_CAPTION, SidebarColors.FirstSectionBottomColor );
+ _draftsPostList = new DraftPostList(this, _toolTip, DRAFTS_SECTION_CAPTION);
+ _draftsPostList.PostSelected +=new PostEventHandler(_draftsPostList_PostSelected);
+ _draftsPostList.PostDeleteRequested +=new PostEventHandler(_draftsPostList_PostDeleteRequested);
+ _openDraftCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.OpenPost.png", MORE_DRAFTS_CAPTION, MORE_DRAFTS_ACCNAME, _toolTip, MORE_DRAFTS_TOOLTIP, CommandId.OpenDrafts.ToString());
+ _recentPostsSectionHeader = new SectionHeader(this, RECENT_POSTS_SECTION_CAPTION, SidebarColors.SecondSectionBottomColor );
+ _recentPostList = new RecentPostList(this, _toolTip, RECENT_POSTS_SECTION_CAPTION);
+ _recentPostList.PostSelected +=new PostEventHandler(_recentPostList_PostSelected);
+ _openPostCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.OpenPost.png", MORE_POSTS_CAPTION, MORE_POSTS_ACCNAME, _toolTip, MORE_POSTS_TOOLTIP, CommandId.OpenRecentPosts.ToString());
+ _insertPanelHeader = new PanelHeader(this, INSERT_PANEL_CAPTION);
+ _insertPanelBody = new PanelBody();
+ _insertLinkCommand = new LinkCommand(this, "PostHtmlEditing.Sidebar.Images.InsertLink.png", INSERT_LINK_CAPTION, INSERT_LINK_ACCNAME, _toolTip, INSERT_LINK_TOOLTIP, CommandId.InsertLink.ToString());
+ _insertPictureCommand = new LinkCommand(this, "BlogThis.ItemTypes.Images.ImageItem.png", INSERT_PICTURE_CAPTION, INSERT_PICTURE_ACCNAME, _toolTip, INSERT_PICTURE_TOOLTIP, CommandId.InsertPictureFromFile.ToString());
- ContentSourceInfo csi = ContentSourceManager.GetContentSourceInfoById(PhotoAlbumContentSource.ID);
+ ContentSourceInfo csi = ContentSourceManager.GetContentSourceInfoById(PhotoAlbumContentSource.ID);
if (csi != null)
{
_insertPhotoAlbumCommand = new LinkCommand(this, csi.Image,
@@ -112,22 +112,22 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Sidebar
}
_insertTableCommand = new LinkCommand(this, "Tables.Commands.Images.CommandInsertTableCommandBarButtonBitmapEnabled.png", INSERT_TABLE_CAPTION, INSERT_TABLE_ACCNAME, _toolTip, INSERT_TABLE_TOOLTIP, CommandId.InsertTable.ToString());
- _contentInsertCommands = new ContentInsertCommands(this, _toolTip, LINK_COMMAND_PADDING, int.MaxValue);
- _separator2 = new SeparatorControl();
+ _contentInsertCommands = new ContentInsertCommands(this, _toolTip, LINK_COMMAND_PADDING, int.MaxValue);
+ _separator2 = new SeparatorControl();
Controls.Add(_separator2);
- Controls.Add(_headerControl);
+ Controls.Add(_headerControl);
- UpdatePostLists() ;
- }
+ UpdatePostLists() ;
+ }
- public override bool HasStatusBar
- {
- get
- {
- return false ;
- }
- }
+ public override bool HasStatusBar
+ {
+ get
+ {
+ return false ;
+ }
+ }
protected override void OnSizeChanged(EventArgs e)
{
@@ -147,9 +147,8 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Sidebar
RefreshLayout();
}
-
private void RefreshLayout(bool blogChanged)
- {
+ {
// no-op if we do not have an active weblog
// (solves order of initialization problem)
if (_postEditingSite.CurrentAccountId == null)
@@ -250,1291 +249,1270 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Sidebar
bounds.Height += SECTION_SPACING;
_insertPanelBody.Layout(bounds, _contentInsertCommands.Bounds.Bottom + INSERT_EXTRA_BOTTOM_PAD);
- BidiHelper.RtlLayoutFixup(this);
+ BidiHelper.RtlLayoutFixup(this);
MinimumSize = new Size(0, _insertPanelBody.Bounds.Bottom + INSERT_EXTRA_BOTTOM_PAD);
Refresh();
- }
+ }
- protected override void OnPaint(PaintEventArgs e)
- {
- try
- {
- // alias graphics object
- BidiGraphics g = new BidiGraphics(e.Graphics, ClientRectangle) ;
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ try
+ {
+ // alias graphics object
+ BidiGraphics g = new BidiGraphics(e.Graphics, ClientRectangle) ;
- _openPanelHeader.Paint(g);
- _openPanelBody.Paint(g);
+ _openPanelHeader.Paint(g);
+ _openPanelBody.Paint(g);
- _draftsSectionHeader.Paint(g);
- _draftsPostList.Paint(g);
- if (ShouldShowMoreDrafts)
- _openDraftCommand.Paint(g);
+ _draftsSectionHeader.Paint(g);
+ _draftsPostList.Paint(g);
+ if (ShouldShowMoreDrafts)
+ _openDraftCommand.Paint(g);
- _recentPostsSectionHeader.Paint(g);
- _recentPostList.Paint(g);
- if (ShouldShowMoreRecentPosts)
- _openPostCommand.Paint(g);
+ _recentPostsSectionHeader.Paint(g);
+ _recentPostList.Paint(g);
+ if (ShouldShowMoreRecentPosts)
+ _openPostCommand.Paint(g);
- _insertPanelHeader.Paint(g);
- _insertPanelBody.Paint(g);
+ _insertPanelHeader.Paint(g);
+ _insertPanelBody.Paint(g);
- _insertLinkCommand.Paint(g);
- _insertPictureCommand.Paint(g);
+ _insertLinkCommand.Paint(g);
+ _insertPictureCommand.Paint(g);
if (_insertPhotoAlbumCommand != null)
- _insertPhotoAlbumCommand.Paint(g);
+ _insertPhotoAlbumCommand.Paint(g);
if (_insertWebImage != null)
_insertWebImage.Paint(g);
- _insertTableCommand.Paint(g);
- _contentInsertCommands.Paint(g);
+ _insertTableCommand.Paint(g);
+ _contentInsertCommands.Paint(g);
- }
- catch(Exception ex)
- {
- Trace.Fail("Unexpected exception: " + ex.ToString()) ;
- }
- }
+ }
+ catch(Exception ex)
+ {
+ Trace.Fail("Unexpected exception: " + ex.ToString()) ;
+ }
+ }
+ private void _postEditingSite_WeblogChanged(string blogId)
+ {
+ RefreshLayout(true);
+ }
- private void _postEditingSite_WeblogChanged(string blogId)
- {
- RefreshLayout(true);
- }
+ private void _postEditingSite_WeblogSettingsChanged(string blogId, bool templateChanged)
+ {
+ RefreshLayout(true);
+ }
- private void _postEditingSite_WeblogSettingsChanged(string blogId, bool templateChanged)
- {
- RefreshLayout(true);
- }
-
-
- private void _postEditingSite_PostListChanged(object sender, EventArgs e)
- {
+ private void _postEditingSite_PostListChanged(object sender, EventArgs e)
+ {
RefreshLayout();
- }
+ }
- private void ContentSourceManager_GlobalContentSourceListChanged(object sender, EventArgs e)
- {
- if ( ControlHelper.ControlCanHandleInvoke(this) )
- BeginInvoke(new InvokeInUIThreadDelegate(HandleContentSourceListChanged)) ;
- }
+ private void ContentSourceManager_GlobalContentSourceListChanged(object sender, EventArgs e)
+ {
+ if ( ControlHelper.ControlCanHandleInvoke(this) )
+ BeginInvoke(new InvokeInUIThreadDelegate(HandleContentSourceListChanged)) ;
+ }
- private void HandleContentSourceListChanged()
- {
- _contentInsertCommands.RefreshContentSourceCommands();
- RefreshLayout() ;
- }
+ private void HandleContentSourceListChanged()
+ {
+ _contentInsertCommands.RefreshContentSourceCommands();
+ RefreshLayout() ;
+ }
- private void _draftsPostList_PostSelected(PostInfo post)
- {
- WindowCascadeHelper.SetNextOpenedLocation(_postEditingSite.FrameWindow.Location);
- _postEditingSite.OpenLocalPost(post);
- }
+ private void _draftsPostList_PostSelected(PostInfo post)
+ {
+ WindowCascadeHelper.SetNextOpenedLocation(_postEditingSite.FrameWindow.Location);
+ _postEditingSite.OpenLocalPost(post);
+ }
- private void _draftsPostList_PostDeleteRequested(PostInfo post)
- {
- _postEditingSite.DeleteLocalPost(post) ;
- UpdatePostLists() ;
- }
+ private void _draftsPostList_PostDeleteRequested(PostInfo post)
+ {
+ _postEditingSite.DeleteLocalPost(post) ;
+ UpdatePostLists() ;
+ }
private void FrameWindow_Layout(object sender, EventArgs e)
{
}
- private void _recentPostList_PostSelected(PostInfo post)
- {
- WindowCascadeHelper.SetNextOpenedLocation(_postEditingSite.FrameWindow.Location);
- _postEditingSite.OpenLocalPost(post);
- }
+ private void _recentPostList_PostSelected(PostInfo post)
+ {
+ WindowCascadeHelper.SetNextOpenedLocation(_postEditingSite.FrameWindow.Location);
+ _postEditingSite.OpenLocalPost(post);
+ }
- private void UpdatePostLists()
- {
- PostInfo[] drafts = PostListCache.Drafts;
- PostInfo[] recentPosts = PostListCache.RecentPosts;
- _draftsPostList.SetPosts(drafts);
- _recentPostList.SetPosts(recentPosts);
- _shouldShowMoreDrafts = drafts.Length > PostList.MAX_POSTS;
- _shouldShowMoreRecentPosts = recentPosts.Length > PostList.MAX_POSTS;
- }
+ private void UpdatePostLists()
+ {
+ PostInfo[] drafts = PostListCache.Drafts;
+ PostInfo[] recentPosts = PostListCache.RecentPosts;
+ _draftsPostList.SetPosts(drafts);
+ _recentPostList.SetPosts(recentPosts);
+ _shouldShowMoreDrafts = drafts.Length > PostList.MAX_POSTS;
+ _shouldShowMoreRecentPosts = recentPosts.Length > PostList.MAX_POSTS;
+ }
- private bool _shouldShowMoreDrafts;
- private bool _shouldShowMoreRecentPosts;
+ private bool _shouldShowMoreDrafts;
+ private bool _shouldShowMoreRecentPosts;
- private bool ShouldShowMoreRecentPosts
- {
- get { return _shouldShowMoreRecentPosts; }
- }
+ private bool ShouldShowMoreRecentPosts
+ {
+ get { return _shouldShowMoreRecentPosts; }
+ }
- private bool ShouldShowMoreDrafts
- {
- get { return _shouldShowMoreDrafts; }
- }
+ private bool ShouldShowMoreDrafts
+ {
+ get { return _shouldShowMoreDrafts; }
+ }
// private PanelHeader _weblogPanelHeader;
- // private WeblogHeader _weblogHeader ;
- // private PanelBody _weblogPanelBody ;
- // private LinkCommand _viewWeblogCommand ;
- // private LinkCommand _viewWeblogAdminCommand ;
- // private BlogProviderButtonCommandBarControl _blogProviderButtonCommandBar ;
- private SidebarHeaderControl _headerControl;
+ // private WeblogHeader _weblogHeader ;
+ // private PanelBody _weblogPanelBody ;
+ // private LinkCommand _viewWeblogCommand ;
+ // private LinkCommand _viewWeblogAdminCommand ;
+ // private BlogProviderButtonCommandBarControl _blogProviderButtonCommandBar ;
+ private SidebarHeaderControl _headerControl;
private PanelHeader _openPanelHeader;
- private PanelBody _openPanelBody;
- private SectionHeader _draftsSectionHeader ;
- private PostList _draftsPostList ;
- private SectionHeader _recentPostsSectionHeader ;
- private PostList _recentPostList ;
- private LinkCommand _openDraftCommand ;
- private LinkCommand _openPostCommand ;
- private PanelHeader _insertPanelHeader ;
- private PanelBody _insertPanelBody;
- private LinkCommand _insertLinkCommand ;
- private LinkCommand _insertPictureCommand ;
- private LinkCommand _insertPhotoAlbumCommand ;
- private LinkCommand _insertTableCommand ;
+ private PanelBody _openPanelBody;
+ private SectionHeader _draftsSectionHeader ;
+ private PostList _draftsPostList ;
+ private SectionHeader _recentPostsSectionHeader ;
+ private PostList _recentPostList ;
+ private LinkCommand _openDraftCommand ;
+ private LinkCommand _openPostCommand ;
+ private PanelHeader _insertPanelHeader ;
+ private PanelBody _insertPanelBody;
+ private LinkCommand _insertLinkCommand ;
+ private LinkCommand _insertPictureCommand ;
+ private LinkCommand _insertPhotoAlbumCommand ;
+ private LinkCommand _insertTableCommand ;
private LinkCommand _insertWebImage;
- private ContentInsertCommands _contentInsertCommands ;
+ private ContentInsertCommands _contentInsertCommands ;
private SeparatorControl _separator2;
- private ToolTip2 _toolTip ;
- private IBlogPostEditingSite _postEditingSite ;
+ private ToolTip2 _toolTip ;
+ private IBlogPostEditingSite _postEditingSite ;
- private const int PANEL_TOP_INSET = 2 ;
- internal const int PANEL_HORIZONTAL_INSET = 10 ;
- private const int PANEL_SECTION_PADDING = 10;
- private const int PANEL_SECTION_PADDING_FIRST = 1;
- internal const int LINK_COMMAND_PADDING = 5 ;
- private const int INSERT_EXTRA_BOTTOM_PAD = 0 ;
- private const int OPEN_COMMAND_PADDING = 3 ;
- private const int OPEN_COMMAND_LEFT_OFFSET = 20 ;
- private const int SECTION_SPACING = 8;
- private const int SECONDARY_HEADER_INSET = 3;
- private const int TERTIARY_INSET = 3;
+ private const int PANEL_TOP_INSET = 2 ;
+ internal const int PANEL_HORIZONTAL_INSET = 10 ;
+ private const int PANEL_SECTION_PADDING = 10;
+ private const int PANEL_SECTION_PADDING_FIRST = 1;
+ internal const int LINK_COMMAND_PADDING = 5 ;
+ private const int INSERT_EXTRA_BOTTOM_PAD = 0 ;
+ private const int OPEN_COMMAND_PADDING = 3 ;
+ private const int OPEN_COMMAND_LEFT_OFFSET = 20 ;
+ private const int SECTION_SPACING = 8;
+ private const int SECONDARY_HEADER_INSET = 3;
+ private const int TERTIARY_INSET = 3;
+ private string WEBLOG_PANEL_CAPTION = Res.Get(StringId.Weblog) ;
+ private string OPEN_PANEL_CAPTION = Res.Get(StringId.Open) ;
+ private string DRAFTS_SECTION_CAPTION = Res.Get(StringId.Drafts) ;
+ private string RECENT_POSTS_SECTION_CAPTION = Res.Get(StringId.RecentlyPosted) ;
+ private string MORE_DRAFTS_CAPTION = Res.Get(StringId.MoreDotDotDot) ;
+ private string MORE_DRAFTS_ACCNAME = Res.Get(StringId.MoreDrafts) ;
+ private string MORE_DRAFTS_TOOLTIP = Res.Get(StringId.MoreDraftsTooltip) ;
+ private string MORE_POSTS_CAPTION = Res.Get(StringId.MoreDotDotDot) ;
+ private string MORE_POSTS_ACCNAME = Res.Get(StringId.MorePosts) ;
+ private string MORE_POSTS_TOOLTIP = Res.Get(StringId.MorePostsTooltip) ;
+ private string INSERT_PANEL_CAPTION = Res.Get(StringId.Insert) ;
+ private string INSERT_LINK_CAPTION = Res.Get(StringId.InsertLinkDotDotDot) ;
+ private string INSERT_LINK_ACCNAME = Res.Get(StringId.InsertLink) ;
+ private string INSERT_LINK_TOOLTIP = Res.Get(StringId.InsertLinkTooltip) ;
+ private string INSERT_PICTURE_CAPTION = Res.Get(StringId.InsertPictureDotDotDot) ;
+ private string INSERT_PICTURE_ACCNAME = Res.Get(StringId.InsertPicture) ;
+ private string INSERT_PICTURE_TOOLTIP = Res.Get(StringId.InsertPictureTooltip) ;
+ private string INSERT_TABLE_CAPTION = Res.Get(StringId.InsertTableDotDotDot) ;
+ private string INSERT_TABLE_ACCNAME = Res.Get(StringId.InsertTable) ;
+ private string INSERT_TABLE_TOOLTIP = Res.Get(StringId.InsertTableTooltip) ;
- private string WEBLOG_PANEL_CAPTION = Res.Get(StringId.Weblog) ;
- private string OPEN_PANEL_CAPTION = Res.Get(StringId.Open) ;
- private string DRAFTS_SECTION_CAPTION = Res.Get(StringId.Drafts) ;
- private string RECENT_POSTS_SECTION_CAPTION = Res.Get(StringId.RecentlyPosted) ;
- private string MORE_DRAFTS_CAPTION = Res.Get(StringId.MoreDotDotDot) ;
- private string MORE_DRAFTS_ACCNAME = Res.Get(StringId.MoreDrafts) ;
- private string MORE_DRAFTS_TOOLTIP = Res.Get(StringId.MoreDraftsTooltip) ;
- private string MORE_POSTS_CAPTION = Res.Get(StringId.MoreDotDotDot) ;
- private string MORE_POSTS_ACCNAME = Res.Get(StringId.MorePosts) ;
- private string MORE_POSTS_TOOLTIP = Res.Get(StringId.MorePostsTooltip) ;
- private string INSERT_PANEL_CAPTION = Res.Get(StringId.Insert) ;
- private string INSERT_LINK_CAPTION = Res.Get(StringId.InsertLinkDotDotDot) ;
- private string INSERT_LINK_ACCNAME = Res.Get(StringId.InsertLink) ;
- private string INSERT_LINK_TOOLTIP = Res.Get(StringId.InsertLinkTooltip) ;
- private string INSERT_PICTURE_CAPTION = Res.Get(StringId.InsertPictureDotDotDot) ;
- private string INSERT_PICTURE_ACCNAME = Res.Get(StringId.InsertPicture) ;
- private string INSERT_PICTURE_TOOLTIP = Res.Get(StringId.InsertPictureTooltip) ;
- private string INSERT_TABLE_CAPTION = Res.Get(StringId.InsertTableDotDotDot) ;
- private string INSERT_TABLE_ACCNAME = Res.Get(StringId.InsertTable) ;
- private string INSERT_TABLE_TOOLTIP = Res.Get(StringId.InsertTableTooltip) ;
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
+ _postEditingSite.WeblogChanged -= new WeblogHandler(_postEditingSite_WeblogChanged);
+ _postEditingSite.WeblogSettingsChanged -= new WeblogSettingsChangedHandler(_postEditingSite_WeblogSettingsChanged);
+ _postEditingSite.FrameWindow.Layout -= new LayoutEventHandler(FrameWindow_Layout);
+ _postEditingSite.PostListChanged -= new EventHandler(_postEditingSite_PostListChanged);
+ ContentSourceManager.GlobalContentSourceListChanged -= new EventHandler(ContentSourceManager_GlobalContentSourceListChanged);
- _postEditingSite.WeblogChanged -= new WeblogHandler(_postEditingSite_WeblogChanged);
- _postEditingSite.WeblogSettingsChanged -= new WeblogSettingsChangedHandler(_postEditingSite_WeblogSettingsChanged);
- _postEditingSite.FrameWindow.Layout -= new LayoutEventHandler(FrameWindow_Layout);
- _postEditingSite.PostListChanged -= new EventHandler(_postEditingSite_PostListChanged);
- ContentSourceManager.GlobalContentSourceListChanged -= new EventHandler(ContentSourceManager_GlobalContentSourceListChanged);
+ _openPanelHeader.Dispose();
+ _insertPanelHeader.Dispose();
+ }
+ base.Dispose( disposing );
+ }
- _openPanelHeader.Dispose();
- _insertPanelHeader.Dispose();
- }
- base.Dispose( disposing );
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+ #endregion
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- }
- #endregion
+ internal class ContentInsertCommands
+ {
+ public ContentInsertCommands(Control parent, ToolTip parentToolTip, int linkCommandPadding, int maxCommands)
+ {
+ // save reference to parent and command padding
+ _parent = parent ;
+ _linkCommandPadding = linkCommandPadding ;
+ _maxCommands = maxCommands ;
+ _parentToolTip = parentToolTip ;
- }
+ // update list of content-source commands
+ RefreshContentSourceCommands() ;
+ }
- internal class ContentInsertCommands
- {
+ public void RefreshContentSourceCommands()
+ {
+ _parent.SuspendLayout() ;
+ try
+ {
+ // clear existing commands
+ foreach ( LinkCommand linkCommand in _contentSourceCommands )
+ linkCommand.Dispose() ;
+ _contentSourceCommands.Clear();
- public ContentInsertCommands(Control parent, ToolTip parentToolTip, int linkCommandPadding, int maxCommands)
- {
- // save reference to parent and command padding
- _parent = parent ;
- _linkCommandPadding = linkCommandPadding ;
- _maxCommands = maxCommands ;
- _parentToolTip = parentToolTip ;
+ if ( _addPluginCommand != null )
+ {
+ _addPluginCommand.Dispose();
+ _addPluginCommand = null ;
+ }
- // update list of content-source commands
- RefreshContentSourceCommands() ;
- }
+ // get the commands
+ ContentSourceInfo[] contentSources = GetSidebarContentSources(_maxCommands) ;
- public void RefreshContentSourceCommands()
- {
- _parent.SuspendLayout() ;
- try
- {
- // clear existing commands
- foreach ( LinkCommand linkCommand in _contentSourceCommands )
- linkCommand.Dispose() ;
- _contentSourceCommands.Clear();
-
- if ( _addPluginCommand != null )
- {
- _addPluginCommand.Dispose();
- _addPluginCommand = null ;
- }
-
- // get the commands
- ContentSourceInfo[] contentSources = GetSidebarContentSources(_maxCommands) ;
-
- // add a link comment for each source
- foreach (ContentSourceInfo contentSourceInfo in contentSources)
- {
+ // add a link comment for each source
+ foreach (ContentSourceInfo contentSourceInfo in contentSources)
+ {
if (contentSourceInfo.Id == PhotoAlbumContentSource.ID || contentSourceInfo.Id == WebImageContentSource.ID)
continue;
- LinkCommand linkCommand = new LinkCommand(
- _parent,
- contentSourceInfo.Image,
- String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), contentSourceInfo.InsertableContentSourceSidebarText),
- String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), contentSourceInfo.InsertableContentSourceSidebarText),
- _parentToolTip,
- null, //String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarTooltip), contentSourceInfo.InsertableContentSourceMenuText),
- contentSourceInfo.Id ) ;
+ LinkCommand linkCommand = new LinkCommand(
+ _parent,
+ contentSourceInfo.Image,
+ String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), contentSourceInfo.InsertableContentSourceSidebarText),
+ String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarText), contentSourceInfo.InsertableContentSourceSidebarText),
+ _parentToolTip,
+ null, //String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.PluginInsertSidebarTooltip), contentSourceInfo.InsertableContentSourceMenuText),
+ contentSourceInfo.Id ) ;
- _contentSourceCommands.Add(linkCommand) ;
- }
+ _contentSourceCommands.Add(linkCommand) ;
+ }
- // create add-plugin command
- if (MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
- {
- Command addPluginCommand = ApplicationManager.CommandManager.Get(CommandId.AddPlugin) ;
- _addPluginCommand = new LinkCommand(_parent, _parentToolTip, addPluginCommand.Identifier);
- }
- }
- finally
- {
- _parent.ResumeLayout();
- }
- }
+ // create add-plugin command
+ if (MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
+ {
+ Command addPluginCommand = ApplicationManager.CommandManager.Get(CommandId.AddPlugin) ;
+ _addPluginCommand = new LinkCommand(_parent, _parentToolTip, addPluginCommand.Identifier);
+ }
+ }
+ finally
+ {
+ _parent.ResumeLayout();
+ }
+ }
- public Rectangle Bounds = new Rectangle();
+ public Rectangle Bounds = new Rectangle();
- public void Layout(Point startLocation)
- {
- Bounds.Location = startLocation ;
- Bounds.Height = startLocation.Y - Bounds.Location.Y;
+ public void Layout(Point startLocation)
+ {
+ Bounds.Location = startLocation ;
+ Bounds.Height = startLocation.Y - Bounds.Location.Y;
int floor = int.MaxValue; //_parent.ClientSize.Height - 50;
- for (int i = 0; i < _contentSourceCommands.Count; i++)
- {
- LinkCommand linkCommand = (LinkCommand) _contentSourceCommands[i];
+ for (int i = 0; i < _contentSourceCommands.Count; i++)
+ {
+ LinkCommand linkCommand = (LinkCommand) _contentSourceCommands[i];
- if (startLocation.Y > floor)
- {
- for (int j = i; j < _contentSourceCommands.Count; j++)
- ((LinkCommand)_contentSourceCommands[j]).Visible = false;
- break;
- }
+ if (startLocation.Y > floor)
+ {
+ for (int j = i; j < _contentSourceCommands.Count; j++)
+ ((LinkCommand)_contentSourceCommands[j]).Visible = false;
+ break;
+ }
- _laidOutContentCommands = true ;
+ _laidOutContentCommands = true ;
- linkCommand.Visible = true;
- // layout the link command
- linkCommand.Layout(startLocation);
+ linkCommand.Visible = true;
+ // layout the link command
+ linkCommand.Layout(startLocation);
- // update start location for next iteration
- startLocation = new Point(startLocation.X, linkCommand.Bounds.Bottom + _linkCommandPadding);
+ // update start location for next iteration
+ startLocation = new Point(startLocation.X, linkCommand.Bounds.Bottom + _linkCommandPadding);
- // update bounds
- Bounds.Width = linkCommand.Bounds.Width ;
- Bounds.Height = startLocation.Y - Bounds.Location.Y ;
- }
+ // update bounds
+ Bounds.Width = linkCommand.Bounds.Width ;
+ Bounds.Height = startLocation.Y - Bounds.Location.Y ;
+ }
- if ( _laidOutContentCommands && MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
- {
- // add the "add a plugin" command and update height
- _addPluginCommand.Layout(new Point(startLocation.X, startLocation.Y + ADD_PLUGIN_PAD));
- Bounds.Height = _addPluginCommand.Bounds.Bottom - Bounds.Location.Y - _linkCommandPadding + 2;
- }
- }
- private const int ADD_PLUGIN_PAD = 3 ;
- private bool _laidOutContentCommands = false ;
+ if ( _laidOutContentCommands && MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
+ {
+ // add the "add a plugin" command and update height
+ _addPluginCommand.Layout(new Point(startLocation.X, startLocation.Y + ADD_PLUGIN_PAD));
+ Bounds.Height = _addPluginCommand.Bounds.Bottom - Bounds.Location.Y - _linkCommandPadding + 2;
+ }
+ }
+ private const int ADD_PLUGIN_PAD = 3 ;
+ private bool _laidOutContentCommands = false ;
- public void Paint(BidiGraphics g)
- {
- foreach ( LinkCommand linkCommand in _contentSourceCommands )
- linkCommand.Paint(g);
+ public void Paint(BidiGraphics g)
+ {
+ foreach ( LinkCommand linkCommand in _contentSourceCommands )
+ linkCommand.Paint(g);
- if (MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
- {
- int y = _addPluginCommand.Bounds.Y - ADD_PLUGIN_PAD ;
- using ( Pen pen = PanelBody.CreateBorderPen() )
- g.DrawLine(pen, _addPluginCommand.Bounds.X, y, _parent.Right - _addPluginCommand.Bounds.X, y);
+ if (MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.WLGallery))
+ {
+ int y = _addPluginCommand.Bounds.Y - ADD_PLUGIN_PAD ;
+ using ( Pen pen = PanelBody.CreateBorderPen() )
+ g.DrawLine(pen, _addPluginCommand.Bounds.X, y, _parent.Right - _addPluginCommand.Bounds.X, y);
- _addPluginCommand.Paint(g);
- }
- }
+ _addPluginCommand.Paint(g);
+ }
+ }
- private ContentSourceInfo[] GetSidebarContentSources(int maxSources)
- {
- ArrayList sidebarContentSources = new ArrayList();
- if ( maxSources <= ContentSourceManager.BuiltInInsertableContentSources.Length )
- {
- // clip the list of standard spources if necessary
- for( int i=0; i i )
+ {
+ string postType = posts[i].IsPage ? Res.Get(StringId.Page) : Res.Get(StringId.Post);
+ LinkLabels[i].AccessibleName = string.Format(CultureInfo.CurrentCulture, AccessibilityNameFormat, postType);
+ DeleteButtons[i].AccessibleName = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.DeleteSomething), LinkLabels[i].AccessibleName);
-
- internal abstract class PostList
- {
- public PostList(Control parent, ToolTip toolTip, string title)
- {
- _parent = parent ;
- _toolTip = toolTip ;
- _title = title ;
- }
-
- public void SetPosts(PostInfo[] posts)
- {
- // copy posts into link labels
- for ( int i=0; i i )
- {
- string postType = posts[i].IsPage ? Res.Get(StringId.Page) : Res.Get(StringId.Post);
- LinkLabels[i].AccessibleName = string.Format(CultureInfo.CurrentCulture, AccessibilityNameFormat, postType);
- DeleteButtons[i].AccessibleName = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.DeleteSomething), LinkLabels[i].AccessibleName);
-
- LinkLabels[i].Text = posts[i].Title ;
- string tooltipText = FormatToolTipText(posts[i]);
- LinkLabels[i].AccessibleDescription = tooltipText;
+ LinkLabels[i].Text = posts[i].Title ;
+ string tooltipText = FormatToolTipText(posts[i]);
+ LinkLabels[i].AccessibleDescription = tooltipText;
LinkLabels[i].LinkColor = ColorizedResources.Instance.SidebarLinkColor;
- _toolTip.SetToolTip(LinkLabels[i], tooltipText);
- LinkLabels[i].Tag = posts[i] ;
- LinkLabels[i].Visible = true ;
- _toolTip.SetToolTip(DeleteButtons[i], DeleteButtonToolTip);
- DeleteButtons[i].Tag = posts[i] ;
- DeleteButtons[i].Visible = true ;
- DeleteButtons[i].AccessibleDescription = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.DeleteSomething), posts[i].Title);
- }
- else
- {
- LinkLabels[i].Text = String.Empty ;
- LinkLabels[i].Tag = null ;
- LinkLabels[i].Visible = false ;
- DeleteButtons[i].Tag = null ;
- DeleteButtons[i].Visible = false ;
- }
- }
+ _toolTip.SetToolTip(LinkLabels[i], tooltipText);
+ LinkLabels[i].Tag = posts[i] ;
+ LinkLabels[i].Visible = true ;
+ _toolTip.SetToolTip(DeleteButtons[i], DeleteButtonToolTip);
+ DeleteButtons[i].Tag = posts[i] ;
+ DeleteButtons[i].Visible = true ;
+ DeleteButtons[i].AccessibleDescription = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.DeleteSomething), posts[i].Title);
+ }
+ else
+ {
+ LinkLabels[i].Text = String.Empty ;
+ LinkLabels[i].Tag = null ;
+ LinkLabels[i].Visible = false ;
+ DeleteButtons[i].Tag = null ;
+ DeleteButtons[i].Visible = false ;
+ }
+ }
- // note whether we have posts to display
- _havePostsToDisplay = posts.Length > 0 ;
- }
+ // note whether we have posts to display
+ _havePostsToDisplay = posts.Length > 0 ;
+ }
- public event PostEventHandler PostSelected ;
+ public event PostEventHandler PostSelected ;
- public event PostEventHandler PostDeleteRequested ;
+ public event PostEventHandler PostDeleteRequested ;
- public Rectangle Bounds = new Rectangle();
+ public Rectangle Bounds = new Rectangle();
private const int POSTLIST_INDENT = 15;
- public void Layout(Point startLocation)
- {
- // make sure the link labels have a parent
- Init() ;
+ public void Layout(Point startLocation)
+ {
+ // make sure the link labels have a parent
+ Init() ;
- // initialize the bounds
- Bounds.Location = startLocation ;
- Bounds.Size = new Size( _parent.Width - startLocation.X, 0);
+ // initialize the bounds
+ Bounds.Location = startLocation ;
+ Bounds.Size = new Size( _parent.Width - startLocation.X, 0);
- if ( _havePostsToDisplay )
- {
- // position the visible link labels
- int currentLocationY = startLocation.Y + LINK_TEXT_PADDING;
- for (int i=0; i
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/HtmlEditorSidebarTitle.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/HtmlEditorSidebarTitle.cs
index 8c4b99f4..3bd50ce6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/HtmlEditorSidebarTitle.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/HtmlEditorSidebarTitle.cs
@@ -18,172 +18,169 @@ using OpenLiveWriter.Localization.Bidi;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Sidebar
{
- internal class HtmlEditorSidebarTitle : Panel
- {
- private const int TOP_INSET = 2;
+ internal class HtmlEditorSidebarTitle : Panel
+ {
+ private const int TOP_INSET = 2;
- private BitmapButton buttonChevron;
- private SidebarTitleUITheme _uiTheme;
+ private BitmapButton buttonChevron;
+ private SidebarTitleUITheme _uiTheme;
- public HtmlEditorSidebarTitle()
- {
- // enable double buffered painting.
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.DoubleBuffer, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ public HtmlEditorSidebarTitle()
+ {
+ // enable double buffered painting.
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.DoubleBuffer, true);
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- Height = 30;
+ Height = 30;
- buttonChevron = new BitmapButton(this.components);
- buttonChevron.ButtonStyle = ButtonStyle.Bitmap;
- buttonChevron.ButtonText = Res.Get(StringId.HideSidebar);
- buttonChevron.ToolTip = Res.Get(StringId.HideSidebar);
- buttonChevron.Click += new EventHandler(ClickHandler);
- buttonChevron.AccessibleName = Res.Get(StringId.HideSidebar);
- buttonChevron.TabStop = true;
- buttonChevron.TabIndex = 0;
- buttonChevron.RightToLeft = (BidiHelper.IsRightToLeft ? RightToLeft.No : RightToLeft.Yes);
- buttonChevron.AllowMirroring = true;
- Controls.Add(buttonChevron);
+ buttonChevron = new BitmapButton(this.components);
+ buttonChevron.ButtonStyle = ButtonStyle.Bitmap;
+ buttonChevron.ButtonText = Res.Get(StringId.HideSidebar);
+ buttonChevron.ToolTip = Res.Get(StringId.HideSidebar);
+ buttonChevron.Click += new EventHandler(ClickHandler);
+ buttonChevron.AccessibleName = Res.Get(StringId.HideSidebar);
+ buttonChevron.TabStop = true;
+ buttonChevron.TabIndex = 0;
+ buttonChevron.RightToLeft = (BidiHelper.IsRightToLeft ? RightToLeft.No : RightToLeft.Yes);
+ buttonChevron.AllowMirroring = true;
+ Controls.Add(buttonChevron);
+ Click += new EventHandler(ClickHandler);
- Click += new EventHandler(ClickHandler);
+ //create the UI theme
+ _uiTheme = new SidebarTitleUITheme(this);
- //create the UI theme
- _uiTheme = new SidebarTitleUITheme(this);
+ buttonChevron.Bounds =
+ RectangleHelper.Center(_uiTheme.bmpChevronRight.Size, new Rectangle(0, 0, 20, ClientSize.Height), false);
+ }
- buttonChevron.Bounds =
- RectangleHelper.Center(_uiTheme.bmpChevronRight.Size, new Rectangle(0, 0, 20, ClientSize.Height), false);
- }
+ public void UpdateTitle( string titleText )
+ {
+ Text = titleText ;
+ Invalidate();
+ }
- public void UpdateTitle( string titleText )
- {
- Text = titleText ;
- Invalidate();
- }
-
- protected override void OnPaint(PaintEventArgs e)
- {
- BidiGraphics g = new BidiGraphics(e.Graphics, ClientRectangle);
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ BidiGraphics g = new BidiGraphics(e.Graphics, ClientRectangle);
using (Brush b = new SolidBrush(ColorizedResources.Instance.BorderDarkColor))
- g.FillRectangle(b, ClientRectangle);
+ g.FillRectangle(b, ClientRectangle);
- TextFormatFlags tf = TextFormatFlags.VerticalCenter;
- int width = g.MeasureText(Text, Font).Width;
+ TextFormatFlags tf = TextFormatFlags.VerticalCenter;
+ int width = g.MeasureText(Text, Font).Width;
g.DrawText(Text, Font, new Rectangle(20, -1, width, ClientSize.Height), _uiTheme.TextColor, tf);
- }
+ }
+ ///
+ /// Close event (indicates that the user has hit the close button and wants
+ /// the tray hidden)
+ ///
+ public event EventHandler HideTitleBarClicked ;
- ///
- /// Close event (indicates that the user has hit the close button and wants
- /// the tray hidden)
- ///
- public event EventHandler HideTitleBarClicked ;
+ ///
+ /// Fires the Close event
+ ///
+ /// event args
+ protected virtual void OnHideTitleBarClicked( EventArgs ea )
+ {
+ if ( HideTitleBarClicked != null )
+ HideTitleBarClicked( this, ea ) ;
+ }
+ ///
+ /// Handle close button click event
+ ///
+ /// sender
+ /// event args
+ private void ClickHandler(object sender, EventArgs e)
+ {
+ OnHideTitleBarClicked( EventArgs.Empty ) ;
+ }
- ///
- /// Fires the Close event
- ///
- /// event args
- protected virtual void OnHideTitleBarClicked( EventArgs ea )
- {
- if ( HideTitleBarClicked != null )
- HideTitleBarClicked( this, ea ) ;
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- ///
- /// Handle close button click event
- ///
- /// sender
- /// event args
- private void ClickHandler(object sender, EventArgs e)
- {
- OnHideTitleBarClicked( EventArgs.Empty ) ;
- }
+ private class SidebarTitleUITheme : ControlUITheme
+ {
+ private Bitmap bmpChevronRightBase = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronRight.png");
+ internal Bitmap bmpChevronRight;
+ private Bitmap bmpChevronRightHover = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronRightHover.png");
+ private Color _textColor;
+ private HtmlEditorSidebarTitle _sidebarTitleControl;
+ public SidebarTitleUITheme(HtmlEditorSidebarTitle sidebarTitleControl) : base(sidebarTitleControl, false)
+ {
+ _sidebarTitleControl = sidebarTitleControl;
+ ColorizedResources.Instance.ColorizationChanged += new EventHandler(ColorizationChanged);
+ ApplyTheme();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ protected override void Dispose()
+ {
+ ColorizedResources.Instance.ColorizationChanged -= new EventHandler(ColorizationChanged);
+ }
- private class SidebarTitleUITheme : ControlUITheme
- {
- private Bitmap bmpChevronRightBase = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronRight.png");
- internal Bitmap bmpChevronRight;
- private Bitmap bmpChevronRightHover = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronRightHover.png");
- private Color _textColor;
- private HtmlEditorSidebarTitle _sidebarTitleControl;
- public SidebarTitleUITheme(HtmlEditorSidebarTitle sidebarTitleControl) : base(sidebarTitleControl, false)
- {
- _sidebarTitleControl = sidebarTitleControl;
- ColorizedResources.Instance.ColorizationChanged += new EventHandler(ColorizationChanged);
- ApplyTheme();
- }
+ protected override void ApplyTheme(bool highContrast)
+ {
+ if(bmpChevronRight != null && bmpChevronRight != bmpChevronRightBase)
+ bmpChevronRight.Dispose();
- protected override void Dispose()
- {
- ColorizedResources.Instance.ColorizationChanged -= new EventHandler(ColorizationChanged);
- }
+ if(highContrast)
+ {
+ _textColor = SystemColors.ControlText;
+ _sidebarTitleControl.buttonChevron.BackColor = SystemColors.Control;
- protected override void ApplyTheme(bool highContrast)
- {
- if(bmpChevronRight != null && bmpChevronRight != bmpChevronRightBase)
- bmpChevronRight.Dispose();
+ //convert the chevon's White color to the Window Text color (fixes bug 437444)
+ bmpChevronRight = new Bitmap(bmpChevronRightBase);
+ ColorMap colorMap = new ColorMap();
+ colorMap.OldColor = Color.White;
+ colorMap.NewColor = SystemColors.WindowText;
+ ImageHelper.ConvertColors(bmpChevronRight, colorMap);
+ }
+ else
+ {
+ _textColor = Color.White;
+ _sidebarTitleControl.buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
+ bmpChevronRight = bmpChevronRightBase;
+ }
- if(highContrast)
- {
- _textColor = SystemColors.ControlText;
- _sidebarTitleControl.buttonChevron.BackColor = SystemColors.Control;
+ _sidebarTitleControl.buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
+ _sidebarTitleControl.buttonChevron.BitmapEnabled = bmpChevronRight;
+ _sidebarTitleControl.buttonChevron.BitmapSelected = bmpChevronRightHover;
+ _sidebarTitleControl.buttonChevron.BitmapPushed = bmpChevronRightHover;
+ }
- //convert the chevon's White color to the Window Text color (fixes bug 437444)
- bmpChevronRight = new Bitmap(bmpChevronRightBase);
- ColorMap colorMap = new ColorMap();
- colorMap.OldColor = Color.White;
- colorMap.NewColor = SystemColors.WindowText;
- ImageHelper.ConvertColors(bmpChevronRight, colorMap);
- }
- else
- {
- _textColor = Color.White;
- _sidebarTitleControl.buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
- bmpChevronRight = bmpChevronRightBase;
- }
+ private void ColorizationChanged(object sender, EventArgs e)
+ {
+ _sidebarTitleControl.buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
+ }
- _sidebarTitleControl.buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
- _sidebarTitleControl.buttonChevron.BitmapEnabled = bmpChevronRight;
- _sidebarTitleControl.buttonChevron.BitmapSelected = bmpChevronRightHover;
- _sidebarTitleControl.buttonChevron.BitmapPushed = bmpChevronRightHover;
- }
+ public Color TextColor { get { return _textColor; }}
+ }
- private void ColorizationChanged(object sender, EventArgs e)
- {
- _sidebarTitleControl.buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
- }
+ ///
+ /// Embedded components
+ ///
+ private Container components = new Container();
- public Color TextColor { get { return _textColor; }}
- }
-
- ///
- /// Embedded components
- ///
- private Container components = new Container();
-
- // close button images
- private const string IMAGE_RESOURCE_PATH = "Images." ;
- private Bitmap closeButtonDisabled = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonDisabled.png") ;
- private Bitmap closeButtonEnabled = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonEnabled.png") ;
- private Bitmap closeButtonPushed = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonPushed.png") ;
- private Bitmap closeButtonSelected = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonSelected.png") ;
- }
+ // close button images
+ private const string IMAGE_RESOURCE_PATH = "Images." ;
+ private Bitmap closeButtonDisabled = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonDisabled.png") ;
+ private Bitmap closeButtonEnabled = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonEnabled.png") ;
+ private Bitmap closeButtonPushed = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonPushed.png") ;
+ private Bitmap closeButtonSelected = ResourceHelper.LoadAssemblyResourceBitmap( IMAGE_RESOURCE_PATH + "CloseButtonSelected.png") ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/SidebarGutter.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/SidebarGutter.cs
index fcab2ee2..33c69baf 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/SidebarGutter.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/Sidebar/SidebarGutter.cs
@@ -15,108 +15,107 @@ using OpenLiveWriter.Localization.Bidi;
namespace OpenLiveWriter.PostEditor.PostHtmlEditing.Sidebar
{
- ///
- /// Summary description for SidebarGutter.
- ///
- public class SidebarGutter : System.Windows.Forms.UserControl
- {
- const int BLOCK_HEIGHT = 30;
+ ///
+ /// Summary description for SidebarGutter.
+ ///
+ public class SidebarGutter : System.Windows.Forms.UserControl
+ {
+ const int BLOCK_HEIGHT = 30;
- private Bitmap bitmapChevronLeft = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronLeft.png");
- private Bitmap bitmapChevronLeftHover = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronLeftHover.png");
+ private Bitmap bitmapChevronLeft = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronLeft.png");
+ private Bitmap bitmapChevronLeftHover = ResourceHelper.LoadAssemblyResourceBitmap("PostHtmlEditing.Sidebar.Images.ChevronLeftHover.png");
- private BitmapButton buttonChevron;
+ private BitmapButton buttonChevron;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public SidebarGutter()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public SidebarGutter()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- buttonChevron = new BitmapButton(this.components);
- ColorizedResources.Instance.ColorizationChanged += new EventHandler(ColorizationChanged);
- buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
- buttonChevron.BitmapEnabled = bitmapChevronLeft;
- buttonChevron.BitmapSelected = bitmapChevronLeftHover;
- buttonChevron.BitmapPushed = bitmapChevronLeftHover;
- buttonChevron.Bounds =
- RectangleHelper.Center(new Size(10, 9), new Rectangle(0, 0, ClientSize.Width, BLOCK_HEIGHT), false);
- buttonChevron.ButtonStyle = ButtonStyle.Bitmap;
- buttonChevron.ButtonText = Res.Get(StringId.ShowSidebar);
- buttonChevron.ToolTip = Res.Get(StringId.ShowSidebar);
- buttonChevron.Click += new EventHandler(buttonChevron_Click);
- buttonChevron.AccessibleName = Res.Get(StringId.ShowSidebar);
- buttonChevron.TabStop = true;
- buttonChevron.TabIndex = 0;
+ buttonChevron = new BitmapButton(this.components);
+ ColorizedResources.Instance.ColorizationChanged += new EventHandler(ColorizationChanged);
+ buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
+ buttonChevron.BitmapEnabled = bitmapChevronLeft;
+ buttonChevron.BitmapSelected = bitmapChevronLeftHover;
+ buttonChevron.BitmapPushed = bitmapChevronLeftHover;
+ buttonChevron.Bounds =
+ RectangleHelper.Center(new Size(10, 9), new Rectangle(0, 0, ClientSize.Width, BLOCK_HEIGHT), false);
+ buttonChevron.ButtonStyle = ButtonStyle.Bitmap;
+ buttonChevron.ButtonText = Res.Get(StringId.ShowSidebar);
+ buttonChevron.ToolTip = Res.Get(StringId.ShowSidebar);
+ buttonChevron.Click += new EventHandler(buttonChevron_Click);
+ buttonChevron.AccessibleName = Res.Get(StringId.ShowSidebar);
+ buttonChevron.TabStop = true;
+ buttonChevron.TabIndex = 0;
buttonChevron.RightToLeft = (BidiHelper.IsRightToLeft ? RightToLeft.No : RightToLeft.Yes);
- buttonChevron.AllowMirroring = true;
- Controls.Add(buttonChevron);
- AccessibleRole = AccessibleRole.PushButton;
- }
+ buttonChevron.AllowMirroring = true;
+ Controls.Add(buttonChevron);
+ AccessibleRole = AccessibleRole.PushButton;
+ }
- protected override void OnResize(EventArgs e)
- {
- base.OnResize (e);
- Invalidate();
- }
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize (e);
+ Invalidate();
+ }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ ColorizedResources.Instance.ColorizationChanged -= new EventHandler(ColorizationChanged);
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- ColorizedResources.Instance.ColorizationChanged -= new EventHandler(ColorizationChanged);
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new Container();
+ //
+ // SidebarGutter
+ //
+ this.Name = "SidebarGutter";
+ this.Size = new System.Drawing.Size(12, 150);
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new Container();
- //
- // SidebarGutter
- //
- this.Name = "SidebarGutter";
- this.Size = new System.Drawing.Size(12, 150);
+ }
+ #endregion
- }
- #endregion
-
- protected override void OnPaintBackground(PaintEventArgs e)
- {
- ColorizedResources colRes = ColorizedResources.Instance;
- Color blockColor = colRes.SidebarHeaderBackgroundColor;
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ ColorizedResources colRes = ColorizedResources.Instance;
+ Color blockColor = colRes.SidebarHeaderBackgroundColor;
using (Brush b = new SolidBrush(colRes.SidebarGradientBottomColor))
- e.Graphics.FillRectangle(b, ClientRectangle);
- using (Brush b = new SolidBrush(blockColor))
- e.Graphics.FillRectangle(b, 0, 0, ClientSize.Width, BLOCK_HEIGHT);
- }
+ e.Graphics.FillRectangle(b, ClientRectangle);
+ using (Brush b = new SolidBrush(blockColor))
+ e.Graphics.FillRectangle(b, 0, 0, ClientSize.Width, BLOCK_HEIGHT);
+ }
- private void buttonChevron_Click(object sender, EventArgs e)
- {
- OnClick(EventArgs.Empty);
- }
+ private void buttonChevron_Click(object sender, EventArgs e)
+ {
+ OnClick(EventArgs.Empty);
+ }
- private void ColorizationChanged(object sender, EventArgs e)
- {
- buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
- }
- }
+ private void ColorizationChanged(object sender, EventArgs e)
+ {
+ buttonChevron.BackColor = ColorizedResources.Instance.SidebarHeaderBackgroundColor;
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/SmartContentContextMenuDefinition.cs b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/SmartContentContextMenuDefinition.cs
index d20c20ca..4949dd06 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/SmartContentContextMenuDefinition.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostHtmlEditing/SmartContentContextMenuDefinition.cs
@@ -18,10 +18,10 @@ namespace OpenLiveWriter.PostEditor.PostHtmlEditing
Entries.Add(CommandId.CopyCommand, false, false);
Entries.Add(CommandId.Paste, false, true);
/*
- Entries.Add(CommandId.AlignLeft, false, false);
- Entries.Add(CommandId.AlignCenter, false, false);
- Entries.Add(CommandId.AlignRight, false, false);
- */
+ Entries.Add(CommandId.AlignLeft, false, false);
+ Entries.Add(CommandId.AlignCenter, false, false);
+ Entries.Add(CommandId.AlignRight, false, false);
+ */
}
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayCheckControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayCheckControl.cs
index 865ec20b..ff51b2e8 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayCheckControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayCheckControl.cs
@@ -11,172 +11,171 @@ using OpenLiveWriter.HtmlParser.Parser;
namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
{
- internal interface ICategorySelectorControl
- {
- BlogPostCategory Category
- {
- get;
- }
+ internal interface ICategorySelectorControl
+ {
+ BlogPostCategory Category
+ {
+ get;
+ }
- bool Selected
- {
- get; set;
- }
+ bool Selected
+ {
+ get; set;
+ }
- Control Control
- {
- get;
- }
+ Control Control
+ {
+ get;
+ }
- event EventHandler SelectedChanged;
- }
+ event EventHandler SelectedChanged;
+ }
- internal class CategorySelectorControlFactory
- {
+ internal class CategorySelectorControlFactory
+ {
- private static CategorySelectorControlFactory _categorySelectionControlFactory;
+ private static CategorySelectorControlFactory _categorySelectionControlFactory;
- public static CategorySelectorControlFactory Instance
- {
- get
- {
- if (_categorySelectionControlFactory == null)
- _categorySelectionControlFactory = new CategorySelectorControlFactory();
- return _categorySelectionControlFactory;
- }
- }
+ public static CategorySelectorControlFactory Instance
+ {
+ get
+ {
+ if (_categorySelectionControlFactory == null)
+ _categorySelectionControlFactory = new CategorySelectorControlFactory();
+ return _categorySelectionControlFactory;
+ }
+ }
- public ICategorySelectorControl GetControl(BlogPostCategory category, bool multiSelect)
- {
- if (multiSelect)
- return new CategoryCheckSelectorControl(category);
- else
- return new CategoryRadioSelectorControl(category);
- }
- }
+ public ICategorySelectorControl GetControl(BlogPostCategory category, bool multiSelect)
+ {
+ if (multiSelect)
+ return new CategoryCheckSelectorControl(category);
+ else
+ return new CategoryRadioSelectorControl(category);
+ }
+ }
- internal class CategoryRadioSelectorControl: RadioButton, ICategorySelectorControl
- {
+ internal class CategoryRadioSelectorControl: RadioButton, ICategorySelectorControl
+ {
- public CategoryRadioSelectorControl(BlogPostCategory category) : base()
- {
- FlatStyle = FlatStyle.System;
- _category = category;
- }
+ public CategoryRadioSelectorControl(BlogPostCategory category) : base()
+ {
+ FlatStyle = FlatStyle.System;
+ _category = category;
+ }
- protected override void OnCreateControl()
- {
- base.OnCreateControl();
- TextAlign = ContentAlignment.TopLeft ; // prevent wrapping
- string categoryText = HtmlUtils.UnEscapeEntities(Category.Name, HtmlUtils.UnEscapeMode.Default);
- Text = categoryText.Replace("&", "&&") ;
- using ( Graphics g = CreateGraphics() )
- Height = Math.Max((int)Math.Ceiling(DisplayHelper.ScaleY(18)), Convert.ToInt32(Font.GetHeight(g)));
- }
+ protected override void OnCreateControl()
+ {
+ base.OnCreateControl();
+ TextAlign = ContentAlignment.TopLeft ; // prevent wrapping
+ string categoryText = HtmlUtils.UnEscapeEntities(Category.Name, HtmlUtils.UnEscapeMode.Default);
+ Text = categoryText.Replace("&", "&&") ;
+ using ( Graphics g = CreateGraphics() )
+ Height = Math.Max((int)Math.Ceiling(DisplayHelper.ScaleY(18)), Convert.ToInt32(Font.GetHeight(g)));
+ }
- #region ICategorySelectorControl Members
+ #region ICategorySelectorControl Members
- public BlogPostCategory Category
- {
- get
- {
- return _category;
- }
- }
- private BlogPostCategory _category;
+ public BlogPostCategory Category
+ {
+ get
+ {
+ return _category;
+ }
+ }
+ private BlogPostCategory _category;
- public bool Selected
- {
- get
- {
- return Checked;
- }
- set
- {
- Checked = value;
- }
- }
+ public bool Selected
+ {
+ get
+ {
+ return Checked;
+ }
+ set
+ {
+ Checked = value;
+ }
+ }
- public Control Control
- {
- get
- {
- return this;
- }
- }
+ public Control Control
+ {
+ get
+ {
+ return this;
+ }
+ }
- public event EventHandler SelectedChanged;
- protected override void OnCheckedChanged(EventArgs e)
- {
- if (SelectedChanged != null)
- SelectedChanged(this, e);
- base.OnCheckedChanged (e);
- }
+ public event EventHandler SelectedChanged;
+ protected override void OnCheckedChanged(EventArgs e)
+ {
+ if (SelectedChanged != null)
+ SelectedChanged(this, e);
+ base.OnCheckedChanged (e);
+ }
- #endregion
+ #endregion
- }
+ }
- internal class CategoryCheckSelectorControl : CheckBox, ICategorySelectorControl
- {
- public CategoryCheckSelectorControl(BlogPostCategory category) : base()
- {
- FlatStyle = FlatStyle.System;
- _category = category;
+ internal class CategoryCheckSelectorControl : CheckBox, ICategorySelectorControl
+ {
+ public CategoryCheckSelectorControl(BlogPostCategory category) : base()
+ {
+ FlatStyle = FlatStyle.System;
+ _category = category;
- }
+ }
- protected override void OnCreateControl()
- {
- base.OnCreateControl();
- TextAlign = ContentAlignment.TopLeft ; // prevent wrapping
- string categoryText = HtmlUtils.UnEscapeEntities(Category.Name, HtmlUtils.UnEscapeMode.Default);
- Text = categoryText.Replace("&", "&&") ;
- using ( Graphics g = CreateGraphics() )
- Height = Math.Max((int)Math.Ceiling(DisplayHelper.ScaleY(18)), Convert.ToInt32(Font.GetHeight(g)));
- }
+ protected override void OnCreateControl()
+ {
+ base.OnCreateControl();
+ TextAlign = ContentAlignment.TopLeft ; // prevent wrapping
+ string categoryText = HtmlUtils.UnEscapeEntities(Category.Name, HtmlUtils.UnEscapeMode.Default);
+ Text = categoryText.Replace("&", "&&") ;
+ using ( Graphics g = CreateGraphics() )
+ Height = Math.Max((int)Math.Ceiling(DisplayHelper.ScaleY(18)), Convert.ToInt32(Font.GetHeight(g)));
+ }
- #region ICategorySelectorControl Members
+ #region ICategorySelectorControl Members
- public BlogPostCategory Category
- {
- get
- {
- return _category;
- }
- }
- private BlogPostCategory _category;
+ public BlogPostCategory Category
+ {
+ get
+ {
+ return _category;
+ }
+ }
+ private BlogPostCategory _category;
- public bool Selected
- {
- get
- {
- return Checked;
- }
- set
- {
- Checked = value;
- }
- }
+ public bool Selected
+ {
+ get
+ {
+ return Checked;
+ }
+ set
+ {
+ Checked = value;
+ }
+ }
- public Control Control
- {
- get
- {
- return this;
- }
- }
+ public Control Control
+ {
+ get
+ {
+ return this;
+ }
+ }
- public event EventHandler SelectedChanged;
- protected override void OnCheckedChanged(EventArgs e)
- {
- if (SelectedChanged != null)
- SelectedChanged(this, e);
- base.OnCheckedChanged (e);
- }
+ public event EventHandler SelectedChanged;
+ protected override void OnCheckedChanged(EventArgs e)
+ {
+ if (SelectedChanged != null)
+ SelectedChanged(this, e);
+ base.OnCheckedChanged (e);
+ }
-
- #endregion
- }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayFormM1.cs b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayFormM1.cs
index 4e71af15..9dd4a879 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayFormM1.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDisplayFormM1.cs
@@ -22,229 +22,223 @@ using OpenLiveWriter.Localization.Bidi;
namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
{
- ///
- /// Summary description for CategoryDisplayForm.
- ///
- internal class CategoryDisplayFormM1 : MiniForm
- {
- public CategoryDisplayFormM1(Control parentControl, CategoryContext categoryContext)
- {
- SuppressAutoRtlFixup = true;
- // save references and signup for changed event
- _parentControl = parentControl;
- _categoryContext = categoryContext;
- _categoryContext.Changed += new CategoryContext.CategoryChangedEventHandler(_categoryContext_Changed);
+ ///
+ /// Summary description for CategoryDisplayForm.
+ ///
+ internal class CategoryDisplayFormM1 : MiniForm
+ {
+ public CategoryDisplayFormM1(Control parentControl, CategoryContext categoryContext)
+ {
+ SuppressAutoRtlFixup = true;
+ // save references and signup for changed event
+ _parentControl = parentControl;
+ _categoryContext = categoryContext;
+ _categoryContext.Changed += new CategoryContext.CategoryChangedEventHandler(_categoryContext_Changed);
- // standard designer stuff
- InitializeComponent();
+ // standard designer stuff
+ InitializeComponent();
- this.buttonAdd.Text = Res.Get(StringId.AddButton2);
+ this.buttonAdd.Text = Res.Get(StringId.AddButton2);
- // mini form behavior
- DismissOnDeactivate = true;
+ // mini form behavior
+ DismissOnDeactivate = true;
- // dynamic background colors based on theme
- BackColor = ColorizedResources.Instance.FrameGradientLight ;
- categoryRefreshControl.BackColor = ColorizedResources.Instance.FrameGradientLight ;
- categoryContainerControl.BackColor = SystemColors.Window ;
+ // dynamic background colors based on theme
+ BackColor = ColorizedResources.Instance.FrameGradientLight ;
+ categoryRefreshControl.BackColor = ColorizedResources.Instance.FrameGradientLight ;
+ categoryContainerControl.BackColor = SystemColors.Window ;
- // dynamic layout depending upon whether we support adding categories
- if ( categoryContext.SupportsAddingCategories )
- {
- textBoxAddCategory.MaxLength = categoryContext.MaxCategoryNameLength ;
- }
- else
- {
- int gap = categoryContainerControl.Top - panelAddCategory.Top ;
- panelAddCategory.Visible = false ;
- categoryContainerControl.Top = panelAddCategory.Top + 2 ;
- categoryContainerControl.Height += gap ;
- }
+ // dynamic layout depending upon whether we support adding categories
+ if ( categoryContext.SupportsAddingCategories )
+ {
+ textBoxAddCategory.MaxLength = categoryContext.MaxCategoryNameLength ;
+ }
+ else
+ {
+ int gap = categoryContainerControl.Top - panelAddCategory.Top ;
+ panelAddCategory.Visible = false ;
+ categoryContainerControl.Top = panelAddCategory.Top + 2 ;
+ categoryContainerControl.Height += gap ;
+ }
- // dynamic layout depending upon whether we support heirarchical categories
- if ( !categoryContext.SupportsHierarchicalCategories )
- {
- textBoxAddCategory.Width += (comboBoxParent.Right - textBoxAddCategory.Right);
- comboBoxParent.Visible = false ;
- }
+ // dynamic layout depending upon whether we support heirarchical categories
+ if ( !categoryContext.SupportsHierarchicalCategories )
+ {
+ textBoxAddCategory.Width += (comboBoxParent.Right - textBoxAddCategory.Right);
+ comboBoxParent.Visible = false ;
+ }
- // initialize add textbox
- ClearAddTextBox() ;
+ // initialize add textbox
+ ClearAddTextBox() ;
- // initialize category control
- categoryRefreshControl.Initialize(_categoryContext);
- }
+ // initialize category control
+ categoryRefreshControl.Initialize(_categoryContext);
+ }
- public int MaxDropDownWidth
- {
- get { return _maxDropDownWidth; }
- set { _maxDropDownWidth = value; }
- }
+ public int MaxDropDownWidth
+ {
+ get { return _maxDropDownWidth; }
+ set { _maxDropDownWidth = value; }
+ }
- public int MinDropDownWidth
- {
- get { return _minDropDownWidth; }
- set { _minDropDownWidth = value; }
- }
+ public int MinDropDownWidth
+ {
+ get { return _minDropDownWidth; }
+ set { _minDropDownWidth = value; }
+ }
- private int _maxDropDownWidth = 260;
- private int _minDropDownWidth = 104;
+ private int _maxDropDownWidth = 260;
+ private int _minDropDownWidth = 104;
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
-
- RefreshParentCombo();
+ RefreshParentCombo();
+ if (panelAddCategory.Visible)
+ {
+ if (comboBoxParent.Visible)
+ {
+ DisplayHelper.AutoFitSystemButton(buttonAdd);
+ using (new AutoGrow(this, AnchorStyles.Bottom | AnchorStyles.Right, false))
+ {
+ textBoxAddCategory.Width = buttonAdd.Right - textBoxAddCategory.Left;
- if (panelAddCategory.Visible)
- {
- if (comboBoxParent.Visible)
- {
- DisplayHelper.AutoFitSystemButton(buttonAdd);
- using (new AutoGrow(this, AnchorStyles.Bottom | AnchorStyles.Right, false))
- {
- textBoxAddCategory.Width = buttonAdd.Right - textBoxAddCategory.Left;
+ DisplayHelper.AutoFitSystemCombo(comboBoxParent, 0, int.MaxValue, true);
+ comboBoxParent.Left = textBoxAddCategory.Left;
+ comboBoxParent.Top = textBoxAddCategory.Bottom + ScaleY(3);
+ buttonAdd.Top = comboBoxParent.Top + (comboBoxParent.Height - buttonAdd.Height) / 2;
+ buttonAdd.Left = comboBoxParent.Right + ScaleX(3);
- DisplayHelper.AutoFitSystemCombo(comboBoxParent, 0, int.MaxValue, true);
- comboBoxParent.Left = textBoxAddCategory.Left;
- comboBoxParent.Top = textBoxAddCategory.Bottom + ScaleY(3);
- buttonAdd.Top = comboBoxParent.Top + (comboBoxParent.Height - buttonAdd.Height) / 2;
- buttonAdd.Left = comboBoxParent.Right + ScaleX(3);
+ if (buttonAdd.Right > textBoxAddCategory.Right)
+ {
+ int deltaX = buttonAdd.Right - textBoxAddCategory.Right;
+ textBoxAddCategory.Width += deltaX;
+ using (LayoutHelper.SuspendAnchoring(textBoxAddCategory, buttonAdd, comboBoxParent))
+ panelAddCategory.Width += deltaX;
+ categoryContainerControl.Width += deltaX;
+ }
+ else
+ {
+ buttonAdd.Left = textBoxAddCategory.Right - buttonAdd.Width;
+ comboBoxParent.Width = buttonAdd.Left - comboBoxParent.Left - ScaleX(3);
+ }
- if (buttonAdd.Right > textBoxAddCategory.Right)
- {
- int deltaX = buttonAdd.Right - textBoxAddCategory.Right;
- textBoxAddCategory.Width += deltaX;
- using (LayoutHelper.SuspendAnchoring(textBoxAddCategory, buttonAdd, comboBoxParent))
- panelAddCategory.Width += deltaX;
- categoryContainerControl.Width += deltaX;
- }
- else
- {
- buttonAdd.Left = textBoxAddCategory.Right - buttonAdd.Width;
- comboBoxParent.Width = buttonAdd.Left - comboBoxParent.Left - ScaleX(3);
- }
+ int deltaY = comboBoxParent.Bottom - textBoxAddCategory.Bottom;
+ panelAddCategory.Height += deltaY;
+ categoryContainerControl.Top += deltaY;
+ categoryRefreshControl.Top += deltaY;
+ }
+ }
+ else
+ {
+ using (new AutoGrow(this, AnchorStyles.Right, false))
+ {
+ int deltaX = -buttonAdd.Width + DisplayHelper.AutoFitSystemButton(buttonAdd);
+ textBoxAddCategory.Width -= deltaX;
- int deltaY = comboBoxParent.Bottom - textBoxAddCategory.Bottom;
- panelAddCategory.Height += deltaY;
- categoryContainerControl.Top += deltaY;
- categoryRefreshControl.Top += deltaY;
- }
- }
- else
- {
- using (new AutoGrow(this, AnchorStyles.Right, false))
- {
- int deltaX = -buttonAdd.Width + DisplayHelper.AutoFitSystemButton(buttonAdd);
- textBoxAddCategory.Width -= deltaX;
-
- int desiredWidth = DisplayHelper.MeasureString(textBoxAddCategory, textBoxAddCategory.Text).Width + (int)DisplayHelper.ScaleX(10);
- deltaX += desiredWidth - textBoxAddCategory.Width;
- if (deltaX > 0)
- {
- panelAddCategory.Width += deltaX;
- categoryContainerControl.Width += deltaX;
+ int desiredWidth = DisplayHelper.MeasureString(textBoxAddCategory, textBoxAddCategory.Text).Width + (int)DisplayHelper.ScaleX(10);
+ deltaX += desiredWidth - textBoxAddCategory.Width;
+ if (deltaX > 0)
+ {
+ panelAddCategory.Width += deltaX;
+ categoryContainerControl.Width += deltaX;
// textBoxAddCategory.Width += deltaX;
// buttonAdd.Left = textBoxAddCategory.Right + ScaleX(3);
// textBoxAddCategory.Width = Math.Max(desiredWidth, textBoxAddCategory.Width);
// textBoxAddCategory.Width = buttonAdd.Left - textBoxAddCategory.Left - ScaleX(3);
- }
- }
- }
+ }
+ }
+ }
- /*using (LayoutHelper.SuspendAnchoring(comboBoxParent, buttonAdd, textBoxAddCategory, panelAddCategory, categoryContainerControl))
- {
- if (comboBoxParent.Visible)
- {
- deltaW = -comboBoxParent.Width + DisplayHelper.AutoFitSystemCombo(comboBoxParent, 0, int.MaxValue, true);
- buttonAdd.Left += deltaW;
- }
+ /*using (LayoutHelper.SuspendAnchoring(comboBoxParent, buttonAdd, textBoxAddCategory, panelAddCategory, categoryContainerControl))
+ {
+ if (comboBoxParent.Visible)
+ {
+ deltaW = -comboBoxParent.Width + DisplayHelper.AutoFitSystemCombo(comboBoxParent, 0, int.MaxValue, true);
+ buttonAdd.Left += deltaW;
+ }
- int oldWidth = buttonAdd.Width;
- DisplayHelper.AutoFitSystemButton(buttonAdd);
- buttonAdd.Width += (int)DisplayHelper.ScaleX(6); // add some more "air" in the Add button
- deltaW += buttonAdd.Width - oldWidth;
+ int oldWidth = buttonAdd.Width;
+ DisplayHelper.AutoFitSystemButton(buttonAdd);
+ buttonAdd.Width += (int)DisplayHelper.ScaleX(6); // add some more "air" in the Add button
+ deltaW += buttonAdd.Width - oldWidth;
- panelAddCategory.Width += deltaW;
- categoryContainerControl.Width += deltaW;
- Width += deltaW;
- }*/
- }
+ panelAddCategory.Width += deltaW;
+ categoryContainerControl.Width += deltaW;
+ Width += deltaW;
+ }*/
+ }
- // use design time defaults to drive dynamic layout
- _topMargin = categoryContainerControl.Top ;
- _bottomMargin = Bottom - categoryContainerControl.Bottom ;
+ // use design time defaults to drive dynamic layout
+ _topMargin = categoryContainerControl.Top ;
+ _bottomMargin = Bottom - categoryContainerControl.Bottom ;
- using (new AutoGrow(this, AnchorStyles.Right, false))
- LayoutControls(_categoryContext, true, false);
- UpdateSelectedCategories(_categoryContext.SelectedCategories);
+ using (new AutoGrow(this, AnchorStyles.Right, false))
+ LayoutControls(_categoryContext, true, false);
+ UpdateSelectedCategories(_categoryContext.SelectedCategories);
- BidiHelper.RtlLayoutFixup(this);
- }
+ BidiHelper.RtlLayoutFixup(this);
+ }
+ private System.Windows.Forms.Panel panelAddCategory;
+ private System.Windows.Forms.TextBox textBoxAddCategory;
+ private System.Windows.Forms.Button buttonAdd;
+ private OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.CategoryRefreshControl categoryRefreshControl;
+ private ParentCategoryComboBox comboBoxParent;
- private System.Windows.Forms.Panel panelAddCategory;
- private System.Windows.Forms.TextBox textBoxAddCategory;
- private System.Windows.Forms.Button buttonAdd;
- private OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.CategoryRefreshControl categoryRefreshControl;
- private ParentCategoryComboBox comboBoxParent;
+ protected override CreateParams CreateParams
+ {
+ get
+ {
+ CreateParams createParams = base.CreateParams;
+
+ // Borderless windows show in the alt+tab window, so this fakes
+ // out windows into thinking its a tool window (which doesn't
+ // show up in the alt+tab window).
+ createParams.ExStyle |= 0x00000080; // WS_EX_TOOLWINDOW
+
+ return createParams;
+ }
+ }
- protected override CreateParams CreateParams
- {
- get
- {
- CreateParams createParams = base.CreateParams;
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if ( keyData == Keys.Enter )
+ {
+ if ( textBoxAddCategory.ContainsFocus )
+ {
+ AddCategory() ;
+ return true ;
+ }
+ else if ( categoryContainerControl.ContainsFocus )
+ {
+ Close() ;
+ return true ;
+ }
+ else
+ {
+ return false ;
+ }
+ }
- // Borderless windows show in the alt+tab window, so this fakes
- // out windows into thinking its a tool window (which doesn't
- // show up in the alt+tab window).
- createParams.ExStyle |= 0x00000080; // WS_EX_TOOLWINDOW
+ else if (keyData == Keys.Escape )
+ {
+ Close();
+ return true;
+ }
- return createParams;
- }
- }
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
-
-
- protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
- {
- if ( keyData == Keys.Enter )
- {
- if ( textBoxAddCategory.ContainsFocus )
- {
- AddCategory() ;
- return true ;
- }
- else if ( categoryContainerControl.ContainsFocus )
- {
- Close() ;
- return true ;
- }
- else
- {
- return false ;
- }
- }
-
- else if (keyData == Keys.Escape )
- {
- Close();
- return true;
- }
-
- return base.ProcessCmdKey(ref msg, keyData);
- }
-
-
- protected override void OnPaintBackground(PaintEventArgs e)
- {
- base.OnPaintBackground(e);
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ base.OnPaintBackground(e);
// I don't know why this is necessary, but when RightToLeft and RightToLeftLayout
// are both true, the rightmost column or two of pixels get clipped unless we
@@ -252,725 +246,718 @@ namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
e.Graphics.ResetClip();
// draw border around form
- using ( Pen pen = new Pen(ColorizedResources.Instance.BorderDarkColor) )
- e.Graphics.DrawRectangle(pen, 0, 0, ClientSize.Width - 1, ClientSize.Height - 1);
+ using ( Pen pen = new Pen(ColorizedResources.Instance.BorderDarkColor) )
+ e.Graphics.DrawRectangle(pen, 0, 0, ClientSize.Width - 1, ClientSize.Height - 1);
- // draw border around category control
+ // draw border around category control
Color controlBorderColor = ColorHelper.GetThemeBorderColor(ColorizedResources.Instance.BorderDarkColor) ;
- using ( Pen pen = new Pen( controlBorderColor, 1 ))
- {
- Rectangle categoryRect = categoryContainerControl.Bounds ;
- categoryRect.Inflate(1,1);
- e.Graphics.DrawRectangle(pen, categoryRect);
- }
- }
+ using ( Pen pen = new Pen( controlBorderColor, 1 ))
+ {
+ Rectangle categoryRect = categoryContainerControl.Bounds ;
+ categoryRect.Inflate(1,1);
+ e.Graphics.DrawRectangle(pen, categoryRect);
+ }
+ }
+ private int _topMargin ;
+ private int _bottomMargin ;
+ private Panel categoryContainerControl;
- private int _topMargin ;
- private int _bottomMargin ;
- private Panel categoryContainerControl;
+ private void LayoutControls(CategoryContext categoryContext, bool sizeForm, bool performRtlLayoutFixup)
+ {
+ ClearForm();
+ SuspendLayout();
- private void LayoutControls(CategoryContext categoryContext, bool sizeForm, bool performRtlLayoutFixup)
- {
- ClearForm();
- SuspendLayout();
+ // calculate how much room there is above me on the parent form
+ int parentControlY = _parentControl.PointToScreen(_parentControl.Location).Y ;
+ Form parentForm = _parentControl.FindForm() ;
+ int parentFormY = parentForm.PointToScreen(parentForm.ClientRectangle.Location).Y ;
+ int maxHeight = parentControlY - parentFormY - ScaleY(_topMargin) - ScaleY(_bottomMargin);
- // calculate how much room there is above me on the parent form
- int parentControlY = _parentControl.PointToScreen(_parentControl.Location).Y ;
- Form parentForm = _parentControl.FindForm() ;
- int parentFormY = parentForm.PointToScreen(parentForm.ClientRectangle.Location).Y ;
- int maxHeight = parentControlY - parentFormY - ScaleY(_topMargin) - ScaleY(_bottomMargin);
+ // enforce additional constraint (or not, let freedom reign!)
+ //maxHeight = Math.Min(maxHeight, 400) ;
- // enforce additional constraint (or not, let freedom reign!)
- //maxHeight = Math.Min(maxHeight, 400) ;
+ using (PositionManager positionManager = new PositionManager(ScaleX(X_MARGIN), ScaleY(Y_MARGIN + 2), ScaleY(4), ScaleX(MinDropDownWidth), categoryContainerControl.Width, maxHeight, scale))
+ {
+ // add 'none' if we're single selecting categories
+ if (categoryContext.SelectionMode != CategoryContext.SelectionModes.MultiSelect)
+ AddCategoryControl(new BlogPostCategoryListItem(new BlogPostCategoryNone(), 0), positionManager);
- using (PositionManager positionManager = new PositionManager(ScaleX(X_MARGIN), ScaleY(Y_MARGIN + 2), ScaleY(4), ScaleX(MinDropDownWidth), categoryContainerControl.Width, maxHeight, scale))
- {
- // add 'none' if we're single selecting categories
- if (categoryContext.SelectionMode != CategoryContext.SelectionModes.MultiSelect)
- AddCategoryControl(new BlogPostCategoryListItem(new BlogPostCategoryNone(), 0), positionManager);
+ // add the other categories
+ BlogPostCategoryListItem[] categoryListItems = BlogPostCategoryListItem.BuildList(categoryContext.Categories, true) ;
+ foreach(BlogPostCategoryListItem categoryListItem in categoryListItems)
+ AddCategoryControl(categoryListItem, positionManager) ;
- // add the other categories
- BlogPostCategoryListItem[] categoryListItems = BlogPostCategoryListItem.BuildList(categoryContext.Categories, true) ;
- foreach(BlogPostCategoryListItem categoryListItem in categoryListItems)
- AddCategoryControl(categoryListItem, positionManager) ;
+ if ( sizeForm )
+ PositionAndSizeForm(positionManager);
+ }
+ if (performRtlLayoutFixup)
+ BidiHelper.RtlLayoutFixup(categoryContainerControl);
+ ResumeLayout();
+ }
- if ( sizeForm )
- PositionAndSizeForm(positionManager);
- }
- if (performRtlLayoutFixup)
- BidiHelper.RtlLayoutFixup(categoryContainerControl);
- ResumeLayout();
- }
-
- private BlogPostCategory[] GetCategories(CategoryContext context)
- {
- ArrayList categories = new ArrayList(context.Categories);
- categories.Sort();
+ private BlogPostCategory[] GetCategories(CategoryContext context)
+ {
+ ArrayList categories = new ArrayList(context.Categories);
+ categories.Sort();
+ return (BlogPostCategory[]) categories.ToArray(typeof (BlogPostCategory));
+ }
- return (BlogPostCategory[]) categories.ToArray(typeof (BlogPostCategory));
- }
+ private void ClearForm()
+ {
+ if (_categoryControls.Count > 0)
+ {
+ categoryContainerControl.Controls.Clear();
+ _categoryControls.Clear();
+ }
+ }
- private void ClearForm()
- {
- if (_categoryControls.Count > 0)
- {
- categoryContainerControl.Controls.Clear();
- _categoryControls.Clear();
- }
- }
+ private void AddCategoryControl(BlogPostCategoryListItem categoryListItem, PositionManager positionManager)
+ {
+ ICategorySelectorControl catSelector =
+ CategorySelectorControlFactory.Instance.GetControl(categoryListItem.Category,
+ (_categoryContext.SelectionMode ==
+ CategoryContext.SelectionModes.MultiSelect));
+ catSelector.SelectedChanged += new EventHandler(catSelector_SelectedChanged);
- private void AddCategoryControl(BlogPostCategoryListItem categoryListItem, PositionManager positionManager)
- {
- ICategorySelectorControl catSelector =
- CategorySelectorControlFactory.Instance.GetControl(categoryListItem.Category,
- (_categoryContext.SelectionMode ==
- CategoryContext.SelectionModes.MultiSelect));
- catSelector.SelectedChanged += new EventHandler(catSelector_SelectedChanged);
+ catSelector.Control.Scale(new SizeF(scale.X, scale.Y));
- catSelector.Control.Scale(new SizeF(scale.X, scale.Y));
+ positionManager.PositionControl(catSelector.Control, categoryListItem.IndentLevel);
- positionManager.PositionControl(catSelector.Control, categoryListItem.IndentLevel);
+ categoryContainerControl.Controls.Add(catSelector.Control);
- categoryContainerControl.Controls.Add(catSelector.Control);
+ _categoryControls.Add(catSelector.Control);
+ }
- _categoryControls.Add(catSelector.Control);
- }
+ private void PositionAndSizeForm(PositionManager manager)
+ {
+ // determine height based on position manager calculations
+ categoryContainerControl.Height = manager.Height;
+ Height = manager.Height + ScaleY(_topMargin) + ScaleY(_bottomMargin) ;
- private void PositionAndSizeForm(PositionManager manager)
- {
- // determine height based on position manager calculations
- categoryContainerControl.Height = manager.Height;
- Height = manager.Height + ScaleY(_topMargin) + ScaleY(_bottomMargin) ;
+ Point bottomRightCorner =
+ _parentControl.PointToScreen(new Point(_parentControl.Width - Width, -Height));
+ Location = bottomRightCorner;
+ }
-
- Point bottomRightCorner =
- _parentControl.PointToScreen(new Point(_parentControl.Width - Width, -Height));
- Location = bottomRightCorner;
- }
-
- #region High DPI Scaling
+ #region High DPI Scaling
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
{
SaveScaleState(factor.Width, factor.Height);
base.ScaleControl(factor, specified);
}
- protected override void ScaleCore(float dx, float dy)
- {
- SaveScaleState(dx, dy);
- base.ScaleCore(dx, dy);
- }
-
- private void SaveScaleState(float dx, float dy)
- {
- scale = new PointF(scale.X*dx, scale.Y*dy);
-
- //synchronize the comboBoxParent item height so it matches the scaled control height.
- //Note: ScaleY(3) is padding to deal with mismatches in the way the ItemHeight scales versus its peer controls...
- //comboBoxParent.ItemHeight = (int) (comboBoxParent.ItemHeight*dy) + ScaleY(3);
- comboBoxParent.ItemHeight = (int) (comboBoxParent.ItemHeight*dy) + (scale.Y == 1f ? 0 : ScaleY(3));
- }
-
- private PointF scale = new PointF(1f, 1f);
-
- protected int ScaleX(int x)
- {
- return (int) (x*scale.X);
- }
-
- protected int ScaleY(int y)
- {
- return (int) (y*scale.Y);
- }
- #endregion
-
- private const int Y_MARGIN = 2;
- private const int X_MARGIN = 4;
-
- private void CommitSelection()
- {
- ArrayList selectedCategories = new ArrayList();
- foreach (ICategorySelectorControl categoryControl in _categoryControls)
- {
- if (categoryControl.Selected)
- {
- if (BlogPostCategoryNone.IsCategoryNone(categoryControl.Category))
- {
- selectedCategories.Clear();
- break;
- }
- else
- {
- selectedCategories.Add(categoryControl.Category);
- }
- }
- }
- _categoryContext.SelectedCategories = (BlogPostCategory[]) selectedCategories.ToArray(typeof (BlogPostCategory));
- }
-
- private BlogPostCategory[] GetCurrentlySelectedCategories()
- {
- ArrayList selectedCategories = new ArrayList();
- foreach (ICategorySelectorControl sc in _categoryControls)
- {
- if (sc.Selected)
- {
- if (BlogPostCategoryNone.IsCategoryNone(sc.Category))
- {
- selectedCategories.Clear();
- break;
- }
- else
- {
- selectedCategories.Add(sc.Category);
- }
- }
- }
- return (BlogPostCategory[]) selectedCategories.ToArray(typeof (BlogPostCategory));
- }
-
- private void UpdateSelectedCategories(BlogPostCategory[] selectedCategories)
- {
- bool focused = false;
- foreach (ICategorySelectorControl sc in _categoryControls)
- {
- if (!focused)
- {
- sc.Control.Focus();
- focused = true;
- }
- sc.Selected = false;
- }
-
- if (selectedCategories.Length > 0)
- {
- foreach (BlogPostCategory c in selectedCategories)
- foreach (ICategorySelectorControl sc in _categoryControls)
- {
- if (c.Id.ToLower(CultureInfo.CurrentCulture) == sc.Category.Id.ToLower(CultureInfo.CurrentCulture) ||
- c.Name.ToLower(CultureInfo.CurrentCulture) == sc.Category.Name.ToLower(CultureInfo.CurrentCulture) )
- {
- sc.Selected = true;
- break;
- }
- }
- }
- else
- {
- // scan for special "None" category and select it
- foreach (ICategorySelectorControl sc in _categoryControls)
- {
- if (BlogPostCategoryNone.IsCategoryNone((sc.Category)))
- {
- sc.Selected = true;
- break;
- }
- }
- }
- }
-
-
- private void textBoxAddCategory_Enter(object sender, System.EventArgs e)
- {
- if ( textBoxAddCategory.Text == Res.Get(StringId.CategoryAdd) )
- ActivateAddTextBoxForEdit() ;
- }
-
- private void textBoxAddCategory_Leave(object sender, System.EventArgs e)
- {
- if ( textBoxAddCategory.Text.Trim() == String.Empty )
- ClearAddTextBox() ;
- }
-
- private void ClearAddTextBox()
- {
- textBoxAddCategory.ForeColor = SystemColors.GrayText ;
- textBoxAddCategory.Text = Res.Get(StringId.CategoryAdd);
- }
-
- private void ActivateAddTextBoxForEdit()
- {
- textBoxAddCategory.ForeColor = SystemColors.ControlText;
- textBoxAddCategory.Text = String.Empty ;
- }
-
- private void buttonAdd_Click(object sender, System.EventArgs e)
- {
- AddCategory() ;
- }
-
- private void AddCategory()
- {
- // add the new category
- BlogPostCategory newCategory = GetNewCategory() ;
-
- // see if the "new" category is already in our list
- if ( newCategory != null )
- {
- ICategorySelectorControl selectorControl = GetCategorySelectorControl(newCategory) ;
-
- // if there is no existing selector control then add the category
- if ( selectorControl == null )
- _categoryContext.AddNewCategory(newCategory);
-
- // now re-lookup the selector control and select it
- selectorControl = GetCategorySelectorControl(newCategory) ;
- selectorControl.Selected = true ;
-
- // ensure the added category is scrolled into view
- categoryContainerControl.ScrollControlIntoView(selectorControl.Control);
-
- // clear the parent combo and update its ui
- comboBoxParent.SelectedIndex = 0 ;
- UpdateParentComboForeColor() ;
-
- // setup the text box to add another category if we support multiple categories
- if ( _categoryContext.SelectionMode == CategoryContext.SelectionModes.MultiSelect )
- {
- ActivateAddTextBoxForEdit() ;
- textBoxAddCategory.Focus() ;
- }
- else
- {
- ClearAddTextBox() ;
- selectorControl.Control.Focus() ;
- }
- }
- }
-
-
- private BlogPostCategory GetNewCategory()
- {
- if ( textBoxAddCategory.ForeColor == SystemColors.ControlText )
- {
- string categoryName = this.textBoxAddCategory.Text.Trim() ;
- if ( categoryName != String.Empty )
- {
- // see if we have a parent
- BlogPostCategory parentCategory = GetParentCategory() ;
- if ( parentCategory != null )
- return new BlogPostCategory(categoryName, categoryName, parentCategory.Id);
- else
- return new BlogPostCategory(categoryName);
- }
- else
- {
- return null ;
- }
- }
- else
- {
- return null ;
- }
- }
-
- private ICategorySelectorControl GetCategorySelectorControl(BlogPostCategory category)
- {
- // scan for control
- foreach (ICategorySelectorControl selectorControl in _categoryControls)
- {
- if ( selectorControl.Category.Id.ToLower(CultureInfo.CurrentCulture) == category.Id.ToLower(CultureInfo.CurrentCulture) ||
- selectorControl.Category.Name.ToLower(CultureInfo.CurrentCulture) == category.Name.ToLower(CultureInfo.CurrentCulture) )
- {
- return selectorControl ;
- }
- }
-
- // didn't find it
- return null ;
-
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.categoryContainerControl = new System.Windows.Forms.Panel();
- this.panelAddCategory = new System.Windows.Forms.Panel();
- this.comboBoxParent = new OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.CategoryDisplayFormM1.ParentCategoryComboBox();
- this.buttonAdd = new System.Windows.Forms.Button();
- this.textBoxAddCategory = new System.Windows.Forms.TextBox();
- this.categoryRefreshControl = new OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.CategoryRefreshControl();
- this.panelAddCategory.SuspendLayout();
- this.SuspendLayout();
- //
- // categoryContainerControl
- //
- this.categoryContainerControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.categoryContainerControl.AutoScroll = true;
- this.categoryContainerControl.Location = new System.Drawing.Point(7, 33);
- this.categoryContainerControl.Name = "categoryContainerControl";
- this.categoryContainerControl.Size = new System.Drawing.Size(189, 72);
- this.categoryContainerControl.TabIndex = 0;
- //
- // panelAddCategory
- //
- this.panelAddCategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.panelAddCategory.Controls.Add(this.comboBoxParent);
- this.panelAddCategory.Controls.Add(this.buttonAdd);
- this.panelAddCategory.Controls.Add(this.textBoxAddCategory);
- this.panelAddCategory.Location = new System.Drawing.Point(6, 5);
- this.panelAddCategory.Name = "panelAddCategory";
- this.panelAddCategory.Size = new System.Drawing.Size(194, 25);
- this.panelAddCategory.TabIndex = 1;
- //
- // comboBoxParent
- //
- this.comboBoxParent.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.comboBoxParent.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
- this.comboBoxParent.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxParent.DropDownWidth = 200;
- this.comboBoxParent.IntegralHeight = false;
- this.comboBoxParent.ItemHeight = 15;
- this.comboBoxParent.Location = new System.Drawing.Point(42, 1);
- this.comboBoxParent.MaxDropDownItems = 20;
- this.comboBoxParent.Name = "comboBoxParent";
- this.comboBoxParent.Size = new System.Drawing.Size(88, 21);
- this.comboBoxParent.TabIndex = 1;
- this.comboBoxParent.Leave += new System.EventHandler(this.comboBoxParent_Leave);
- this.comboBoxParent.Enter += new System.EventHandler(this.comboBoxParent_Enter);
- //
- // buttonAdd
- //
- this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonAdd.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonAdd.Location = new System.Drawing.Point(134, 0);
- this.buttonAdd.Name = "buttonAdd";
- this.buttonAdd.Size = new System.Drawing.Size(59, 23);
- this.buttonAdd.TabIndex = 2;
- this.buttonAdd.Text = "&Add";
- this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click);
- //
- // textBoxAddCategory
- //
- this.textBoxAddCategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxAddCategory.AutoSize = false;
- this.textBoxAddCategory.Location = new System.Drawing.Point(0, 1);
- this.textBoxAddCategory.Name = "textBoxAddCategory";
- this.textBoxAddCategory.Size = new System.Drawing.Size(38, 21);
- this.textBoxAddCategory.TabIndex = 0;
- this.textBoxAddCategory.Text = "";
- this.textBoxAddCategory.Leave += new System.EventHandler(this.textBoxAddCategory_Leave);
- this.textBoxAddCategory.Enter += new System.EventHandler(this.textBoxAddCategory_Enter);
- //
- // categoryRefreshControl
- //
- this.categoryRefreshControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.categoryRefreshControl.BackColor = System.Drawing.SystemColors.ControlLightLight;
- this.categoryRefreshControl.Location = new System.Drawing.Point(6, 111);
- this.categoryRefreshControl.Name = "categoryRefreshControl";
- this.categoryRefreshControl.Size = new System.Drawing.Size(193, 23);
- this.categoryRefreshControl.TabIndex = 2;
- //
- // CategoryDisplayFormM1
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.AutoScrollMargin = new System.Drawing.Size(2, 2);
- this.BackColor = System.Drawing.SystemColors.ControlLightLight;
- this.ClientSize = new System.Drawing.Size(205, 138);
- this.ControlBox = false;
- this.Controls.Add(this.categoryRefreshControl);
- this.Controls.Add(this.panelAddCategory);
- this.Controls.Add(this.categoryContainerControl);
- this.DismissOnDeactivate = true;
- this.DockPadding.All = 1;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "CategoryDisplayFormM1";
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
- this.panelAddCategory.ResumeLayout(false);
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- _categoryContext.Changed -= new CategoryContext.CategoryChangedEventHandler(_categoryContext_Changed);
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose(disposing);
- }
-
- private System.ComponentModel.IContainer components = new Container();
- private ArrayList _categoryControls = new ArrayList();
- private CategoryContext _categoryContext;
- private Control _parentControl;
-
- private void catSelector_SelectedChanged(object sender, EventArgs e)
- {
- CommitSelection();
- }
-
- private void _categoryContext_Changed(object sender, CategoryContext.CategoryChangedEventArgs e)
- {
- if (e.ChangeType == CategoryContext.ChangeType.Category || e.ChangeType == CategoryContext.ChangeType.SelectionMode)
- {
- BlogPostCategory[] selectedCategories = GetCurrentlySelectedCategories();
- LayoutControls(_categoryContext, false, true);
- UpdateSelectedCategories(selectedCategories);
- RefreshParentCombo() ;
- Invalidate() ;
- }
- }
-
- private void RefreshParentCombo()
- {
- // populate "parent" combo
- object selectedItem = comboBoxParent.SelectedItem ;
- comboBoxParent.Items.Clear();
- comboBoxParent.Items.Add(new ParentCategoryComboItemNone(comboBoxParent)) ;
- BlogPostCategoryListItem[] categoryListItems = BlogPostCategoryListItem.BuildList(_categoryContext.BlogCategories, true) ;
- foreach(BlogPostCategoryListItem categoryListItem in categoryListItems)
- comboBoxParent.Items.Add(new ParentCategoryComboItem(comboBoxParent, categoryListItem.Category, categoryListItem.IndentLevel)) ;
- UpdateParentComboForeColor() ;
- if ( selectedItem != null && comboBoxParent.Items.Contains(selectedItem))
- comboBoxParent.SelectedItem = selectedItem ;
- else
- comboBoxParent.SelectedIndex = 0 ;
- }
-
- private BlogPostCategory GetParentCategory()
- {
- ParentCategoryComboItem parentComboItem = comboBoxParent.SelectedItem as ParentCategoryComboItem ;
- if ( parentComboItem != null )
- {
- if ( !BlogPostCategoryNone.IsCategoryNone(parentComboItem.Category) )
- return parentComboItem.Category ;
- else
- return null ;
- }
- else
- {
- return null ;
- }
- }
-
- private void comboBoxParent_Enter(object sender, System.EventArgs e)
- {
- comboBoxParent.ForeColor = SystemColors.ControlText;
- }
-
- private void comboBoxParent_Leave(object sender, System.EventArgs e)
- {
- UpdateParentComboForeColor() ;
- }
-
- private void UpdateParentComboForeColor()
- {
- if ( GetParentCategory() != null )
- comboBoxParent.ForeColor = SystemColors.ControlText ;
- else
- comboBoxParent.ForeColor = SystemColors.GrayText ;
- }
-
- private class ParentCategoryComboItem
- {
- public ParentCategoryComboItem(ComboBox parentCombo, BlogPostCategory category, int indentLevel)
- {
- _parentCombo = parentCombo ;
- _category = category ;
- _indentLevel = indentLevel ;
- }
-
- public BlogPostCategory Category
- {
- get { return _category; }
- }
- private BlogPostCategory _category ;
-
- public override bool Equals(object obj)
- {
- return (obj as ParentCategoryComboItem).Category.Equals(Category) ;
- }
-
- public override int GetHashCode()
- {
- return Category.GetHashCode() ;
- }
-
- public override string ToString()
- {
- // default padding
- string padding = new String(' ', _indentLevel * 3) ;
-
- // override if we are selected
- if ( !_parentCombo.DroppedDown && (_parentCombo.SelectedItem != null) && this.Equals(_parentCombo.SelectedItem) )
- padding = String.Empty ;
-
- string categoryName = HtmlUtils.UnEscapeEntities(Category.Name, HtmlUtils.UnEscapeMode.Default) ;
- string stringRepresentation = String.Format(CultureInfo.InvariantCulture, "{0}{1}", padding, categoryName) ;
- return stringRepresentation ;
- }
-
- private int _indentLevel ;
- private ComboBox _parentCombo ;
-
- }
-
- private class ParentCategoryComboBox : ComboBox
- {
- public ParentCategoryComboBox()
- {
- // prevent editing and showing of drop down
- DropDownStyle = ComboBoxStyle.DropDownList ;
-
- // fully cusotm painting
- DrawMode = DrawMode.OwnerDrawFixed ;
- IntegralHeight = false ;
- }
-
- protected override void OnDrawItem(DrawItemEventArgs e)
- {
- if (e.Index != -1)
- {
- ParentCategoryComboItem comboItem = Items[e.Index] as ParentCategoryComboItem ;
-
- e.DrawBackground();
-
- // don't indent for main display of category
- string text = comboItem.ToString();
- if (e.Bounds.Width < Width)
- text = text.Trim() ;
-
- using ( Brush brush = new SolidBrush(e.ForeColor) )
- e.Graphics.DrawString(text, e.Font, brush, e.Bounds.X, e.Bounds.Y) ;
-
- e.DrawFocusRectangle();
- }
- }
- }
-
- private class ParentCategoryComboItemNone : ParentCategoryComboItem
- {
- public ParentCategoryComboItemNone(ComboBox parentCombo)
- : base(parentCombo, new BlogPostCategoryNone(), 0)
- {
- }
-
- public override string ToString()
- {
- return Res.Get(StringId.CategoryNoParent) ;
- }
- }
-
-
- private class PositionManager : IDisposable
- {
- private int _top;
- private int _left;
- private int _width;
- private int _margin;
- private ArrayList _controls = new ArrayList();
- private int _maxWidth;
- private int _minWidth;
- private int _maxHeight ;
- private int _enforcedMaxHeight = -1 ;
- private PointF _autoScaleSize;
- private StringFormat _format;
-
- public PositionManager(int initialLeft, int initialTop, int scaledMargin, int minWidth, int maxWidth, int maxHeight, PointF autoScaleSize)
- {
- _left = initialLeft;
- _top = initialTop;
- _margin = scaledMargin;
- _maxWidth = maxWidth;
- _minWidth = _width = minWidth;
- _maxHeight = maxHeight ;
- _autoScaleSize = autoScaleSize;
- _format = new StringFormat();
- _format.Trimming = StringTrimming.EllipsisCharacter;
- }
-
- public void PositionControl(Control c, int indentLevel)
- {
- int INDENT_MARGIN = ScaleX(16) ;
- c.Top = _top;
- c.Left = _left + (INDENT_MARGIN * indentLevel);
-
- Graphics g = c.CreateGraphics();
- try
- {
- int maxWidth = _maxWidth - SystemInformation.VerticalScrollBarWidth - c.Left - _left;
- c.Width = maxWidth;
- if (c is CheckBox)
- DisplayHelper.AutoFitSystemCheckBox((CheckBox)c, 0, maxWidth);
- else if (c is RadioButton)
- DisplayHelper.AutoFitSystemRadioButton((RadioButton)c, 0, maxWidth);
- else
- Debug.Fail("Being asked to position a control that isn't a radiobutton or checkbox");
- LayoutHelper.NaturalizeHeight(c);
- }
- finally
- {
- g.Dispose();
- }
- _width = Math.Max(_width, c.Width);
- _controls.Add(c);
-
- _top = _top + c.Height + _margin;
-
- // enforce max height if necessary
- if ( _enforcedMaxHeight == -1 && _top > _maxHeight )
- _enforcedMaxHeight = _top ;
- }
-
- public int Width
- {
- get { return _width; }
- }
-
- public int Height
- {
- get
- {
- if ( _enforcedMaxHeight != -1 )
- return _enforcedMaxHeight ;
- else
- return _top + _margin;
- }
- }
-
- protected int ScaleX(int x)
- {
- return (int) (x*_autoScaleSize.X);
- }
-
- protected int ScaleY(int y)
- {
- return (int) (y*_autoScaleSize.Y);
- }
-
- #region IDisposable Members
-
- public void Dispose()
- {
- }
-
- #endregion
- }
-
-
- }
+ protected override void ScaleCore(float dx, float dy)
+ {
+ SaveScaleState(dx, dy);
+ base.ScaleCore(dx, dy);
+ }
+
+ private void SaveScaleState(float dx, float dy)
+ {
+ scale = new PointF(scale.X*dx, scale.Y*dy);
+
+ //synchronize the comboBoxParent item height so it matches the scaled control height.
+ //Note: ScaleY(3) is padding to deal with mismatches in the way the ItemHeight scales versus its peer controls...
+ //comboBoxParent.ItemHeight = (int) (comboBoxParent.ItemHeight*dy) + ScaleY(3);
+ comboBoxParent.ItemHeight = (int) (comboBoxParent.ItemHeight*dy) + (scale.Y == 1f ? 0 : ScaleY(3));
+ }
+
+ private PointF scale = new PointF(1f, 1f);
+
+ protected int ScaleX(int x)
+ {
+ return (int) (x*scale.X);
+ }
+
+ protected int ScaleY(int y)
+ {
+ return (int) (y*scale.Y);
+ }
+ #endregion
+
+ private const int Y_MARGIN = 2;
+ private const int X_MARGIN = 4;
+
+ private void CommitSelection()
+ {
+ ArrayList selectedCategories = new ArrayList();
+ foreach (ICategorySelectorControl categoryControl in _categoryControls)
+ {
+ if (categoryControl.Selected)
+ {
+ if (BlogPostCategoryNone.IsCategoryNone(categoryControl.Category))
+ {
+ selectedCategories.Clear();
+ break;
+ }
+ else
+ {
+ selectedCategories.Add(categoryControl.Category);
+ }
+ }
+ }
+ _categoryContext.SelectedCategories = (BlogPostCategory[]) selectedCategories.ToArray(typeof (BlogPostCategory));
+ }
+
+ private BlogPostCategory[] GetCurrentlySelectedCategories()
+ {
+ ArrayList selectedCategories = new ArrayList();
+ foreach (ICategorySelectorControl sc in _categoryControls)
+ {
+ if (sc.Selected)
+ {
+ if (BlogPostCategoryNone.IsCategoryNone(sc.Category))
+ {
+ selectedCategories.Clear();
+ break;
+ }
+ else
+ {
+ selectedCategories.Add(sc.Category);
+ }
+ }
+ }
+ return (BlogPostCategory[]) selectedCategories.ToArray(typeof (BlogPostCategory));
+ }
+
+ private void UpdateSelectedCategories(BlogPostCategory[] selectedCategories)
+ {
+ bool focused = false;
+ foreach (ICategorySelectorControl sc in _categoryControls)
+ {
+ if (!focused)
+ {
+ sc.Control.Focus();
+ focused = true;
+ }
+ sc.Selected = false;
+ }
+
+ if (selectedCategories.Length > 0)
+ {
+ foreach (BlogPostCategory c in selectedCategories)
+ foreach (ICategorySelectorControl sc in _categoryControls)
+ {
+ if (c.Id.ToLower(CultureInfo.CurrentCulture) == sc.Category.Id.ToLower(CultureInfo.CurrentCulture) ||
+ c.Name.ToLower(CultureInfo.CurrentCulture) == sc.Category.Name.ToLower(CultureInfo.CurrentCulture) )
+ {
+ sc.Selected = true;
+ break;
+ }
+ }
+ }
+ else
+ {
+ // scan for special "None" category and select it
+ foreach (ICategorySelectorControl sc in _categoryControls)
+ {
+ if (BlogPostCategoryNone.IsCategoryNone((sc.Category)))
+ {
+ sc.Selected = true;
+ break;
+ }
+ }
+ }
+ }
+
+ private void textBoxAddCategory_Enter(object sender, System.EventArgs e)
+ {
+ if ( textBoxAddCategory.Text == Res.Get(StringId.CategoryAdd) )
+ ActivateAddTextBoxForEdit() ;
+ }
+
+ private void textBoxAddCategory_Leave(object sender, System.EventArgs e)
+ {
+ if ( textBoxAddCategory.Text.Trim() == String.Empty )
+ ClearAddTextBox() ;
+ }
+
+ private void ClearAddTextBox()
+ {
+ textBoxAddCategory.ForeColor = SystemColors.GrayText ;
+ textBoxAddCategory.Text = Res.Get(StringId.CategoryAdd);
+ }
+
+ private void ActivateAddTextBoxForEdit()
+ {
+ textBoxAddCategory.ForeColor = SystemColors.ControlText;
+ textBoxAddCategory.Text = String.Empty ;
+ }
+
+ private void buttonAdd_Click(object sender, System.EventArgs e)
+ {
+ AddCategory() ;
+ }
+
+ private void AddCategory()
+ {
+ // add the new category
+ BlogPostCategory newCategory = GetNewCategory() ;
+
+ // see if the "new" category is already in our list
+ if ( newCategory != null )
+ {
+ ICategorySelectorControl selectorControl = GetCategorySelectorControl(newCategory) ;
+
+ // if there is no existing selector control then add the category
+ if ( selectorControl == null )
+ _categoryContext.AddNewCategory(newCategory);
+
+ // now re-lookup the selector control and select it
+ selectorControl = GetCategorySelectorControl(newCategory) ;
+ selectorControl.Selected = true ;
+
+ // ensure the added category is scrolled into view
+ categoryContainerControl.ScrollControlIntoView(selectorControl.Control);
+
+ // clear the parent combo and update its ui
+ comboBoxParent.SelectedIndex = 0 ;
+ UpdateParentComboForeColor() ;
+
+ // setup the text box to add another category if we support multiple categories
+ if ( _categoryContext.SelectionMode == CategoryContext.SelectionModes.MultiSelect )
+ {
+ ActivateAddTextBoxForEdit() ;
+ textBoxAddCategory.Focus() ;
+ }
+ else
+ {
+ ClearAddTextBox() ;
+ selectorControl.Control.Focus() ;
+ }
+ }
+ }
+
+ private BlogPostCategory GetNewCategory()
+ {
+ if ( textBoxAddCategory.ForeColor == SystemColors.ControlText )
+ {
+ string categoryName = this.textBoxAddCategory.Text.Trim() ;
+ if ( categoryName != String.Empty )
+ {
+ // see if we have a parent
+ BlogPostCategory parentCategory = GetParentCategory() ;
+ if ( parentCategory != null )
+ return new BlogPostCategory(categoryName, categoryName, parentCategory.Id);
+ else
+ return new BlogPostCategory(categoryName);
+ }
+ else
+ {
+ return null ;
+ }
+ }
+ else
+ {
+ return null ;
+ }
+ }
+
+ private ICategorySelectorControl GetCategorySelectorControl(BlogPostCategory category)
+ {
+ // scan for control
+ foreach (ICategorySelectorControl selectorControl in _categoryControls)
+ {
+ if ( selectorControl.Category.Id.ToLower(CultureInfo.CurrentCulture) == category.Id.ToLower(CultureInfo.CurrentCulture) ||
+ selectorControl.Category.Name.ToLower(CultureInfo.CurrentCulture) == category.Name.ToLower(CultureInfo.CurrentCulture) )
+ {
+ return selectorControl ;
+ }
+ }
+
+ // didn't find it
+ return null ;
+
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.categoryContainerControl = new System.Windows.Forms.Panel();
+ this.panelAddCategory = new System.Windows.Forms.Panel();
+ this.comboBoxParent = new OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.CategoryDisplayFormM1.ParentCategoryComboBox();
+ this.buttonAdd = new System.Windows.Forms.Button();
+ this.textBoxAddCategory = new System.Windows.Forms.TextBox();
+ this.categoryRefreshControl = new OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.CategoryRefreshControl();
+ this.panelAddCategory.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // categoryContainerControl
+ //
+ this.categoryContainerControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.categoryContainerControl.AutoScroll = true;
+ this.categoryContainerControl.Location = new System.Drawing.Point(7, 33);
+ this.categoryContainerControl.Name = "categoryContainerControl";
+ this.categoryContainerControl.Size = new System.Drawing.Size(189, 72);
+ this.categoryContainerControl.TabIndex = 0;
+ //
+ // panelAddCategory
+ //
+ this.panelAddCategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.panelAddCategory.Controls.Add(this.comboBoxParent);
+ this.panelAddCategory.Controls.Add(this.buttonAdd);
+ this.panelAddCategory.Controls.Add(this.textBoxAddCategory);
+ this.panelAddCategory.Location = new System.Drawing.Point(6, 5);
+ this.panelAddCategory.Name = "panelAddCategory";
+ this.panelAddCategory.Size = new System.Drawing.Size(194, 25);
+ this.panelAddCategory.TabIndex = 1;
+ //
+ // comboBoxParent
+ //
+ this.comboBoxParent.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.comboBoxParent.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.comboBoxParent.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxParent.DropDownWidth = 200;
+ this.comboBoxParent.IntegralHeight = false;
+ this.comboBoxParent.ItemHeight = 15;
+ this.comboBoxParent.Location = new System.Drawing.Point(42, 1);
+ this.comboBoxParent.MaxDropDownItems = 20;
+ this.comboBoxParent.Name = "comboBoxParent";
+ this.comboBoxParent.Size = new System.Drawing.Size(88, 21);
+ this.comboBoxParent.TabIndex = 1;
+ this.comboBoxParent.Leave += new System.EventHandler(this.comboBoxParent_Leave);
+ this.comboBoxParent.Enter += new System.EventHandler(this.comboBoxParent_Enter);
+ //
+ // buttonAdd
+ //
+ this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonAdd.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonAdd.Location = new System.Drawing.Point(134, 0);
+ this.buttonAdd.Name = "buttonAdd";
+ this.buttonAdd.Size = new System.Drawing.Size(59, 23);
+ this.buttonAdd.TabIndex = 2;
+ this.buttonAdd.Text = "&Add";
+ this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click);
+ //
+ // textBoxAddCategory
+ //
+ this.textBoxAddCategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBoxAddCategory.AutoSize = false;
+ this.textBoxAddCategory.Location = new System.Drawing.Point(0, 1);
+ this.textBoxAddCategory.Name = "textBoxAddCategory";
+ this.textBoxAddCategory.Size = new System.Drawing.Size(38, 21);
+ this.textBoxAddCategory.TabIndex = 0;
+ this.textBoxAddCategory.Text = "";
+ this.textBoxAddCategory.Leave += new System.EventHandler(this.textBoxAddCategory_Leave);
+ this.textBoxAddCategory.Enter += new System.EventHandler(this.textBoxAddCategory_Enter);
+ //
+ // categoryRefreshControl
+ //
+ this.categoryRefreshControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.categoryRefreshControl.BackColor = System.Drawing.SystemColors.ControlLightLight;
+ this.categoryRefreshControl.Location = new System.Drawing.Point(6, 111);
+ this.categoryRefreshControl.Name = "categoryRefreshControl";
+ this.categoryRefreshControl.Size = new System.Drawing.Size(193, 23);
+ this.categoryRefreshControl.TabIndex = 2;
+ //
+ // CategoryDisplayFormM1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.AutoScrollMargin = new System.Drawing.Size(2, 2);
+ this.BackColor = System.Drawing.SystemColors.ControlLightLight;
+ this.ClientSize = new System.Drawing.Size(205, 138);
+ this.ControlBox = false;
+ this.Controls.Add(this.categoryRefreshControl);
+ this.Controls.Add(this.panelAddCategory);
+ this.Controls.Add(this.categoryContainerControl);
+ this.DismissOnDeactivate = true;
+ this.DockPadding.All = 1;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "CategoryDisplayFormM1";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.panelAddCategory.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ _categoryContext.Changed -= new CategoryContext.CategoryChangedEventHandler(_categoryContext_Changed);
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose(disposing);
+ }
+
+ private System.ComponentModel.IContainer components = new Container();
+ private ArrayList _categoryControls = new ArrayList();
+ private CategoryContext _categoryContext;
+ private Control _parentControl;
+
+ private void catSelector_SelectedChanged(object sender, EventArgs e)
+ {
+ CommitSelection();
+ }
+
+ private void _categoryContext_Changed(object sender, CategoryContext.CategoryChangedEventArgs e)
+ {
+ if (e.ChangeType == CategoryContext.ChangeType.Category || e.ChangeType == CategoryContext.ChangeType.SelectionMode)
+ {
+ BlogPostCategory[] selectedCategories = GetCurrentlySelectedCategories();
+ LayoutControls(_categoryContext, false, true);
+ UpdateSelectedCategories(selectedCategories);
+ RefreshParentCombo() ;
+ Invalidate() ;
+ }
+ }
+
+ private void RefreshParentCombo()
+ {
+ // populate "parent" combo
+ object selectedItem = comboBoxParent.SelectedItem ;
+ comboBoxParent.Items.Clear();
+ comboBoxParent.Items.Add(new ParentCategoryComboItemNone(comboBoxParent)) ;
+ BlogPostCategoryListItem[] categoryListItems = BlogPostCategoryListItem.BuildList(_categoryContext.BlogCategories, true) ;
+ foreach(BlogPostCategoryListItem categoryListItem in categoryListItems)
+ comboBoxParent.Items.Add(new ParentCategoryComboItem(comboBoxParent, categoryListItem.Category, categoryListItem.IndentLevel)) ;
+ UpdateParentComboForeColor() ;
+ if ( selectedItem != null && comboBoxParent.Items.Contains(selectedItem))
+ comboBoxParent.SelectedItem = selectedItem ;
+ else
+ comboBoxParent.SelectedIndex = 0 ;
+ }
+
+ private BlogPostCategory GetParentCategory()
+ {
+ ParentCategoryComboItem parentComboItem = comboBoxParent.SelectedItem as ParentCategoryComboItem ;
+ if ( parentComboItem != null )
+ {
+ if ( !BlogPostCategoryNone.IsCategoryNone(parentComboItem.Category) )
+ return parentComboItem.Category ;
+ else
+ return null ;
+ }
+ else
+ {
+ return null ;
+ }
+ }
+
+ private void comboBoxParent_Enter(object sender, System.EventArgs e)
+ {
+ comboBoxParent.ForeColor = SystemColors.ControlText;
+ }
+
+ private void comboBoxParent_Leave(object sender, System.EventArgs e)
+ {
+ UpdateParentComboForeColor() ;
+ }
+
+ private void UpdateParentComboForeColor()
+ {
+ if ( GetParentCategory() != null )
+ comboBoxParent.ForeColor = SystemColors.ControlText ;
+ else
+ comboBoxParent.ForeColor = SystemColors.GrayText ;
+ }
+
+ private class ParentCategoryComboItem
+ {
+ public ParentCategoryComboItem(ComboBox parentCombo, BlogPostCategory category, int indentLevel)
+ {
+ _parentCombo = parentCombo ;
+ _category = category ;
+ _indentLevel = indentLevel ;
+ }
+
+ public BlogPostCategory Category
+ {
+ get { return _category; }
+ }
+ private BlogPostCategory _category ;
+
+ public override bool Equals(object obj)
+ {
+ return (obj as ParentCategoryComboItem).Category.Equals(Category) ;
+ }
+
+ public override int GetHashCode()
+ {
+ return Category.GetHashCode() ;
+ }
+
+ public override string ToString()
+ {
+ // default padding
+ string padding = new String(' ', _indentLevel * 3) ;
+
+ // override if we are selected
+ if ( !_parentCombo.DroppedDown && (_parentCombo.SelectedItem != null) && this.Equals(_parentCombo.SelectedItem) )
+ padding = String.Empty ;
+
+ string categoryName = HtmlUtils.UnEscapeEntities(Category.Name, HtmlUtils.UnEscapeMode.Default) ;
+ string stringRepresentation = String.Format(CultureInfo.InvariantCulture, "{0}{1}", padding, categoryName) ;
+ return stringRepresentation ;
+ }
+
+ private int _indentLevel ;
+ private ComboBox _parentCombo ;
+
+ }
+
+ private class ParentCategoryComboBox : ComboBox
+ {
+ public ParentCategoryComboBox()
+ {
+ // prevent editing and showing of drop down
+ DropDownStyle = ComboBoxStyle.DropDownList ;
+
+ // fully cusotm painting
+ DrawMode = DrawMode.OwnerDrawFixed ;
+ IntegralHeight = false ;
+ }
+
+ protected override void OnDrawItem(DrawItemEventArgs e)
+ {
+ if (e.Index != -1)
+ {
+ ParentCategoryComboItem comboItem = Items[e.Index] as ParentCategoryComboItem ;
+
+ e.DrawBackground();
+
+ // don't indent for main display of category
+ string text = comboItem.ToString();
+ if (e.Bounds.Width < Width)
+ text = text.Trim() ;
+
+ using ( Brush brush = new SolidBrush(e.ForeColor) )
+ e.Graphics.DrawString(text, e.Font, brush, e.Bounds.X, e.Bounds.Y) ;
+
+ e.DrawFocusRectangle();
+ }
+ }
+ }
+
+ private class ParentCategoryComboItemNone : ParentCategoryComboItem
+ {
+ public ParentCategoryComboItemNone(ComboBox parentCombo)
+ : base(parentCombo, new BlogPostCategoryNone(), 0)
+ {
+ }
+
+ public override string ToString()
+ {
+ return Res.Get(StringId.CategoryNoParent) ;
+ }
+ }
+
+ private class PositionManager : IDisposable
+ {
+ private int _top;
+ private int _left;
+ private int _width;
+ private int _margin;
+ private ArrayList _controls = new ArrayList();
+ private int _maxWidth;
+ private int _minWidth;
+ private int _maxHeight ;
+ private int _enforcedMaxHeight = -1 ;
+ private PointF _autoScaleSize;
+ private StringFormat _format;
+
+ public PositionManager(int initialLeft, int initialTop, int scaledMargin, int minWidth, int maxWidth, int maxHeight, PointF autoScaleSize)
+ {
+ _left = initialLeft;
+ _top = initialTop;
+ _margin = scaledMargin;
+ _maxWidth = maxWidth;
+ _minWidth = _width = minWidth;
+ _maxHeight = maxHeight ;
+ _autoScaleSize = autoScaleSize;
+ _format = new StringFormat();
+ _format.Trimming = StringTrimming.EllipsisCharacter;
+ }
+
+ public void PositionControl(Control c, int indentLevel)
+ {
+ int INDENT_MARGIN = ScaleX(16) ;
+ c.Top = _top;
+ c.Left = _left + (INDENT_MARGIN * indentLevel);
+
+ Graphics g = c.CreateGraphics();
+ try
+ {
+ int maxWidth = _maxWidth - SystemInformation.VerticalScrollBarWidth - c.Left - _left;
+ c.Width = maxWidth;
+ if (c is CheckBox)
+ DisplayHelper.AutoFitSystemCheckBox((CheckBox)c, 0, maxWidth);
+ else if (c is RadioButton)
+ DisplayHelper.AutoFitSystemRadioButton((RadioButton)c, 0, maxWidth);
+ else
+ Debug.Fail("Being asked to position a control that isn't a radiobutton or checkbox");
+ LayoutHelper.NaturalizeHeight(c);
+ }
+ finally
+ {
+ g.Dispose();
+ }
+ _width = Math.Max(_width, c.Width);
+ _controls.Add(c);
+
+ _top = _top + c.Height + _margin;
+
+ // enforce max height if necessary
+ if ( _enforcedMaxHeight == -1 && _top > _maxHeight )
+ _enforcedMaxHeight = _top ;
+ }
+
+ public int Width
+ {
+ get { return _width; }
+ }
+
+ public int Height
+ {
+ get
+ {
+ if ( _enforcedMaxHeight != -1 )
+ return _enforcedMaxHeight ;
+ else
+ return _top + _margin;
+ }
+ }
+
+ protected int ScaleX(int x)
+ {
+ return (int) (x*_autoScaleSize.X);
+ }
+
+ protected int ScaleY(int y)
+ {
+ return (int) (y*_autoScaleSize.Y);
+ }
+
+ #region IDisposable Members
+
+ public void Dispose()
+ {
+ }
+
+ #endregion
+ }
+
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControl.cs
index 90b0f394..d8d98a4e 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControl.cs
@@ -20,324 +20,321 @@ using OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.DisplayMessa
namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
{
- internal class CategoryDropDownControl : ComboBox, IBlogPostEditor, IBlogCategorySettings
- {
- #region IBlogPostEditor Members
+ internal class CategoryDropDownControl : ComboBox, IBlogPostEditor, IBlogCategorySettings
+ {
+ #region IBlogPostEditor Members
- void IBlogPostEditor.Initialize(IBlogPostEditingContext editingContext)
- {
- CategoryContext.SelectedCategories = editingContext.BlogPost.Categories ;
- toolTipCategories.SetToolTip(this, CategoryContext.FormattedCategoryList);
- _isDirty = false ;
- }
+ void IBlogPostEditor.Initialize(IBlogPostEditingContext editingContext)
+ {
+ CategoryContext.SelectedCategories = editingContext.BlogPost.Categories ;
+ toolTipCategories.SetToolTip(this, CategoryContext.FormattedCategoryList);
+ _isDirty = false ;
+ }
- void IBlogPostEditor.SaveChanges(BlogPost post)
- {
- post.Categories = CategoryContext.SelectedCategories;
- _isDirty = false ;
- }
+ void IBlogPostEditor.SaveChanges(BlogPost post)
+ {
+ post.Categories = CategoryContext.SelectedCategories;
+ _isDirty = false ;
+ }
- private System.Windows.Forms.ToolTip toolTipCategories;
+ private System.Windows.Forms.ToolTip toolTipCategories;
- bool IBlogPostEditor.ValidatePublish()
- {
- // see if we need to halt publishing to specify a category
- if ( Visible )
- {
- if ( PostEditorSettings.CategoryReminder && (CategoryContext.Categories.Length > 0) && (CategoryContext.SelectedCategories.Length == 0) )
- {
- if ( DisplayMessage.Show(typeof(CategoryReminderDisplayMessage), FindForm(), "\r\n\r\n") == DialogResult.No )
- {
- Focus() ;
- return false ;
- }
- }
- }
+ bool IBlogPostEditor.ValidatePublish()
+ {
+ // see if we need to halt publishing to specify a category
+ if ( Visible )
+ {
+ if ( PostEditorSettings.CategoryReminder && (CategoryContext.Categories.Length > 0) && (CategoryContext.SelectedCategories.Length == 0) )
+ {
+ if ( DisplayMessage.Show(typeof(CategoryReminderDisplayMessage), FindForm(), "\r\n\r\n") == DialogResult.No )
+ {
+ Focus() ;
+ return false ;
+ }
+ }
+ }
- // proceed
- return true ;
- }
+ // proceed
+ return true ;
+ }
- void IBlogPostEditor.OnPublishSucceeded(BlogPost blogPost, PostResult postResult)
- {
+ void IBlogPostEditor.OnPublishSucceeded(BlogPost blogPost, PostResult postResult)
+ {
- }
+ }
- bool IBlogPostEditor.IsDirty
- {
- get
- {
- return _isDirty ;
- }
- }
- private bool _isDirty = false ;
+ bool IBlogPostEditor.IsDirty
+ {
+ get
+ {
+ return _isDirty ;
+ }
+ }
+ private bool _isDirty = false ;
- void IBlogPostEditor.OnBlogChanged(Blog newBlog)
- {
- _targetBlog = newBlog ;
+ void IBlogPostEditor.OnBlogChanged(Blog newBlog)
+ {
+ _targetBlog = newBlog ;
- if ( newBlog.ClientOptions.SupportsMultipleCategories )
- CategoryContext.SelectionMode = CategoryContext.SelectionModes.MultiSelect;
- else
- CategoryContext.SelectionMode = CategoryContext.SelectionModes.SingleSelect;
+ if ( newBlog.ClientOptions.SupportsMultipleCategories )
+ CategoryContext.SelectionMode = CategoryContext.SelectionModes.MultiSelect;
+ else
+ CategoryContext.SelectionMode = CategoryContext.SelectionModes.SingleSelect;
- CategoryContext.SetBlogCategories(_targetBlog.Categories);
- CategoryContext.SelectedCategories = new BlogPostCategory[0];
- }
- private Blog _targetBlog ;
+ CategoryContext.SetBlogCategories(_targetBlog.Categories);
+ CategoryContext.SelectedCategories = new BlogPostCategory[0];
+ }
+ private Blog _targetBlog ;
+ void IBlogPostEditor.OnBlogSettingsChanged(bool templateChanged)
+ {
+ // make sure we have the lastest categoires (in case the underlying target blog changed)
+ CategoryContext.SetBlogCategories(_targetBlog.Categories) ;
+ }
- void IBlogPostEditor.OnBlogSettingsChanged(bool templateChanged)
- {
- // make sure we have the lastest categoires (in case the underlying target blog changed)
- CategoryContext.SetBlogCategories(_targetBlog.Categories) ;
- }
+ #endregion
- #endregion
+ public CategoryDropDownControl() : base()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- public CategoryDropDownControl() : base()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ // prevent editing and showing of drop down
+ DropDownStyle = ComboBoxStyle.DropDownList ;
- // prevent editing and showing of drop down
- DropDownStyle = ComboBoxStyle.DropDownList ;
+ // fully cusotm painting
+ IntegralHeight = false ;
+ DrawMode = DrawMode.OwnerDrawFixed ;
+ Items.Add(String.Empty) ;
- // fully cusotm painting
- IntegralHeight = false ;
- DrawMode = DrawMode.OwnerDrawFixed ;
- Items.Add(String.Empty) ;
+ _categoryContext = new CategoryContext();
+ }
- _categoryContext = new CategoryContext();
- }
+ public void Initialize(IWin32Window parentFrame)
+ {
+ _parentFrame = parentFrame ;
+ _categoryContext.BlogCategorySettings = this;
+ _categoryContext.Changed += new CategoryContext.CategoryChangedEventHandler(_categoryContext_Changed);
+ }
- public void Initialize(IWin32Window parentFrame)
- {
- _parentFrame = parentFrame ;
- _categoryContext.BlogCategorySettings = this;
- _categoryContext.Changed += new CategoryContext.CategoryChangedEventHandler(_categoryContext_Changed);
- }
+ // replace standard drop down behavior with category form
+ protected override void WndProc(ref Message m)
+ {
+ if (IsDropDownMessage(m))
+ {
+ DisplayCategoryForm();
+ }
+ else
+ {
+ base.WndProc(ref m);
+ }
+ }
+ // replace standard painting behavior
+ protected override void OnDrawItem(DrawItemEventArgs e)
+ {
+ // determine the text color based on whether we have categories
+ bool hasCategories = _categoryContext.SelectedCategories.Length > 0 ;
+ Color textColor = hasCategories ? SystemColors.ControlText : SystemColors.GrayText;
- // replace standard drop down behavior with category form
- protected override void WndProc(ref Message m)
- {
- if (IsDropDownMessage(m))
- {
- DisplayCategoryForm();
- }
- else
- {
- base.WndProc(ref m);
- }
- }
+ // draw the text
+ const int HORIZONTAL_MARGIN = 2 ;
+ const int VERTICAL_MARGIN = 1 ;
+ Rectangle textRegion = new Rectangle(new Point(HORIZONTAL_MARGIN, VERTICAL_MARGIN), new Size(Width - 2*HORIZONTAL_MARGIN, Height - 2*VERTICAL_MARGIN) );
+ using (Brush textBrush = new SolidBrush(textColor))
+ {
+ e.Graphics.DrawString(
+ _categoryContext.Text,
+ Font, textBrush, textRegion, DisplayFormat );
+ }
- // replace standard painting behavior
- protected override void OnDrawItem(DrawItemEventArgs e)
- {
- // determine the text color based on whether we have categories
- bool hasCategories = _categoryContext.SelectedCategories.Length > 0 ;
- Color textColor = hasCategories ? SystemColors.ControlText : SystemColors.GrayText;
+ // draw focus rectangle (only if necessary)
+ e.DrawFocusRectangle();
+ }
+ private const int MARGIN = 1;
- // draw the text
- const int HORIZONTAL_MARGIN = 2 ;
- const int VERTICAL_MARGIN = 1 ;
- Rectangle textRegion = new Rectangle(new Point(HORIZONTAL_MARGIN, VERTICAL_MARGIN), new Size(Width - 2*HORIZONTAL_MARGIN, Height - 2*VERTICAL_MARGIN) );
- using (Brush textBrush = new SolidBrush(textColor))
- {
- e.Graphics.DrawString(
- _categoryContext.Text,
- Font, textBrush, textRegion, DisplayFormat );
- }
+ BlogPostCategory[] IBlogCategorySettings.RefreshCategories(bool ignoreErrors)
+ {
+ try
+ {
+ _targetBlog.RefreshCategories();
+ }
+ catch( BlogClientOperationCancelledException )
+ {
+ // show no UI for operation cancelled
+ Debug.WriteLine("BlogClient operation cancelled");
+ }
+ catch (Exception ex)
+ {
+ if(!ignoreErrors)
+ DisplayableExceptionDisplayForm.Show( _parentFrame, ex );
+ }
+ return _targetBlog.Categories;
+ }
- // draw focus rectangle (only if necessary)
- e.DrawFocusRectangle();
- }
- private const int MARGIN = 1;
+ void IBlogCategorySettings.UpdateCategories(BlogPostCategory[] categories)
+ {
+ using ( BlogSettings blogSettings = BlogSettings.ForBlogId(_targetBlog.Id) )
+ blogSettings.Categories = categories ;
+ }
- BlogPostCategory[] IBlogCategorySettings.RefreshCategories(bool ignoreErrors)
- {
- try
- {
- _targetBlog.RefreshCategories();
- }
- catch( BlogClientOperationCancelledException )
- {
- // show no UI for operation cancelled
- Debug.WriteLine("BlogClient operation cancelled");
- }
- catch (Exception ex)
- {
- if(!ignoreErrors)
- DisplayableExceptionDisplayForm.Show( _parentFrame, ex );
- }
- return _targetBlog.Categories;
- }
+ private CategoryContext CategoryContext
+ {
+ get
+ {
+ return _categoryContext;
+ }
+ }
- void IBlogCategorySettings.UpdateCategories(BlogPostCategory[] categories)
- {
- using ( BlogSettings blogSettings = BlogSettings.ForBlogId(_targetBlog.Id) )
- blogSettings.Categories = categories ;
- }
+ private void DisplayCategoryForm()
+ {
+ // If we just dismissed the form, don't display it
+ if (_recentlyClosedForm)
+ return;
- private CategoryContext CategoryContext
- {
- get
- {
- return _categoryContext;
- }
- }
+ Focus();
- private void DisplayCategoryForm()
- {
- // If we just dismissed the form, don't display it
- if (_recentlyClosedForm)
- return;
+ _categoryDisplayForm = new CategoryDisplayForm(this, _categoryContext);
+ //_categoryDisplayForm.MinDropDownWidth = 0;
+ IMiniFormOwner miniFormOwner = FindForm() as IMiniFormOwner;
+ if (miniFormOwner != null)
+ _categoryDisplayForm.FloatAboveOwner(miniFormOwner);
+ _categoryDisplayForm.Closed += new EventHandler(_categoryDisplayForm_Closed);
+ _categoryDisplayForm.Show();
+ }
+ private CategoryDisplayFormBase _categoryDisplayForm = null;
- Focus();
+ private void _categoryContext_Changed(object sender, CategoryContext.CategoryChangedEventArgs e)
+ {
+ _isDirty = true ;
- _categoryDisplayForm = new CategoryDisplayForm(this, _categoryContext);
- //_categoryDisplayForm.MinDropDownWidth = 0;
- IMiniFormOwner miniFormOwner = FindForm() as IMiniFormOwner;
- if (miniFormOwner != null)
- _categoryDisplayForm.FloatAboveOwner(miniFormOwner);
- _categoryDisplayForm.Closed += new EventHandler(_categoryDisplayForm_Closed);
- _categoryDisplayForm.Show();
- }
- private CategoryDisplayFormBase _categoryDisplayForm = null;
+ toolTipCategories.SetToolTip(this, CategoryContext.FormattedCategoryList);
+ Invalidate();
+ Update();
+ }
- private void _categoryContext_Changed(object sender, CategoryContext.CategoryChangedEventArgs e)
- {
- _isDirty = true ;
+ private void _categoryDisplayForm_Closed(object sender, EventArgs e)
+ {
+ // This timer makes it so when you click the control to dismiss the form,
+ // we don't instantly redisplay the form (same goes for hitting enter)
+ _recentlyClosedForm = true;
+ Timer t = new Timer();
+ t.Interval = 100;
+ t.Tick += new EventHandler(t_Tick);
+ t.Start();
- toolTipCategories.SetToolTip(this, CategoryContext.FormattedCategoryList);
- Invalidate();
- Update();
- }
+ _categoryDisplayForm.Closed -= new EventHandler(_categoryDisplayForm_Closed);
+ Invalidate();
+ }
- private void _categoryDisplayForm_Closed(object sender, EventArgs e)
- {
- // This timer makes it so when you click the control to dismiss the form,
- // we don't instantly redisplay the form (same goes for hitting enter)
- _recentlyClosedForm = true;
- Timer t = new Timer();
- t.Interval = 100;
- t.Tick += new EventHandler(t_Tick);
- t.Start();
+ private void t_Tick(object sender, EventArgs e)
+ {
+ _recentlyClosedForm = false;
+ Timer t = (Timer)sender;
+ t.Stop();
+ t.Tick -= new EventHandler(t_Tick);
+ t.Dispose();
+ }
- _categoryDisplayForm.Closed -= new EventHandler(_categoryDisplayForm_Closed);
- Invalidate();
- }
+ private StringFormat DisplayFormat
+ {
+ get
+ {
+ if (_displayFormat == null)
+ {
+ _displayFormat = new StringFormat();
+ _displayFormat.Trimming = StringTrimming.EllipsisCharacter;
+ _displayFormat.Alignment = StringAlignment.Near;
+ _displayFormat.LineAlignment = StringAlignment.Center;
+ _displayFormat.FormatFlags = StringFormatFlags.FitBlackBox | StringFormatFlags.LineLimit;
- private void t_Tick(object sender, EventArgs e)
- {
- _recentlyClosedForm = false;
- Timer t = (Timer)sender;
- t.Stop();
- t.Tick -= new EventHandler(t_Tick);
- t.Dispose();
- }
+ }
+ return _displayFormat;
+ }
+ }
+ private StringFormat _displayFormat;
- private StringFormat DisplayFormat
- {
- get
- {
- if (_displayFormat == null)
- {
- _displayFormat = new StringFormat();
- _displayFormat.Trimming = StringTrimming.EllipsisCharacter;
- _displayFormat.Alignment = StringAlignment.Near;
- _displayFormat.LineAlignment = StringAlignment.Center;
- _displayFormat.FormatFlags = StringFormatFlags.FitBlackBox | StringFormatFlags.LineLimit;
+ private bool IsDropDownMessage(Message m)
+ {
+ // Left Mouse Button
+ if ( m.Msg == WM.LBUTTONDOWN || m.Msg == WM.LBUTTONDBLCLK )
+ {
+ return true ;
+ }
- }
- return _displayFormat;
- }
- }
- private StringFormat _displayFormat;
+ // F4
+ else if ( m.Msg == WM.KEYDOWN )
+ {
+ Keys keyCombo = (Keys)(int)m.WParam & Keys.KeyCode ;
- private bool IsDropDownMessage(Message m)
- {
- // Left Mouse Button
- if ( m.Msg == WM.LBUTTONDOWN || m.Msg == WM.LBUTTONDBLCLK )
- {
- return true ;
- }
+ if ( keyCombo == Keys.F4 )
+ return true ;
+ else
+ return false ;
+ }
- // F4
- else if ( m.Msg == WM.KEYDOWN )
- {
- Keys keyCombo = (Keys)(int)m.WParam & Keys.KeyCode ;
+ // Alt+Arrow
+ else if ( m.Msg == WM.SYSKEYDOWN )
+ {
+ int wparam = m.WParam.ToInt32();
+ int lparam = m.LParam.ToInt32();
- if ( keyCombo == Keys.F4 )
- return true ;
- else
- return false ;
- }
+ if ((wparam == 0x28 && (lparam == 0x21500001 || lparam == 0x20500001)) || //Alt+Down, Alt+NumDown
+ (wparam == 0x26 && (lparam == 0x21480001 || lparam == 0x20480001))) //Alt+Up, Alt+NumUp
+ {
+ return true ;
+ }
+ else
+ {
+ return false ;
+ }
+ }
- // Alt+Arrow
- else if ( m.Msg == WM.SYSKEYDOWN )
- {
- int wparam = m.WParam.ToInt32();
- int lparam = m.LParam.ToInt32();
+ // Not a drop-down message
+ else
+ {
+ return false ;
+ }
+ }
- if ((wparam == 0x28 && (lparam == 0x21500001 || lparam == 0x20500001)) || //Alt+Down, Alt+NumDown
- (wparam == 0x26 && (lparam == 0x21480001 || lparam == 0x20480001))) //Alt+Up, Alt+NumUp
- {
- return true ;
- }
- else
- {
- return false ;
- }
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- // Not a drop-down message
- else
- {
- return false ;
- }
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.toolTipCategories = new System.Windows.Forms.ToolTip(this.components);
+ //
+ // CategoryDropDownControl
+ //
+ this.Size = new System.Drawing.Size(138, 48);
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ }
+ #endregion
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.toolTipCategories = new System.Windows.Forms.ToolTip(this.components);
- //
- // CategoryDropDownControl
- //
- this.Size = new System.Drawing.Size(138, 48);
+ private IWin32Window _parentFrame;
+ private bool _recentlyClosedForm = false;
+ private System.ComponentModel.IContainer components;
+ private CategoryContext _categoryContext;
- }
- #endregion
-
- private IWin32Window _parentFrame;
- private bool _recentlyClosedForm = false;
- private System.ComponentModel.IContainer components;
- private CategoryContext _categoryContext;
-
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControlM1.cs b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControlM1.cs
index 2d21cc91..7a1bffd9 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControlM1.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryDropDownControlM1.cs
@@ -261,14 +261,14 @@ namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
Focus();
/*
- _categoryDisplayForm = new CategoryDisplayFormM1(this, _categoryContext) ;
- _categoryDisplayForm.MinDropDownWidth = 0;
- IMiniFormOwner miniFormOwner = FindForm() as IMiniFormOwner;
- if (miniFormOwner != null)
- _categoryDisplayForm.FloatAboveOwner(miniFormOwner);
- _categoryDisplayForm.Closed += new EventHandler(_categoryDisplayForm_Closed);
- using ( new WaitCursor() )
- _categoryDisplayForm.Show();
+ _categoryDisplayForm = new CategoryDisplayFormM1(this, _categoryContext) ;
+ _categoryDisplayForm.MinDropDownWidth = 0;
+ IMiniFormOwner miniFormOwner = FindForm() as IMiniFormOwner;
+ if (miniFormOwner != null)
+ _categoryDisplayForm.FloatAboveOwner(miniFormOwner);
+ _categoryDisplayForm.Closed += new EventHandler(_categoryDisplayForm_Closed);
+ using ( new WaitCursor() )
+ _categoryDisplayForm.Show();
*/
Point anchor = PointToScreen(new Point(RightToLeft == RightToLeft.Yes ? 0 : ClientSize.Width, ClientSize.Height));
@@ -322,7 +322,6 @@ namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
Invalidate();
}
-
private TextFormatFlags DisplayFormat
{
get { return TextFormatFlags.EndEllipsis | TextFormatFlags.VerticalCenter | TextFormatFlags.NoPrefix; }
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryRefreshControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryRefreshControl.cs
index 709d084c..b6c2a284 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryRefreshControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategoryRefreshControl.cs
@@ -12,131 +12,129 @@ using OpenLiveWriter.Localization;
namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
{
- ///
- /// Summary description for CategoryRefreshControl.
- ///
- internal class CategoryRefreshControl : UserControl
- {
- private BitmapButton buttonRefresh;
- private IContainer components;
- private CategoryContext _categoryContext;
+ ///
+ /// Summary description for CategoryRefreshControl.
+ ///
+ internal class CategoryRefreshControl : UserControl
+ {
+ private BitmapButton buttonRefresh;
+ private IContainer components;
+ private CategoryContext _categoryContext;
- public CategoryRefreshControl()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
- buttonRefresh.ButtonText = Res.Get(StringId.CategoryRefreshList);
- this.buttonRefresh.ToolTip = Res.Get(StringId.CategoryRefreshListTooltip);
- }
+ public CategoryRefreshControl()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
+ buttonRefresh.ButtonText = Res.Get(StringId.CategoryRefreshList);
+ this.buttonRefresh.ToolTip = Res.Get(StringId.CategoryRefreshListTooltip);
+ }
+ public void Initialize(CategoryContext context)
+ {
+ SuspendLayout();
+ buttonRefresh.BitmapDisabled = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refresh.png");
+ buttonRefresh.BitmapEnabled = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refresh.png");
+ buttonRefresh.BitmapPushed = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refresh.png");
+ buttonRefresh.BitmapSelected = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refreshSelected.png");
+ buttonRefresh.TextAlignment = TextAlignment.Right;
+ buttonRefresh.ButtonStyle = ButtonStyle.Standard;
+ buttonRefresh.ButtonText = Res.Get(StringId.CategoryRefreshList);
+ this.buttonRefresh.Size = new Size(94, 22);
+ buttonRefresh.Click += new EventHandler(buttonRefresh_Click);
- public void Initialize(CategoryContext context)
- {
- SuspendLayout();
- buttonRefresh.BitmapDisabled = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refresh.png");
- buttonRefresh.BitmapEnabled = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refresh.png");
- buttonRefresh.BitmapPushed = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refresh.png");
- buttonRefresh.BitmapSelected = ResourceHelper.LoadAssemblyResourceBitmap("PostPropertyEditing.CategoryControl.Images.refreshSelected.png");
- buttonRefresh.TextAlignment = TextAlignment.Right;
- buttonRefresh.ButtonStyle = ButtonStyle.Standard;
- buttonRefresh.ButtonText = Res.Get(StringId.CategoryRefreshList);
- this.buttonRefresh.Size = new Size(94, 22);
- buttonRefresh.Click += new EventHandler(buttonRefresh_Click);
+ ResumeLayout(false);
+ _categoryContext = context;
- ResumeLayout(false);
- _categoryContext = context;
+ }
- }
+ private void RequestRefresh()
+ {
+ _refreshing = true;
+ using (new WaitCursor())
+ _categoryContext.Refresh();
+ _refreshing = false;
+ }
+ private bool _refreshing = false;
- private void RequestRefresh()
- {
- _refreshing = true;
- using (new WaitCursor())
- _categoryContext.Refresh();
- _refreshing = false;
- }
- private bool _refreshing = false;
+ protected override void OnMouseUp(MouseEventArgs e)
+ {
+ RequestRefresh();
+ base.OnMouseUp (e);
+ }
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.Enter && !_refreshing)
+ {
+ RequestRefresh();
+ return true;
+ }
+ else if (keyData == Keys.Up)
+ {
+ if (Parent != null)
+ Parent.SelectNextControl(this, false, true, true, true);
+ return true;
+ }
+ else if (keyData == Keys.Down)
+ {
+ if (Parent != null)
+ Parent.SelectNextControl(this, true, true, true, true);
+ return true;
+ }
+ return base.ProcessCmdKey (ref msg, keyData);
+ }
- protected override void OnMouseUp(MouseEventArgs e)
- {
- RequestRefresh();
- base.OnMouseUp (e);
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
- {
- if (keyData == Keys.Enter && !_refreshing)
- {
- RequestRefresh();
- return true;
- }
- else if (keyData == Keys.Up)
- {
- if (Parent != null)
- Parent.SelectNextControl(this, false, true, true, true);
- return true;
- }
- else if (keyData == Keys.Down)
- {
- if (Parent != null)
- Parent.SelectNextControl(this, true, true, true, true);
- return true;
- }
- return base.ProcessCmdKey (ref msg, keyData);
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.buttonRefresh = new OpenLiveWriter.Controls.BitmapButton(this.components);
+ this.SuspendLayout();
+ //
+ // buttonRefresh
+ //
+ this.buttonRefresh.AutoSizeWidth = true;
+ this.buttonRefresh.ButtonText = "Refresh List";
+ this.buttonRefresh.Location = new System.Drawing.Point(0, 0);
+ this.buttonRefresh.Name = "buttonRefresh";
+ this.buttonRefresh.Size = new System.Drawing.Size(94, 29);
+ this.buttonRefresh.TabIndex = 0;
+ this.buttonRefresh.ToolTip = "Refreshes the list of categories.";
+ //
+ // CategoryRefreshControl
+ //
+ this.BackColor = System.Drawing.SystemColors.ControlLightLight;
+ this.Controls.Add(this.buttonRefresh);
+ this.Name = "CategoryRefreshControl";
+ this.Size = new System.Drawing.Size(94, 29);
+ this.ResumeLayout(false);
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ }
+ #endregion
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.buttonRefresh = new OpenLiveWriter.Controls.BitmapButton(this.components);
- this.SuspendLayout();
- //
- // buttonRefresh
- //
- this.buttonRefresh.AutoSizeWidth = true;
- this.buttonRefresh.ButtonText = "Refresh List";
- this.buttonRefresh.Location = new System.Drawing.Point(0, 0);
- this.buttonRefresh.Name = "buttonRefresh";
- this.buttonRefresh.Size = new System.Drawing.Size(94, 29);
- this.buttonRefresh.TabIndex = 0;
- this.buttonRefresh.ToolTip = "Refreshes the list of categories.";
- //
- // CategoryRefreshControl
- //
- this.BackColor = System.Drawing.SystemColors.ControlLightLight;
- this.Controls.Add(this.buttonRefresh);
- this.Name = "CategoryRefreshControl";
- this.Size = new System.Drawing.Size(94, 29);
- this.ResumeLayout(false);
+ private void buttonRefresh_Click(object sender, EventArgs e)
+ {
+ RequestRefresh();
+ }
- }
- #endregion
-
- private void buttonRefresh_Click(object sender, EventArgs e)
- {
- RequestRefresh();
- }
-
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategorySeparatorControl.cs b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategorySeparatorControl.cs
index 62bc816b..fec2134d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategorySeparatorControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/CategorySeparatorControl.cs
@@ -7,59 +7,59 @@ using System.Windows.Forms;
namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
{
- ///
- /// Summary description for CategorySeparatorControl.
- ///
- internal class CategorySeparatorControl : UserControl
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CategorySeparatorControl.
+ ///
+ internal class CategorySeparatorControl : UserControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CategorySeparatorControl()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public CategorySeparatorControl()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- TabStop = false;
- }
+ TabStop = false;
+ }
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint (e);
- e.Graphics.DrawLine(new Pen(SystemBrushes.ControlDarkDark, 1), 0, 0, Width - 8, 0 );
- }
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint (e);
+ e.Graphics.DrawLine(new Pen(SystemBrushes.ControlDarkDark, 1), 0, 0, Width - 8, 0 );
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CategorySeparatorControl
- //
- this.Name = "CategorySeparatorControl";
- this.Size = new System.Drawing.Size(100, 5);
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CategorySeparatorControl
+ //
+ this.Name = "CategorySeparatorControl";
+ this.Size = new System.Drawing.Size(100, 5);
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/DisplayMessages/CategoryReminderDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/DisplayMessages/CategoryReminderDisplayMessage.cs
index deba6d42..a7716ece 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/DisplayMessages/CategoryReminderDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PostPropertyEditing/CategoryControl/DisplayMessages/CategoryReminderDisplayMessage.cs
@@ -8,63 +8,63 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl.DisplayMessages
{
- public class CategoryReminderDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class CategoryReminderDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CategoryReminderDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public CategoryReminderDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- }
+ }
- public CategoryReminderDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
- }
+ public CategoryReminderDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConfirmDeleteEntryDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2 ;
- this.Text = "You have not specified categories for this post.{0}Do you still want to continue with publishing?";
- this.Title = "Category Reminder";
- this.Type = DisplayMessageType.Question;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConfirmDeleteEntryDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.DefaultButton = System.Windows.Forms.MessageBoxDefaultButton.Button2 ;
+ this.Text = "You have not specified categories for this post.{0}Do you still want to continue with publishing?";
+ this.Title = "Category Reminder";
+ this.Type = DisplayMessageType.Question;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/PreferencesHandler.cs b/src/managed/OpenLiveWriter.PostEditor/PreferencesHandler.cs
index 814d2e9c..a713ce9c 100644
--- a/src/managed/OpenLiveWriter.PostEditor/PreferencesHandler.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/PreferencesHandler.cs
@@ -30,7 +30,7 @@ namespace OpenLiveWriter.PostEditor
///
/// The name to preferences panel type table.
///
- private static Hashtable preferencesPanelTypeTable;
+ private static Hashtable preferencesPanelTypeTable;
public static PreferencesHandler Instance
{
@@ -59,7 +59,6 @@ namespace OpenLiveWriter.PostEditor
ShowPreferences(owner, null, type);
}
-
///
/// A version of show preferences that allows the caller to specify which
/// panel should be selected when the dialog opens
diff --git a/src/managed/OpenLiveWriter.PostEditor/RecentPostProgressForm.cs b/src/managed/OpenLiveWriter.PostEditor/RecentPostProgressForm.cs
index 125f33bf..979007e6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/RecentPostProgressForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/RecentPostProgressForm.cs
@@ -27,7 +27,6 @@ namespace OpenLiveWriter.PostEditor
///
private Container components = null;
-
public RecentPostProgressForm(string entityName)
{
//
@@ -171,6 +170,5 @@ namespace OpenLiveWriter.PostEditor
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/CellPropertiesForm.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/CellPropertiesForm.cs
index fec20f53..8946bd97 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/CellPropertiesForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/CellPropertiesForm.cs
@@ -66,7 +66,6 @@ namespace OpenLiveWriter.PostEditor.Tables
DialogResult = DialogResult.OK;
}
-
private bool ValidateInput()
{
return true;
@@ -146,6 +145,5 @@ namespace OpenLiveWriter.PostEditor.Tables
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/ColumnWidthControl.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/ColumnWidthControl.cs
index 5ab3d300..d90ea1d8 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/ColumnWidthControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/ColumnWidthControl.cs
@@ -17,16 +17,16 @@ namespace OpenLiveWriter.PostEditor.Tables
{
/* Why is percent based column sizing not allowed? We want to in all cases let the
- * table flow to occupy the width of its container. This provides for both robust
- * behavior accross blogs/templates/normal mode and also allows the browser table
- * rendering logic to automatically "balance" columns based on their content and
- * preferred widths. Percent mode requires that the table be given a fixed width
- * (otherwise you end up with a table of essentially zero size). Note that users
- * are essentially able to do percent based sizing by providing a set of
- * preferred widths to their columns (if the preferred widths exceed the available
- * width in the table's parent block then they become relative guidelines for
- * sizing the columns).
- */
+ * table flow to occupy the width of its container. This provides for both robust
+ * behavior accross blogs/templates/normal mode and also allows the browser table
+ * rendering logic to automatically "balance" columns based on their content and
+ * preferred widths. Percent mode requires that the table be given a fixed width
+ * (otherwise you end up with a table of essentially zero size). Note that users
+ * are essentially able to do percent based sizing by providing a set of
+ * preferred widths to their columns (if the preferred widths exceed the available
+ * width in the table's parent block then they become relative guidelines for
+ * sizing the columns).
+ */
public class ColumnWidthControl : System.Windows.Forms.UserControl
{
@@ -38,7 +38,6 @@ namespace OpenLiveWriter.PostEditor.Tables
///
private System.ComponentModel.Container components = null;
-
public ColumnWidthControl()
{
// This call is required by the Windows.Forms Form Designer.
@@ -59,7 +58,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
}
-
public int ColumnWidth
{
get
@@ -185,9 +183,7 @@ namespace OpenLiveWriter.PostEditor.Tables
}
#endregion
-
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandCellProperties.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandCellProperties.cs
index 3e68d405..28055783 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandCellProperties.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandCellProperties.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandCellProperties : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandCellProperties : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandCellProperties(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandCellProperties(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandCellProperties()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandCellProperties()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.CellProperties";
+ this.MainMenuPath = "T&able@6/Cell &Properties...@120";
+ this.MenuText = "Cell &Properties...";
+ this.Text = "Cell Properties";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.CellProperties";
- this.MainMenuPath = "T&able@6/Cell &Properties...@120";
- this.MenuText = "Cell &Properties...";
- this.Text = "Cell Properties";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandClearCell.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandClearCell.cs
index 923fee18..70e11503 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandClearCell.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandClearCell.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandClearCell : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandClearCell : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandClearCell(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandClearCell(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandClearCell()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandClearCell()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandClearCell
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.ClearCell";
+ this.MainMenuPath = "T&able@6/-Cl&ear Cell{0}@320";
+ this.MenuText = "Cl&ear Cell{0}";
+ this.Text = "Clear Cell";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandClearCell
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.ClearCell";
- this.MainMenuPath = "T&able@6/-Cl&ear Cell{0}@320";
- this.MenuText = "Cl&ear Cell{0}";
- this.Text = "Clear Cell";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandColumnProperties.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandColumnProperties.cs
index 7109154e..0fb86639 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandColumnProperties.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandColumnProperties.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandColumnProperties : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandColumnProperties : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandColumnProperties(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandColumnProperties(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandColumnProperties()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandColumnProperties()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.ColumnProperties";
+ this.MainMenuPath = "T&able@6/&Column Properties...@115";
+ this.MenuText = "&Column Properties...";
+ this.Text = "Column Properties";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.ColumnProperties";
- this.MainMenuPath = "T&able@6/&Column Properties...@115";
- this.MenuText = "&Column Properties...";
- this.Text = "Column Properties";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteColumn.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteColumn.cs
index 87617feb..d3183a06 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteColumn.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteColumn.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandDeleteColumn : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandDeleteColumn : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandDeleteColumn(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteColumn(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandDeleteColumn()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteColumn()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandDeleteColumn
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.DeleteColumn";
+ this.MainMenuPath = "T&able@6/Delete Colum&n{0}@310";
+ this.MenuText = "Delete Colum&n{0}";
+ this.Text = "Delete Column";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandDeleteColumn
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.DeleteColumn";
- this.MainMenuPath = "T&able@6/Delete Colum&n{0}@310";
- this.MenuText = "Delete Colum&n{0}";
- this.Text = "Delete Column";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteRow.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteRow.cs
index 36616f5e..a7eb05a0 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteRow.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteRow.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandDeleteRow : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandDeleteRow : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandDeleteRow(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteRow(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandDeleteRow()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteRow()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandDeleteRow
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.DeleteRow";
+ this.MainMenuPath = "T&able@6/Delete Ro&w{0}@305";
+ this.MenuText = "Delete Ro&w{0}";
+ this.Text = "Delete Row";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandDeleteRow
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.DeleteRow";
- this.MainMenuPath = "T&able@6/Delete Ro&w{0}@305";
- this.MenuText = "Delete Ro&w{0}";
- this.Text = "Delete Row";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteTable.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteTable.cs
index 4d8ddc27..2c0193c4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteTable.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandDeleteTable.cs
@@ -6,54 +6,53 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandDeleteTable : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandDeleteTable : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandDeleteTable(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteTable(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandDeleteTable()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandDeleteTable()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.DeleteTable";
+ this.MainMenuPath = "T&able@6/-&Delete Table...@300";
+ this.MenuText = "&Delete Table...";
+ this.Text = "Delete Table";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.DeleteTable";
- this.MainMenuPath = "T&able@6/-&Delete Table...@300";
- this.MenuText = "&Delete Table...";
- this.Text = "Delete Table";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnLeft.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnLeft.cs
index 96f50b14..4691f043 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnLeft.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnLeft.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertColumnLeft : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertColumnLeft : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertColumnLeft(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertColumnLeft(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandInsertColumnLeft()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertColumnLeft()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertColumnLeft";
+ this.MainMenuPath = "T&able@6/-Insert Column &Left@250";
+ this.MenuText = "Insert Column &Left" ;
+ this.Text = "Insert Column Left";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertColumnLeft";
- this.MainMenuPath = "T&able@6/-Insert Column &Left@250";
- this.MenuText = "Insert Column &Left" ;
- this.Text = "Insert Column Left";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnRight.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnRight.cs
index 3a810cad..2de38cb4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnRight.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertColumnRight.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertColumnRight : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertColumnRight : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertColumnRight(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertColumnRight(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandInsertColumnRight()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertColumnRight()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertColumnRight";
+ this.MainMenuPath = "T&able@6/Insert Column Ri&ght@255";
+ this.MenuText = "Insert Column Ri&ght" ;
+ this.Text = "Insert Column Right";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertColumnRight";
- this.MainMenuPath = "T&able@6/Insert Column Ri&ght@255";
- this.MenuText = "Insert Column Ri&ght" ;
- this.Text = "Insert Column Right";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowAbove.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowAbove.cs
index 7df921c5..4f8b4c82 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowAbove.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowAbove.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertRowAbove : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertRowAbove : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertRowAbove(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertRowAbove(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandInsertRowAbove()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertRowAbove()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertRowAbove";
+ this.MainMenuPath = "T&able@6/-Insert Row &Above@200";
+ this.MenuText = "Insert Row &Above" ;
+ this.Text = "Insert Row Above";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertRowAbove";
- this.MainMenuPath = "T&able@6/-Insert Row &Above@200";
- this.MenuText = "Insert Row &Above" ;
- this.Text = "Insert Row Above";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowBelow.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowBelow.cs
index ff556434..980f8314 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowBelow.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertRowBelow.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertRowBelow : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertRowBelow : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertRowBelow(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertRowBelow(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandInsertRowBelow()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertRowBelow()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertRowBelow";
+ this.MainMenuPath = "T&able@6/Insert Row &Below@205";
+ this.MenuText = "Insert Row &Below" ;
+ this.Text = "Insert Row Below";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertRowBelow";
- this.MainMenuPath = "T&able@6/Insert Row &Below@205";
- this.MenuText = "Insert Row &Below" ;
- this.Text = "Insert Row Below";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable.cs
index 64166f8d..a4c13522 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertTable : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertTable : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertTable(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertTable(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandInsertTable()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertTable()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertTable
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertTable";
+ this.MainMenuPath = "T&able@6/&Insert Table...-@100";
+ this.MenuText = "&Insert Table...";
+ this.Text = "Insert Table";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertTable
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertTable";
- this.MainMenuPath = "T&able@6/&Insert Table...-@100";
- this.MenuText = "&Insert Table...";
- this.Text = "Insert Table";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable2.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable2.cs
index edc9a3dc..5ddc10d2 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable2.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandInsertTable2.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandInsertTable2 : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandInsertTable2 : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandInsertTable2(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertTable2(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandInsertTable2()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandInsertTable2()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertTable
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertTable2";
+ this.MainMenuPath = "&Insert@4/&Table...@200";
+ this.MenuText = "&Table...";
+ this.Text = "Insert Table";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertTable
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.InsertTable2";
- this.MainMenuPath = "&Insert@4/&Table...@200";
- this.MenuText = "&Table...";
- this.Text = "Insert Table";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnLeft.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnLeft.cs
index 9f35bce1..cda66fa6 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnLeft.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnLeft.cs
@@ -6,56 +6,55 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandMoveColumnLeft : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandMoveColumnLeft : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandMoveColumnLeft(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveColumnLeft(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandMoveColumnLeft()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveColumnLeft()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveColumnLeft";
- this.MainMenuPath = "T&able@6/Move Column Le&ft@260";
- this.MenuText = "Move Column Le&ft" ;
- this.Text = "Move Column Left";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveColumnLeft";
+ this.MainMenuPath = "T&able@6/Move Column Le&ft@260";
+ this.MenuText = "Move Column Le&ft" ;
+ this.Text = "Move Column Left";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnRight.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnRight.cs
index 9214470e..8a4052e5 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnRight.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveColumnRight.cs
@@ -6,53 +6,52 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandMoveColumnRight : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandMoveColumnRight : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandMoveColumnRight(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveColumnRight(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandMoveColumnRight()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveColumnRight()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveColumnRight";
- this.MainMenuPath = "T&able@6/Move Column Rig&ht@265";
- this.MenuText = "Move Column Rig&ht" ;
- this.Text = "Move Column Right";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveColumnRight";
+ this.MainMenuPath = "T&able@6/Move Column Rig&ht@265";
+ this.MenuText = "Move Column Rig&ht" ;
+ this.Text = "Move Column Right";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowDown.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowDown.cs
index f7c3f1bd..8eea0242 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowDown.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowDown.cs
@@ -6,56 +6,55 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandMoveRowDown : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandMoveRowDown : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandMoveRowDown(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveRowDown(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandMoveRowDown()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveRowDown()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveRowDown";
- this.MainMenuPath = "T&able@6/Move Row D&own@215";
- this.MenuText = "Move Row D&own" ;
- this.Text = "Move Row Down";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveRowDown";
+ this.MainMenuPath = "T&able@6/Move Row D&own@215";
+ this.MenuText = "Move Row D&own" ;
+ this.Text = "Move Row Down";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowUp.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowUp.cs
index 480c7214..1a9a9815 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowUp.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandMoveRowUp.cs
@@ -6,56 +6,55 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandMoveRowUp : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandMoveRowUp : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandMoveRowUp(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveRowUp(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandMoveRowUp()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandMoveRowUp()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveRowUp";
- this.MainMenuPath = "T&able@6/Move Row &Up@210";
- this.MenuText = "Move Row &Up" ;
- this.Text = "Move Row Up";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.MoveRowUp";
+ this.MainMenuPath = "T&able@6/Move Row &Up@210";
+ this.MenuText = "Move Row &Up" ;
+ this.Text = "Move Row Up";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandRowProperties.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandRowProperties.cs
index 78740252..325f5fbf 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandRowProperties.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandRowProperties.cs
@@ -6,56 +6,55 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandRowProperties : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandRowProperties : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandRowProperties(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandRowProperties(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandRowProperties()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandRowProperties()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
-
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.RowProperties";
- this.MainMenuPath = "T&able@6/&Row Properties...@120";
- this.MenuText = "&Row Properties...";
- this.Text = "Row Properties";
- }
- #endregion
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.RowProperties";
+ this.MainMenuPath = "T&able@6/&Row Properties...@120";
+ this.MenuText = "&Row Properties...";
+ this.Text = "Row Properties";
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableMenu.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableMenu.cs
index 76955c6d..9d430673 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableMenu.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableMenu.cs
@@ -6,56 +6,55 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandTableMenu : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandTableMenu : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandTableMenu(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandTableMenu(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandTableMenu()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandTableMenu()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandInsertTable
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableMenu";
+ this.MenuText = "Table";
+ this.Text = "Table";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandInsertTable
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableMenu";
- this.MenuText = "Table";
- this.Text = "Table";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableProperties.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableProperties.cs
index cf456c62..bbd4488d 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableProperties.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/Commands/CommandTableProperties.cs
@@ -6,57 +6,56 @@ using OpenLiveWriter.ApplicationFramework ;
namespace OpenLiveWriter.PostEditor.Tables.Commands
{
- ///
- /// Summary description for CommandCopy.
- ///
- public class CommandTableProperties : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandCopy.
+ ///
+ public class CommandTableProperties : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandTableProperties(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandTableProperties(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandTableProperties()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandTableProperties()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFont
+ //
+ this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableProperties";
+ this.MainMenuPath = "T&able@6/&Table Properties...@105";
+ this.MenuText = "&Table Properties...";
+ this.Text = "Table Properties";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFont
- //
- this.Identifier = "OpenLiveWriter.PostEditor.Tables.Commands.TableProperties";
- this.MainMenuPath = "T&able@6/&Table Properties...@105";
- this.MenuText = "&Table Properties...";
- this.Text = "Table Properties";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ConfirmDeleteTableDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ConfirmDeleteTableDisplayMessage.cs
index cd2a143e..e4e25c66 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ConfirmDeleteTableDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ConfirmDeleteTableDisplayMessage.cs
@@ -6,69 +6,69 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Tables.DisplayMessages
{
- public class ConfirmDeleteTableDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ public class ConfirmDeleteTableDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ConfirmDeleteTableDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ConfirmDeleteTableDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public ConfirmDeleteTableDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public ConfirmDeleteTableDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // ConfirmDeletePostDisplayMessage
- //
- this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
- this.Text = "Are you sure you want to delete the table?";
- this.Title = "Confirm Delete";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // ConfirmDeletePostDisplayMessage
+ //
+ this.Buttons = System.Windows.Forms.MessageBoxButtons.YesNo;
+ this.Text = "Are you sure you want to delete the table?";
+ this.Title = "Confirm Delete";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/UnspecifiedValueDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/UnspecifiedValueDisplayMessage.cs
index 83b1575b..bf11e626 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/UnspecifiedValueDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/UnspecifiedValueDisplayMessage.cs
@@ -6,68 +6,68 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Tables.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class UnspecifiedValueDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class UnspecifiedValueDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public UnspecifiedValueDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public UnspecifiedValueDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public UnspecifiedValueDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public UnspecifiedValueDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Text = "You must provide a value for the {0} field.";
- this.Title = "Required Value Not Specified";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Text = "You must provide a value for the {0} field.";
+ this.Title = "Required Value Not Specified";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueExceedsMaximumDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueExceedsMaximumDisplayMessage.cs
index fb1be0e6..14a5be8e 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueExceedsMaximumDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueExceedsMaximumDisplayMessage.cs
@@ -6,68 +6,68 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Tables.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class ValueExceedsMaximumDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class ValueExceedsMaximumDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ValueExceedsMaximumDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ValueExceedsMaximumDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public ValueExceedsMaximumDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public ValueExceedsMaximumDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Text = "You must enter a value less than {0} for the {1} field.";
- this.Title = "Maximum Value Exceeded";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Text = "You must enter a value less than {0} for the {1} field.";
+ this.Title = "Maximum Value Exceeded";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueLessThanMinimumDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueLessThanMinimumDisplayMessage.cs
index f1604d20..4bc73428 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueLessThanMinimumDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/ValueLessThanMinimumDisplayMessage.cs
@@ -6,68 +6,68 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Tables.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class ValueLessThanMinimumDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class ValueLessThanMinimumDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public ValueLessThanMinimumDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public ValueLessThanMinimumDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public ValueLessThanMinimumDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public ValueLessThanMinimumDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Text = "You must enter a value of at least {0} for the {1} field.";
- this.Title = "Value Less Than Minimum";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Text = "You must enter a value of at least {0} for the {1} field.";
+ this.Title = "Value Less Than Minimum";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/WidthExceedsMaximumDisplayMessage.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/WidthExceedsMaximumDisplayMessage.cs
index 3594b1db..7088544e 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/WidthExceedsMaximumDisplayMessage.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/DisplayMessages/WidthExceedsMaximumDisplayMessage.cs
@@ -6,68 +6,68 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.PostEditor.Tables.DisplayMessages
{
- ///
- /// Summary description for DeleteSingleItemDisplayMessage.
- ///
- public class WidthExceedsMaximumDisplayMessage : DisplayMessage
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for DeleteSingleItemDisplayMessage.
+ ///
+ public class WidthExceedsMaximumDisplayMessage : DisplayMessage
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public WidthExceedsMaximumDisplayMessage(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- container.Add(this);
- InitializeComponent();
+ public WidthExceedsMaximumDisplayMessage(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ container.Add(this);
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public WidthExceedsMaximumDisplayMessage()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public WidthExceedsMaximumDisplayMessage()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.Text = "A table cannot have a width larger than the width of its container\n(this table's container is {0} pixels wide).";
- this.Title = "Table Width Exceeds Maximum";
- this.Type = DisplayMessageType.Warning;
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.Text = "A table cannot have a width larger than the width of its container\n(this table's container is {0} pixels wide).";
+ this.Title = "Table Width Exceeds Maximum";
+ this.Type = DisplayMessageType.Warning;
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/RowPropertiesForm.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/RowPropertiesForm.cs
index c18d59ba..756d28fe 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/RowPropertiesForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/RowPropertiesForm.cs
@@ -308,6 +308,5 @@ namespace OpenLiveWriter.PostEditor.Tables
}
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableAlignmentControl.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableAlignmentControl.cs
index c4bb22a2..2c92cef3 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableAlignmentControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableAlignmentControl.cs
@@ -89,7 +89,6 @@ namespace OpenLiveWriter.PostEditor.Tables
comboBoxValue.Items.Remove(option);
}
-
///
/// Clean up any resources being used.
///
@@ -157,7 +156,6 @@ namespace OpenLiveWriter.PostEditor.Tables
_value = value;
}
-
public string Caption { get { return _caption; } }
public object Value { get { return _value; } }
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableCellSelectionTracker.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableCellSelectionTracker.cs
index 621f705d..c9f3c4fb 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableCellSelectionTracker.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableCellSelectionTracker.cs
@@ -64,6 +64,5 @@ namespace OpenLiveWriter.PostEditor.Tables
private ArrayList _lastSelectedCells = new ArrayList();
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableColorPickerControl.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableColorPickerControl.cs
index 6887ee35..1d20b33a 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableColorPickerControl.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableColorPickerControl.cs
@@ -11,141 +11,140 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.PostEditor.Tables
{
- ///
- /// Summary description for TableColorPickerControl.
- ///
- public class TableColorPickerControl : System.Windows.Forms.UserControl
- {
- private System.Windows.Forms.Button buttonBrowseColor;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for TableColorPickerControl.
+ ///
+ public class TableColorPickerControl : System.Windows.Forms.UserControl
+ {
+ private System.Windows.Forms.Button buttonBrowseColor;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public TableColorPickerControl()
- {
- // This call is required by the Windows.Forms Form Designer.
- InitializeComponent();
+ public TableColorPickerControl()
+ {
+ // This call is required by the Windows.Forms Form Designer.
+ InitializeComponent();
- }
+ }
- public CellColor CellColor
- {
- get
- {
- return _cellColor ;
- }
- set
- {
- // null == default
- CellColor cellColor = value ;
- if ( cellColor == null )
- cellColor = new CellColor();
+ public CellColor CellColor
+ {
+ get
+ {
+ return _cellColor ;
+ }
+ set
+ {
+ // null == default
+ CellColor cellColor = value ;
+ if ( cellColor == null )
+ cellColor = new CellColor();
- _cellColor = cellColor ;
+ _cellColor = cellColor ;
- Invalidate() ;
- }
- }
- private CellColor _cellColor = new CellColor();
+ Invalidate() ;
+ }
+ }
+ private CellColor _cellColor = new CellColor();
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint(e);
+ Graphics g = e.Graphics ;
- Graphics g = e.Graphics ;
+ // calculate rectangle for color display
+ Rectangle rectColorDisplay = new Rectangle(0,0, Width-buttonBrowseColor.Width-5, Height-1 ) ;
- // calculate rectangle for color display
- Rectangle rectColorDisplay = new Rectangle(0,0, Width-buttonBrowseColor.Width-5, Height-1 ) ;
+ // draw color
+ if ( CellColor.IsMixed )
+ {
+ using ( Brush brush = new SolidBrush(Color.Yellow) )
+ g.FillRectangle(brush, rectColorDisplay);
+ }
+ else if (CellColor.Color == Color.Empty )
+ {
+ using ( Brush brush = new SolidBrush(Color.Red) )
+ g.FillRectangle(brush, rectColorDisplay);
+ }
+ else
+ {
+ using ( Brush brush = new SolidBrush(CellColor.Color) )
+ g.FillRectangle(brush, rectColorDisplay);
+ }
- // draw color
- if ( CellColor.IsMixed )
- {
- using ( Brush brush = new SolidBrush(Color.Yellow) )
- g.FillRectangle(brush, rectColorDisplay);
- }
- else if (CellColor.Color == Color.Empty )
- {
- using ( Brush brush = new SolidBrush(Color.Red) )
- g.FillRectangle(brush, rectColorDisplay);
- }
- else
- {
- using ( Brush brush = new SolidBrush(CellColor.Color) )
- g.FillRectangle(brush, rectColorDisplay);
- }
+ // draw border
+ using ( Pen pen = new Pen(ColorHelper.GetThemeBorderColor()) )
+ g.DrawRectangle(pen, rectColorDisplay) ;
+ }
- // draw border
- using ( Pen pen = new Pen(ColorHelper.GetThemeBorderColor()) )
- g.DrawRectangle(pen, rectColorDisplay) ;
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.buttonBrowseColor = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // buttonBrowseColor
+ //
+ this.buttonBrowseColor.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonBrowseColor.Location = new System.Drawing.Point(50, 0);
+ this.buttonBrowseColor.Name = "buttonBrowseColor";
+ this.buttonBrowseColor.Size = new System.Drawing.Size(23, 21);
+ this.buttonBrowseColor.TabIndex = 1;
+ this.buttonBrowseColor.Text = "...";
+ this.buttonBrowseColor.Click += new System.EventHandler(this.buttonBrowseColor_Click);
+ //
+ // TableColorPickerControl
+ //
+ this.Controls.Add(this.buttonBrowseColor);
+ this.Name = "TableColorPickerControl";
+ this.Size = new System.Drawing.Size(73, 21);
+ this.ResumeLayout(false);
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.buttonBrowseColor = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // buttonBrowseColor
- //
- this.buttonBrowseColor.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonBrowseColor.Location = new System.Drawing.Point(50, 0);
- this.buttonBrowseColor.Name = "buttonBrowseColor";
- this.buttonBrowseColor.Size = new System.Drawing.Size(23, 21);
- this.buttonBrowseColor.TabIndex = 1;
- this.buttonBrowseColor.Text = "...";
- this.buttonBrowseColor.Click += new System.EventHandler(this.buttonBrowseColor_Click);
- //
- // TableColorPickerControl
- //
- this.Controls.Add(this.buttonBrowseColor);
- this.Name = "TableColorPickerControl";
- this.Size = new System.Drawing.Size(73, 21);
- this.ResumeLayout(false);
+ }
+ #endregion
- }
- #endregion
+ private void buttonBrowseColor_Click(object sender, System.EventArgs e)
+ {
+ // create the color picker dialog
+ using (ColorDialog colorDialog = new ColorDialog() )
+ {
+ colorDialog.AllowFullOpen = false;
+ colorDialog.FullOpen = false;
+ colorDialog.Color = CellColor.Color ;
- private void buttonBrowseColor_Click(object sender, System.EventArgs e)
- {
- // create the color picker dialog
- using (ColorDialog colorDialog = new ColorDialog() )
- {
- colorDialog.AllowFullOpen = false;
- colorDialog.FullOpen = false;
- colorDialog.Color = CellColor.Color ;
-
- // show the color picker dialog
- using ( new WaitCursor() )
- {
- if ( colorDialog.ShowDialog(FindForm()) == DialogResult.OK )
- {
- // update color
- CellColor = new CellColor(colorDialog.Color) ;
- }
- }
- }
- }
- }
+ // show the color picker dialog
+ using ( new WaitCursor() )
+ {
+ if ( colorDialog.ShowDialog(FindForm()) == DialogResult.OK )
+ {
+ // update color
+ CellColor = new CellColor(colorDialog.Color) ;
+ }
+ }
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableColumnSizeEditor.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableColumnSizeEditor.cs
index d9195506..65f5f19c 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableColumnSizeEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableColumnSizeEditor.cs
@@ -70,7 +70,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
}
-
private int HandleMouseEvent(int inEvtDispId, IHTMLEventObj pIEventObj)
{
// WinLive 160252: MSHTML throws a COMException with HRESULT 0x8000FFFF (E_UNEXPECTED) when calling
@@ -176,7 +175,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
-
private void OnMouseMove(TableColumnMouseEventArgs ea)
{
if (_sizingOperation.InProgress)
@@ -386,7 +384,6 @@ namespace OpenLiveWriter.PostEditor.Tables
ShowSizingCursor();
}
-
public void EndSizing()
{
try
@@ -432,7 +429,6 @@ namespace OpenLiveWriter.PostEditor.Tables
get { return _sizingUndoUnit != null; }
}
-
public void ShowCursor(Cursor cursor)
{
_editorContext.OverrideCursor = true;
@@ -512,7 +508,6 @@ namespace OpenLiveWriter.PostEditor.Tables
private HTMLTableColumn _rightColumn = null;
private bool _cellWidthsFixed = true;
-
}
internal class TableColumnMouseEventArgs : EventArgs
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableDataFormatHandler.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableDataFormatHandler.cs
index 657374c2..62a125b0 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableDataFormatHandler.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableDataFormatHandler.cs
@@ -198,6 +198,5 @@ namespace OpenLiveWriter.PostEditor.Tables
return null;
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingElementBehavior.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingElementBehavior.cs
index 2b0e0201..21070cd8 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingElementBehavior.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingElementBehavior.cs
@@ -25,7 +25,6 @@ namespace OpenLiveWriter.PostEditor.Tables
_tableEditingManager = tableEditingManager;
}
-
protected override void OnElementAttached()
{
base.OnElementAttached();
@@ -317,7 +316,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
private TableEditingContext _tableEditingContext;
-
private void SelectEntireTable()
{
try
@@ -389,5 +387,4 @@ namespace OpenLiveWriter.PostEditor.Tables
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingManager.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingManager.cs
index 0284b55c..d9fca0c5 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingManager.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditingManager.cs
@@ -367,5 +367,4 @@ namespace OpenLiveWriter.PostEditor.Tables
}
-
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditor.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditor.cs
index 2e4950b8..09cc8db3 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditor.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableEditor.cs
@@ -186,7 +186,6 @@ namespace OpenLiveWriter.PostEditor.Tables
return tableEditor.InsertRowBelow();
}
-
public static void MoveRowUp(IHtmlEditorComponentContext editorContext)
{
MarkupRange selectedMarkupRange = editorContext.Selection.SelectedMarkupRange;
@@ -376,7 +375,6 @@ namespace OpenLiveWriter.PostEditor.Tables
tableEditor.MakeEmptyCellsNull();
}
-
#region Construction and Initialization
private TableEditor(IHtmlEditorComponentContext editorContext)
@@ -390,12 +388,10 @@ namespace OpenLiveWriter.PostEditor.Tables
_markupRange = markupRange;
}
-
#endregion
#region Table Level Commands
-
private TableProperties TableProperties
{
get
@@ -494,7 +490,6 @@ namespace OpenLiveWriter.PostEditor.Tables
#region Row Level Commands
-
private RowProperties RowProperties
{
get
@@ -923,10 +918,8 @@ namespace OpenLiveWriter.PostEditor.Tables
undoUnit.Commit();
}
-
}
-
///
/// Routine to automatically add/remove/restore to empty cells so that
/// these empty cells do not "collapse" when published.
@@ -1077,7 +1070,6 @@ namespace OpenLiveWriter.PostEditor.Tables
textRange.select();
}
-
#endregion
#region Private Helpers
@@ -1213,7 +1205,6 @@ namespace OpenLiveWriter.PostEditor.Tables
return verticalAlignment;
}
-
private bool TableParentElementFilter(IHTMLElement e)
{
if (ElementFilters.BLOCK_ELEMENTS(e))
@@ -1235,7 +1226,6 @@ namespace OpenLiveWriter.PostEditor.Tables
return cell as IHTMLTableCell;
}
-
private void DeleteTableIfEmpty()
{
IHTMLElement tableElement = TableSelection.Table as IHTMLElement;
@@ -1248,7 +1238,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
-
private void InsertAdjacentColumn(HTMLTableColumn column, bool after)
{
// set the specified alignment for each cell in the column
@@ -1282,7 +1271,6 @@ namespace OpenLiveWriter.PostEditor.Tables
private MarkupRange _preservedMarkupRange = null;
}
-
#endregion
#region Private Data and Constants
@@ -1297,7 +1285,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
-
public class TableCreationParameters
{
public TableCreationParameters(int rows, int columns, TableProperties properties)
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TableHelper.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TableHelper.cs
index 3fe7dd17..ba9dfc43 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TableHelper.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TableHelper.cs
@@ -112,7 +112,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
}
-
public static int GetRowHeight(IHTMLTableRow row)
{
IHTMLTableRow2 row2 = row as IHTMLTableRow2;
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tables/TablePropertiesForm.cs b/src/managed/OpenLiveWriter.PostEditor/Tables/TablePropertiesForm.cs
index f0d27f5d..1a9400a4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tables/TablePropertiesForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tables/TablePropertiesForm.cs
@@ -170,7 +170,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
-
private void InitializeFormProperties(TableProperties properties)
{
BorderSize = properties.BorderSize;
@@ -219,7 +218,6 @@ namespace OpenLiveWriter.PostEditor.Tables
}
}
-
private void buttonOK_Click(object sender, System.EventArgs e)
{
if (ValidateInput())
@@ -299,7 +297,6 @@ namespace OpenLiveWriter.PostEditor.Tables
return true;
}
-
private bool ValidateTextBoxInteger(string name, TextBox textBox, int maxValue)
{
string textBoxValue = textBox.Text.Trim();
@@ -398,7 +395,6 @@ namespace OpenLiveWriter.PostEditor.Tables
TableEditingSettings.DefaultWidth = parameters.Properties.Width;
}
-
///
/// Clean up any resources being used.
///
@@ -662,6 +658,5 @@ namespace OpenLiveWriter.PostEditor.Tables
#endregion
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tagging/SectionHeader.cs b/src/managed/OpenLiveWriter.PostEditor/Tagging/SectionHeader.cs
index d5d8bfbf..4f438ec9 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tagging/SectionHeader.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tagging/SectionHeader.cs
@@ -10,82 +10,82 @@ using OpenLiveWriter.CoreServices.UI;
namespace OpenLiveWriter.PostEditor.Tagging
{
- class SectionHeader : Control
- {
- public SectionHeader()
- {
- _uiTheme = new UITheme(this);
- }
- public string HeaderText
- {
- get { return _headerText; }
- set
- {
- _headerText = value;
- Invalidate();
- }
- }
- private string _headerText;
+ class SectionHeader : Control
+ {
+ public SectionHeader()
+ {
+ _uiTheme = new UITheme(this);
+ }
+ public string HeaderText
+ {
+ get { return _headerText; }
+ set
+ {
+ _headerText = value;
+ Invalidate();
+ }
+ }
+ private string _headerText;
- protected override void OnPaintBackground(PaintEventArgs pevent)
- {
- // supress background painting to avoid flicker
- }
+ protected override void OnPaintBackground(PaintEventArgs pevent)
+ {
+ // supress background painting to avoid flicker
+ }
- protected override void OnPaint(PaintEventArgs e)
- {
- // draw background
- using (Brush brush = new SolidBrush(_uiTheme.BackgroundColor))
- e.Graphics.FillRectangle(brush, ClientRectangle);
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ // draw background
+ using (Brush brush = new SolidBrush(_uiTheme.BackgroundColor))
+ e.Graphics.FillRectangle(brush, ClientRectangle);
- // draw corner
- if(_uiTheme.DrawImages)
- e.Graphics.DrawImage(HeaderCornerImage, 0, 0);
+ // draw corner
+ if(_uiTheme.DrawImages)
+ e.Graphics.DrawImage(HeaderCornerImage, 0, 0);
- // draw text
- if (_headerText != null)
- using (Brush brush = new SolidBrush(_uiTheme.TextColor))
- e.Graphics.DrawString(HeaderText, Font, brush, 3, 1);
- }
+ // draw text
+ if (_headerText != null)
+ using (Brush brush = new SolidBrush(_uiTheme.TextColor))
+ e.Graphics.DrawString(HeaderText, Font, brush, 3, 1);
+ }
- protected override void OnSizeChanged(EventArgs e)
- {
- base.OnSizeChanged(e);
- Invalidate();
- }
+ protected override void OnSizeChanged(EventArgs e)
+ {
+ base.OnSizeChanged(e);
+ Invalidate();
+ }
- private static Bitmap HeaderCornerImage
- {
- get
- {
- return ResourceHelper.LoadAssemblyResourceBitmap("Tagging.Images.HeaderCorner.png") ;
- }
- }
+ private static Bitmap HeaderCornerImage
+ {
+ get
+ {
+ return ResourceHelper.LoadAssemblyResourceBitmap("Tagging.Images.HeaderCorner.png") ;
+ }
+ }
- private UITheme _uiTheme;
- private class UITheme : ControlUITheme
- {
- public Color TextColor;
- public Color BackgroundColor;
- public bool DrawImages;
- public UITheme(Control c) : base(c, true)
- {
- }
+ private UITheme _uiTheme;
+ private class UITheme : ControlUITheme
+ {
+ public Color TextColor;
+ public Color BackgroundColor;
+ public bool DrawImages;
+ public UITheme(Control c) : base(c, true)
+ {
+ }
- protected override void ApplyTheme(bool highContrast)
- {
- DrawImages = !highContrast;
- if(highContrast)
- {
- TextColor = SystemColors.ControlText;
- }
- else
- {
- TextColor = Color.FromArgb(74, 101, 149);
- BackgroundColor = Color.FromArgb(147, 176, 235);
- }
- base.ApplyTheme(highContrast);
- }
- }
- }
+ protected override void ApplyTheme(bool highContrast)
+ {
+ DrawImages = !highContrast;
+ if(highContrast)
+ {
+ TextColor = SystemColors.ControlText;
+ }
+ else
+ {
+ TextColor = Color.FromArgb(74, 101, 149);
+ BackgroundColor = Color.FromArgb(147, 176, 235);
+ }
+ base.ApplyTheme(highContrast);
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tagging/TagContentSource.cs b/src/managed/OpenLiveWriter.PostEditor/Tagging/TagContentSource.cs
index bc55d324..25670bb0 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tagging/TagContentSource.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tagging/TagContentSource.cs
@@ -87,6 +87,5 @@ namespace OpenLiveWriter.PostEditor.Tagging
options.ShowDialog(dialogOwner);
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tagging/TagForm.cs b/src/managed/OpenLiveWriter.PostEditor/Tagging/TagForm.cs
index 1ef128b4..e4dbd64b 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tagging/TagForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tagging/TagForm.cs
@@ -153,6 +153,5 @@ namespace OpenLiveWriter.PostEditor.Tagging
DialogResult = DialogResult.Cancel;
}
-
}
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Tagging/TagProvider.cs b/src/managed/OpenLiveWriter.PostEditor/Tagging/TagProvider.cs
index 84be310b..60617308 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Tagging/TagProvider.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Tagging/TagProvider.cs
@@ -11,7 +11,6 @@ using OpenLiveWriter.Localization;
namespace OpenLiveWriter.PostEditor.Tagging
{
-
public class TagProvider : IComparable
{
private const string DEFAULT_FORMAT = "{1}";
diff --git a/src/managed/OpenLiveWriter.PostEditor/TextEditingCommandDispatcher.cs b/src/managed/OpenLiveWriter.PostEditor/TextEditingCommandDispatcher.cs
index 04f80e8b..a7e2c92c 100644
--- a/src/managed/OpenLiveWriter.PostEditor/TextEditingCommandDispatcher.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/TextEditingCommandDispatcher.cs
@@ -826,7 +826,6 @@ namespace OpenLiveWriter.PostEditor
ActiveSimpleTextEditor.Paste();
}
-
public override void Manage()
{
Enabled = ActiveSimpleTextEditor.CanPaste;
@@ -988,7 +987,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
internal class LetterCommand : OverridableCommand, CommandBarButtonLightweightControl.ICustomButtonBitmapPaint
{
private char _letter;
@@ -1160,7 +1158,6 @@ namespace OpenLiveWriter.PostEditor
}
}
-
private class StyleCommand : TextEditingCommand
{
IHtmlStylePicker _stylePicker;
@@ -1267,7 +1264,6 @@ namespace OpenLiveWriter.PostEditor
public override string ContextMenuText { get { return Command.MenuText; } }
}
-
private class NumbersCommand : LatchedTextEditingCommand
{
public override CommandId CommandId { get { return CommandId.Numbers; } }
diff --git a/src/managed/OpenLiveWriter.PostEditor/UpdateWeblogProgressForm.cs b/src/managed/OpenLiveWriter.PostEditor/UpdateWeblogProgressForm.cs
index ce494fb4..bcf21c89 100644
--- a/src/managed/OpenLiveWriter.PostEditor/UpdateWeblogProgressForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/UpdateWeblogProgressForm.cs
@@ -184,7 +184,6 @@ namespace OpenLiveWriter.PostEditor
Location = new Point(parentBounds.Left + ((parentBounds.Width - Width) / 2), parentBounds.Top + (int)(1.5 * Height));
}
-
private string FormatFormCaption(string entityName, bool publish)
{
return String.Format(CultureInfo.CurrentCulture, Res.Get(StringId.UpdateWeblogPublish1), publish ? entityName : Res.Get(StringId.UpdateWeblogDraft));
@@ -260,7 +259,6 @@ namespace OpenLiveWriter.PostEditor
progressAnimatedBitmap.Start();
}
-
private void checkBoxViewPost_CheckedChanged(object sender, EventArgs e)
{
PostEditorSettings.ViewPostAfterPublish = checkBoxViewPost.Checked;
@@ -287,7 +285,6 @@ namespace OpenLiveWriter.PostEditor
private Bitmap bottomBevelBitmap = ResourceHelper.LoadAssemblyResourceBitmap("Images.PublishAnimation.BottomBevel.png");
-
///
/// Clean up any resources being used.
///
diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/VideoBrowserForm.cs b/src/managed/OpenLiveWriter.PostEditor/Video/VideoBrowserForm.cs
index 62777178..436b7db4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Video/VideoBrowserForm.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Video/VideoBrowserForm.cs
@@ -16,265 +16,264 @@ using OpenLiveWriter.Localization;
namespace OpenLiveWriter.PostEditor.Video
{
- ///
- /// Summary description for VideoBrowserForm.
- ///
- public class VideoBrowserForm : ApplicationDialog
- {
- private IContainer components = null;
+ ///
+ /// Summary description for VideoBrowserForm.
+ ///
+ public class VideoBrowserForm : ApplicationDialog
+ {
+ private IContainer components = null;
- //top tab control
- private LightweightControlContainerControl mainTabControl;
- private TabLightweightControl tabs;
+ //top tab control
+ private LightweightControlContainerControl mainTabControl;
+ private TabLightweightControl tabs;
- //video source info for non local file images
- private ArrayList _videoSources;
- private VideoSource activeVideoSource = null;
+ //video source info for non local file images
+ private ArrayList _videoSources;
+ private VideoSource activeVideoSource = null;
- private Button btnInsert;
- private LinkLabel copyrightLinkLabel;
- private Button btnCancel;
+ private Button btnInsert;
+ private LinkLabel copyrightLinkLabel;
+ private Button btnCancel;
public VideoBrowserForm(ArrayList videoSources, string blogID, int selectedTab)
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- _videoSources = videoSources;
+ _videoSources = videoSources;
- //set strings
- btnInsert.Text = Res.Get(StringId.InsertButtonText);
- btnCancel.Text = Res.Get(StringId.CancelButton);
- Text = Res.Get(StringId.Plugin_Videos_Select_Video_Form);
+ //set strings
+ btnInsert.Text = Res.Get(StringId.InsertButtonText);
+ btnCancel.Text = Res.Get(StringId.CancelButton);
+ Text = Res.Get(StringId.Plugin_Videos_Select_Video_Form);
- if (!MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.VideoCopyright))
- {
- copyrightLinkLabel.Visible = false;
- }
- else
- {
- copyrightLinkLabel.Font = Res.GetFont(FontSize.Small, FontStyle.Regular);
- copyrightLinkLabel.Text = Res.Get(StringId.Plugin_Video_Copyright_Notice);
- string link = MarketizationOptions.GetFeatureParameter(MarketizationOptions.Feature.VideoCopyright, "Glink");
- if (link == null || link == String.Empty)
- copyrightLinkLabel.LinkArea = new LinkArea(0,0);
- else
- copyrightLinkLabel.LinkClicked += copyrightLinkLabel_LinkClicked;
- }
+ if (!MarketizationOptions.IsFeatureEnabled(MarketizationOptions.Feature.VideoCopyright))
+ {
+ copyrightLinkLabel.Visible = false;
+ }
+ else
+ {
+ copyrightLinkLabel.Font = Res.GetFont(FontSize.Small, FontStyle.Regular);
+ copyrightLinkLabel.Text = Res.Get(StringId.Plugin_Video_Copyright_Notice);
+ string link = MarketizationOptions.GetFeatureParameter(MarketizationOptions.Feature.VideoCopyright, "Glink");
+ if (link == null || link == String.Empty)
+ copyrightLinkLabel.LinkArea = new LinkArea(0,0);
+ else
+ copyrightLinkLabel.LinkClicked += copyrightLinkLabel_LinkClicked;
+ }
copyrightLinkLabel.LinkColor = SystemColors.HotTrack;
- //
- // tabs
- //
- tabs = new TabLightweightControl();
- tabs.VirtualBounds = new Rectangle(0, 5, 450, 485);
- tabs.LightweightControlContainerControl = mainTabControl;
- tabs.DrawSideAndBottomTabPageBorders = false;
+ //
+ // tabs
+ //
+ tabs = new TabLightweightControl();
+ tabs.VirtualBounds = new Rectangle(0, 5, 450, 485);
+ tabs.LightweightControlContainerControl = mainTabControl;
+ tabs.DrawSideAndBottomTabPageBorders = false;
tabs.ColorizeBorder = false;
- int i = 0;
- foreach (VideoSource videoSource in _videoSources)
- {
- videoSource.BlogId = blogID;
- videoSource.Init();
- videoSource.VideoSelected += new EventHandler(videoSource_VideoSelected);
- TabPageControl tab = (TabPageControl)videoSource;
- tab.TabStop = false;
- Controls.Add(tab);
- tabs.SetTab(i++, tab);
- }
+ int i = 0;
+ foreach (VideoSource videoSource in _videoSources)
+ {
+ videoSource.BlogId = blogID;
+ videoSource.Init();
+ videoSource.VideoSelected += new EventHandler(videoSource_VideoSelected);
+ TabPageControl tab = (TabPageControl)videoSource;
+ tab.TabStop = false;
+ Controls.Add(tab);
+ tabs.SetTab(i++, tab);
+ }
- // initial appearance of editor
+ // initial appearance of editor
SetActiveTab(selectedTab);
tabs.SelectedTabNumber = selectedTab;
- tabs.SelectedTabNumberChanged += new EventHandler(tabs_SelectedTabNumberChanged);
+ tabs.SelectedTabNumberChanged += new EventHandler(tabs_SelectedTabNumberChanged);
- if ( !DesignMode )
- Icon = ApplicationEnvironment.ProductIcon ;
+ if ( !DesignMode )
+ Icon = ApplicationEnvironment.ProductIcon ;
- tabs.VirtualLocation = new Point(0, 5);
- tabs.VirtualSize = Size;
+ tabs.VirtualLocation = new Point(0, 5);
+ tabs.VirtualSize = Size;
Width = 510;
Height = 570;
- }
+ }
- protected override void OnLayout(LayoutEventArgs levent)
- {
- base.OnLayout (levent);
+ protected override void OnLayout(LayoutEventArgs levent)
+ {
+ base.OnLayout (levent);
- if (tabs != null && mainTabControl != null)
- tabs.VirtualSize = new Size(mainTabControl.Width, mainTabControl.Height - 5);
- }
+ if (tabs != null && mainTabControl != null)
+ tabs.VirtualSize = new Size(mainTabControl.Width, mainTabControl.Height - 5);
+ }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad (e);
- LayoutHelper.FixupOKCancel(btnInsert, btnCancel);
- }
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad (e);
+ LayoutHelper.FixupOKCancel(btnInsert, btnCancel);
+ }
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ tabs.CheckForTabSwitch(keyData);
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
- protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
- {
- tabs.CheckForTabSwitch(keyData);
- return base.ProcessCmdKey(ref msg, keyData);
- }
-
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
foreach(VideoSource source in _videoSources)
{
source.Dispose();
}
- }
- base.Dispose( disposing );
- }
+ }
+ base.Dispose( disposing );
+ }
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.mainTabControl = new OpenLiveWriter.Controls.LightweightControlContainerControl();
- this.btnInsert = new System.Windows.Forms.Button();
- this.btnCancel = new System.Windows.Forms.Button();
- this.copyrightLinkLabel = new System.Windows.Forms.LinkLabel();
- ((System.ComponentModel.ISupportInitialize)(this.mainTabControl)).BeginInit();
- this.SuspendLayout();
- //
- // mainTabControl
- //
- this.mainTabControl.AllowDragDropAutoScroll = false;
- this.mainTabControl.AllPaintingInWmPaint = true;
- this.mainTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.mainTabControl.BackColor = System.Drawing.SystemColors.Control;
- this.mainTabControl.Location = new System.Drawing.Point(0, 0);
- this.mainTabControl.Name = "mainTabControl";
- this.mainTabControl.Size = new System.Drawing.Size(450, 485);
- this.mainTabControl.TabIndex = 14;
- //
- // btnInsert
- //
- this.btnInsert.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnInsert.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnInsert.Location = new System.Drawing.Point(288, 490);
- this.btnInsert.Name = "buttonInsert";
- this.btnInsert.TabIndex = 20;
- this.btnInsert.Text = "Insert";
- this.btnInsert.Click += new System.EventHandler(this.btnInsert_Click);
- //
- // btnCancel
- //
- this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnCancel.Location = new System.Drawing.Point(368, 490);
- this.btnCancel.Name = "buttonCancel";
- this.btnCancel.TabIndex = 21;
- this.btnCancel.Text = "Cancel";
- //
- // copyrightLinkLabel
- //
- this.copyrightLinkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.copyrightLinkLabel.AutoSize = true;
- this.copyrightLinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.copyrightLinkLabel.Location = new System.Drawing.Point(6, 496);
- this.copyrightLinkLabel.Name = "copyrightLinkLabel";
- this.copyrightLinkLabel.Size = new System.Drawing.Size(208, 18);
- this.copyrightLinkLabel.TabIndex = 19;
- this.copyrightLinkLabel.TabStop = true;
- this.copyrightLinkLabel.Text = "Please Respect Copyright";
- //
- // VideoBrowserForm
- //
- this.AcceptButton = this.btnInsert;
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.CancelButton = this.btnCancel;
- this.ClientSize = new System.Drawing.Size(450, 520);
- this.Controls.Add(this.copyrightLinkLabel);
- this.Controls.Add(this.btnCancel);
- this.Controls.Add(this.btnInsert);
- this.Controls.Add(this.mainTabControl);
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "VideoBrowserForm";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Insert Video";
- ((System.ComponentModel.ISupportInitialize)(this.mainTabControl)).EndInit();
- this.ResumeLayout(false);
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.mainTabControl = new OpenLiveWriter.Controls.LightweightControlContainerControl();
+ this.btnInsert = new System.Windows.Forms.Button();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.copyrightLinkLabel = new System.Windows.Forms.LinkLabel();
+ ((System.ComponentModel.ISupportInitialize)(this.mainTabControl)).BeginInit();
+ this.SuspendLayout();
+ //
+ // mainTabControl
+ //
+ this.mainTabControl.AllowDragDropAutoScroll = false;
+ this.mainTabControl.AllPaintingInWmPaint = true;
+ this.mainTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.mainTabControl.BackColor = System.Drawing.SystemColors.Control;
+ this.mainTabControl.Location = new System.Drawing.Point(0, 0);
+ this.mainTabControl.Name = "mainTabControl";
+ this.mainTabControl.Size = new System.Drawing.Size(450, 485);
+ this.mainTabControl.TabIndex = 14;
+ //
+ // btnInsert
+ //
+ this.btnInsert.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnInsert.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.btnInsert.Location = new System.Drawing.Point(288, 490);
+ this.btnInsert.Name = "buttonInsert";
+ this.btnInsert.TabIndex = 20;
+ this.btnInsert.Text = "Insert";
+ this.btnInsert.Click += new System.EventHandler(this.btnInsert_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.btnCancel.Location = new System.Drawing.Point(368, 490);
+ this.btnCancel.Name = "buttonCancel";
+ this.btnCancel.TabIndex = 21;
+ this.btnCancel.Text = "Cancel";
+ //
+ // copyrightLinkLabel
+ //
+ this.copyrightLinkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.copyrightLinkLabel.AutoSize = true;
+ this.copyrightLinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.copyrightLinkLabel.Location = new System.Drawing.Point(6, 496);
+ this.copyrightLinkLabel.Name = "copyrightLinkLabel";
+ this.copyrightLinkLabel.Size = new System.Drawing.Size(208, 18);
+ this.copyrightLinkLabel.TabIndex = 19;
+ this.copyrightLinkLabel.TabStop = true;
+ this.copyrightLinkLabel.Text = "Please Respect Copyright";
+ //
+ // VideoBrowserForm
+ //
+ this.AcceptButton = this.btnInsert;
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(450, 520);
+ this.Controls.Add(this.copyrightLinkLabel);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnInsert);
+ this.Controls.Add(this.mainTabControl);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "VideoBrowserForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Insert Video";
+ ((System.ComponentModel.ISupportInitialize)(this.mainTabControl)).EndInit();
+ this.ResumeLayout(false);
- }
- #endregion
+ }
+ #endregion
- private void SetActiveTab(int num)
- {
- activeVideoSource = (VideoSource)_videoSources[num];
- activeVideoSource.TabSelected();
- }
+ private void SetActiveTab(int num)
+ {
+ activeVideoSource = (VideoSource)_videoSources[num];
+ activeVideoSource.TabSelected();
+ }
- private void tabs_SelectedTabNumberChanged(object sender, EventArgs e)
- {
- int tabChosen = ((TabLightweightControl)sender).SelectedTabNumber;
- SetActiveTab(tabChosen);
- }
+ private void tabs_SelectedTabNumberChanged(object sender, EventArgs e)
+ {
+ int tabChosen = ((TabLightweightControl)sender).SelectedTabNumber;
+ SetActiveTab(tabChosen);
+ }
- private void btnInsert_Click(object sender, EventArgs e)
- {
- if (activeVideoSource.ValidateSelection())
- {
- DialogResult = DialogResult.OK;
- }
- }
+ private void btnInsert_Click(object sender, EventArgs e)
+ {
+ if (activeVideoSource.ValidateSelection())
+ {
+ DialogResult = DialogResult.OK;
+ }
+ }
- public Video SelectedVideo
- {
- get
- {
- return activeVideoSource.GetVideoForInsert();
- }
- }
+ public Video SelectedVideo
+ {
+ get
+ {
+ return activeVideoSource.GetVideoForInsert();
+ }
+ }
- private void videoSource_VideoSelected(object sender, EventArgs e)
- {
- if (activeVideoSource.ValidateSelection())
- {
- DialogResult = DialogResult.OK;
- }
- }
+ private void videoSource_VideoSelected(object sender, EventArgs e)
+ {
+ if (activeVideoSource.ValidateSelection())
+ {
+ DialogResult = DialogResult.OK;
+ }
+ }
- private void copyrightLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
- {
- string link = MarketizationOptions.GetFeatureParameter(MarketizationOptions.Feature.VideoCopyright, "Glink");
- if (link != null && link != String.Empty)
- {
- try
- {
- ShellHelper.LaunchUrl( link );
- }
- catch( Exception ex )
- {
- Trace.Fail( "Unexpected exception navigating to copyright page: " + link + ", " + ex.ToString() ) ;
- }
- }
- }
- }
+ private void copyrightLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ string link = MarketizationOptions.GetFeatureParameter(MarketizationOptions.Feature.VideoCopyright, "Glink");
+ if (link != null && link != String.Empty)
+ {
+ try
+ {
+ ShellHelper.LaunchUrl( link );
+ }
+ catch( Exception ex )
+ {
+ Trace.Fail( "Unexpected exception navigating to copyright page: " + link + ", " + ex.ToString() ) ;
+ }
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/VideoContentSource.cs b/src/managed/OpenLiveWriter.PostEditor/Video/VideoContentSource.cs
index 5b6fe852..9ec5d6c4 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Video/VideoContentSource.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Video/VideoContentSource.cs
@@ -262,7 +262,6 @@ namespace OpenLiveWriter.PostEditor.Video
}
}
-
#region IContentUpdateFilter Members
public bool ShouldUpdateContent(string oldHTML, string newHTML)
diff --git a/src/managed/OpenLiveWriter.PostEditor/Video/VideoHelper.cs b/src/managed/OpenLiveWriter.PostEditor/Video/VideoHelper.cs
index e7b4de4f..feb4dd41 100644
--- a/src/managed/OpenLiveWriter.PostEditor/Video/VideoHelper.cs
+++ b/src/managed/OpenLiveWriter.PostEditor/Video/VideoHelper.cs
@@ -12,35 +12,35 @@ using OpenLiveWriter.Localization;
namespace OpenLiveWriter.PostEditor.Video
{
- ///
- /// Summary description for VideoHelper.
- ///
- public class VideoHelper :IDisposable
- {
+ ///
+ /// Summary description for VideoHelper.
+ ///
+ public class VideoHelper :IDisposable
+ {
public const int DEFAULT_TIMEOUT_MS = 15000;
- public const string WIDTH = "{width}";
- public const string HEIGHT = "{height}";
- private Bitmap testBitmap = null;
- private Color testColor;
- private double testPct;
- private RectTest rectTest;
+ public const string WIDTH = "{width}";
+ public const string HEIGHT = "{height}";
+ private Bitmap testBitmap = null;
+ private Color testColor;
+ private double testPct;
+ private RectTest rectTest;
- public static string GenerateEmbedHtml(string embedFormat, Size size)
- {
- string pattern = embedFormat.Replace(WIDTH, "{0}").Replace(HEIGHT, "{1}");
- return String.Format(pattern, size.Width, size.Height);
- }
+ public static string GenerateEmbedHtml(string embedFormat, Size size)
+ {
+ string pattern = embedFormat.Replace(WIDTH, "{0}").Replace(HEIGHT, "{1}");
+ return String.Format(pattern, size.Width, size.Height);
+ }
- public Bitmap GetVideoSnapshot(VideoProvider provider, string embedHtml, Size videoSize)
- {
- try
- {
- string videoHtml = GenerateEmbedHtml(embedHtml, videoSize);
- if (provider != null && provider.UseBackgroundColor != String.Empty)
- {
- videoHtml = String.Format(CultureInfo.InvariantCulture, " {1} ", provider.UseBackgroundColor, videoHtml);
- }
- HtmlScreenCapture htmlScreenCapture = new HtmlScreenCapture(videoHtml, videoSize.Width);
+ public Bitmap GetVideoSnapshot(VideoProvider provider, string embedHtml, Size videoSize)
+ {
+ try
+ {
+ string videoHtml = GenerateEmbedHtml(embedHtml, videoSize);
+ if (provider != null && provider.UseBackgroundColor != String.Empty)
+ {
+ videoHtml = String.Format(CultureInfo.InvariantCulture, "{1} ", provider.UseBackgroundColor, videoHtml);
+ }
+ HtmlScreenCapture htmlScreenCapture = new HtmlScreenCapture(videoHtml, videoSize.Width);
if (provider != null && provider.RectangleTest != null)
{
@@ -48,31 +48,31 @@ namespace OpenLiveWriter.PostEditor.Video
htmlScreenCapture.HtmlScreenCaptureAvailable += new HtmlScreenCaptureAvailableHandler(htmlScreenCapture_HtmlScreenCaptureAvailable_RectangleTest);
}
else if (provider != null && provider.SnapshotLoadedOrigColor != Color.Empty)
- {
- testColor = provider.SnapshotLoadedOrigColor;
- testPct = provider.SnapshotLoadedColorPct;
- htmlScreenCapture.HtmlScreenCaptureAvailable +=new HtmlScreenCaptureAvailableHandler(htmlScreenCapture_HtmlScreenCaptureAvailable_ColorTest);
- }
- else
- {
- testBitmap = null;
- htmlScreenCapture.HtmlScreenCaptureAvailable +=new HtmlScreenCaptureAvailableHandler(htmlScreenCapture_HtmlScreenCaptureAvailable_ChangeTest);
- }
+ {
+ testColor = provider.SnapshotLoadedOrigColor;
+ testPct = provider.SnapshotLoadedColorPct;
+ htmlScreenCapture.HtmlScreenCaptureAvailable +=new HtmlScreenCaptureAvailableHandler(htmlScreenCapture_HtmlScreenCaptureAvailable_ColorTest);
+ }
+ else
+ {
+ testBitmap = null;
+ htmlScreenCapture.HtmlScreenCaptureAvailable +=new HtmlScreenCaptureAvailableHandler(htmlScreenCapture_HtmlScreenCaptureAvailable_ChangeTest);
+ }
- htmlScreenCapture.MaximumHeight = videoSize.Height;
- //we set our own limit to ensure a snapshot is always getting returned
+ htmlScreenCapture.MaximumHeight = videoSize.Height;
+ //we set our own limit to ensure a snapshot is always getting returned
SetTimeout(DEFAULT_TIMEOUT_MS);
Bitmap videoSnapshot = htmlScreenCapture.CaptureHtml(2 * DEFAULT_TIMEOUT_MS);
- // return the video
- return videoSnapshot ;
- }
- catch(Exception ex)
- {
+ // return the video
+ return videoSnapshot ;
+ }
+ catch(Exception ex)
+ {
Trace.WriteLine(ex.ToString());
- throw new VideoPluginException(Res.Get(StringId.Plugin_Video_Snapshot_Error_Title), String.Format(Res.Get(StringId.Plugin_Video_Snapshot_Error_Message), ex.Message)) ;
- }
- }
+ throw new VideoPluginException(Res.Get(StringId.Plugin_Video_Snapshot_Error_Title), String.Format(Res.Get(StringId.Plugin_Video_Snapshot_Error_Message), ex.Message)) ;
+ }
+ }
void htmlScreenCapture_HtmlScreenCaptureAvailable_RectangleTest(object sender, HtmlScreenCaptureAvailableEventArgs e)
{
@@ -96,79 +96,79 @@ namespace OpenLiveWriter.PostEditor.Video
e.CaptureCompleted = nonMatchingPixelCount == 0 || TimedOut;
}
- private DateTime _timeoutTime ;
- private void SetTimeout(int ms)
- {
- _timeoutTime = DateTime.Now.AddMilliseconds(ms) ;
- }
+ private DateTime _timeoutTime ;
+ private void SetTimeout(int ms)
+ {
+ _timeoutTime = DateTime.Now.AddMilliseconds(ms) ;
+ }
- private bool TimedOut
- {
- get
- {
- return DateTime.Now > _timeoutTime;
- }
- }
+ private bool TimedOut
+ {
+ get
+ {
+ return DateTime.Now > _timeoutTime;
+ }
+ }
- private void htmlScreenCapture_HtmlScreenCaptureAvailable_ColorTest(object sender, HtmlScreenCaptureAvailableEventArgs e)
- {
- const int PLAYER_CONTROL_OFFSET = 30;
- // get the bitmap
- Bitmap bitmap = e.Bitmap ;
+ private void htmlScreenCapture_HtmlScreenCaptureAvailable_ColorTest(object sender, HtmlScreenCaptureAvailableEventArgs e)
+ {
+ const int PLAYER_CONTROL_OFFSET = 30;
+ // get the bitmap
+ Bitmap bitmap = e.Bitmap ;
- int pixelCount = 0;
- for (int x=0; x
- /// Summary description for CommandImageDecoratorApply.
- ///
- public class CommandAddToDictionary : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandImageDecoratorApply.
+ ///
+ public class CommandAddToDictionary : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandAddToDictionary(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandAddToDictionary(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandAddToDictionary()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandAddToDictionary()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandAddToDictionary
+ //
+ this.CommandBarButtonText = "";
+ this.Identifier = "OpenLiveWriter.SpellChecker.CommandAddToDictionary";
+ this.MenuText = "&Add to Dictionary";
+ this.Text = "Add this word to the local dictionary";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandAddToDictionary
- //
- this.CommandBarButtonText = "";
- this.Identifier = "OpenLiveWriter.SpellChecker.CommandAddToDictionary";
- this.MenuText = "&Add to Dictionary";
- this.Text = "Add this word to the local dictionary";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandFixWordSpelling.cs b/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandFixWordSpelling.cs
index 290e9a5b..fdaca31c 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandFixWordSpelling.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandFixWordSpelling.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Summary description for CommandImageDecoratorApply.
- ///
- public class CommandFixWordSpelling : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandImageDecoratorApply.
+ ///
+ public class CommandFixWordSpelling : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandFixWordSpelling(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandFixWordSpelling(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandFixWordSpelling()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandFixWordSpelling()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandFixWordSpelling
+ //
+ this.CommandBarButtonText = "";
+ this.Identifier = "OpenLiveWriter.SpellChecker.CommandFixWordSpelling";
+ this.MenuText = "";
+ this.Text = "Change to this";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandFixWordSpelling
- //
- this.CommandBarButtonText = "";
- this.Identifier = "OpenLiveWriter.SpellChecker.CommandFixWordSpelling";
- this.MenuText = "";
- this.Text = "Change to this";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandIgnoreAll.cs b/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandIgnoreAll.cs
index 47dd5b2c..44472200 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandIgnoreAll.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandIgnoreAll.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Summary description for CommandImageDecoratorApply.
- ///
- public class CommandIgnoreAll : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandImageDecoratorApply.
+ ///
+ public class CommandIgnoreAll : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandIgnoreAll(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandIgnoreAll(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandIgnoreAll()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandIgnoreAll()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandIgnoreAll
+ //
+ this.CommandBarButtonText = "";
+ this.Identifier = "OpenLiveWriter.SpellChecker.CommandIgnoreAll";
+ this.MenuText = "&Ignore All";
+ this.Text = "Ignore all instances of this word";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandIgnoreAll
- //
- this.CommandBarButtonText = "";
- this.Identifier = "OpenLiveWriter.SpellChecker.CommandIgnoreAll";
- this.MenuText = "&Ignore All";
- this.Text = "Ignore all instances of this word";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandOpenSpellingForm.cs b/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandOpenSpellingForm.cs
index 6877d368..cf76a964 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandOpenSpellingForm.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/Commands/CommandOpenSpellingForm.cs
@@ -6,58 +6,57 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Summary description for CommandImageDecoratorApply.
- ///
- public class CommandOpenSpellingForm : Command
- {
- ///
- /// Required designer variable.
- ///
- private Container components = null;
+ ///
+ /// Summary description for CommandImageDecoratorApply.
+ ///
+ public class CommandOpenSpellingForm : Command
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private Container components = null;
- public CommandOpenSpellingForm(IContainer container)
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenSpellingForm(IContainer container)
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
- public CommandOpenSpellingForm()
- {
- ///
- /// Required for Windows.Forms Class Composition Designer support
- ///
- InitializeComponent();
+ public CommandOpenSpellingForm()
+ {
+ ///
+ /// Required for Windows.Forms Class Composition Designer support
+ ///
+ InitializeComponent();
- //
- //
- //
- }
+ //
+ //
+ //
+ }
+ #region Component Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ //
+ // CommandOpenSpellingForm
+ //
+ this.CommandBarButtonText = "";
+ this.Identifier = "OpenLiveWriter.SpellChecker.CommandOpenSpellingForm";
+ this.MenuText = "&Open Spelling Dialog";
+ this.Text = "Open the spelling dialog";
- #region Component Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- //
- // CommandOpenSpellingForm
- //
- this.CommandBarButtonText = "";
- this.Identifier = "OpenLiveWriter.SpellChecker.CommandOpenSpellingForm";
- this.MenuText = "&Open Spelling Dialog";
- this.Text = "Open the spelling dialog";
-
- }
- #endregion
- }
+ }
+ #endregion
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/HighlightSegmentTracker.cs b/src/managed/OpenLiveWriter.SpellChecker/HighlightSegmentTracker.cs
index addb308f..845e5b5a 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/HighlightSegmentTracker.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/HighlightSegmentTracker.cs
@@ -11,201 +11,201 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.SpellChecker
{
- //used to store the highlight segments in a post for tracking spelling changes
- public class HighlightSegmentTracker
- {
- SortedList list;
+ //used to store the highlight segments in a post for tracking spelling changes
+ public class HighlightSegmentTracker
+ {
+ SortedList list;
- private class SegmentDef
- {
- public IHighlightSegmentRaw segment;
- public IMarkupPointerRaw endPtr;
- public IMarkupPointerRaw startPtr;
- public string word;
- public SegmentDef(IHighlightSegmentRaw seg, IMarkupPointerRaw start, IMarkupPointerRaw end, string wd)
- {
- segment = seg;
- startPtr = start;
- endPtr = end;
- word = wd;
- }
+ private class SegmentDef
+ {
+ public IHighlightSegmentRaw segment;
+ public IMarkupPointerRaw endPtr;
+ public IMarkupPointerRaw startPtr;
+ public string word;
+ public SegmentDef(IHighlightSegmentRaw seg, IMarkupPointerRaw start, IMarkupPointerRaw end, string wd)
+ {
+ segment = seg;
+ startPtr = start;
+ endPtr = end;
+ word = wd;
+ }
- }
+ }
- public class MatchingSegment
- {
- public IHighlightSegmentRaw _segment;
- public IMarkupPointerRaw _pointer;
- public MatchingSegment(IHighlightSegmentRaw seg, IMarkupPointerRaw pointer)
- {
- _segment = seg;
- _pointer = pointer;
- }
- }
+ public class MatchingSegment
+ {
+ public IHighlightSegmentRaw _segment;
+ public IMarkupPointerRaw _pointer;
+ public MatchingSegment(IHighlightSegmentRaw seg, IMarkupPointerRaw pointer)
+ {
+ _segment = seg;
+ _pointer = pointer;
+ }
+ }
- //this needs to be on a post by post basis
- public HighlightSegmentTracker()
- {
- list = new SortedList(new MarkupPointerComparer());
- }
+ //this needs to be on a post by post basis
+ public HighlightSegmentTracker()
+ {
+ list = new SortedList(new MarkupPointerComparer());
+ }
- //adds a segment to the list
- //used when a misspelled word is found
- public void AddSegment(IHighlightSegmentRaw segment, string wordHere, IMarkupServicesRaw markupServices)
- {
- IMarkupPointerRaw start, end;
- markupServices.CreateMarkupPointer(out start);
- markupServices.CreateMarkupPointer(out end);
- segment.GetPointers(start, end);
- if (!list.ContainsKey(start))
- list.Add(start, new SegmentDef(segment, start, end, wordHere));
- }
+ //adds a segment to the list
+ //used when a misspelled word is found
+ public void AddSegment(IHighlightSegmentRaw segment, string wordHere, IMarkupServicesRaw markupServices)
+ {
+ IMarkupPointerRaw start, end;
+ markupServices.CreateMarkupPointer(out start);
+ markupServices.CreateMarkupPointer(out end);
+ segment.GetPointers(start, end);
+ if (!list.ContainsKey(start))
+ list.Add(start, new SegmentDef(segment, start, end, wordHere));
+ }
- //find all the segments in a specific range
- //used to clear out a section when it is getting rechecked
- //need to expand selection from these bounds out around full words
- public IHighlightSegmentRaw[] GetSegments(IMarkupPointerRaw start, IMarkupPointerRaw end)
- {
- if (list.Count == 0)
- return null;
- int firstSegmentInd = -1;
- int lastSegmentInd = list.Count;
- bool test;
- //find the first segment after the start pointer
- do
- {
- firstSegmentInd++;
- //check if we have gone through the whole selection
- if (firstSegmentInd >= lastSegmentInd)
- return null;
- SegmentDef x = (SegmentDef) list.GetByIndex(firstSegmentInd);
- start.IsRightOf(x.startPtr, out test);
- } while (test);
- do
- {
- lastSegmentInd--;
- //check if we have gone through the whole selection
- if (lastSegmentInd < firstSegmentInd)
- return null;
- SegmentDef x = (SegmentDef) list.GetByIndex(lastSegmentInd);
- end.IsLeftOf(x.startPtr, out test);
- } while (test);
- return Subarray(firstSegmentInd, lastSegmentInd);
- }
+ //find all the segments in a specific range
+ //used to clear out a section when it is getting rechecked
+ //need to expand selection from these bounds out around full words
+ public IHighlightSegmentRaw[] GetSegments(IMarkupPointerRaw start, IMarkupPointerRaw end)
+ {
+ if (list.Count == 0)
+ return null;
+ int firstSegmentInd = -1;
+ int lastSegmentInd = list.Count;
+ bool test;
+ //find the first segment after the start pointer
+ do
+ {
+ firstSegmentInd++;
+ //check if we have gone through the whole selection
+ if (firstSegmentInd >= lastSegmentInd)
+ return null;
+ SegmentDef x = (SegmentDef) list.GetByIndex(firstSegmentInd);
+ start.IsRightOf(x.startPtr, out test);
+ } while (test);
+ do
+ {
+ lastSegmentInd--;
+ //check if we have gone through the whole selection
+ if (lastSegmentInd < firstSegmentInd)
+ return null;
+ SegmentDef x = (SegmentDef) list.GetByIndex(lastSegmentInd);
+ end.IsLeftOf(x.startPtr, out test);
+ } while (test);
+ return Subarray(firstSegmentInd, lastSegmentInd);
+ }
- public IHighlightSegmentRaw[] ClearAllSegments()
- {
- return Subarray(0, list.Count - 1);
- }
+ public IHighlightSegmentRaw[] ClearAllSegments()
+ {
+ return Subarray(0, list.Count - 1);
+ }
- public delegate bool CheckWordSpelling(string word);
+ public delegate bool CheckWordSpelling(string word);
- //find all the segments with a specific misspelled word
- //used to clear for ignore all, add to dictionary
- public MatchingSegment[] GetSegments(string word, CheckWordSpelling checkSpelling)
- {
- ArrayList segments = new ArrayList();
- for (int i = 0; i < list.Count; i++)
- {
- SegmentDef x = (SegmentDef) list.GetByIndex(i);
- //TODO: Change with new cultures added!!!
- if (0 == String.Compare(word, x.word, true, CultureInfo.InvariantCulture))
- {
- //check spelling--capitalized word may be ok, but not mixed case, etc.
- if (!checkSpelling(x.word))
- {
- segments.Add(new MatchingSegment(x.segment, x.startPtr));
- }
- }
- }
- return (MatchingSegment[])segments.ToArray(typeof (MatchingSegment));
- }
+ //find all the segments with a specific misspelled word
+ //used to clear for ignore all, add to dictionary
+ public MatchingSegment[] GetSegments(string word, CheckWordSpelling checkSpelling)
+ {
+ ArrayList segments = new ArrayList();
+ for (int i = 0; i < list.Count; i++)
+ {
+ SegmentDef x = (SegmentDef) list.GetByIndex(i);
+ //TODO: Change with new cultures added!!!
+ if (0 == String.Compare(word, x.word, true, CultureInfo.InvariantCulture))
+ {
+ //check spelling--capitalized word may be ok, but not mixed case, etc.
+ if (!checkSpelling(x.word))
+ {
+ segments.Add(new MatchingSegment(x.segment, x.startPtr));
+ }
+ }
+ }
+ return (MatchingSegment[])segments.ToArray(typeof (MatchingSegment));
+ }
- public void RemoveSegment(IMarkupPointerRaw pointer)
- {
- list.Remove(pointer);
- }
+ public void RemoveSegment(IMarkupPointerRaw pointer)
+ {
+ list.Remove(pointer);
+ }
- public MisspelledWordInfo FindSegment(MshtmlMarkupServices markupServices, IMarkupPointerRaw current)
- {
- //binary search
- int start = 0;
- int end = list.Count - 1;
- int i = Middle(start, end);
- while (-1 != i)
- {
- SegmentDef x = (SegmentDef)list.GetByIndex(i);
- bool startTest;
- current.IsRightOfOrEqualTo(x.startPtr, out startTest);
- if (startTest)
- {
- bool endTest;
- current.IsLeftOfOrEqualTo(x.endPtr, out endTest);
- if (endTest)
- {
- MarkupPointer pStart = markupServices.CreateMarkupPointer(x.startPtr);
- MarkupPointer pEnd = markupServices.CreateMarkupPointer(x.endPtr);
- MarkupRange range = markupServices.CreateMarkupRange(pStart, pEnd);
- //this could be a "phantom" range...no more content due to uncommitted damage or other reasons
- //if it is phantom, remove it from the tracker and return null
- if (range.Text == null)
- {
- list.RemoveAt(i);
- return null;
- }
- return new MisspelledWordInfo(range, x.word);
- }
- start = i + 1;
- }
- else
- {
- end = i - 1;
- }
- i = Middle(start, end);
- }
- return null;
- }
+ public MisspelledWordInfo FindSegment(MshtmlMarkupServices markupServices, IMarkupPointerRaw current)
+ {
+ //binary search
+ int start = 0;
+ int end = list.Count - 1;
+ int i = Middle(start, end);
+ while (-1 != i)
+ {
+ SegmentDef x = (SegmentDef)list.GetByIndex(i);
+ bool startTest;
+ current.IsRightOfOrEqualTo(x.startPtr, out startTest);
+ if (startTest)
+ {
+ bool endTest;
+ current.IsLeftOfOrEqualTo(x.endPtr, out endTest);
+ if (endTest)
+ {
+ MarkupPointer pStart = markupServices.CreateMarkupPointer(x.startPtr);
+ MarkupPointer pEnd = markupServices.CreateMarkupPointer(x.endPtr);
+ MarkupRange range = markupServices.CreateMarkupRange(pStart, pEnd);
+ //this could be a "phantom" range...no more content due to uncommitted damage or other reasons
+ //if it is phantom, remove it from the tracker and return null
+ if (range.Text == null)
+ {
+ list.RemoveAt(i);
+ return null;
+ }
+ return new MisspelledWordInfo(range, x.word);
+ }
+ start = i + 1;
+ }
+ else
+ {
+ end = i - 1;
+ }
+ i = Middle(start, end);
+ }
+ return null;
+ }
- private int Middle(int start, int end)
- {
- if (start <= end)
- {
- return (int)Math.Floor(Convert.ToDouble((start + end)/2));
- }
- return -1;
- }
+ private int Middle(int start, int end)
+ {
+ if (start <= end)
+ {
+ return (int)Math.Floor(Convert.ToDouble((start + end)/2));
+ }
+ return -1;
+ }
- private IHighlightSegmentRaw[] Subarray(int start, int end)
- {
- int count = end - start + 1;
- IHighlightSegmentRaw[] segments = new IHighlightSegmentRaw[count];
- //fill in array by removing from the list starting at the end, so that
- // deleting from the list doesn't change the other indices
- for (int i = end; i >= start; i--)
- {
- segments[--count] = ((SegmentDef) list.GetByIndex(i)).segment;
- list.RemoveAt(i);
- }
- return segments;
- }
+ private IHighlightSegmentRaw[] Subarray(int start, int end)
+ {
+ int count = end - start + 1;
+ IHighlightSegmentRaw[] segments = new IHighlightSegmentRaw[count];
+ //fill in array by removing from the list starting at the end, so that
+ // deleting from the list doesn't change the other indices
+ for (int i = end; i >= start; i--)
+ {
+ segments[--count] = ((SegmentDef) list.GetByIndex(i)).segment;
+ list.RemoveAt(i);
+ }
+ return segments;
+ }
- public void Clear()
- {
- list.Clear();
- }
- }
+ public void Clear()
+ {
+ list.Clear();
+ }
+ }
- internal class MarkupPointerComparer : IComparer, System.Collections.Generic.IComparer
- {
- public int Compare(object x, object y)
- {
- IMarkupPointerRaw a = (IMarkupPointerRaw) x;
- IMarkupPointerRaw b = (IMarkupPointerRaw) y;
- return Compare(a, b);
- }
+ internal class MarkupPointerComparer : IComparer, System.Collections.Generic.IComparer
+ {
+ public int Compare(object x, object y)
+ {
+ IMarkupPointerRaw a = (IMarkupPointerRaw) x;
+ IMarkupPointerRaw b = (IMarkupPointerRaw) y;
+ return Compare(a, b);
+ }
- public int Compare(IMarkupPointerRaw a, IMarkupPointerRaw b)
- {
+ public int Compare(IMarkupPointerRaw a, IMarkupPointerRaw b)
+ {
bool test;
a.IsEqualTo(b, out test);
if (test) return 0;
@@ -213,5 +213,5 @@ namespace OpenLiveWriter.SpellChecker
if (test) return -1;
return 1;
}
- }
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/HtmlTextBoxWordRange.cs b/src/managed/OpenLiveWriter.SpellChecker/HtmlTextBoxWordRange.cs
index 10e8dc63..8789c1f0 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/HtmlTextBoxWordRange.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/HtmlTextBoxWordRange.cs
@@ -10,290 +10,290 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Some test cases:
- ///
- /// [empty string]
- /// all correct words
- /// mzispalled wordz
- /// "Punctuaation."
- /// Apostraphe's
- /// 'Apostraphe's'
- /// numb3rs
- /// 1312
- /// Good
- ///
- /// Limitations:
- /// Doesn't handle mid-word markup (e.g. test)
- /// Doesn't correct ALT attributes
- /// Doesn't know to ignore http:// and e-mail addresses
- ///
- public class HtmlTextBoxWordRange : IWordRange
- {
- private readonly TextBox _textBox;
- private readonly WordSource _src;
- private readonly int _startAt;
- private readonly int _endAt;
+ ///
+ /// Some test cases:
+ ///
+ /// [empty string]
+ /// all correct words
+ /// mzispalled wordz
+ /// "Punctuaation."
+ /// Apostraphe's
+ /// 'Apostraphe's'
+ /// numb3rs
+ /// 1312
+ /// Good
+ ///
+ /// Limitations:
+ /// Doesn't handle mid-word markup (e.g. test)
+ /// Doesn't correct ALT attributes
+ /// Doesn't know to ignore http:// and e-mail addresses
+ ///
+ public class HtmlTextBoxWordRange : IWordRange
+ {
+ private readonly TextBox _textBox;
+ private readonly WordSource _src;
+ private readonly int _startAt;
+ private readonly int _endAt;
- private int _drift = 0;
- private TextWithOffsetAndLen _currentWord = null;
- private TextWithOffsetAndLen _nextWord;
+ private int _drift = 0;
+ private TextWithOffsetAndLen _currentWord = null;
+ private TextWithOffsetAndLen _nextWord;
- public HtmlTextBoxWordRange(TextBox textBox)
- {
- _textBox = textBox;
- _src = new WordSource(new HtmlTextSource(new SimpleHtmlParser(_textBox.Text)));
+ public HtmlTextBoxWordRange(TextBox textBox)
+ {
+ _textBox = textBox;
+ _src = new WordSource(new HtmlTextSource(new SimpleHtmlParser(_textBox.Text)));
- if (_textBox.SelectionLength > 0)
- {
- _startAt = _textBox.SelectionStart;
- _endAt = _startAt + _textBox.SelectionLength;
- }
- else
- {
- _startAt = 0;
- _endAt = _textBox.TextLength;
- }
+ if (_textBox.SelectionLength > 0)
+ {
+ _startAt = _textBox.SelectionStart;
+ _endAt = _startAt + _textBox.SelectionLength;
+ }
+ else
+ {
+ _startAt = 0;
+ _endAt = _textBox.TextLength;
+ }
- AdvanceToStart();
- }
+ AdvanceToStart();
+ }
- private void AdvanceToStart()
- {
- while (null != (_nextWord = _src.Next()) // not at EOD
- && (_nextWord.Offset + _nextWord.Len <= _startAt)) // word is entirely before startAt
- {
- }
+ private void AdvanceToStart()
+ {
+ while (null != (_nextWord = _src.Next()) // not at EOD
+ && (_nextWord.Offset + _nextWord.Len <= _startAt)) // word is entirely before startAt
+ {
+ }
- CheckForNextWordPastEnd();
- }
+ CheckForNextWordPastEnd();
+ }
- private void CheckForNextWordPastEnd()
- {
- if (_nextWord != null && _nextWord.Offset >= _endAt)
- _nextWord = null;
- }
+ private void CheckForNextWordPastEnd()
+ {
+ if (_nextWord != null && _nextWord.Offset >= _endAt)
+ _nextWord = null;
+ }
- public bool HasNext()
- {
- return _nextWord != null;
- }
+ public bool HasNext()
+ {
+ return _nextWord != null;
+ }
- public void Next()
- {
- _currentWord = _nextWord;
- _nextWord = _src.Next();
- CheckForNextWordPastEnd();
- }
+ public void Next()
+ {
+ _currentWord = _nextWord;
+ _nextWord = _src.Next();
+ CheckForNextWordPastEnd();
+ }
- public string CurrentWord
- {
- get
- {
- return _currentWord.Text;
- }
- }
+ public string CurrentWord
+ {
+ get
+ {
+ return _currentWord.Text;
+ }
+ }
- public void PlaceCursor()
- {
- _textBox.Select(_currentWord.Offset - _drift + _currentWord.Len, 0);
- }
+ public void PlaceCursor()
+ {
+ _textBox.Select(_currentWord.Offset - _drift + _currentWord.Len, 0);
+ }
- public void Highlight(int offset, int length)
- {
- _textBox.Select(_currentWord.Offset - _drift + offset, length);
- }
+ public void Highlight(int offset, int length)
+ {
+ _textBox.Select(_currentWord.Offset - _drift + offset, length);
+ }
- public void RemoveHighlight()
- {
- _textBox.Select(_textBox.SelectionStart, 0);
- }
+ public void RemoveHighlight()
+ {
+ _textBox.Select(_textBox.SelectionStart, 0);
+ }
- public void Replace(int offset, int length, string newText)
- {
- newText = HtmlUtils.EscapeEntities(newText);
+ public void Replace(int offset, int length, string newText)
+ {
+ newText = HtmlUtils.EscapeEntities(newText);
Highlight(offset, length);
- _textBox.SelectedText = newText;
- _drift += _currentWord.Len - newText.Length;
- }
+ _textBox.SelectedText = newText;
+ _drift += _currentWord.Len - newText.Length;
+ }
- public bool IsCurrentWordUrlPart()
- {
- return false;
- }
+ public bool IsCurrentWordUrlPart()
+ {
+ return false;
+ }
- public bool FilterApplies()
- {
- return false;
- }
- public bool FilterAppliesRanged(int offset, int length)
- {
- return false;
- }
+ public bool FilterApplies()
+ {
+ return false;
+ }
+ public bool FilterAppliesRanged(int offset, int length)
+ {
+ return false;
+ }
- private class TextWithOffsetAndLen
- {
- public readonly string Text;
- public readonly int Offset;
- public readonly int Len;
+ private class TextWithOffsetAndLen
+ {
+ public readonly string Text;
+ public readonly int Offset;
+ public readonly int Len;
- public TextWithOffsetAndLen(string text, int offset, int len)
- {
- this.Text = text;
- this.Offset = offset;
- this.Len = len;
- }
- }
+ public TextWithOffsetAndLen(string text, int offset, int len)
+ {
+ this.Text = text;
+ this.Offset = offset;
+ this.Len = len;
+ }
+ }
- private class WordSource
- {
- [Flags]
- private enum CharClass
- {
- Break = 1,
- BoundaryBreak = 2, // only counts as break if at start or end of word
- LetterOrNumber = 4,
- Letter = LetterOrNumber | 8,
- Number = LetterOrNumber | 0x10,
+ private class WordSource
+ {
+ [Flags]
+ private enum CharClass
+ {
+ Break = 1,
+ BoundaryBreak = 2, // only counts as break if at start or end of word
+ LetterOrNumber = 4,
+ Letter = LetterOrNumber | 8,
+ Number = LetterOrNumber | 0x10,
IncludedBreakChar = 0x20 // counts as a break, but is also included in the word
- }
+ }
- private HtmlTextSource _src;
+ private HtmlTextSource _src;
- private TextWithOffsetAndLen _curr;
- private int _offset = 0;
+ private TextWithOffsetAndLen _curr;
+ private int _offset = 0;
- public WordSource(HtmlTextSource src)
- {
- this._src = src;
- this._curr = src.Next();
- }
+ public WordSource(HtmlTextSource src)
+ {
+ this._src = src;
+ this._curr = src.Next();
+ }
- public TextWithOffsetAndLen Next()
- {
- while (true)
- {
- // No chunks left.
- if (_curr == null)
- return null;
+ public TextWithOffsetAndLen Next()
+ {
+ while (true)
+ {
+ // No chunks left.
+ if (_curr == null)
+ return null;
- // Advance until we get to the next potential start of word.
- // Note that this may not turn out to be an actual word, e.g.
- // if it is all numbers.
- AdvanceUntilWordStart();
+ // Advance until we get to the next potential start of word.
+ // Note that this may not turn out to be an actual word, e.g.
+ // if it is all numbers.
+ AdvanceUntilWordStart();
- if (EOS()) // Reached end of this chunk
- {
- _offset = 0;
- _curr = _src.Next();
- continue; // Try again with new chunk (or null, in which case we exit)
- }
+ if (EOS()) // Reached end of this chunk
+ {
+ _offset = 0;
+ _curr = _src.Next();
+ continue; // Try again with new chunk (or null, in which case we exit)
+ }
- // Move to the end of the word. Note that BoundaryWordBreak
- // characters may not end the word. For example, for the
- // string "'that's'" (including single quotes), the word is
- // "that's" (note outer single quotes dropped).
- int start = _offset;
- int endOfWord = _offset;
- do
- {
- int charsToConsume;
- CharClass charClass = ClassifyChar(_curr.Text, _offset, out charsToConsume);
- if (Test(charClass, CharClass.Break))
- break;
- _offset += charsToConsume;
+ // Move to the end of the word. Note that BoundaryWordBreak
+ // characters may not end the word. For example, for the
+ // string "'that's'" (including single quotes), the word is
+ // "that's" (note outer single quotes dropped).
+ int start = _offset;
+ int endOfWord = _offset;
+ do
+ {
+ int charsToConsume;
+ CharClass charClass = ClassifyChar(_curr.Text, _offset, out charsToConsume);
+ if (Test(charClass, CharClass.Break))
+ break;
+ _offset += charsToConsume;
if (Test(charClass, CharClass.IncludedBreakChar))
{
endOfWord = _offset;
break;
}
- if (Test(charClass, CharClass.LetterOrNumber))
- endOfWord = _offset;
- } while (!EOS());
+ if (Test(charClass, CharClass.LetterOrNumber))
+ endOfWord = _offset;
+ } while (!EOS());
- string substring = _curr.Text.Substring(start, endOfWord - start);
- if (substring.Length > 0)
- {
- return new TextWithOffsetAndLen(
- HtmlUtils.UnEscapeEntities(substring, HtmlUtils.UnEscapeMode.NonMarkupText),
- _curr.Offset + start,
- substring.Length
- );
- }
- }
- }
+ string substring = _curr.Text.Substring(start, endOfWord - start);
+ if (substring.Length > 0)
+ {
+ return new TextWithOffsetAndLen(
+ HtmlUtils.UnEscapeEntities(substring, HtmlUtils.UnEscapeMode.NonMarkupText),
+ _curr.Offset + start,
+ substring.Length
+ );
+ }
+ }
+ }
- private void AdvanceUntilWordStart()
- {
- int charsToConsume;
- while (!EOS() && !Test(ClassifyChar(_curr.Text, _offset, out charsToConsume), CharClass.LetterOrNumber))
- _offset += charsToConsume;
- }
+ private void AdvanceUntilWordStart()
+ {
+ int charsToConsume;
+ while (!EOS() && !Test(ClassifyChar(_curr.Text, _offset, out charsToConsume), CharClass.LetterOrNumber))
+ _offset += charsToConsume;
+ }
- private bool Test(CharClass val, CharClass comparand)
- {
- return (val & comparand) == comparand;
- }
+ private bool Test(CharClass val, CharClass comparand)
+ {
+ return (val & comparand) == comparand;
+ }
- ///
- /// Determines the type of character that is currently pointed to by _offset,
- ///
- ///
- ///
- private CharClass ClassifyChar(string strval, int offset, out int charsToConsume)
- {
- charsToConsume = 1;
- char currChar = strval[offset];
+ ///
+ /// Determines the type of character that is currently pointed to by _offset,
+ ///
+ ///
+ ///
+ private CharClass ClassifyChar(string strval, int offset, out int charsToConsume)
+ {
+ charsToConsume = 1;
+ char currChar = strval[offset];
- if (currChar == '&')
- {
- int nextSemi = strval.IndexOf(';', offset + 1);
- if (nextSemi != -1)
- {
- int code = HtmlUtils.DecodeEntityReference(strval.Substring(offset + 1, nextSemi - offset - 1));
- if (code != -1)
- {
- charsToConsume = nextSemi - offset + 1;
- currChar = (char)code;
- }
- }
- }
+ if (currChar == '&')
+ {
+ int nextSemi = strval.IndexOf(';', offset + 1);
+ if (nextSemi != -1)
+ {
+ int code = HtmlUtils.DecodeEntityReference(strval.Substring(offset + 1, nextSemi - offset - 1));
+ if (code != -1)
+ {
+ charsToConsume = nextSemi - offset + 1;
+ currChar = (char)code;
+ }
+ }
+ }
- return
+ return
!WordRangeHelper.IsNonSymbolChar(currChar) ? CharClass.Break :
- char.IsLetter(currChar) ? CharClass.Letter :
- char.IsNumber(currChar) ? CharClass.Number :
- currChar == '\'' ? CharClass.BoundaryBreak :
- currChar == '’' ? CharClass.BoundaryBreak :
- currChar == '.' ? CharClass.IncludedBreakChar :
- CharClass.Break;
- }
+ char.IsLetter(currChar) ? CharClass.Letter :
+ char.IsNumber(currChar) ? CharClass.Number :
+ currChar == '\'' ? CharClass.BoundaryBreak :
+ currChar == '’' ? CharClass.BoundaryBreak :
+ currChar == '.' ? CharClass.IncludedBreakChar :
+ CharClass.Break;
+ }
- private bool EOS()
- {
- return _offset >= _curr.Text.Length;
- }
- }
+ private bool EOS()
+ {
+ return _offset >= _curr.Text.Length;
+ }
+ }
- private class HtmlTextSource
- {
- private SimpleHtmlParser _parser;
+ private class HtmlTextSource
+ {
+ private SimpleHtmlParser _parser;
- public HtmlTextSource(SimpleHtmlParser parser)
- {
- this._parser = parser;
- }
+ public HtmlTextSource(SimpleHtmlParser parser)
+ {
+ this._parser = parser;
+ }
- public TextWithOffsetAndLen Next()
- {
- Element e;
- while (null != (e = _parser.Next()))
- {
- if (e is Text)
- return new TextWithOffsetAndLen(e.RawText, e.Offset, e.Length);
- }
- return null;
- }
- }
- }
+ public TextWithOffsetAndLen Next()
+ {
+ Element e;
+ while (null != (e = _parser.Next()))
+ {
+ if (e is Text)
+ return new TextWithOffsetAndLen(e.RawText, e.Offset, e.Length);
+ }
+ return null;
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/IBlogPostSpellCheckingContext.cs b/src/managed/OpenLiveWriter.SpellChecker/IBlogPostSpellCheckingContext.cs
index cfa7cb9b..3cce5534 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/IBlogPostSpellCheckingContext.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/IBlogPostSpellCheckingContext.cs
@@ -5,16 +5,16 @@ using System;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Spelling checking services for the HTML Editor.
- ///
- public interface IBlogPostSpellCheckingContext
- {
+ ///
+ /// Spelling checking services for the HTML Editor.
+ ///
+ public interface IBlogPostSpellCheckingContext
+ {
bool CanSpellCheck { get; }
- string PostSpellingContextDirectory { get; }
+ string PostSpellingContextDirectory { get; }
ISpellingChecker SpellingChecker { get; }
- string AutoCorrectLexiconFilePath { get; }
- event EventHandler SpellingOptionsChanged;
- }
+ string AutoCorrectLexiconFilePath { get; }
+ event EventHandler SpellingOptionsChanged;
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/ISpellingChecker.cs b/src/managed/OpenLiveWriter.SpellChecker/ISpellingChecker.cs
index 7106c467..dae4a546 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/ISpellingChecker.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/ISpellingChecker.cs
@@ -6,88 +6,87 @@ using System.Diagnostics;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Generic interface implemented by spell checking engines
- ///
- public interface ISpellingChecker : IDisposable
- {
- ///
- /// Notify the spell checker that we are going to start checking a document
- /// and that we would like the user's Ignore All and Replace All commands
- /// to be persisted in a context-bound dictionary
- ///
- /// directory where the
- /// spell checker can write a context-bound dictionary (null to not
- /// use a context-dictionary)
- void StartChecking( string contextDictionaryLocation ) ;
+ ///
+ /// Generic interface implemented by spell checking engines
+ ///
+ public interface ISpellingChecker : IDisposable
+ {
+ ///
+ /// Notify the spell checker that we are going to start checking a document
+ /// and that we would like the user's Ignore All and Replace All commands
+ /// to be persisted in a context-bound dictionary
+ ///
+ /// directory where the
+ /// spell checker can write a context-bound dictionary (null to not
+ /// use a context-dictionary)
+ void StartChecking( string contextDictionaryLocation ) ;
-
- ///
- /// Notify the spell checker that we have stopped checking the document
- ///
- void StopChecking() ;
+ ///
+ /// Notify the spell checker that we have stopped checking the document
+ ///
+ void StopChecking() ;
bool IsInitialized { get; }
- ///
- /// Check the spelling of the specified word
- ///
- /// word to check
- /// auto or conditional replace word (returned only
- /// for certain SpellCheckResult values)
- /// check-word result
- SpellCheckResult CheckWord(string word, out string otherWord, out int offset, out int length) ;
+ ///
+ /// Check the spelling of the specified word
+ ///
+ /// word to check
+ /// auto or conditional replace word (returned only
+ /// for certain SpellCheckResult values)
+ /// check-word result
+ SpellCheckResult CheckWord(string word, out string otherWord, out int offset, out int length) ;
- ///
- /// Suggest alternate spellings for the specified word
- ///
- /// word to get suggestions for
- /// maximum number of suggestions to return
- /// depth of search -- 0 to 100 where larger values
- /// indicated a deeper (and longer) search
- /// array of spelling suggestions (up to maxSuggestions long)
- SpellingSuggestion[] Suggest(string word, short maxSuggestions, short depth ) ;
+ ///
+ /// Suggest alternate spellings for the specified word
+ ///
+ /// word to get suggestions for
+ /// maximum number of suggestions to return
+ /// depth of search -- 0 to 100 where larger values
+ /// indicated a deeper (and longer) search
+ /// array of spelling suggestions (up to maxSuggestions long)
+ SpellingSuggestion[] Suggest(string word, short maxSuggestions, short depth ) ;
- ///
- /// Add a word to the permenant user-dictionary
- ///
- ///
- void AddToUserDictionary( string word ) ;
+ ///
+ /// Add a word to the permenant user-dictionary
+ ///
+ ///
+ void AddToUserDictionary( string word ) ;
- event EventHandler WordAdded;
+ event EventHandler WordAdded;
- ///
- /// Ignore all subsequent instances of the specified word
- ///
- /// word to ignore
- void IgnoreAll( string word ) ;
+ ///
+ /// Ignore all subsequent instances of the specified word
+ ///
+ /// word to ignore
+ void IgnoreAll( string word ) ;
- event EventHandler WordIgnored;
+ event EventHandler WordIgnored;
- ///
- /// Replace all subsequent instances of the specified word
- ///
- /// word to replace
- /// replacement word
- void ReplaceAll( string word, string replaceWith ) ;
+ ///
+ /// Replace all subsequent instances of the specified word
+ ///
+ /// word to replace
+ /// replacement word
+ void ReplaceAll( string word, string replaceWith ) ;
- void Reset();
- }
+ void Reset();
+ }
- ///
- /// Languages supported by the spelling checker
- ///
- public enum SpellingCheckerLanguage
- {
- None,
- EnglishUS,
- EnglishUK,
- EnglishCanada,
- EnglishAustralia,
- Spanish,
- German,
- GermanReform,
- French,
+ ///
+ /// Languages supported by the spelling checker
+ ///
+ public enum SpellingCheckerLanguage
+ {
+ None,
+ EnglishUS,
+ EnglishUK,
+ EnglishCanada,
+ EnglishAustralia,
+ Spanish,
+ German,
+ GermanReform,
+ French,
Korean,
Italian,
Dutch,
@@ -118,102 +117,101 @@ namespace OpenLiveWriter.SpellChecker
SerbianCyrillic,
Swedish,
Ukrainian,
- }
+ }
+ ///
+ /// Possible result codes from check-word call
+ ///
+ public enum SpellCheckResult
+ {
+ ///
+ /// Word is correctly spelled
+ ///
+ Correct,
- ///
- /// Possible result codes from check-word call
- ///
- public enum SpellCheckResult
- {
- ///
- /// Word is correctly spelled
- ///
- Correct,
+ ///
+ /// Word has an auto-replace value (value returned in otherWord parameter)
+ ///
+ AutoReplace,
- ///
- /// Word has an auto-replace value (value returned in otherWord parameter)
- ///
- AutoReplace,
+ ///
+ /// Word has a conditional-replace value (value returned in otherWord parameter)
+ ///
+ ConditionalReplace,
- ///
- /// Word has a conditional-replace value (value returned in otherWord parameter)
- ///
- ConditionalReplace,
+ ///
+ /// Word is incorrectly capitalized
+ ///
+ Capitalization,
- ///
- /// Word is incorrectly capitalized
- ///
- Capitalization,
+ ///
+ /// Word is misspelled
+ ///
+ Misspelled
+ }
- ///
- /// Word is misspelled
- ///
- Misspelled
- }
+ ///
+ /// Suggestion for a misspelled word
+ ///
+ public struct SpellingSuggestion
+ {
+ ///
+ /// Initialize with hte appropriate suggestion and score
+ ///
+ /// suggestion
+ /// score
+ public SpellingSuggestion( string suggestion, short score )
+ {
+ Suggestion = suggestion ;
+ Score = score ;
+ }
- ///
- /// Suggestion for a misspelled word
- ///
- public struct SpellingSuggestion
- {
- ///
- /// Initialize with hte appropriate suggestion and score
- ///
- /// suggestion
- /// score
- public SpellingSuggestion( string suggestion, short score )
- {
- Suggestion = suggestion ;
- Score = score ;
- }
+ ///
+ /// Suggested word
+ ///
+ public readonly string Suggestion ;
- ///
- /// Suggested word
- ///
- public readonly string Suggestion ;
+ ///
+ /// Score (0-100 percent where 100 indicates an exact match)
+ ///
+ public readonly short Score ;
+ }
- ///
- /// Score (0-100 percent where 100 indicates an exact match)
- ///
- public readonly short Score ;
- }
+ ///
+ /// Exception that occurs during spell checking
+ ///
+ public class SpellingCheckerException : ApplicationException
+ {
+ ///
+ /// Initialize with just an error message
+ ///
+ ///
+ public SpellingCheckerException( string message )
+ : this( message, 0 )
+ {
+ }
- ///
- /// Exception that occurs during spell checking
- ///
- public class SpellingCheckerException : ApplicationException
- {
- ///
- /// Initialize with just an error message
- ///
- ///
- public SpellingCheckerException( string message )
- : this( message, 0 )
- {
- }
+ ///
+ /// Initialize with a message and native error
+ ///
+ /// error message
+ /// native error code
+ public SpellingCheckerException( string message, int nativeError )
+ : base( message )
+ {
+ this.nativeError = nativeError ;
+ }
- ///
- /// Initialize with a message and native error
- ///
- /// error message
- /// native error code
- public SpellingCheckerException( string message, int nativeError )
- : base( message )
- {
- this.nativeError = nativeError ;
- }
+ ///
+ /// Underlying error code from native implementation
+ ///
+ public int NativeError { get { return nativeError; } }
- ///
- /// Underlying error code from native implementation
- ///
- public int NativeError { get { return nativeError; } }
-
- ///
- /// Underlying native error code
- ///
- private int nativeError = 0 ;
- }
+ ///
+ /// Underlying native error code
+ ///
+ private int nativeError = 0 ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/IWordRange.cs b/src/managed/OpenLiveWriter.SpellChecker/IWordRange.cs
index 1839afc4..1dcd4efe 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/IWordRange.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/IWordRange.cs
@@ -8,63 +8,63 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Interface representing a word-range to be spell checked
- ///
- [Guid("F4FB57BC-5DB2-484A-8CDC-1EA270BE3821")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComVisible(true)]
- public interface IWordRange
- {
- ///
- /// Is there another word in the range?
- ///
- /// true if there is another word in the range
- bool HasNext() ;
+ ///
+ /// Interface representing a word-range to be spell checked
+ ///
+ [Guid("F4FB57BC-5DB2-484A-8CDC-1EA270BE3821")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [ComVisible(true)]
+ public interface IWordRange
+ {
+ ///
+ /// Is there another word in the range?
+ ///
+ /// true if there is another word in the range
+ bool HasNext() ;
- ///
- /// Advance to the next word in the range
- ///
- void Next() ;
+ ///
+ /// Advance to the next word in the range
+ ///
+ void Next() ;
- ///
- /// Get the current word
- ///
- string CurrentWord { get; }
+ ///
+ /// Get the current word
+ ///
+ string CurrentWord { get; }
- ///
- /// Place the cursor
- ///
- void PlaceCursor() ;
+ ///
+ /// Place the cursor
+ ///
+ void PlaceCursor() ;
- ///
- /// Highlight the current word, adjusted by the offset and length.
- /// The offset and length do not change the current word,
- /// they just affect the application of the highlight.
- ///
- void Highlight(int offset, int length) ;
+ ///
+ /// Highlight the current word, adjusted by the offset and length.
+ /// The offset and length do not change the current word,
+ /// they just affect the application of the highlight.
+ ///
+ void Highlight(int offset, int length) ;
- ///
- /// Remove highlighting from the range
- ///
- void RemoveHighlight() ;
+ ///
+ /// Remove highlighting from the range
+ ///
+ void RemoveHighlight() ;
- ///
- /// Replace the current word
- ///
- void Replace(int offset, int length, string newText) ;
+ ///
+ /// Replace the current word
+ ///
+ void Replace(int offset, int length, string newText) ;
- ///
- /// Tests the current word to determine if it is part of a URL sequence.
- ///
- ///
- bool IsCurrentWordUrlPart();
+ ///
+ /// Tests the current word to determine if it is part of a URL sequence.
+ ///
+ ///
+ bool IsCurrentWordUrlPart();
- ///
- /// Tests the current word to determine if it is contained in smart content.
- ///
- ///
- bool FilterApplies();
+ ///
+ /// Tests the current word to determine if it is contained in smart content.
+ ///
+ ///
+ bool FilterApplies();
///
/// Tests the current word from an offset for a given length to determine if it is contained in smart content.
@@ -72,8 +72,8 @@ namespace OpenLiveWriter.SpellChecker
///
///
///
- bool FilterAppliesRanged(int offset, int length);
- }
+ bool FilterAppliesRanged(int offset, int length);
+ }
public static class WordRangeHelper
{
diff --git a/src/managed/OpenLiveWriter.SpellChecker/MisspelledWordInfo.cs b/src/managed/OpenLiveWriter.SpellChecker/MisspelledWordInfo.cs
index 8455f78e..3bed2594 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/MisspelledWordInfo.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/MisspelledWordInfo.cs
@@ -6,34 +6,34 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Summary description for MisspelledWordInfo.
- ///
- public class MisspelledWordInfo
- {
- private MarkupRange _range;
- private string _word;
+ ///
+ /// Summary description for MisspelledWordInfo.
+ ///
+ public class MisspelledWordInfo
+ {
+ private MarkupRange _range;
+ private string _word;
- public MisspelledWordInfo(MarkupRange range, string word)
- {
- _range = range;
- _word = word;
- }
+ public MisspelledWordInfo(MarkupRange range, string word)
+ {
+ _range = range;
+ _word = word;
+ }
- public MarkupRange WordRange
- {
- get
- {
- return _range;
- }
- }
+ public MarkupRange WordRange
+ {
+ get
+ {
+ return _range;
+ }
+ }
- public string Word
- {
- get
- {
- return _word;
- }
- }
- }
+ public string Word
+ {
+ get
+ {
+ return _word;
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/MshtmlWordRange.cs b/src/managed/OpenLiveWriter.SpellChecker/MshtmlWordRange.cs
index dc2e2583..625d1cc9 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/MshtmlWordRange.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/MshtmlWordRange.cs
@@ -12,35 +12,35 @@ using System.Text.RegularExpressions;
namespace OpenLiveWriter.SpellChecker
{
- public delegate void DamageFunction(MarkupRange range);
+ public delegate void DamageFunction(MarkupRange range);
public delegate bool MarkupRangeFilter(MarkupRange range);
- ///
- /// Implementation of IWordRange for an MSHTML control
- ///
- public class MshtmlWordRange : IWordRange
- {
+ ///
+ /// Implementation of IWordRange for an MSHTML control
+ ///
+ public class MshtmlWordRange : IWordRange
+ {
MarkupRangeFilter filter = null;
- DamageFunction damageFunction = null;
+ DamageFunction damageFunction = null;
- ///
- /// Initialize word range for the entire body of the document
- ///
- /// mshtml control
- public MshtmlWordRange(MshtmlControl mshtmlControl) :
- this(mshtmlControl.HTMLDocument, false, null, null)
- {
- }
+ ///
+ /// Initialize word range for the entire body of the document
+ ///
+ /// mshtml control
+ public MshtmlWordRange(MshtmlControl mshtmlControl) :
+ this(mshtmlControl.HTMLDocument, false, null, null)
+ {
+ }
- ///
- /// Initialize word range for the specified markup-range within the document
- ///
- public MshtmlWordRange(IHTMLDocument document, bool useDocumentSelectionRange, MarkupRangeFilter filter, DamageFunction damageFunction)
- {
- MshtmlMarkupServices markupServices = new MshtmlMarkupServices((IMarkupServicesRaw)document);
- IHTMLDocument2 document2 = (IHTMLDocument2)document;
- MarkupRange markupRange;
+ ///
+ /// Initialize word range for the specified markup-range within the document
+ ///
+ public MshtmlWordRange(IHTMLDocument document, bool useDocumentSelectionRange, MarkupRangeFilter filter, DamageFunction damageFunction)
+ {
+ MshtmlMarkupServices markupServices = new MshtmlMarkupServices((IMarkupServicesRaw)document);
+ IHTMLDocument2 document2 = (IHTMLDocument2)document;
+ MarkupRange markupRange;
if (useDocumentSelectionRange)
{
markupRange = markupServices.CreateMarkupRange(document2.selection);
@@ -51,194 +51,194 @@ namespace OpenLiveWriter.SpellChecker
markupRange = markupServices.CreateMarkupRange(document2.body, false);
}
- Init(document, markupServices, markupRange, filter, damageFunction, useDocumentSelectionRange);
- }
+ Init(document, markupServices, markupRange, filter, damageFunction, useDocumentSelectionRange);
+ }
- ///
- /// Initialize word range for the specified markup-range within the document
- ///
+ ///
+ /// Initialize word range for the specified markup-range within the document
+ ///
public MshtmlWordRange(IHTMLDocument document, MarkupRange markupRange, MarkupRangeFilter filter, DamageFunction damageFunction)
- {
- MshtmlMarkupServices markupServices = new MshtmlMarkupServices((IMarkupServicesRaw)document);
- Init(document, markupServices, markupRange, filter, damageFunction, true);
- }
+ {
+ MshtmlMarkupServices markupServices = new MshtmlMarkupServices((IMarkupServicesRaw)document);
+ Init(document, markupServices, markupRange, filter, damageFunction, true);
+ }
private void Init(IHTMLDocument document, MshtmlMarkupServices markupServices, MarkupRange selectionRange, MarkupRangeFilter filter, DamageFunction damageFunction, bool expandRange)
- {
- // save references
- this.htmlDocument = document;
- this.markupServices = markupServices;
- this.selectionRange = selectionRange;
- this.filter = filter;
- this.damageFunction = damageFunction;
+ {
+ // save references
+ this.htmlDocument = document;
+ this.markupServices = markupServices;
+ this.selectionRange = selectionRange;
+ this.filter = filter;
+ this.damageFunction = damageFunction;
// If the range is already the body, don't expand it or else it will be the whole document
if (expandRange)
- ExpandRangeToWordBoundaries(selectionRange);
+ ExpandRangeToWordBoundaries(selectionRange);
// initialize pointer to beginning of selection range
- MarkupPointer wordStart = MarkupServices.CreateMarkupPointer(selectionRange.Start);
- MarkupPointer wordEnd = MarkupServices.CreateMarkupPointer(selectionRange.Start);
+ MarkupPointer wordStart = MarkupServices.CreateMarkupPointer(selectionRange.Start);
+ MarkupPointer wordEnd = MarkupServices.CreateMarkupPointer(selectionRange.Start);
- //create the range for holding the current word.
- //Be sure to set its gravity so that it stays around text that get replaced.
- currentWordRange = MarkupServices.CreateMarkupRange(wordStart, wordEnd);
- currentWordRange.Start.Gravity = _POINTER_GRAVITY.POINTER_GRAVITY_Left;
- currentWordRange.End.Gravity = _POINTER_GRAVITY.POINTER_GRAVITY_Right;
+ //create the range for holding the current word.
+ //Be sure to set its gravity so that it stays around text that get replaced.
+ currentWordRange = MarkupServices.CreateMarkupRange(wordStart, wordEnd);
+ currentWordRange.Start.Gravity = _POINTER_GRAVITY.POINTER_GRAVITY_Left;
+ currentWordRange.End.Gravity = _POINTER_GRAVITY.POINTER_GRAVITY_Right;
- currentVirtualPosition = currentWordRange.End.Clone();
- }
+ currentVirtualPosition = currentWordRange.End.Clone();
+ }
- public static void ExpandRangeToWordBoundaries(MarkupRange range)
- {
+ public static void ExpandRangeToWordBoundaries(MarkupRange range)
+ {
//adjust the selection so that it entirely covers the first and last words.
- range.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
- range.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
- range.End.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
- range.End.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
- }
+ range.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
+ range.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
+ range.End.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
+ range.End.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
+ }
- public bool IsCurrentWordUrlPart()
- {
- return IsRangeInUrl(currentWordRange);
- }
+ public bool IsCurrentWordUrlPart()
+ {
+ return IsRangeInUrl(currentWordRange);
+ }
- public bool FilterApplies()
- {
- return filter != null && filter(currentWordRange);
- }
- public bool FilterAppliesRanged(int offset, int length)
- {
- MarkupRange adjustedRange = currentWordRange.Clone();
- MarkupHelpers.AdjustMarkupRange(ref stagingTextRange, adjustedRange, offset, length);
- return filter != null && filter(adjustedRange);
- }
+ public bool FilterApplies()
+ {
+ return filter != null && filter(currentWordRange);
+ }
+ public bool FilterAppliesRanged(int offset, int length)
+ {
+ MarkupRange adjustedRange = currentWordRange.Clone();
+ MarkupHelpers.AdjustMarkupRange(ref stagingTextRange, adjustedRange, offset, length);
+ return filter != null && filter(adjustedRange);
+ }
- ///
- /// Do we have another word in our range?
- ///
- ///
- public bool HasNext()
- {
- return currentWordRange.End.IsLeftOf(selectionRange.End);
- }
+ ///
+ /// Do we have another word in our range?
+ ///
+ ///
+ public bool HasNext()
+ {
+ return currentWordRange.End.IsLeftOf(selectionRange.End);
+ }
- ///
- /// Advance to next word
- ///
- public void Next()
- {
+ ///
+ /// Advance to next word
+ ///
+ public void Next()
+ {
currentWordRange.End.MoveToPointer(currentVirtualPosition);
- do
- {
- //advance the start pointer to the beginning of next word
- if(!currentWordRange.End.IsEqualTo(selectionRange.Start)) //avoids skipping over the first word
- {
- //fix bug 1848 - move the start to the end pointer before advancing to the next word
- //this ensures that the "next begin" is after the current selection.
- currentWordRange.Start.MoveToPointer(currentWordRange.End);
- currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
+ do
+ {
+ //advance the start pointer to the beginning of next word
+ if(!currentWordRange.End.IsEqualTo(selectionRange.Start)) //avoids skipping over the first word
+ {
+ //fix bug 1848 - move the start to the end pointer before advancing to the next word
+ //this ensures that the "next begin" is after the current selection.
+ currentWordRange.Start.MoveToPointer(currentWordRange.End);
+ currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
- currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDBEGIN);
- }
- else
- {
- //Special case for putting the start pointer at the beginning of the
- //correct word when the selection may or may not be already adjacent
- //to the the beginning of the word.
- //Note: theoretically, the selection adjustment in the constructor
- //guarantees that we will be flush against the first word, so we could
- //probably do nothing, but it works, so we'll keep it.
- currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
- currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
- }
+ currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDBEGIN);
+ }
+ else
+ {
+ //Special case for putting the start pointer at the beginning of the
+ //correct word when the selection may or may not be already adjacent
+ //to the the beginning of the word.
+ //Note: theoretically, the selection adjustment in the constructor
+ //guarantees that we will be flush against the first word, so we could
+ //probably do nothing, but it works, so we'll keep it.
+ currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
+ currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
+ }
- //advance the end pointer to the end of next word
- currentWordRange.End.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
+ //advance the end pointer to the end of next word
+ currentWordRange.End.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_NEXTWORDEND);
- if(currentWordRange.Start.IsRightOf(currentWordRange.End))
- {
- //Note: this was a condition that caused several bugs that caused us to stop
- //spell-checking correctly, so this logic is here in case we still have edge
- //cases that trigger it.
- //This should not occur anymore since we fixed several causes of this
- //condition by setting the currentWordRange gravity, and detecting case where
- //the selection may or may-not start at the beginning of a word.
- Debug.Fail("word start jumped past word end");
+ if(currentWordRange.Start.IsRightOf(currentWordRange.End))
+ {
+ //Note: this was a condition that caused several bugs that caused us to stop
+ //spell-checking correctly, so this logic is here in case we still have edge
+ //cases that trigger it.
+ //This should not occur anymore since we fixed several causes of this
+ //condition by setting the currentWordRange gravity, and detecting case where
+ //the selection may or may-not start at the beginning of a word.
+ Debug.Fail("word start jumped past word end");
- //if this occured, it was probably because start was already at the beginning
- //of the correct word before it was moved. To resolve this situation, we
- //move the start pointer back to the beginning of the word that the end pointer
- //is at. Since the End pointer always advances on each iteration, this should not
- //cause an infinite loop. The worst case scenario is that we check the same word
- //more than once.
- currentWordRange.Start.MoveToPointer(currentWordRange.End);
- currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
- }
+ //if this occured, it was probably because start was already at the beginning
+ //of the correct word before it was moved. To resolve this situation, we
+ //move the start pointer back to the beginning of the word that the end pointer
+ //is at. Since the End pointer always advances on each iteration, this should not
+ //cause an infinite loop. The worst case scenario is that we check the same word
+ //more than once.
+ currentWordRange.Start.MoveToPointer(currentWordRange.End);
+ currentWordRange.Start.MoveUnit(_MOVEUNIT_ACTION.MOVEUNIT_PREVWORDBEGIN);
+ }
- } while( MarkupHelpers.GetRangeTextFast(currentWordRange) == null &&
- currentWordRange.End.IsLeftOf(selectionRange.End));
+ } while( MarkupHelpers.GetRangeTextFast(currentWordRange) == null &&
+ currentWordRange.End.IsLeftOf(selectionRange.End));
currentVirtualPosition.MoveToPointer(currentWordRange.End);
- if(currentWordRange.End.IsRightOf(selectionRange.End))
- {
- //then collapse the range so that CurrentWord returns Empty;
- currentWordRange.Start.MoveToPointer(currentWordRange.End);
- }
+ if(currentWordRange.End.IsRightOf(selectionRange.End))
+ {
+ //then collapse the range so that CurrentWord returns Empty;
+ currentWordRange.Start.MoveToPointer(currentWordRange.End);
+ }
else
- {
- MarkupRange testRange = currentWordRange.Clone();
+ {
+ MarkupRange testRange = currentWordRange.Clone();
testRange.Collapse(false);
testRange.End.MoveUnitBounded(_MOVEUNIT_ACTION.MOVEUNIT_NEXTCHAR, selectionRange.End);
if (MarkupHelpers.GetRangeHtmlFast(testRange) == ".")
{
currentWordRange.End.MoveToPointer(testRange.End);
}
- }
- }
+ }
+ }
private bool IsRangeInUrl(MarkupRange range)
- {
- //must have this range cloned, otherwise in some cases IsInsideURL call
- // was MOVING the current word range! if "www.foo.com" was in the editor,
- // when the final "\"" was the current word, this call MOVED the current
- // word range BACK to www.foo.com, then nextWord would get "\"" and a loop
- // would occur (bug 411528)
- range = range.Clone();
- IMarkupPointer2Raw p2StartRaw = (IMarkupPointer2Raw)range.Start.PointerRaw;
- bool insideUrl;
- p2StartRaw.IsInsideURL(range.End.PointerRaw, out insideUrl);
- return insideUrl;
- }
+ {
+ //must have this range cloned, otherwise in some cases IsInsideURL call
+ // was MOVING the current word range! if "www.foo.com" was in the editor,
+ // when the final "\"" was the current word, this call MOVED the current
+ // word range BACK to www.foo.com, then nextWord would get "\"" and a loop
+ // would occur (bug 411528)
+ range = range.Clone();
+ IMarkupPointer2Raw p2StartRaw = (IMarkupPointer2Raw)range.Start.PointerRaw;
+ bool insideUrl;
+ p2StartRaw.IsInsideURL(range.End.PointerRaw, out insideUrl);
+ return insideUrl;
+ }
- ///
- /// Get the text of the current word
- ///
- public string CurrentWord
- {
- get
- {
- return currentWordRange.Text ?? "";
- }
- }
+ ///
+ /// Get the text of the current word
+ ///
+ public string CurrentWord
+ {
+ get
+ {
+ return currentWordRange.Text ?? "";
+ }
+ }
- public void PlaceCursor()
- {
- currentWordRange.Collapse(false);
- currentWordRange.ToTextRange().select();
- }
+ public void PlaceCursor()
+ {
+ currentWordRange.Collapse(false);
+ currentWordRange.ToTextRange().select();
+ }
- ///
- /// Highlight the current word
- ///
- public void Highlight(int offset, int length)
- {
- // select word
- MarkupRange highlightRange = currentWordRange.Clone();
- MarkupHelpers.AdjustMarkupRange(highlightRange, offset, length);
+ ///
+ /// Highlight the current word
+ ///
+ public void Highlight(int offset, int length)
+ {
+ // select word
+ MarkupRange highlightRange = currentWordRange.Clone();
+ MarkupHelpers.AdjustMarkupRange(highlightRange, offset, length);
try
{
@@ -250,14 +250,14 @@ namespace OpenLiveWriter.SpellChecker
if (ce.ErrorCode != unchecked((int)0x800A025E))
throw;
}
- }
+ }
- ///
- /// Remove highlighting from the document
- ///
- public void RemoveHighlight()
- {
- // clear document selection
+ ///
+ /// Remove highlighting from the document
+ ///
+ public void RemoveHighlight()
+ {
+ // clear document selection
try
{
((IHTMLDocument2) (htmlDocument)).selection.empty();
@@ -267,46 +267,46 @@ namespace OpenLiveWriter.SpellChecker
if (ce.ErrorCode != unchecked((int)0x800A025E))
throw;
}
- }
+ }
- ///
- /// Replace the text of the current word
- ///
- public void Replace(int offset, int length, string newText)
- {
- MarkupRange origRange = currentWordRange.Clone();
- // set the text
+ ///
+ /// Replace the text of the current word
+ ///
+ public void Replace(int offset, int length, string newText)
+ {
+ MarkupRange origRange = currentWordRange.Clone();
+ // set the text
currentWordRange.Text = StringHelper.Replace(currentWordRange.Text, offset, length, newText);
damageFunction(origRange);
- }
+ }
- ///
- /// Markup services for mshtml control
- ///
- private MshtmlMarkupServices MarkupServices
- {
- get { return markupServices; }
- }
+ ///
+ /// Markup services for mshtml control
+ ///
+ private MshtmlMarkupServices MarkupServices
+ {
+ get { return markupServices; }
+ }
- ///
- /// Control we are providing a word range for
- ///
- //private MshtmlControl mshtmlControl ;
- private IHTMLDocument htmlDocument;
- private MshtmlMarkupServices markupServices;
+ ///
+ /// Control we are providing a word range for
+ ///
+ //private MshtmlControl mshtmlControl ;
+ private IHTMLDocument htmlDocument;
+ private MshtmlMarkupServices markupServices;
- ///
- /// Range over which we are iterating
- ///
- private MarkupRange selectionRange;
+ ///
+ /// Range over which we are iterating
+ ///
+ private MarkupRange selectionRange;
- public MarkupRange SelectionRange
- {
- get
- {
- return selectionRange;
- }
- }
+ public MarkupRange SelectionRange
+ {
+ get
+ {
+ return selectionRange;
+ }
+ }
///
/// In order to fix the "vs." defect (trailing periods need to
@@ -319,19 +319,19 @@ namespace OpenLiveWriter.SpellChecker
///
private MarkupPointer currentVirtualPosition;
- private IHTMLTxtRange stagingTextRange;
+ private IHTMLTxtRange stagingTextRange;
///
- /// Pointer to current word
- ///
- private MarkupRange currentWordRange;
+ /// Pointer to current word
+ ///
+ private MarkupRange currentWordRange;
- public MarkupRange CurrentWordRange
- {
- get
- {
- return currentWordRange;
- }
- }
- }
+ public MarkupRange CurrentWordRange
+ {
+ get
+ {
+ return currentWordRange;
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/SpellCheckerForm.cs b/src/managed/OpenLiveWriter.SpellChecker/SpellCheckerForm.cs
index f62fe422..568e3e30 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/SpellCheckerForm.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/SpellCheckerForm.cs
@@ -152,7 +152,6 @@ namespace OpenLiveWriter.SpellChecker
return;
}
-
using (new WaitCursor())
{
// loop through all of the words in the word-range
@@ -302,7 +301,6 @@ namespace OpenLiveWriter.SpellChecker
spellingChecker.Reset();
}
-
///
/// Provide suggestions for the current misspelled word
///
@@ -450,7 +448,6 @@ namespace OpenLiveWriter.SpellChecker
ContinueSpellCheck();
}
-
///
/// Handle TextChanged event to update state of buttons
///
@@ -484,7 +481,6 @@ namespace OpenLiveWriter.SpellChecker
textBoxChangeTo.Text = String.Empty;
}
-
///
/// Double-click of a word in suggestions results in auto-replacement
///
@@ -542,7 +538,6 @@ namespace OpenLiveWriter.SpellChecker
wordRangeHighlightPending = true;
}
-
///
/// Ensure the form is loaded
///
@@ -580,13 +575,13 @@ namespace OpenLiveWriter.SpellChecker
}
Button[] buttons = {
- buttonIgnore,
- buttonIgnoreAll,
- buttonChange,
- buttonChangeAll,
- buttonAdd,
- buttonCancel
- };
+ buttonIgnore,
+ buttonIgnoreAll,
+ buttonChange,
+ buttonChangeAll,
+ buttonAdd,
+ buttonCancel
+ };
using (new AutoGrow(this, AnchorStyles.Right, true))
{
diff --git a/src/managed/OpenLiveWriter.SpellChecker/SpellCheckingContextMenuDefinition.cs b/src/managed/OpenLiveWriter.SpellChecker/SpellCheckingContextMenuDefinition.cs
index e93e3569..aa2ad734 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/SpellCheckingContextMenuDefinition.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/SpellCheckingContextMenuDefinition.cs
@@ -12,107 +12,106 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// Summary description for SpellCheckingContextMenuDefinition.
- /// 1. list of word suggestions
- /// 2. static menu with ignore all, add to dictionary (which take word as argument)
- /// 3. launch spelling dialog ??
- /// 4. static menu with cut/copy/paste
- ///
- ///
- public class SpellCheckingContextMenuDefinition : CommandContextMenuDefinition
- {
- public SpellCheckingContextMenuDefinition() : this(null, null)
- {
- }
+ ///
+ /// Summary description for SpellCheckingContextMenuDefinition.
+ /// 1. list of word suggestions
+ /// 2. static menu with ignore all, add to dictionary (which take word as argument)
+ /// 3. launch spelling dialog ??
+ /// 4. static menu with cut/copy/paste
+ ///
+ ///
+ public class SpellCheckingContextMenuDefinition : CommandContextMenuDefinition
+ {
+ public SpellCheckingContextMenuDefinition() : this(null, null)
+ {
+ }
- public SpellCheckingContextMenuDefinition(string word, SpellingManager manager)
- {
- _currentWord = word;
- _spellingManager = manager;
- Entries.AddRange(GetSpellingSuggestions());
+ public SpellCheckingContextMenuDefinition(string word, SpellingManager manager)
+ {
+ _currentWord = word;
+ _spellingManager = manager;
+ Entries.AddRange(GetSpellingSuggestions());
Entries.Add(CommandId.IgnoreOnce, true, false);
Entries.Add(CommandId.IgnoreAll, false, false);
- Entries.Add(CommandId.AddToDictionary, false, false);
- Entries.Add(CommandId.OpenSpellingForm, false, false);
- }
+ Entries.Add(CommandId.AddToDictionary, false, false);
+ Entries.Add(CommandId.OpenSpellingForm, false, false);
+ }
- private string _currentWord;
- private SpellingManager _spellingManager;
+ private string _currentWord;
+ private SpellingManager _spellingManager;
- private MenuDefinitionEntryCollection GetSpellingSuggestions()
- {
- CommandManager commandManager = _spellingManager.CommandManager;
- MenuDefinitionEntryCollection listOfSuggestions = new MenuDefinitionEntryCollection();
+ private MenuDefinitionEntryCollection GetSpellingSuggestions()
+ {
+ CommandManager commandManager = _spellingManager.CommandManager;
+ MenuDefinitionEntryCollection listOfSuggestions = new MenuDefinitionEntryCollection();
commandManager.SuppressEvents = true;
commandManager.BeginUpdate();
- try
- {
- // provide suggestions
- SpellingSuggestion[] suggestions = _spellingManager.SpellingChecker.Suggest(_currentWord, DEFAULT_MAX_SUGGESTIONS, SUGGESTION_DEPTH ) ;
- bool foundSuggestion = false;
- if ( suggestions.Length > 0 )
- {
- // add suggestions to list (stop adding when the quality of scores
- // declines precipitously)
- short lastScore = suggestions[0].Score ;
- for (int i = 0; i < suggestions.Length; i++)
- {
- SpellingSuggestion suggestion = suggestions[i];
+ try
+ {
+ // provide suggestions
+ SpellingSuggestion[] suggestions = _spellingManager.SpellingChecker.Suggest(_currentWord, DEFAULT_MAX_SUGGESTIONS, SUGGESTION_DEPTH ) ;
+ bool foundSuggestion = false;
+ if ( suggestions.Length > 0 )
+ {
+ // add suggestions to list (stop adding when the quality of scores
+ // declines precipitously)
+ short lastScore = suggestions[0].Score ;
+ for (int i = 0; i < suggestions.Length; i++)
+ {
+ SpellingSuggestion suggestion = suggestions[i];
//note: in some weird cases, like 's, a suggestion is returned but lacks a suggested replacement, so need to check that case
- if ( (lastScore-suggestion.Score) < SCORE_GAP_FILTER && (suggestion.Suggestion != null))
- {
- Command FixSpellingCommand = new Command(CommandId.FixWordSpelling);
- FixSpellingCommand.Identifier += suggestion.Suggestion;
- FixSpellingCommand.Text = suggestion.Suggestion;
- FixSpellingCommand.MenuText = suggestion.Suggestion;
- FixSpellingCommand.Execute += new EventHandler(_spellingManager.fixSpellingApplyCommand_Execute);
- FixSpellingCommand.Tag = suggestion.Suggestion;
+ if ( (lastScore-suggestion.Score) < SCORE_GAP_FILTER && (suggestion.Suggestion != null))
+ {
+ Command FixSpellingCommand = new Command(CommandId.FixWordSpelling);
+ FixSpellingCommand.Identifier += suggestion.Suggestion;
+ FixSpellingCommand.Text = suggestion.Suggestion;
+ FixSpellingCommand.MenuText = suggestion.Suggestion;
+ FixSpellingCommand.Execute += new EventHandler(_spellingManager.fixSpellingApplyCommand_Execute);
+ FixSpellingCommand.Tag = suggestion.Suggestion;
commandManager.Add(FixSpellingCommand);
- listOfSuggestions.Add(FixSpellingCommand.Identifier, false, i == suggestions.Length - 1);
- foundSuggestion = true;
- }
- else
- break ;
+ listOfSuggestions.Add(FixSpellingCommand.Identifier, false, i == suggestions.Length - 1);
+ foundSuggestion = true;
+ }
+ else
+ break ;
- // update last score
- lastScore = suggestion.Score ;
- }
- }
- if (!foundSuggestion)
- {
- Command FixSpellingCommand = new Command(CommandId.FixWordSpelling);
- FixSpellingCommand.Enabled = false;
+ // update last score
+ lastScore = suggestion.Score ;
+ }
+ }
+ if (!foundSuggestion)
+ {
+ Command FixSpellingCommand = new Command(CommandId.FixWordSpelling);
+ FixSpellingCommand.Enabled = false;
commandManager.Add(FixSpellingCommand);
- listOfSuggestions.Add(CommandId.FixWordSpelling, false, true);
- }
- }
- finally
- {
+ listOfSuggestions.Add(CommandId.FixWordSpelling, false, true);
+ }
+ }
+ finally
+ {
commandManager.EndUpdate();
commandManager.SuppressEvents = false;
- }
- return listOfSuggestions;
- }
+ }
+ return listOfSuggestions;
+ }
+ ///
+ /// Default maximum suggestions to return
+ ///
+ private const short DEFAULT_MAX_SUGGESTIONS = 10 ;
- ///
- /// Default maximum suggestions to return
- ///
- private const short DEFAULT_MAX_SUGGESTIONS = 10 ;
+ ///
+ /// If we detect a gap between scores of this value or greater then
+ /// we drop the score and all remaining
+ ///
+ private const short SCORE_GAP_FILTER = 20 ;
- ///
- /// If we detect a gap between scores of this value or greater then
- /// we drop the score and all remaining
- ///
- private const short SCORE_GAP_FILTER = 20 ;
-
- ///
- /// Suggestion depth for searching (100 is the maximum)
- ///
- private const short SUGGESTION_DEPTH = 80 ;
- }
+ ///
+ /// Suggestion depth for searching (100 is the maximum)
+ ///
+ private const short SUGGESTION_DEPTH = 80 ;
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/SpellingConfigReader.cs b/src/managed/OpenLiveWriter.SpellChecker/SpellingConfigReader.cs
index bd2d3589..68522397 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/SpellingConfigReader.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/SpellingConfigReader.cs
@@ -14,39 +14,38 @@ using OpenLiveWriter.Localization;
namespace OpenLiveWriter.SpellChecker
{
- internal class SpellingConfigReader
- {
- private static readonly SpellingLanguageEntry[] languages;
- private static readonly SpellingCheckerLanguage defaultLanguage;
+ internal class SpellingConfigReader
+ {
+ private static readonly SpellingLanguageEntry[] languages;
+ private static readonly SpellingCheckerLanguage defaultLanguage;
- public static SpellingLanguageEntry[] Languages
- {
- get { return languages; }
- }
+ public static SpellingLanguageEntry[] Languages
+ {
+ get { return languages; }
+ }
- public static SpellingCheckerLanguage DefaultLanguage
- {
- get { return defaultLanguage; }
- }
+ public static SpellingCheckerLanguage DefaultLanguage
+ {
+ get { return defaultLanguage; }
+ }
-
- static SpellingConfigReader()
- {
+ static SpellingConfigReader()
+ {
// TODO:OLW
- if (languages == null)
- {
- languages = new SpellingLanguageEntry[]
- {
- CreateNullDictionaryLanguage()
- };
- }
- defaultLanguage = SpellingCheckerLanguage.None;
- }
+ if (languages == null)
+ {
+ languages = new SpellingLanguageEntry[]
+ {
+ CreateNullDictionaryLanguage()
+ };
+ }
+ defaultLanguage = SpellingCheckerLanguage.None;
+ }
- private static SpellingLanguageEntry CreateNullDictionaryLanguage()
- {
- return new SpellingLanguageEntry(SpellingCheckerLanguage.None, 0xFFFF, null, new string[0], "", Res.Get(StringId.DictionaryLanguageNone));
- }
- }
+ private static SpellingLanguageEntry CreateNullDictionaryLanguage()
+ {
+ return new SpellingLanguageEntry(SpellingCheckerLanguage.None, 0xFFFF, null, new string[0], "", Res.Get(StringId.DictionaryLanguageNone));
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/SpellingHighlighter.cs b/src/managed/OpenLiveWriter.SpellChecker/SpellingHighlighter.cs
index 25a0e56d..b64bac33 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/SpellingHighlighter.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/SpellingHighlighter.cs
@@ -14,205 +14,204 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.SpellChecker
{
- public class SpellingHighlighter : IDisposable
- {
+ public class SpellingHighlighter : IDisposable
+ {
- static int TIMER_INTERVAL = 10;
- static int NUMBER_OF_WORDS_TO_CHECK = 30;
+ static int TIMER_INTERVAL = 10;
+ static int NUMBER_OF_WORDS_TO_CHECK = 30;
- private ISpellingChecker _spellingChecker ;
+ private ISpellingChecker _spellingChecker ;
- private IHighlightRenderingServicesRaw _highlightRenderingServices;
+ private IHighlightRenderingServicesRaw _highlightRenderingServices;
- private IDisplayServicesRaw _displayServices;
+ private IDisplayServicesRaw _displayServices;
- private IMarkupServicesRaw _markupServicesRaw;
+ private IMarkupServicesRaw _markupServicesRaw;
- private MshtmlMarkupServices _markupServices;
+ private MshtmlMarkupServices _markupServices;
- private IHTMLDocument4 _htmlDocument;
+ private IHTMLDocument4 _htmlDocument;
- private HighlightSegmentTracker _tracker;
+ private HighlightSegmentTracker _tracker;
- private Queue _workerQueue;
+ private Queue _workerQueue;
- private SpellingTimer _timer;
+ private SpellingTimer _timer;
- private bool _fatalSpellingError = false ;
+ private bool _fatalSpellingError = false ;
- public SpellingHighlighter(ISpellingChecker spellingChecker, IHighlightRenderingServicesRaw highlightRenderingServices,
- IDisplayServicesRaw displayServices, IMarkupServicesRaw markupServices, IHTMLDocument4 htmlDocument)
- {
- _spellingChecker = spellingChecker;
- _highlightRenderingServices = highlightRenderingServices;
- _displayServices = displayServices;
- _markupServicesRaw = markupServices;
- _markupServices = new MshtmlMarkupServices(_markupServicesRaw);
- _htmlDocument = htmlDocument;
- _tracker = new HighlightSegmentTracker();
- //the timer to handle interleaving of spell ghecking
- _timer = new SpellingTimer(TIMER_INTERVAL);
- _timer.Start();
- _timer.Tick += new EventHandler(_timer_Tick);
- _workerQueue = new Queue();
+ public SpellingHighlighter(ISpellingChecker spellingChecker, IHighlightRenderingServicesRaw highlightRenderingServices,
+ IDisplayServicesRaw displayServices, IMarkupServicesRaw markupServices, IHTMLDocument4 htmlDocument)
+ {
+ _spellingChecker = spellingChecker;
+ _highlightRenderingServices = highlightRenderingServices;
+ _displayServices = displayServices;
+ _markupServicesRaw = markupServices;
+ _markupServices = new MshtmlMarkupServices(_markupServicesRaw);
+ _htmlDocument = htmlDocument;
+ _tracker = new HighlightSegmentTracker();
+ //the timer to handle interleaving of spell ghecking
+ _timer = new SpellingTimer(TIMER_INTERVAL);
+ _timer.Start();
+ _timer.Tick += new EventHandler(_timer_Tick);
+ _workerQueue = new Queue();
}
- ///
- /// Check spelling--called by the damage handler
- ///
- public void CheckSpelling(MshtmlWordRange range)
- {
- if ( !_fatalSpellingError )
- {
- _timer.Enabled = true;
- _workerQueue.Enqueue(range);
- if (_workerQueue.Count == 1)
- {
- //if the queue had been empty, process this range right away
- DoWork();
- }
- }
- }
+ ///
+ /// Check spelling--called by the damage handler
+ ///
+ public void CheckSpelling(MshtmlWordRange range)
+ {
+ if ( !_fatalSpellingError )
+ {
+ _timer.Enabled = true;
+ _workerQueue.Enqueue(range);
+ if (_workerQueue.Count == 1)
+ {
+ //if the queue had been empty, process this range right away
+ DoWork();
+ }
+ }
+ }
///
/// Prevents asserts that happen within _timer_Tick from going bonkers; since
/// they can happen reentrantly, you can end up with hundreds of assert windows.
///
- private bool reentrant = false;
+ private bool reentrant = false;
- private void _timer_Tick(object o, EventArgs args)
- {
+ private void _timer_Tick(object o, EventArgs args)
+ {
if (reentrant)
return;
- reentrant = true;
+ reentrant = true;
- try
- {
- if (_workerQueue.Count > 0)
- {
- DoWork();
- }
- else
- _timer.Enabled = false;
- }
- catch(Exception ex)
- {
- UnexpectedErrorMessage.Show(Win32WindowImpl.ForegroundWin32Window, ex, "Unexpected Error Spell Checking");
+ try
+ {
+ if (_workerQueue.Count > 0)
+ {
+ DoWork();
+ }
+ else
+ _timer.Enabled = false;
+ }
+ catch(Exception ex)
+ {
+ UnexpectedErrorMessage.Show(Win32WindowImpl.ForegroundWin32Window, ex, "Unexpected Error Spell Checking");
- Reset() ;
+ Reset() ;
- _fatalSpellingError = true ;
- }
+ _fatalSpellingError = true ;
+ }
finally
- {
- reentrant = false;
- }
- }
+ {
+ reentrant = false;
+ }
+ }
+ //manages the queue during work
+ private void DoWork()
+ {
+ {
+ //start processing the first word range, and pop it if we get to the end
+ if (ProcessWordRange((MshtmlWordRange)_workerQueue.Peek()))
+ _workerQueue.Dequeue();
+ }
+ }
- //manages the queue during work
- private void DoWork()
- {
- {
- //start processing the first word range, and pop it if we get to the end
- if (ProcessWordRange((MshtmlWordRange)_workerQueue.Peek()))
- _workerQueue.Dequeue();
- }
- }
+ //iterates through a word range checking for spelling errors
+ //return: whether the word range is finished (true) or not
+ private bool ProcessWordRange(MshtmlWordRange wordRange)
+ {
+ if (wordRange.CurrentWordRange.Positioned)
+ {
+ //track where we will need to clear;
+ MarkupPointer start = _markupServices.CreateMarkupPointer();
+ start.MoveToPointer(wordRange.CurrentWordRange.End);
+ ArrayList highlightwords = new ArrayList(NUMBER_OF_WORDS_TO_CHECK);
- //iterates through a word range checking for spelling errors
- //return: whether the word range is finished (true) or not
- private bool ProcessWordRange(MshtmlWordRange wordRange)
- {
- if (wordRange.CurrentWordRange.Positioned)
- {
- //track where we will need to clear;
- MarkupPointer start = _markupServices.CreateMarkupPointer();
- start.MoveToPointer(wordRange.CurrentWordRange.End);
- ArrayList highlightwords = new ArrayList(NUMBER_OF_WORDS_TO_CHECK);
-
- int i = 0;
- //to do....the word range is losing its place when it stays in the queue
- while (wordRange.HasNext() && i < NUMBER_OF_WORDS_TO_CHECK )
- {
- // advance to the next word
- wordRange.Next() ;
- // check the spelling
- int offset, length;
- if (ProcessWord(wordRange, out offset, out length))
- {
- MarkupRange highlightRange = wordRange.CurrentWordRange.Clone();
- MarkupHelpers.AdjustMarkupRange(ref stagingTextRange, highlightRange, offset, length);
+ int i = 0;
+ //to do....the word range is losing its place when it stays in the queue
+ while (wordRange.HasNext() && i < NUMBER_OF_WORDS_TO_CHECK )
+ {
+ // advance to the next word
+ wordRange.Next() ;
+ // check the spelling
+ int offset, length;
+ if (ProcessWord(wordRange, out offset, out length))
+ {
+ MarkupRange highlightRange = wordRange.CurrentWordRange.Clone();
+ MarkupHelpers.AdjustMarkupRange(ref stagingTextRange, highlightRange, offset, length);
//note: cannot just push the current word range here, as it moves before we get to the highlighting step
- highlightwords.Add(highlightRange);
- }
- i++;
- }
- MarkupPointer end = wordRange.CurrentWordRange.End;
+ highlightwords.Add(highlightRange);
+ }
+ i++;
+ }
+ MarkupPointer end = wordRange.CurrentWordRange.End;
- //got our words, clear the checked range and then add the misspellings
- ClearRange(start, end);
- foreach (MarkupRange word in highlightwords)
- {
- HighlightWordRange(word);
- }
+ //got our words, clear the checked range and then add the misspellings
+ ClearRange(start, end);
+ foreach (MarkupRange word in highlightwords)
+ {
+ HighlightWordRange(word);
+ }
- return !wordRange.HasNext();
- }
- else
- return true;
- }
+ return !wordRange.HasNext();
+ }
+ else
+ return true;
+ }
- //takes one the first word on the range, and checks it for spelling errors
- //***returns true if word is misspelled***
- private bool ProcessWord(MshtmlWordRange word, out int offset, out int length)
- {
- offset = 0;
- length = 0;
+ //takes one the first word on the range, and checks it for spelling errors
+ //***returns true if word is misspelled***
+ private bool ProcessWord(MshtmlWordRange word, out int offset, out int length)
+ {
+ offset = 0;
+ length = 0;
- string otherWord = null;
- SpellCheckResult result;
- string currentWord = word.CurrentWord;
+ string otherWord = null;
+ SpellCheckResult result;
+ string currentWord = word.CurrentWord;
if (!word.IsCurrentWordUrlPart() && !WordRangeHelper.ContainsOnlySymbols(currentWord))
- result = _spellingChecker.CheckWord( currentWord, out otherWord, out offset, out length ) ;
- else
- result = SpellCheckResult.Correct;
+ result = _spellingChecker.CheckWord( currentWord, out otherWord, out offset, out length ) ;
+ else
+ result = SpellCheckResult.Correct;
- if (result != SpellCheckResult.Correct)
- {
- //note: currently using this to not show any errors in smart content, since the fix isn't
- // propogated to the underlying data structure
- if (!word.FilterApplies())
- {
- return true;
- }
- }
- return false;
- }
+ if (result != SpellCheckResult.Correct)
+ {
+ //note: currently using this to not show any errors in smart content, since the fix isn't
+ // propogated to the underlying data structure
+ if (!word.FilterApplies())
+ {
+ return true;
+ }
+ }
+ return false;
+ }
- private bool ProcessWord(string word)
- {
- int offset, length;
- string otherWord ;
- SpellCheckResult result;
- result = _spellingChecker.CheckWord( word, out otherWord, out offset, out length ) ;
- if (result == SpellCheckResult.Correct)
- {
- return false;
- }
- return true;
- }
+ private bool ProcessWord(string word)
+ {
+ int offset, length;
+ string otherWord ;
+ SpellCheckResult result;
+ result = _spellingChecker.CheckWord( word, out otherWord, out offset, out length ) ;
+ if (result == SpellCheckResult.Correct)
+ {
+ return false;
+ }
+ return true;
+ }
- ///
- /// Highlight the current word range
- ///
- ///
- private IHTMLRenderStyle _highlightWordStyle;
- IHTMLRenderStyle HighlightWordStyle
- {
- get
- {
+ ///
+ /// Highlight the current word range
+ ///
+ ///
+ private IHTMLRenderStyle _highlightWordStyle;
+ IHTMLRenderStyle HighlightWordStyle
+ {
+ get
+ {
if(_highlightWordStyle == null)
{
_highlightWordStyle = _htmlDocument.createRenderStyle(null);
@@ -223,12 +222,12 @@ namespace OpenLiveWriter.SpellChecker
_highlightWordStyle.textBackgroundColor = "transparent";
_highlightWordStyle.textColor = "transparent";
}
- return _highlightWordStyle;
- }
- }
+ return _highlightWordStyle;
+ }
+ }
- private void HighlightWordRange(MarkupRange word)
- {
+ private void HighlightWordRange(MarkupRange word)
+ {
try
{
IHighlightSegmentRaw segment;
@@ -250,71 +249,71 @@ namespace OpenLiveWriter.SpellChecker
return;
throw;
}
- }
+ }
- private IHTMLTxtRange stagingTextRange;
+ private IHTMLTxtRange stagingTextRange;
- //remove any covered segments from the tracker and clear their highlights
- public void ClearRange(MarkupPointer start, MarkupPointer end)
- {
- IHighlightSegmentRaw[] segments =
- _tracker.GetSegments(start.PointerRaw, end.PointerRaw);
- if (segments != null)
- {
- for (int i = 0; i < segments.Length; i++)
- {
- _highlightRenderingServices.RemoveSegment(segments[i]);
- }
- }
- }
+ //remove any covered segments from the tracker and clear their highlights
+ public void ClearRange(MarkupPointer start, MarkupPointer end)
+ {
+ IHighlightSegmentRaw[] segments =
+ _tracker.GetSegments(start.PointerRaw, end.PointerRaw);
+ if (segments != null)
+ {
+ for (int i = 0; i < segments.Length; i++)
+ {
+ _highlightRenderingServices.RemoveSegment(segments[i]);
+ }
+ }
+ }
- //remove all misspellings from tracker and clear their highlights
- //used when turning spell checking on and off
- public void Reset()
- {
- _timer.Enabled = false;
- stagingTextRange = null;
- _workerQueue.Clear();
- IHighlightSegmentRaw[] allWords = _tracker.ClearAllSegments();
- for (int i = 0; i < allWords.Length; i++)
- {
- _highlightRenderingServices.RemoveSegment(allWords[i]);
- }
- }
+ //remove all misspellings from tracker and clear their highlights
+ //used when turning spell checking on and off
+ public void Reset()
+ {
+ _timer.Enabled = false;
+ stagingTextRange = null;
+ _workerQueue.Clear();
+ IHighlightSegmentRaw[] allWords = _tracker.ClearAllSegments();
+ for (int i = 0; i < allWords.Length; i++)
+ {
+ _highlightRenderingServices.RemoveSegment(allWords[i]);
+ }
+ }
- //used for ignore all, add to dictionary to remove highlights from new word
- public void UnhighlightWord(string word)
- {
- HighlightSegmentTracker.MatchingSegment[] relevantHighlights = _tracker.GetSegments(word, new HighlightSegmentTracker.CheckWordSpelling(ProcessWord));
- for (int i = 0; i < relevantHighlights.Length; i++)
- {
- HighlightSegmentTracker.MatchingSegment segment = relevantHighlights[i];
- _highlightRenderingServices.RemoveSegment(segment._segment);
- _tracker.RemoveSegment(segment._pointer);
- }
- }
+ //used for ignore all, add to dictionary to remove highlights from new word
+ public void UnhighlightWord(string word)
+ {
+ HighlightSegmentTracker.MatchingSegment[] relevantHighlights = _tracker.GetSegments(word, new HighlightSegmentTracker.CheckWordSpelling(ProcessWord));
+ for (int i = 0; i < relevantHighlights.Length; i++)
+ {
+ HighlightSegmentTracker.MatchingSegment segment = relevantHighlights[i];
+ _highlightRenderingServices.RemoveSegment(segment._segment);
+ _tracker.RemoveSegment(segment._pointer);
+ }
+ }
- public MisspelledWordInfo FindMisspelling(MarkupPointer markupPointer)
- {
- return _tracker.FindSegment(_markupServices, markupPointer.PointerRaw);
- }
+ public MisspelledWordInfo FindMisspelling(MarkupPointer markupPointer)
+ {
+ return _tracker.FindSegment(_markupServices, markupPointer.PointerRaw);
+ }
- #region IDisposable Members
+ #region IDisposable Members
- public void Dispose()
- {
- _timer.Stop();
- if (_tracker != null)
- _tracker = null;
- if (_workerQueue != null)
- _workerQueue = null;
- }
+ public void Dispose()
+ {
+ _timer.Stop();
+ if (_tracker != null)
+ _tracker = null;
+ if (_workerQueue != null)
+ _workerQueue = null;
+ }
- #endregion
+ #endregion
- public void UnhighlightRange(MarkupRange range)
- {
- IHighlightSegmentRaw[] segments = _tracker.GetSegments(range.Start.PointerRaw, range.End.PointerRaw);
+ public void UnhighlightRange(MarkupRange range)
+ {
+ IHighlightSegmentRaw[] segments = _tracker.GetSegments(range.Start.PointerRaw, range.End.PointerRaw);
if (segments == null)
{
@@ -324,6 +323,6 @@ namespace OpenLiveWriter.SpellChecker
foreach (IHighlightSegmentRaw segment in segments)
_highlightRenderingServices.RemoveSegment(segment);
- }
- }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/SpellingPreferencesPanel.cs b/src/managed/OpenLiveWriter.SpellChecker/SpellingPreferencesPanel.cs
index 87a2052d..cff70caa 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/SpellingPreferencesPanel.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/SpellingPreferencesPanel.cs
@@ -144,7 +144,6 @@ namespace OpenLiveWriter.SpellChecker
LayoutHelper.FixupGroupBox(8, _groupBoxGeneralOptions);
}
-
///
/// Save data
///
diff --git a/src/managed/OpenLiveWriter.SpellChecker/SpellingSettings.cs b/src/managed/OpenLiveWriter.SpellChecker/SpellingSettings.cs
index 71eb9470..64cf9240 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/SpellingSettings.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/SpellingSettings.cs
@@ -158,7 +158,6 @@ namespace OpenLiveWriter.SpellChecker
private const string IGNORE_UPPERCASE = "IgnoreUppercase";
private const bool IGNORE_UPPERCASE_DEFAULT = true;
-
///
/// Ignore words with numbers
///
diff --git a/src/managed/OpenLiveWriter.SpellChecker/SpellingTimer.cs b/src/managed/OpenLiveWriter.SpellChecker/SpellingTimer.cs
index 3d197f0c..b578168f 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/SpellingTimer.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/SpellingTimer.cs
@@ -5,11 +5,11 @@ using System;
namespace OpenLiveWriter.SpellChecker
{
- public class SpellingTimer : System.Windows.Forms.Timer
- {
- public SpellingTimer(int interval)
- {
- Interval = interval;
- }
- }
+ public class SpellingTimer : System.Windows.Forms.Timer
+ {
+ public SpellingTimer(int interval)
+ {
+ Interval = interval;
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter.SpellChecker/TextBoxWordRange.cs b/src/managed/OpenLiveWriter.SpellChecker/TextBoxWordRange.cs
index afc3889c..788fc1e1 100644
--- a/src/managed/OpenLiveWriter.SpellChecker/TextBoxWordRange.cs
+++ b/src/managed/OpenLiveWriter.SpellChecker/TextBoxWordRange.cs
@@ -9,175 +9,175 @@ using OpenLiveWriter.Mshtml;
namespace OpenLiveWriter.SpellChecker
{
- ///
- /// IWordRange implementation for Windows Forms text boxes.
- ///
- public class TextBoxWordRange : IWordRange
- {
- private readonly TextBox textBox;
+ ///
+ /// IWordRange implementation for Windows Forms text boxes.
+ ///
+ public class TextBoxWordRange : IWordRange
+ {
+ private readonly TextBox textBox;
- // pointer for start of current word.
- private int startPos;
+ // pointer for start of current word.
+ private int startPos;
- // pointer for end of current word.
- private int endPos;
+ // pointer for end of current word.
+ private int endPos;
- private bool highlighted;
- private string text;
+ private bool highlighted;
+ private string text;
- // the index of the end of the textbox or selection.
- private int limit;
+ // the index of the end of the textbox or selection.
+ private int limit;
- public TextBoxWordRange(TextBox textBox, bool respectExistingSelection)
- {
- this.textBox = textBox;
- this.text = textBox.Text;
+ public TextBoxWordRange(TextBox textBox, bool respectExistingSelection)
+ {
+ this.textBox = textBox;
+ this.text = textBox.Text;
- this.startPos = -1;
- if (textBox.SelectionLength == 0 || !respectExistingSelection)
- {
- this.endPos = 0;
- this.limit = textBox.TextLength;
- }
- else
- {
- this.endPos = StartPosForSelection(textBox.SelectionStart);
- this.limit = textBox.SelectionStart + textBox.SelectionLength;
- }
+ this.startPos = -1;
+ if (textBox.SelectionLength == 0 || !respectExistingSelection)
+ {
+ this.endPos = 0;
+ this.limit = textBox.TextLength;
+ }
+ else
+ {
+ this.endPos = StartPosForSelection(textBox.SelectionStart);
+ this.limit = textBox.SelectionStart + textBox.SelectionLength;
+ }
- this.highlighted = false;
- }
+ this.highlighted = false;
+ }
- ///
- /// Is there another word in the range?
- ///
- /// true if there is another word in the range
- public bool HasNext()
- {
- return NextWordStart() != -1;
- }
+ ///
+ /// Is there another word in the range?
+ ///
+ /// true if there is another word in the range
+ public bool HasNext()
+ {
+ return NextWordStart() != -1;
+ }
- ///
- /// Advance to the next word in the range
- ///
- public void Next()
- {
- startPos = NextWordStart();
- endPos = FindEndOfWord(startPos);
- }
+ ///
+ /// Advance to the next word in the range
+ ///
+ public void Next()
+ {
+ startPos = NextWordStart();
+ endPos = FindEndOfWord(startPos);
+ }
- ///
- /// Get the current word
- ///
- public string CurrentWord
- {
- get
- {
- return text.Substring(startPos, endPos - startPos);
- }
- }
+ ///
+ /// Get the current word
+ ///
+ public string CurrentWord
+ {
+ get
+ {
+ return text.Substring(startPos, endPos - startPos);
+ }
+ }
- public void PlaceCursor()
- {
- textBox.SelectionStart = endPos;
- textBox.SelectionLength = 0;
- }
+ public void PlaceCursor()
+ {
+ textBox.SelectionStart = endPos;
+ textBox.SelectionLength = 0;
+ }
- ///
- /// Highlight the current word
- ///
- public void Highlight(int offset, int length)
- {
- textBox.SelectionStart = startPos + offset;
- textBox.SelectionLength = length;
- highlighted = true;
- }
+ ///
+ /// Highlight the current word
+ ///
+ public void Highlight(int offset, int length)
+ {
+ textBox.SelectionStart = startPos + offset;
+ textBox.SelectionLength = length;
+ highlighted = true;
+ }
- ///
- /// Remove highlighting from the range
- ///
- public void RemoveHighlight()
- {
- textBox.SelectionLength = 0;
- }
+ ///
+ /// Remove highlighting from the range
+ ///
+ public void RemoveHighlight()
+ {
+ textBox.SelectionLength = 0;
+ }
- ///
- /// Replace the current word
- ///
- /// text to replace word with
- public void Replace(int offset, int length, string newText )
- {
- text = text.Substring(0, startPos) + StringHelper.Replace(CurrentWord, offset, length, newText) + text.Substring(endPos);
+ ///
+ /// Replace the current word
+ ///
+ /// text to replace word with
+ public void Replace(int offset, int length, string newText )
+ {
+ text = text.Substring(0, startPos) + StringHelper.Replace(CurrentWord, offset, length, newText) + text.Substring(endPos);
- int delta = newText.Length - (endPos - startPos);
- limit += delta;
- endPos += delta;
+ int delta = newText.Length - (endPos - startPos);
+ limit += delta;
+ endPos += delta;
- textBox.Text = text;
+ textBox.Text = text;
- textBox.SelectionStart = startPos;
- textBox.SelectionLength = highlighted ? endPos - startPos : 0;
- }
+ textBox.SelectionStart = startPos;
+ textBox.SelectionLength = highlighted ? endPos - startPos : 0;
+ }
- public bool IsCurrentWordUrlPart()
- {
- return false;
- }
+ public bool IsCurrentWordUrlPart()
+ {
+ return false;
+ }
- public bool FilterApplies()
- {
- return false;
- }
+ public bool FilterApplies()
+ {
+ return false;
+ }
public bool FilterAppliesRanged(int offset, int length)
- {
- return false;
- }
+ {
+ return false;
+ }
- private int StartPosForSelection(int selectionStart)
- {
- if (selectionStart == 0)
- return 0;
+ private int StartPosForSelection(int selectionStart)
+ {
+ if (selectionStart == 0)
+ return 0;
- if (!(IsWordChar(text[selectionStart - 1]) && IsWordChar(text[selectionStart])))
- return selectionStart;
+ if (!(IsWordChar(text[selectionStart - 1]) && IsWordChar(text[selectionStart])))
+ return selectionStart;
- int lastNonWord = 0;
- for (int i = 0; i < selectionStart; i++)
- {
- if (!IsWordChar(text[i]))
- lastNonWord = i;
- }
- return lastNonWord + 1;
- }
+ int lastNonWord = 0;
+ for (int i = 0; i < selectionStart; i++)
+ {
+ if (!IsWordChar(text[i]))
+ lastNonWord = i;
+ }
+ return lastNonWord + 1;
+ }
- private int NextWordStart()
- {
- for (int i = endPos; i < limit; i++)
- {
- if (IsWordChar(text[i]))
- return i;
- }
- return -1;
- }
+ private int NextWordStart()
+ {
+ for (int i = endPos; i < limit; i++)
+ {
+ if (IsWordChar(text[i]))
+ return i;
+ }
+ return -1;
+ }
- private int FindEndOfWord(int startIndex)
- {
- if (startIndex == -1 || startIndex >= limit)
- return -1;
+ private int FindEndOfWord(int startIndex)
+ {
+ if (startIndex == -1 || startIndex >= limit)
+ return -1;
- Trace.Assert(IsWordChar(text[startIndex]), "Asked to find end of word starting from invalid char " + text[startIndex]);
+ Trace.Assert(IsWordChar(text[startIndex]), "Asked to find end of word starting from invalid char " + text[startIndex]);
- for (int i = startIndex + 1; i < text.Length; i++)
- {
- if (!IsWordChar(text[i]))
- return i;
- }
- return text.Length;
- }
+ for (int i = startIndex + 1; i < text.Length; i++)
+ {
+ if (!IsWordChar(text[i]))
+ return i;
+ }
+ return text.Length;
+ }
- private bool IsWordChar(char c)
- {
- return char.IsLetterOrDigit(c) || c == '\'';
- }
- }
+ private bool IsWordChar(char c)
+ {
+ return char.IsLetterOrDigit(c) || c == '\'';
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter/ApplicationMain.cs b/src/managed/OpenLiveWriter/ApplicationMain.cs
index 34bc5701..2cd1bc2b 100644
--- a/src/managed/OpenLiveWriter/ApplicationMain.cs
+++ b/src/managed/OpenLiveWriter/ApplicationMain.cs
@@ -109,7 +109,6 @@ namespace OpenLiveWriter
UrlMon.CoInternetSetFeatureEnabled(FEATURE.DISABLE_NAVIGATION_SOUNDS, INTERNETSETFEATURE.ON_PROCESS, true);
}
-
private static void LoadCulture(string cultureName)
{
try
diff --git a/src/managed/OpenLiveWriter/PaintingTestForm.cs b/src/managed/OpenLiveWriter/PaintingTestForm.cs
index d91164ce..c917147d 100644
--- a/src/managed/OpenLiveWriter/PaintingTestForm.cs
+++ b/src/managed/OpenLiveWriter/PaintingTestForm.cs
@@ -14,270 +14,263 @@ namespace OpenLiveWriter
{
+ ///
+ /// Summary description for PaintingTestForm.
+ ///
+ public class PaintingTestForm : Form
+ {
- ///
- /// Summary description for PaintingTestForm.
- ///
- public class PaintingTestForm : Form
- {
+ class TransparentLinkLabel : LinkLabel
+ {
+ public TransparentLinkLabel()
+ {
+ SetStyle(ControlStyles.SupportsTransparentBackColor, true);
+ BackColor = Color.Transparent ;
+ FlatStyle = FlatStyle.System ;
+ Cursor = Cursors.Hand ;
+ LinkBehavior = LinkBehavior.HoverUnderline ;
+ }
- class TransparentLinkLabel : LinkLabel
- {
- public TransparentLinkLabel()
- {
- SetStyle(ControlStyles.SupportsTransparentBackColor, true);
- BackColor = Color.Transparent ;
- FlatStyle = FlatStyle.System ;
- Cursor = Cursors.Hand ;
- LinkBehavior = LinkBehavior.HoverUnderline ;
- }
+ }
+
+ class TransparentLabel : Label
+ {
+ public TransparentLabel()
+ {
+ SetStyle(ControlStyles.SupportsTransparentBackColor, true);
+ BackColor = Color.Transparent ;
+ }
+
+ }
+
+ private TransparentLinkLabel linkLabel1;
+ private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel1;
+ private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel2;
+ private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel3;
+ private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel4;
+ private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel5;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
+
+ public static void Main(string[] args)
+ {
+ Application.Run(new PaintingTestForm());
+ }
+
+ public PaintingTestForm()
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- }
+ // Turn off CS_CLIPCHILDREN.
+ //User32.SetWindowLong(Handle, GWL.STYLE, User32.GetWindowLong(Handle, GWL.STYLE) & ~WS.CLIPCHILDREN);
- class TransparentLabel : Label
- {
- public TransparentLabel()
- {
- SetStyle(ControlStyles.SupportsTransparentBackColor, true);
- BackColor = Color.Transparent ;
- }
+ // Turn on double buffered painting.
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.DoubleBuffer, true);
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+
+ }
+
+ protected override void OnSizeChanged(EventArgs e)
+ {
+ base.OnSizeChanged (e);
+ Invalidate();
+ }
+
+ /*
+ protected override void OnPaintBackground(PaintEventArgs pevent)
+ {
+
+ }
+ */
- }
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ // paint background
+ using ( Brush brush = new LinearGradientBrush(ClientRectangle, ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTopColor, ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor, LinearGradientMode.Vertical))
+ e.Graphics.FillRectangle(brush, ClientRectangle);
- private TransparentLinkLabel linkLabel1;
- private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel1;
- private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel2;
- private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel3;
- private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel4;
- private OpenLiveWriter.PaintingTestForm.TransparentLinkLabel transparentLinkLabel5;
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.Button button2;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ // paint headers
+ using ( Brush brush = new SolidBrush(ForeColor) )
+ {
+ e.Graphics.DrawString("Header1", Font, brush, linkLabel1.Left, linkLabel1.Top - 20) ;
- public static void Main(string[] args)
- {
- Application.Run(new PaintingTestForm());
- }
+ e.Graphics.DrawString("Header2", Font, brush, transparentLinkLabel5.Left, transparentLinkLabel5.Top - 20) ;
+ }
- public PaintingTestForm()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.linkLabel1 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
+ this.transparentLinkLabel1 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
+ this.transparentLinkLabel2 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
+ this.transparentLinkLabel3 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
+ this.transparentLinkLabel4 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
+ this.transparentLinkLabel5 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // linkLabel1
+ //
+ this.linkLabel1.BackColor = System.Drawing.Color.Transparent;
+ this.linkLabel1.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.linkLabel1.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
+ this.linkLabel1.Location = new System.Drawing.Point(64, 56);
+ this.linkLabel1.Name = "linkLabel1";
+ this.linkLabel1.Size = new System.Drawing.Size(120, 24);
+ this.linkLabel1.TabIndex = 0;
+ this.linkLabel1.TabStop = true;
+ this.linkLabel1.Text = "linkLabel1";
+ //
+ // transparentLinkLabel1
+ //
+ this.transparentLinkLabel1.BackColor = System.Drawing.Color.Transparent;
+ this.transparentLinkLabel1.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.transparentLinkLabel1.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.transparentLinkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
+ this.transparentLinkLabel1.Location = new System.Drawing.Point(64, 80);
+ this.transparentLinkLabel1.Name = "transparentLinkLabel1";
+ this.transparentLinkLabel1.Size = new System.Drawing.Size(120, 24);
+ this.transparentLinkLabel1.TabIndex = 1;
+ this.transparentLinkLabel1.TabStop = true;
+ this.transparentLinkLabel1.Text = "transparentLinkLabel1";
+ //
+ // transparentLinkLabel2
+ //
+ this.transparentLinkLabel2.BackColor = System.Drawing.Color.Transparent;
+ this.transparentLinkLabel2.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.transparentLinkLabel2.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.transparentLinkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
+ this.transparentLinkLabel2.Location = new System.Drawing.Point(64, 104);
+ this.transparentLinkLabel2.Name = "transparentLinkLabel2";
+ this.transparentLinkLabel2.TabIndex = 0;
+ this.transparentLinkLabel2.TabStop = true;
+ this.transparentLinkLabel2.Text = "last label";
+ //
+ // transparentLinkLabel3
+ //
+ this.transparentLinkLabel3.BackColor = System.Drawing.Color.Transparent;
+ this.transparentLinkLabel3.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.transparentLinkLabel3.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.transparentLinkLabel3.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
+ this.transparentLinkLabel3.Location = new System.Drawing.Point(64, 208);
+ this.transparentLinkLabel3.Name = "transparentLinkLabel3";
+ this.transparentLinkLabel3.TabIndex = 3;
+ this.transparentLinkLabel3.TabStop = true;
+ this.transparentLinkLabel3.Text = "last label";
+ //
+ // transparentLinkLabel4
+ //
+ this.transparentLinkLabel4.BackColor = System.Drawing.Color.Transparent;
+ this.transparentLinkLabel4.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.transparentLinkLabel4.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.transparentLinkLabel4.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
+ this.transparentLinkLabel4.Location = new System.Drawing.Point(64, 184);
+ this.transparentLinkLabel4.Name = "transparentLinkLabel4";
+ this.transparentLinkLabel4.Size = new System.Drawing.Size(120, 24);
+ this.transparentLinkLabel4.TabIndex = 4;
+ this.transparentLinkLabel4.TabStop = true;
+ this.transparentLinkLabel4.Text = "transparentLinkLabel4";
+ //
+ // transparentLinkLabel5
+ //
+ this.transparentLinkLabel5.BackColor = System.Drawing.Color.Transparent;
+ this.transparentLinkLabel5.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.transparentLinkLabel5.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.transparentLinkLabel5.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
+ this.transparentLinkLabel5.Location = new System.Drawing.Point(64, 160);
+ this.transparentLinkLabel5.Name = "transparentLinkLabel5";
+ this.transparentLinkLabel5.TabIndex = 5;
+ this.transparentLinkLabel5.TabStop = true;
+ this.transparentLinkLabel5.Text = "label5";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(216, 96);
+ this.button1.Name = "button1";
+ this.button1.TabIndex = 6;
+ this.button1.Text = "Show";
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(216, 128);
+ this.button2.Name = "button2";
+ this.button2.TabIndex = 7;
+ this.button2.Text = "Hide";
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // PaintingTestForm
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(304, 266);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.transparentLinkLabel3);
+ this.Controls.Add(this.transparentLinkLabel4);
+ this.Controls.Add(this.transparentLinkLabel5);
+ this.Controls.Add(this.transparentLinkLabel2);
+ this.Controls.Add(this.transparentLinkLabel1);
+ this.Controls.Add(this.linkLabel1);
+ this.Name = "PaintingTestForm";
+ this.Text = "PaintingTestForm";
+ this.ResumeLayout(false);
- // Turn off CS_CLIPCHILDREN.
- //User32.SetWindowLong(Handle, GWL.STYLE, User32.GetWindowLong(Handle, GWL.STYLE) & ~WS.CLIPCHILDREN);
+ }
+ #endregion
- // Turn on double buffered painting.
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.DoubleBuffer, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ private void button1_Click(object sender, System.EventArgs e)
+ {
+ transparentLinkLabel1.Visible = true ;
+ transparentLinkLabel2.Top += transparentLinkLabel1.Height ;
+ transparentLinkLabel3.Top += transparentLinkLabel1.Height ;
+ transparentLinkLabel4.Top += transparentLinkLabel1.Height ;
+ transparentLinkLabel5.Top += transparentLinkLabel1.Height ;
+ Invalidate(false);
- }
+ }
- protected override void OnSizeChanged(EventArgs e)
- {
- base.OnSizeChanged (e);
- Invalidate();
- }
+ private void button2_Click(object sender, System.EventArgs e)
+ {
- /*
- protected override void OnPaintBackground(PaintEventArgs pevent)
- {
-
- }
- */
-
-
-
- protected override void OnPaint(PaintEventArgs e)
- {
- // paint background
- using ( Brush brush = new LinearGradientBrush(ClientRectangle, ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarTopColor, ApplicationManager.ApplicationStyle.PrimaryWorkspaceCommandBarBottomColor, LinearGradientMode.Vertical))
- e.Graphics.FillRectangle(brush, ClientRectangle);
-
- // paint headers
- using ( Brush brush = new SolidBrush(ForeColor) )
- {
- e.Graphics.DrawString("Header1", Font, brush, linkLabel1.Left, linkLabel1.Top - 20) ;
-
- e.Graphics.DrawString("Header2", Font, brush, transparentLinkLabel5.Left, transparentLinkLabel5.Top - 20) ;
- }
-
-
- }
-
-
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.linkLabel1 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
- this.transparentLinkLabel1 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
- this.transparentLinkLabel2 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
- this.transparentLinkLabel3 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
- this.transparentLinkLabel4 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
- this.transparentLinkLabel5 = new OpenLiveWriter.PaintingTestForm.TransparentLinkLabel();
- this.button1 = new System.Windows.Forms.Button();
- this.button2 = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // linkLabel1
- //
- this.linkLabel1.BackColor = System.Drawing.Color.Transparent;
- this.linkLabel1.Cursor = System.Windows.Forms.Cursors.Hand;
- this.linkLabel1.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
- this.linkLabel1.Location = new System.Drawing.Point(64, 56);
- this.linkLabel1.Name = "linkLabel1";
- this.linkLabel1.Size = new System.Drawing.Size(120, 24);
- this.linkLabel1.TabIndex = 0;
- this.linkLabel1.TabStop = true;
- this.linkLabel1.Text = "linkLabel1";
- //
- // transparentLinkLabel1
- //
- this.transparentLinkLabel1.BackColor = System.Drawing.Color.Transparent;
- this.transparentLinkLabel1.Cursor = System.Windows.Forms.Cursors.Hand;
- this.transparentLinkLabel1.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.transparentLinkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
- this.transparentLinkLabel1.Location = new System.Drawing.Point(64, 80);
- this.transparentLinkLabel1.Name = "transparentLinkLabel1";
- this.transparentLinkLabel1.Size = new System.Drawing.Size(120, 24);
- this.transparentLinkLabel1.TabIndex = 1;
- this.transparentLinkLabel1.TabStop = true;
- this.transparentLinkLabel1.Text = "transparentLinkLabel1";
- //
- // transparentLinkLabel2
- //
- this.transparentLinkLabel2.BackColor = System.Drawing.Color.Transparent;
- this.transparentLinkLabel2.Cursor = System.Windows.Forms.Cursors.Hand;
- this.transparentLinkLabel2.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.transparentLinkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
- this.transparentLinkLabel2.Location = new System.Drawing.Point(64, 104);
- this.transparentLinkLabel2.Name = "transparentLinkLabel2";
- this.transparentLinkLabel2.TabIndex = 0;
- this.transparentLinkLabel2.TabStop = true;
- this.transparentLinkLabel2.Text = "last label";
- //
- // transparentLinkLabel3
- //
- this.transparentLinkLabel3.BackColor = System.Drawing.Color.Transparent;
- this.transparentLinkLabel3.Cursor = System.Windows.Forms.Cursors.Hand;
- this.transparentLinkLabel3.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.transparentLinkLabel3.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
- this.transparentLinkLabel3.Location = new System.Drawing.Point(64, 208);
- this.transparentLinkLabel3.Name = "transparentLinkLabel3";
- this.transparentLinkLabel3.TabIndex = 3;
- this.transparentLinkLabel3.TabStop = true;
- this.transparentLinkLabel3.Text = "last label";
- //
- // transparentLinkLabel4
- //
- this.transparentLinkLabel4.BackColor = System.Drawing.Color.Transparent;
- this.transparentLinkLabel4.Cursor = System.Windows.Forms.Cursors.Hand;
- this.transparentLinkLabel4.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.transparentLinkLabel4.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
- this.transparentLinkLabel4.Location = new System.Drawing.Point(64, 184);
- this.transparentLinkLabel4.Name = "transparentLinkLabel4";
- this.transparentLinkLabel4.Size = new System.Drawing.Size(120, 24);
- this.transparentLinkLabel4.TabIndex = 4;
- this.transparentLinkLabel4.TabStop = true;
- this.transparentLinkLabel4.Text = "transparentLinkLabel4";
- //
- // transparentLinkLabel5
- //
- this.transparentLinkLabel5.BackColor = System.Drawing.Color.Transparent;
- this.transparentLinkLabel5.Cursor = System.Windows.Forms.Cursors.Hand;
- this.transparentLinkLabel5.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.transparentLinkLabel5.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
- this.transparentLinkLabel5.Location = new System.Drawing.Point(64, 160);
- this.transparentLinkLabel5.Name = "transparentLinkLabel5";
- this.transparentLinkLabel5.TabIndex = 5;
- this.transparentLinkLabel5.TabStop = true;
- this.transparentLinkLabel5.Text = "label5";
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(216, 96);
- this.button1.Name = "button1";
- this.button1.TabIndex = 6;
- this.button1.Text = "Show";
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // button2
- //
- this.button2.Location = new System.Drawing.Point(216, 128);
- this.button2.Name = "button2";
- this.button2.TabIndex = 7;
- this.button2.Text = "Hide";
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // PaintingTestForm
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(304, 266);
- this.Controls.Add(this.button2);
- this.Controls.Add(this.button1);
- this.Controls.Add(this.transparentLinkLabel3);
- this.Controls.Add(this.transparentLinkLabel4);
- this.Controls.Add(this.transparentLinkLabel5);
- this.Controls.Add(this.transparentLinkLabel2);
- this.Controls.Add(this.transparentLinkLabel1);
- this.Controls.Add(this.linkLabel1);
- this.Name = "PaintingTestForm";
- this.Text = "PaintingTestForm";
- this.ResumeLayout(false);
-
- }
- #endregion
-
- private void button1_Click(object sender, System.EventArgs e)
- {
- transparentLinkLabel1.Visible = true ;
- transparentLinkLabel2.Top += transparentLinkLabel1.Height ;
- transparentLinkLabel3.Top += transparentLinkLabel1.Height ;
- transparentLinkLabel4.Top += transparentLinkLabel1.Height ;
- transparentLinkLabel5.Top += transparentLinkLabel1.Height ;
- Invalidate(false);
-
- }
-
- private void button2_Click(object sender, System.EventArgs e)
- {
-
- transparentLinkLabel1.Visible = false ;
- transparentLinkLabel2.Top -= transparentLinkLabel1.Height ;
- transparentLinkLabel3.Top -= transparentLinkLabel1.Height ;
- transparentLinkLabel4.Top -= transparentLinkLabel1.Height ;
- transparentLinkLabel5.Top -= transparentLinkLabel1.Height ;
- Invalidate(false);
- }
- }
+ transparentLinkLabel1.Visible = false ;
+ transparentLinkLabel2.Top -= transparentLinkLabel1.Height ;
+ transparentLinkLabel3.Top -= transparentLinkLabel1.Height ;
+ transparentLinkLabel4.Top -= transparentLinkLabel1.Height ;
+ transparentLinkLabel5.Top -= transparentLinkLabel1.Height ;
+ Invalidate(false);
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter/TestAutoDetection.cs b/src/managed/OpenLiveWriter/TestAutoDetection.cs
index 688bbe57..4168bfc4 100644
--- a/src/managed/OpenLiveWriter/TestAutoDetection.cs
+++ b/src/managed/OpenLiveWriter/TestAutoDetection.cs
@@ -17,243 +17,242 @@ using OpenLiveWriter.Api.BlogClient ;
namespace OpenLiveWriter
{
- ///
- /// Summary description for TestAutoDetection.
- ///
- public class TestAutoDetection : System.Windows.Forms.Form
- {
+ ///
+ /// Summary description for TestAutoDetection.
+ ///
+ public class TestAutoDetection : System.Windows.Forms.Form
+ {
- [STAThread]
- public static void Main(string[] args )
- {
- ApplicationEnvironment.Initialize();
- Application.Run( new TestAutoDetection() ) ;
- }
+ [STAThread]
+ public static void Main(string[] args )
+ {
+ ApplicationEnvironment.Initialize();
+ Application.Run( new TestAutoDetection() ) ;
+ }
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.TextBox textBoxResults;
- private System.Windows.Forms.Button buttonAutoDetectWeblog;
- private System.Windows.Forms.TextBox textBoxPassword;
- private System.Windows.Forms.TextBox textBoxUsername;
- private OpenLiveWriter.PostEditor.Configuration.WeblogHomepageUrlControl weblogHomepageUrlControl;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox textBoxResults;
+ private System.Windows.Forms.Button buttonAutoDetectWeblog;
+ private System.Windows.Forms.TextBox textBoxPassword;
+ private System.Windows.Forms.TextBox textBoxUsername;
+ private OpenLiveWriter.PostEditor.Configuration.WeblogHomepageUrlControl weblogHomepageUrlControl;
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public TestAutoDetection()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ public TestAutoDetection()
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- textBoxPassword.PasswordChar = (char) 0x25cf;
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ textBoxPassword.PasswordChar = (char) 0x25cf;
+ }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
- textBoxUsername.Text = settings.GetString("Username", String.Empty) ;
- textBoxPassword.Text = settings.GetString("Password", String.Empty );
- weblogHomepageUrlControl.HomepageUrl = settings.GetString("WeblogUrl", String.Empty);
- }
+ textBoxUsername.Text = settings.GetString("Username", String.Empty) ;
+ textBoxPassword.Text = settings.GetString("Password", String.Empty );
+ weblogHomepageUrlControl.HomepageUrl = settings.GetString("WeblogUrl", String.Empty);
+ }
- protected override void OnClosing(CancelEventArgs e)
- {
- base.OnClosing (e);
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ base.OnClosing (e);
- settings.SetString( "Username", textBoxUsername.Text );
- settings.SetString( "Password", textBoxPassword.Text );
- settings.SetString( "WeblogUrl", weblogHomepageUrlControl.HomepageUrl);
- }
+ settings.SetString( "Username", textBoxUsername.Text );
+ settings.SetString( "Password", textBoxPassword.Text );
+ settings.SetString( "WeblogUrl", weblogHomepageUrlControl.HomepageUrl);
+ }
- private SettingsPersisterHelper settings = ApplicationEnvironment.UserSettingsRoot.GetSubSettings("AutoDetectionTest");
+ private SettingsPersisterHelper settings = ApplicationEnvironment.UserSettingsRoot.GetSubSettings("AutoDetectionTest");
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.label2 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.textBoxPassword = new System.Windows.Forms.TextBox();
- this.textBoxUsername = new System.Windows.Forms.TextBox();
- this.label4 = new System.Windows.Forms.Label();
- this.weblogHomepageUrlControl = new OpenLiveWriter.PostEditor.Configuration.WeblogHomepageUrlControl();
- this.buttonAutoDetectWeblog = new System.Windows.Forms.Button();
- this.textBoxResults = new System.Windows.Forms.TextBox();
- this.SuspendLayout();
- //
- // label2
- //
- this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.label2.Location = new System.Drawing.Point(16, 16);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(288, 40);
- this.label2.TabIndex = 18;
- this.label2.Text = "Please enter the URL of your Weblog\'s home page and the username and password tha" +
- "t you use to log in to your Weblog.";
- //
- // label3
- //
- this.label3.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.label3.Location = new System.Drawing.Point(168, 112);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(128, 13);
- this.label3.TabIndex = 16;
- this.label3.Text = "&Password:";
- //
- // textBoxPassword
- //
- this.textBoxPassword.Location = new System.Drawing.Point(168, 128);
- this.textBoxPassword.Name = "textBoxPassword";
- this.textBoxPassword.PasswordChar = '*';
- this.textBoxPassword.Size = new System.Drawing.Size(136, 20);
- this.textBoxPassword.TabIndex = 17;
- this.textBoxPassword.Text = "";
- //
- // textBoxUsername
- //
- this.textBoxUsername.Location = new System.Drawing.Point(16, 128);
- this.textBoxUsername.Name = "textBoxUsername";
- this.textBoxUsername.Size = new System.Drawing.Size(137, 20);
- this.textBoxUsername.TabIndex = 15;
- this.textBoxUsername.Text = "";
- //
- // label4
- //
- this.label4.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.label4.Location = new System.Drawing.Point(16, 112);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(128, 13);
- this.label4.TabIndex = 14;
- this.label4.Text = "&Username:";
- //
- // weblogHomepageUrlControl
- //
- this.weblogHomepageUrlControl.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
- this.weblogHomepageUrlControl.HomepageUrl = "";
- this.weblogHomepageUrlControl.Location = new System.Drawing.Point(16, 64);
- this.weblogHomepageUrlControl.Name = "weblogHomepageUrlControl";
- this.weblogHomepageUrlControl.Size = new System.Drawing.Size(288, 37);
- this.weblogHomepageUrlControl.TabIndex = 13;
- //
- // buttonAutoDetectWeblog
- //
- this.buttonAutoDetectWeblog.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonAutoDetectWeblog.Location = new System.Drawing.Point(88, 168);
- this.buttonAutoDetectWeblog.Name = "buttonAutoDetectWeblog";
- this.buttonAutoDetectWeblog.Size = new System.Drawing.Size(144, 23);
- this.buttonAutoDetectWeblog.TabIndex = 19;
- this.buttonAutoDetectWeblog.Text = "Auto Detect Weblog...";
- this.buttonAutoDetectWeblog.Click += new System.EventHandler(this.buttonAutoDetectWeblog_Click);
- //
- // textBoxResults
- //
- this.textBoxResults.Location = new System.Drawing.Point(16, 208);
- this.textBoxResults.Multiline = true;
- this.textBoxResults.Name = "textBoxResults";
- this.textBoxResults.Size = new System.Drawing.Size(288, 168);
- this.textBoxResults.TabIndex = 20;
- this.textBoxResults.Text = "";
- //
- // TestAutoDetection
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(320, 398);
- this.Controls.Add(this.textBoxResults);
- this.Controls.Add(this.buttonAutoDetectWeblog);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.textBoxPassword);
- this.Controls.Add(this.textBoxUsername);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.weblogHomepageUrlControl);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "TestAutoDetection";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "TestAutoDetection";
- this.ResumeLayout(false);
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.textBoxPassword = new System.Windows.Forms.TextBox();
+ this.textBoxUsername = new System.Windows.Forms.TextBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.weblogHomepageUrlControl = new OpenLiveWriter.PostEditor.Configuration.WeblogHomepageUrlControl();
+ this.buttonAutoDetectWeblog = new System.Windows.Forms.Button();
+ this.textBoxResults = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // label2
+ //
+ this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.label2.Location = new System.Drawing.Point(16, 16);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(288, 40);
+ this.label2.TabIndex = 18;
+ this.label2.Text = "Please enter the URL of your Weblog\'s home page and the username and password tha" +
+ "t you use to log in to your Weblog.";
+ //
+ // label3
+ //
+ this.label3.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.label3.Location = new System.Drawing.Point(168, 112);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(128, 13);
+ this.label3.TabIndex = 16;
+ this.label3.Text = "&Password:";
+ //
+ // textBoxPassword
+ //
+ this.textBoxPassword.Location = new System.Drawing.Point(168, 128);
+ this.textBoxPassword.Name = "textBoxPassword";
+ this.textBoxPassword.PasswordChar = '*';
+ this.textBoxPassword.Size = new System.Drawing.Size(136, 20);
+ this.textBoxPassword.TabIndex = 17;
+ this.textBoxPassword.Text = "";
+ //
+ // textBoxUsername
+ //
+ this.textBoxUsername.Location = new System.Drawing.Point(16, 128);
+ this.textBoxUsername.Name = "textBoxUsername";
+ this.textBoxUsername.Size = new System.Drawing.Size(137, 20);
+ this.textBoxUsername.TabIndex = 15;
+ this.textBoxUsername.Text = "";
+ //
+ // label4
+ //
+ this.label4.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.label4.Location = new System.Drawing.Point(16, 112);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(128, 13);
+ this.label4.TabIndex = 14;
+ this.label4.Text = "&Username:";
+ //
+ // weblogHomepageUrlControl
+ //
+ this.weblogHomepageUrlControl.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+ this.weblogHomepageUrlControl.HomepageUrl = "";
+ this.weblogHomepageUrlControl.Location = new System.Drawing.Point(16, 64);
+ this.weblogHomepageUrlControl.Name = "weblogHomepageUrlControl";
+ this.weblogHomepageUrlControl.Size = new System.Drawing.Size(288, 37);
+ this.weblogHomepageUrlControl.TabIndex = 13;
+ //
+ // buttonAutoDetectWeblog
+ //
+ this.buttonAutoDetectWeblog.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonAutoDetectWeblog.Location = new System.Drawing.Point(88, 168);
+ this.buttonAutoDetectWeblog.Name = "buttonAutoDetectWeblog";
+ this.buttonAutoDetectWeblog.Size = new System.Drawing.Size(144, 23);
+ this.buttonAutoDetectWeblog.TabIndex = 19;
+ this.buttonAutoDetectWeblog.Text = "Auto Detect Weblog...";
+ this.buttonAutoDetectWeblog.Click += new System.EventHandler(this.buttonAutoDetectWeblog_Click);
+ //
+ // textBoxResults
+ //
+ this.textBoxResults.Location = new System.Drawing.Point(16, 208);
+ this.textBoxResults.Multiline = true;
+ this.textBoxResults.Name = "textBoxResults";
+ this.textBoxResults.Size = new System.Drawing.Size(288, 168);
+ this.textBoxResults.TabIndex = 20;
+ this.textBoxResults.Text = "";
+ //
+ // TestAutoDetection
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(320, 398);
+ this.Controls.Add(this.textBoxResults);
+ this.Controls.Add(this.buttonAutoDetectWeblog);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.textBoxPassword);
+ this.Controls.Add(this.textBoxUsername);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.weblogHomepageUrlControl);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "TestAutoDetection";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "TestAutoDetection";
+ this.ResumeLayout(false);
- }
- #endregion
+ }
+ #endregion
- private void buttonAutoDetectWeblog_Click(object sender, System.EventArgs e)
- {
- try
- {
- textBoxResults.Text = String.Empty ;
+ private void buttonAutoDetectWeblog_Click(object sender, System.EventArgs e)
+ {
+ try
+ {
+ textBoxResults.Text = String.Empty ;
- BlogAccountDetector accountDetector = new BlogAccountDetector(this, this.weblogHomepageUrlControl.HomepageUrl, this.textBoxUsername.Text, this.textBoxPassword.Text);
+ BlogAccountDetector accountDetector = new BlogAccountDetector(this, this.weblogHomepageUrlControl.HomepageUrl, this.textBoxUsername.Text, this.textBoxPassword.Text);
- // setup the progress dialog and kick off the transfer
- using (ProgressDialog progress = new ProgressDialog())
- {
- // configure progress source
- progress.ProgressProvider = accountDetector;
+ // setup the progress dialog and kick off the transfer
+ using (ProgressDialog progress = new ProgressDialog())
+ {
+ // configure progress source
+ progress.ProgressProvider = accountDetector;
- // set progress title
- progress.Title = Text;
- progress.ProgressText = Text ;
+ // set progress title
+ progress.Title = Text;
+ progress.ProgressText = Text ;
- // start the publisher (this is a non-blocking call)
- accountDetector.Start();
+ // start the publisher (this is a non-blocking call)
+ accountDetector.Start();
- // show the progress dialog
- progress.ShowDialog(this);
- }
+ // show the progress dialog
+ progress.ShowDialog(this);
+ }
- // show error
- if ( accountDetector.ErrorOccurred )
- {
- accountDetector.ShowLastError(this);
- }
- else if (!accountDetector.WasCancelled)// ran to completion
- {
- StringBuilder resultsBuilder = new StringBuilder();
- resultsBuilder.AppendFormat( "Service: {0}\r\nClientApi: {1}\r\nPost URL: {2}\r\nBlogID: {3}\r\n\r\n",
- accountDetector.ServiceName,
- accountDetector.ClientType,
- accountDetector.PostApiUrl,
- accountDetector.BlogId ) ;
+ // show error
+ if ( accountDetector.ErrorOccurred )
+ {
+ accountDetector.ShowLastError(this);
+ }
+ else if (!accountDetector.WasCancelled)// ran to completion
+ {
+ StringBuilder resultsBuilder = new StringBuilder();
+ resultsBuilder.AppendFormat( "Service: {0}\r\nClientApi: {1}\r\nPost URL: {2}\r\nBlogID: {3}\r\n\r\n",
+ accountDetector.ServiceName,
+ accountDetector.ClientType,
+ accountDetector.PostApiUrl,
+ accountDetector.BlogId ) ;
+ foreach ( BlogInfo blog in accountDetector.UsersBlogs )
+ resultsBuilder.AppendFormat( "{0} ({1})\r\n", blog.HomepageUrl, blog.Id ) ;
- foreach ( BlogInfo blog in accountDetector.UsersBlogs )
- resultsBuilder.AppendFormat( "{0} ({1})\r\n", blog.HomepageUrl, blog.Id ) ;
-
- textBoxResults.Text = resultsBuilder.ToString() ;
- }
- }
- catch(Exception ex)
- {
- UnexpectedErrorMessage.Show(ex);
- }
- }
- }
+ textBoxResults.Text = resultsBuilder.ToString() ;
+ }
+ }
+ catch(Exception ex)
+ {
+ UnexpectedErrorMessage.Show(ex);
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter/TestMainForm.cs b/src/managed/OpenLiveWriter/TestMainForm.cs
index 3ea68462..7a608bbc 100644
--- a/src/managed/OpenLiveWriter/TestMainForm.cs
+++ b/src/managed/OpenLiveWriter/TestMainForm.cs
@@ -12,81 +12,81 @@ using OpenLiveWriter.PostEditor.PostHtmlEditing.Maps;
namespace OpenLiveWriter
{
- ///
- /// Summary description for TestMainForm.
- ///
- public class TestMainForm : System.Windows.Forms.Form
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
+ ///
+ /// Summary description for TestMainForm.
+ ///
+ public class TestMainForm : System.Windows.Forms.Form
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.Container components = null;
- public TestMainForm()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
+ public TestMainForm()
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- MapControl mapControl = new MapControl();
- mapControl.Dock = DockStyle.Fill;
- mapControl.LoadMap("48 Stone Ave., Somerville, MA");
- this.Controls.Add(mapControl);
- }
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ MapControl mapControl = new MapControl();
+ mapControl.Dock = DockStyle.Fill;
+ mapControl.LoadMap("48 Stone Ave., Somerville, MA");
+ this.Controls.Add(mapControl);
+ }
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
+ ///
+ /// Clean up any resources being used.
+ ///
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if(components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.Size = new System.Drawing.Size(300,300);
- this.Text = "TestMainForm";
- }
- #endregion
+ #region Windows Form Designer generated code
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.Size = new System.Drawing.Size(300,300);
+ this.Text = "TestMainForm";
+ }
+ #endregion
- [STAThread]
- public static void Main(string[] args)
- {
- try
- {
- // initialize application environment
- ApplicationEnvironment.Initialize();
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ try
+ {
+ // initialize application environment
+ ApplicationEnvironment.Initialize();
- //RsdServiceDescription rsdService = RsdServiceDetector.DetectFromRsdUrl("http://localhost/test/foo.rsd", 10000);
- //Trace.WriteLine(rsdService.EditingTemplateLink);
+ //RsdServiceDescription rsdService = RsdServiceDetector.DetectFromRsdUrl("http://localhost/test/foo.rsd", 10000);
+ //Trace.WriteLine(rsdService.EditingTemplateLink);
- Application.Run(new TestMainForm());
+ Application.Run(new TestMainForm());
- // launch blogging form
- //WeblogConfigurationWizardController.Add(Win32WindowImpl.DesktopWin32Window);
- //WeblogConfigurationWizardController.Edit(Win32WindowImpl.DesktopWin32Window, BlogSettings.DefaultBlogId);
- }
- catch( Exception ex )
- {
- UnexpectedErrorMessage.Show( ex ) ;
- }
- }
- }
+ // launch blogging form
+ //WeblogConfigurationWizardController.Add(Win32WindowImpl.DesktopWin32Window);
+ //WeblogConfigurationWizardController.Edit(Win32WindowImpl.DesktopWin32Window, BlogSettings.DefaultBlogId);
+ }
+ catch( Exception ex )
+ {
+ UnexpectedErrorMessage.Show( ex ) ;
+ }
+ }
+ }
}
diff --git a/src/managed/OpenLiveWriter/TestWizardMain.cs b/src/managed/OpenLiveWriter/TestWizardMain.cs
index 8e460884..1d291870 100644
--- a/src/managed/OpenLiveWriter/TestWizardMain.cs
+++ b/src/managed/OpenLiveWriter/TestWizardMain.cs
@@ -12,65 +12,63 @@ using OpenLiveWriter.BlogClient.Detection;
using OpenLiveWriter.Api.BlogClient;
using OpenLiveWriter.PostEditor.Configuration.Wizard ;
-
namespace OpenLiveWriter
{
- ///
- /// Summary description for TestWizardMain.
- ///
- public class TestWizardMain
- {
- private class TestForm : Form
- {
+ ///
+ /// Summary description for TestWizardMain.
+ ///
+ public class TestWizardMain
+ {
+ private class TestForm : Form
+ {
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+ }
- }
+ protected override void OnClick(EventArgs e)
+ {
+ base.OnClick (e);
- protected override void OnClick(EventArgs e)
- {
- base.OnClick (e);
+ try
+ {
+ BlogEditingTemplateDetector detector = new BlogEditingTemplateDetector(this);
+ detector.SetContext( "http://localhost/test/editingTemplate.htm", @"C:\Program Files\Apache Group\Apache\htdocs\test\blogtemplates" );
+ detector.DetectTemplate(SilentProgressHost.Instance) ;
- try
- {
- BlogEditingTemplateDetector detector = new BlogEditingTemplateDetector(this);
- detector.SetContext( "http://localhost/test/editingTemplate.htm", @"C:\Program Files\Apache Group\Apache\htdocs\test\blogtemplates" );
- detector.DetectTemplate(SilentProgressHost.Instance) ;
+ Trace.WriteLine(detector.BlogTemplateFile);
+ }
+ catch(Exception ex)
+ {
+ UnexpectedErrorMessage.Show( ex ) ;
+ }
+ }
+ }
- Trace.WriteLine(detector.BlogTemplateFile);
- }
- catch(Exception ex)
- {
- UnexpectedErrorMessage.Show( ex ) ;
- }
- }
- }
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ try
+ {
+ // initialize application environment
+ ApplicationEnvironment.Initialize();
- [STAThread]
- public static void Main(string[] args)
- {
- try
- {
- // initialize application environment
- ApplicationEnvironment.Initialize();
+ //RsdServiceDescription rsdService = RsdServiceDetector.DetectFromRsdUrl("http://localhost/test/foo.rsd", 10000);
+ //Trace.WriteLine(rsdService.EditingTemplateLink);
- //RsdServiceDescription rsdService = RsdServiceDetector.DetectFromRsdUrl("http://localhost/test/foo.rsd", 10000);
- //Trace.WriteLine(rsdService.EditingTemplateLink);
+ Application.Run(new TestForm());
- Application.Run(new TestForm());
-
- // launch blogging form
- //WeblogConfigurationWizardController.Add(Win32WindowImpl.DesktopWin32Window);
- //WeblogConfigurationWizardController.Edit(Win32WindowImpl.DesktopWin32Window, BlogSettings.DefaultBlogId);
- }
- catch( Exception ex )
- {
- UnexpectedErrorMessage.Show( ex ) ;
- }
- }
- }
+ // launch blogging form
+ //WeblogConfigurationWizardController.Add(Win32WindowImpl.DesktopWin32Window);
+ //WeblogConfigurationWizardController.Edit(Win32WindowImpl.DesktopWin32Window, BlogSettings.DefaultBlogId);
+ }
+ catch( Exception ex )
+ {
+ UnexpectedErrorMessage.Show( ex ) ;
+ }
+ }
+ }
}
|