mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
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:
parent
2a8e2475d8
commit
a03bc31aef
247 changed files with 6986 additions and 8233 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue