개정판 a6272c57
issue #923: add ICommentUserInfo interface
Change-Id: Id0b65251436a5aa647eef78026dfad90d3ca64ab
MarkupToPDF/Controls/Etc/SignControl.cs | ||
---|---|---|
24 | 24 |
public class SignControl : CommentUserInfo, IDisposable, INormal, INotifyPropertyChanged, IPath, IViewBox, IMarkupCommonData |
25 | 25 |
{ |
26 | 26 |
#region 초기선언 |
27 |
public string ProjectNO { get; set; } |
|
28 |
|
|
27 | 29 |
private const string PART_Image = "PART_Image"; |
28 | 30 |
public Image Base_Image = null; |
29 | 31 |
#endregion |
... | ... | |
295 | 297 |
} |
296 | 298 |
|
297 | 299 |
/// <summary> |
300 |
/// call when mouse is moving while drawing control |
|
301 |
/// </summary> |
|
302 |
/// <author>humkyung</author> |
|
303 |
/// <param name="pt"></param> |
|
304 |
/// <param name="bAxisLocked"></param> |
|
305 |
public override void OnCreatingMouseMove(Point pt, bool bAxisLocked, bool bShiftKeyPressed) |
|
306 |
{ |
|
307 |
this.EndPoint = pt; |
|
308 |
this.LeftBottomPoint = new Point(this.StartPoint.X, this.EndPoint.Y); |
|
309 |
this.TopRightPoint = new Point(this.EndPoint.X, this.StartPoint.Y); |
|
310 |
|
|
311 |
if (this.StartPoint != this.EndPoint && this.SignImage == null) |
|
312 |
{ |
|
313 |
var _sign = GetUserSign.GetSign(this.UserNumber, this.ProjectNO); |
|
314 |
byte[] imageBytes = System.Convert.FromBase64String(_sign); |
|
315 |
System.IO.MemoryStream stream = new System.IO.MemoryStream(); |
|
316 |
stream.Write(imageBytes, 0, imageBytes.Length); |
|
317 |
stream.Position = 0; |
|
318 |
System.Drawing.Image img = System.Drawing.Image.FromStream(stream); |
|
319 |
BitmapImage returnImage = new BitmapImage(); |
|
320 |
returnImage.BeginInit(); |
|
321 |
System.IO.MemoryStream ms = new System.IO.MemoryStream(); |
|
322 |
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png); |
|
323 |
ms.Seek(0, System.IO.SeekOrigin.Begin); |
|
324 |
returnImage.StreamSource = ms; |
|
325 |
returnImage.EndInit(); |
|
326 |
stream.Close(); |
|
327 |
|
|
328 |
this.SignImage = returnImage; |
|
329 |
} |
|
330 |
this.PointSet = new List<Point> |
|
331 |
{ |
|
332 |
this.StartPoint, |
|
333 |
this.LeftBottomPoint, |
|
334 |
this.EndPoint, |
|
335 |
this.TopRightPoint, |
|
336 |
}; |
|
337 |
} |
|
338 |
|
|
339 |
/// <summary> |
|
298 | 340 |
/// return SignControl's area |
299 | 341 |
/// </summary> |
300 | 342 |
/// <author>humkyung</author> |
내보내기 Unified diff