Click here to Skip to main content
11,584,208 members (39,641 online)

.NET Framework

 
GeneralRe: Custom Control Visual Basic .Net Pin
JM768-Feb-14 3:04
memberJM768-Feb-14 3:04 
QuestionToolstrip Pin
Member 103122377-Feb-14 22:42
memberMember 103122377-Feb-14 22:42 
AnswerRe: Toolstrip Pin
Dave Kreskowiak8-Feb-14 2:51
mvpDave Kreskowiak8-Feb-14 2:51 
Questionnot able to save image which is already saved with same name and to the same location Pin
ven7537-Feb-14 18:05
memberven7537-Feb-14 18:05 
AnswerRe: not able to save image which is already saved with same name and to the same location Pin
TnTinMn7-Feb-14 18:37
memberTnTinMn7-Feb-14 18:37 
GeneralRe: not able to save image which is already saved with same name and to the same location Pin
ven7537-Feb-14 23:22
memberven7537-Feb-14 23:22 
GeneralRe: not able to save image which is already saved with same name and to the same location Pin
TnTinMn8-Feb-14 8:43
memberTnTinMn8-Feb-14 8:43 
GeneralRe: not able to save image which is already saved with same name and to the same location Pin
ven7539-Feb-14 2:13
memberven7539-Feb-14 2:13 
AnswerRe: not able to save image which is already saved with same name and to the same location Pin
PKJain7512-Feb-14 23:51
professionalPKJain7512-Feb-14 23:51 
Questionpopulating data from datagridview into textboxes Pin
Member 105062157-Feb-14 1:10
memberMember 105062157-Feb-14 1:10 
QuestionRe: populating data from datagridview into textboxes Pin
Eddy Vluggen7-Feb-14 8:55
professionalEddy Vluggen7-Feb-14 8:55 
QuestionError in conversion of application Pin
Ashish Sharma6-Feb-14 18:18
memberAshish Sharma6-Feb-14 18:18 
AnswerRe: Error in conversion of application Pin
thatraja6-Feb-14 20:24
mvpthatraja6-Feb-14 20:24 
Questionnot able to Deserialize json signature lines Pin
ven7534-Feb-14 18:36
memberven7534-Feb-14 18:36 
hi

I am using json signature and trying deserialize but i am not able to deserialize. below is my json string
{"lines":[[[156.44,96.44],[156.44,95.33],[155.33,94.22],[154.22,93.11],[154.22,90.89],[153.11,89.78],[150.89,87.56],[150.89,84.22],[148.67,83.11],[147.56,80.89],[146.44,78.67],[144.22,76.44],[142,74.22],[139.78,70.89],[136.44,67.56],[134.22,65.33],[130.89,63.11],[128.67,60.89],[126.44,59.78],[124.22,57.56],[123.11,57.56],[122,56.44],[118.67,56.44],[116.44,56.44],[114.22,56.44],[112,56.44],[108.67,56.44],[105.33,56.44],[99.78,56.44],[96.44,57.56],[93.11,59.78],[89.78,60.89],[87.56,62],[86.44,64.22],[84.22,66.44],[83.11,67.56],[80.89,69.78],[79.78,70.89],[78.67,74.22],[77.56,75.33],[77.56,77.56],[77.56,79.78],[77.56,82],[77.56,84.22],[77.56,86.44],[77.56,88.67],[78.67,90.89],[78.67,93.11],[80.89,95.33],[82,97.56],[85.33,98.67],[87.56,99.78],[89.78,102],[93.11,102],[96.44,104.22],[100.89,105.33],[107.56,107.56],[114.22,108.67],[120.89,109.78],[125.33,110.89],[130.89,110.89],[134.22,112],[137.56,113.11],[139.78,114.22],[142,115.33],[143.11,115.33],[144.22,116.44],[145.33,116.44],[147.56,117.56],[147.56,118.67],[148.67,119.78],[149.78,122],[150.89,122],[150.89,124.22],[150.89,126.44],[150.89,127.56],[150.89,129.78],[150.89,132],[150.89,134.22],[149.78,135.33],[148.67,137.56],[147.56,139.78],[145.33,142],[144.22,144.22],[143.11,145.33],[139.78,146.44],[137.56,147.56],[135.33,147.56],[133.11,147.56],[129.78,147.56],[126.44,148.67],[124.22,148.67],[120.89,148.67],[118.67,148.67],[114.22,148.67],[109.78,148.67],[105.33,148.67],[102,148.67],[99.78,148.67],[97.56,148.67],[94.22,148.67],[92,148.67],[88.67,148.67],[86.44,148.67],[84.22,148.67],[83.11,148.67],[82,148.67],[79.78,148.67],[79.78,147.56],[77.56,147.56],[76.44,146.44],[75.33,146.44],[75.33,146.44],[75.33,146.44],[75.33,145.33],[74.22,145.33],[74.22,143.11],[73.11,140.89],[70.89,138.67],[70.89,137.56],[69.78,135.33],[69.78,135.33],[69.78,135.33],[69.78,133.11],[69.78,133.11],[69.78,133.11],[69.78,133.11],[69.78,132]]]}

i used code like below to deserialize
public Bitmap SigJsonToImage(string json)
{
var signatureImage = GetBlankCanvas();
if (!string.IsNullOrEmpty(json))
{
using (var signatureGraphic = Graphics.FromImage(signatureImage))
{
signatureGraphic.SmoothingMode = SmoothingMode.AntiAlias;
var pen = new Pen(PenColor, PenWidth);
var serializer = new JavaScriptSerializer();
var lines = serializer.Deserialize>(json);
foreach (var line in lines)
{
signatureGraphic.DrawLine(pen, line.lx, line.ly, line.mx, line.my);
}
}
}
return signatureImage;
}


