45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Drawing.Drawing2D;
|
|
using System.Drawing;
|
|
using System.Drawing.Imaging;
|
|
using GZTW.AyaNova.BLL;
|
|
|
|
public partial class sign : System.Web.UI.Page
|
|
{
|
|
/**
|
|
* Inspired by the:
|
|
* Click and drag your mouse or touch and move your finger or stylus in the box below
|
|
* jQuery DrawBox Plug-In 1.0
|
|
*
|
|
* http://github.com/crowdsavings/drawbox
|
|
* http://plugins.jquery.com/project/drawbox
|
|
*
|
|
*/
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (Page.IsPostBack)
|
|
{
|
|
object o = Page.Request["sigpad-data"];
|
|
if (o!=null && !string.IsNullOrWhiteSpace(o.ToString()))
|
|
{
|
|
AySignature sig = new AySignature(o.ToString());
|
|
if (sig.HasSignature)
|
|
{
|
|
Response.ContentType = "image/png";
|
|
sig.SignatureBitmap.Save(Response.OutputStream, ImageFormat.Png);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |