개정판 ac4f1e13
Markup load 비동기로 변경
Change-Id: I471906b1090f7f3f0fd18e97d88a54f75fd1f673
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
161 | 161 |
/// </summary> |
162 | 162 |
/// <param name="sender"></param> |
163 | 163 |
/// <param name="e"></param> |
164 |
private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) |
|
164 |
private async void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
|
165 | 165 |
{ |
166 | 166 |
if(e.AddedItems.Count > 0) |
167 | 167 |
{ |
168 |
var number = (e.AddedItems[0] as KCOM.Common.ThumbnailItem).PageNumber; |
|
168 |
await ImgListbox.Dispatcher.InvokeAsync(() => |
|
169 |
{ |
|
170 |
var number = (e.AddedItems[0] as KCOM.Common.ThumbnailItem).PageNumber; |
|
169 | 171 |
|
170 |
ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null); /// save controls |
|
172 |
ViewerDataModel.Instance.SystemMain.dzTopMenu._SaveEvent(null, null); /// save controls
|
|
171 | 173 |
|
172 |
this.CurrentPage = e.AddedItems[0] as KCOM.Common.ThumbnailItem; |
|
174 |
this.CurrentPage = e.AddedItems[0] as KCOM.Common.ThumbnailItem; |
|
175 |
|
|
176 |
PageChanging(this, new PageChangeEventArgs |
|
177 |
{ |
|
178 |
CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == number).First(), |
|
179 |
PageNumber = number, |
|
180 |
PageUri = null |
|
181 |
}); |
|
173 | 182 |
|
174 |
PageChanging(this, new PageChangeEventArgs |
|
175 |
{ |
|
176 |
CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == number).First(), |
|
177 |
PageNumber = number, |
|
178 |
PageUri = null |
|
179 | 183 |
}); |
180 | 184 |
} |
181 | 185 |
|
... | ... | |
675 | 679 |
} |
676 | 680 |
} |
677 | 681 |
|
678 |
private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) |
|
682 |
private async void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
679 | 683 |
{ |
680 | 684 |
if (e.ClickCount >= 2) |
681 | 685 |
{ |
682 | 686 |
var selectItem = MarkupList.SelectedItem as IKCOM.MarkupItem; |
687 |
|
|
683 | 688 |
GotoPage(selectItem.PageNumber); |
684 |
var result = MarkupParser.GetBaseControl(selectItem.Data); |
|
689 |
|
|
690 |
var result = await MarkupParser.GetBaseControlAsync(selectItem.Data); |
|
691 |
|
|
685 | 692 |
Rect rect = new Rect(new Point(result.StartPoint.X - 100, result.StartPoint.Y - 100), new Point(result.EndPoint.X + 100, result.EndPoint.Y + 100)); |
686 | 693 |
this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(rect); |
687 | 694 |
//bool isGO = false; |
... | ... | |
739 | 746 |
/// </summary> |
740 | 747 |
/// <param name="sender"></param> |
741 | 748 |
/// <param name="e"></param> |
742 |
private void RadButton_Click_OLD(object sender, RoutedEventArgs e) |
|
749 |
private async void RadButton_Click_OLD(object sender, RoutedEventArgs e)
|
|
743 | 750 |
{ |
744 | 751 |
var clickButtonItem = sender as RadButton; |
745 | 752 |
if (clickButtonItem != null && clickButtonItem.CommandParameter != null) |
... | ... | |
753 | 760 |
MarkupInfoItemSmall gaza = clickButtonItem.CommandParameter as MarkupInfoItemSmall; |
754 | 761 |
GotoPage(Convert.ToInt32(gaza.PageNumber)); |
755 | 762 |
|
756 |
var data = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString(gaza.Data.ToString()); //언패킹작업
|
|
763 |
var data = await MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStringAsync(gaza.Data.ToString()); //언패킹작업
|
|
757 | 764 |
switch (Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), gaza.Data_Type.ToString())) |
758 | 765 |
{ |
759 | 766 |
case MarkupToPDF.Controls.Common.ControlType.TextControl: |
... | ... | |
1241 | 1248 |
ViewerDataModel.Instance.SystemMain.dzTopMenu.PanoramaShow(); |
1242 | 1249 |
} |
1243 | 1250 |
|
1244 |
private void btnSearch_Click(object sender, RoutedEventArgs e) |
|
1251 |
private async void btnSearch_Click(object sender, RoutedEventArgs e)
|
|
1245 | 1252 |
{ |
1246 | 1253 |
string search_str = txtSearch.Text; |
1247 | 1254 |
|
... | ... | |
1269 | 1276 |
} |
1270 | 1277 |
foreach (var item in list) |
1271 | 1278 |
{ |
1272 |
var data = MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressString(item.Data.ToString());
|
|
1279 |
var data = await MarkupToPDF.Serialize.Core.JsonSerializerHelper.UnCompressStringAsync(item.Data.ToString());
|
|
1273 | 1280 |
|
1274 | 1281 |
switch (Enum.Parse(typeof(MarkupToPDF.Controls.Common.ControlType), item.Data_Type.ToString())) |
1275 | 1282 |
{ |
내보내기 Unified diff