개정판 ab590000
FinalPDFClient 추가
Change-Id: If44701b45542577019b74133cc8c89bf131e3398
FinalService/KCOM_FinalService/FinalPDFClient/MainWindow.xaml.cs | ||
---|---|---|
33 | 33 |
|
34 | 34 |
EventHandler<MakeFinalErrorArgs> errorEventHandler = null; |
35 | 35 |
EventHandler<EndFinalEventArgs> endFinalEventHandler = null; |
36 |
EventHandler<StatusChangedEventArgs> StatusChangedEventHandler = null; |
|
36 | 37 |
|
37 | 38 |
errorEventHandler = (snd, evt) => |
38 | 39 |
{ |
... | ... | |
40 | 41 |
|
41 | 42 |
markupToPDF.FinalMakeError -= errorEventHandler; |
42 | 43 |
markupToPDF.EndFinal -= endFinalEventHandler; |
44 |
markupToPDF.StatusChanged -= StatusChangedEventHandler; |
|
43 | 45 |
}; |
44 | 46 |
|
45 | 47 |
endFinalEventHandler = (snd, evt) => |
46 | 48 |
{ |
49 |
txtOutput.Text += evt.FinalPDFPath + " " + evt.Error; |
|
47 | 50 |
System.Diagnostics.Debug.WriteLine(evt.Message); |
48 | 51 |
|
49 | 52 |
markupToPDF.FinalMakeError -= errorEventHandler; |
50 | 53 |
markupToPDF.EndFinal -= endFinalEventHandler; |
54 |
markupToPDF.StatusChanged -= StatusChangedEventHandler; |
|
55 |
}; |
|
56 |
|
|
57 |
StatusChangedEventHandler = (snd, evt) => |
|
58 |
{ |
|
59 |
txtOutput.Dispatcher.Invoke(() => { |
|
60 |
txtOutput.Text += evt.Message + " " + evt.CurrentPage + " " + evt.Error; |
|
61 |
}); |
|
51 | 62 |
}; |
52 | 63 |
|
53 | 64 |
markupToPDF.FinalMakeError += errorEventHandler; |
54 | 65 |
markupToPDF.EndFinal += endFinalEventHandler; |
66 |
markupToPDF.StatusChanged += StatusChangedEventHandler; |
|
67 |
try |
|
68 |
{ |
|
69 |
var addResult = markupToPDF.AddFinalPDF(txtProject.Text, txtDocId.Text, txtUserId.Text); |
|
55 | 70 |
|
56 |
|
|
57 |
var addResult = markupToPDF.AddFinalPDF(txtProject.Text, txtDocId.Text, txtUserId.Text); |
|
58 |
|
|
59 |
if (addResult.Success) |
|
71 |
if (addResult.Success) |
|
72 |
{ |
|
73 |
markupToPDF.MakeFinalPDF((object)addResult.FinalPDF); |
|
74 |
} |
|
75 |
} |
|
76 |
catch (Exception ex) |
|
60 | 77 |
{ |
61 |
markupToPDF.MakeFinalPDF((object)addResult.FinalPDF);
|
|
78 |
txtOutput.Text = ex.ToString();
|
|
62 | 79 |
} |
63 | 80 |
} |
64 | 81 |
|
내보내기 Unified diff