here i am getting lines count 0 and it is not coming inside codesignatureGraphic.DrawLine

private class SignatureLine
{
public int lx { get; set; }
public int ly { get; set; }
public int mx { get; set; }
public int my { get; set; }
}
private Bitmap GetBlankCanvas()
{
var blankImage = new Bitmap(CanvasWidth, CanvasHeight);
blankImage.MakeTransparent();
using (var signatureGraphic = Graphics.FromImage(blankImage))
{
signatureGraphic.Clear(BackgroundColor);
}
return blankImage;
}

how to achieve this. anybody knows please reply me.
thanks in advance

modified 5-Feb-14 4:35am.

AnswerRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 2:57
professionalRichard Deeming5-Feb-14 2:57 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 5:17
memberven7535-Feb-14 5:17 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 5:35
professionalRichard Deeming5-Feb-14 5:35 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 6:11
memberven7535-Feb-14 6:11 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 6:50
professionalRichard Deeming5-Feb-14 6:50 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 7:18
memberven7535-Feb-14 7:18 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 8:01
professionalRichard Deeming5-Feb-14 8:01 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 16:09
memberven7535-Feb-14 16:09 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming6-Feb-14 1:37
professionalRichard Deeming6-Feb-14 1:37 
GeneralRe: not able to Deserialize json signature lines Pin
ven7536-Feb-14 6:54
memberven7536-Feb-14 6:54 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming6-Feb-14 8:56
professionalRichard Deeming6-Feb-14 8:56 
GeneralRe: not able to Deserialize json signature lines Pin
ven7536-Feb-14 16:18
memberven7536-Feb-14 16:18 
GeneralRe: not able to Deserialize json signature lines Pin
ven7536-Feb-14 21:34
memberven7536-Feb-14 21:34 
GeneralRe: not able to Deserialize json signature lines Pin
ven7537-Feb-14 7:03
memberven7537-Feb-14 7:03 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming10-Feb-14 1:27
professionalRichard Deeming10-Feb-14 1:27 
Question3 layers architecture & MVC Pin
kryptong4-Feb-14 3:20
memberkryptong4-Feb-14 3:20 
AnswerRe: 3 layers architecture & MVC Pin
Eddy Vluggen4-Feb-14 7:55
professionalEddy Vluggen4-Feb-14 7:55 
GeneralRe: 3 layers architecture & MVC Pin
kryptong4-Feb-14 8:08
memberkryptong4-Feb-14 8:08 
GeneralRe: 3 layers architecture & MVC Pin
Eddy Vluggen5-Feb-14 0:30
professionalEddy Vluggen5-Feb-14 0:30 
AnswerRe: 3 layers architecture & MVC Pin
Pete O'Hanlon4-Feb-14 8:28
protectorPete O'Hanlon4-Feb-14 8:28 
AnswerRe: 3 layers architecture & MVC Pin
CoderPanda5-Feb-14 6:56
professionalCoderPanda5-Feb-14 6:56 
QuestionGood GC configuration for Web services Pin
Pingala31-Jan-14 11:36
memberPingala31-Jan-14 11:36 
AnswerRe: Good GC configuration for Web services Pin
Dave Kreskowiak31-Jan-14 11:58
mvpDave Kreskowiak31-Jan-14 11:58 
AnswerRe: Good GC configuration for Web services Pin
CoderPanda5-Feb-14 7:23
professionalCoderPanda5-Feb-14 7:23 
QuestionSending e-mail error-VB.NET Pin
tgkkishore31-Jan-14 5:07
membertgkkishore31-Jan-14 5:07 
AnswerRe: Sending e-mail error-VB.NET Pin
Eddy Vluggen31-Jan-14 6:25
professionalEddy Vluggen31-Jan-14 6:25 
GeneralRe: Sending e-mail error-VB.NET Pin
tgkkishore1-Feb-14 4:34
membertgkkishore1-Feb-14 4:34 
GeneralRe: Sending e-mail error-VB.NET Pin
Eddy Vluggen1-Feb-14 7:09
professionalEddy Vluggen1-Feb-14 7:09 
GeneralRe: Sending e-mail error-VB.NET Pin
tgkkishore2-Feb-14 1:03
membertgkkishore2-Feb-14 1:03 
GeneralRe: Sending e-mail error-VB.NET Pin
Richard MacCutchan2-Feb-14 1:31
mvpRichard MacCutchan2-Feb-14 1:31 
GeneralRe: Sending e-mail error-VB.NET Pin
Richard Deeming3-Feb-14 1:40
professionalRichard Deeming3-Feb-14 1:40 
GeneralRe: Sending e-mail error-VB.NET Pin
tgkkishore5-Feb-14 4:07
membertgkkishore5-Feb-14 4:07 
GeneralRe: Sending e-mail error-VB.NET Pin
Richard Deeming5-Feb-14 4:24
professionalRichard Deeming5-Feb-14 4:24 
Questionlarning .net Pin
Member 1055803029-Jan-14 3:52
memberMember 1055803029-Jan-14 3:52 
AnswerRe: larning .net Pin
Simon_Whale29-Jan-14 4:31
professionalSimon_Whale29-Jan-14 4:31 
AnswerRe: larning .net Pin
Richard MacCutchan29-Jan-14 6:37
mvpRichard MacCutchan29-Jan-14 6:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 6 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid