Creating a branch 1.1 where I will try to make the 1.1.7 build available, this means I need to merge some changes from 2.0 to here.

This commit is contained in:
RKrom 2013-12-04 17:46:02 +01:00
commit a03bc31aef
247 changed files with 6986 additions and 8233 deletions

View file

@ -145,6 +145,7 @@ namespace Greenshot.Helpers {
try {
IHTMLDocument2 document2 = getHTMLDocument(ieWindow);
string title = document2.title;
System.Runtime.InteropServices.Marshal.ReleaseComObject(document2);
if (string.IsNullOrEmpty(title)) {
singleWindowText.Add(ieWindow.Text);
} else {
@ -581,29 +582,6 @@ namespace Greenshot.Helpers {
}
return returnBitmap;
}
/// <summary>
/// Used as an example
/// </summary>
/// <param name="documentContainer"></param>
/// <param name="graphicsTarget"></param>
/// <param name="returnBitmap"></param>
private static void ParseElements(DocumentContainer documentContainer, Graphics graphicsTarget, Bitmap returnBitmap) {
foreach(ElementContainer element in documentContainer.GetElementsByTagName("input", new string[]{"greenshot"})) {
if (element.attributes.ContainsKey("greenshot") && element.attributes["greenshot"] != null) {
string greenshotAction = element.attributes["greenshot"];
if ("hide".Equals(greenshotAction)) {
using (Brush brush = new SolidBrush(Color.Black)) {
graphicsTarget.FillRectangle(brush, element.rectangle);
}
} else if ("red".Equals(greenshotAction)) {
using (Brush brush = new SolidBrush(Color.Red)) {
graphicsTarget.FillRectangle(brush, element.rectangle);
}
}
}
}
}
/// <summary>
/// This method takes the actual capture of the document (frame)