개정판 9380813b
Search Panel 방향키 수정
Text생성시 여러번 클릭 할 경우 입력값이 없으면 생성된 객체 삭제
Font Size에 한글입력 방지
Change-Id: I3b8e47c313869b6e03f0c634cb8ea340c189812d
KCOM/Controls/SearchPanel.xaml.cs | ||
---|---|---|
1 |
using KCOM.Common; |
|
1 |
using Bytescout.PDFExtractor; |
|
2 |
using KCOM.Common; |
|
2 | 3 |
using MarkupToPDF.Common; |
3 | 4 |
using System; |
4 | 5 |
using System.Collections.Generic; |
... | ... | |
18 | 19 |
using System.Windows.Navigation; |
19 | 20 |
using System.Windows.Shapes; |
20 | 21 |
using Telerik.Windows.Controls; |
22 |
using Telerik.Windows.Controls.Rating; |
|
21 | 23 |
|
22 | 24 |
namespace KCOM.Controls |
23 | 25 |
{ |
... | ... | |
83 | 85 |
IsCancelWork = false; |
84 | 86 |
|
85 | 87 |
this.searchIndicator.IsIndeterminate = false; |
88 |
|
|
89 |
//Debuging용 데이터 |
|
90 |
//SearchSet.Add(new SearchText() { PageNo = 1, searchResult = null }); |
|
91 |
//SearchSet.Add(new SearchText() { PageNo = 2, searchResult = null }); |
|
92 |
//SearchSet.Add(new SearchText() { PageNo = 3, searchResult = null }); |
|
93 |
//SearchSet.Add(new SearchText() { PageNo = 4, searchResult = null }); |
|
94 |
|
|
86 | 95 |
this.DataContext = this; |
87 | 96 |
//tbSearch.Text = ""; |
88 | 97 |
tbSearch.Focus(); |
... | ... | |
383 | 392 |
|
384 | 393 |
} |
385 | 394 |
|
395 |
private void lstSearchWord_PreviewKeyDown(object sender, KeyEventArgs e) |
|
396 |
{ |
|
397 |
int iIndex = this.lstSearchWord.SelectedIndex; |
|
398 |
|
|
399 |
if (iIndex > -1) |
|
400 |
{ |
|
401 |
if (e.Key == Key.Up) |
|
402 |
{ |
|
403 |
int iUpIndex = iIndex- 1; |
|
404 |
if(iUpIndex > -1) |
|
405 |
{ |
|
406 |
this.lstSearchWord.SelectedIndex = iUpIndex; |
|
407 |
} |
|
408 |
} |
|
409 |
else if (e.Key == Key.Down) |
|
410 |
{ |
|
411 |
int iDownIndex = iIndex + 1; |
|
412 |
if(iDownIndex < this.lstSearchWord.Items.Count-1) |
|
413 |
{ |
|
414 |
this.lstSearchWord.SelectedIndex = iDownIndex; |
|
415 |
} |
|
416 |
} |
|
417 |
} |
|
418 |
} |
|
419 |
|
|
386 | 420 |
private void lstSearchWord_SelectionChanged(object sender, SelectionChangedEventArgs e) |
387 | 421 |
{ |
388 | 422 |
try |
... | ... | |
438 | 472 |
var searchFocus = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.SearchFocusBorder; |
439 | 473 |
searchFocus.Visibility = Visibility; |
440 | 474 |
|
441 |
Canvas.SetLeft(searchFocus, item.searchResult.Left * widthScale); |
|
442 |
Canvas.SetTop(searchFocus, item.searchResult.Top * heightScale); |
|
443 |
searchFocus.Width = item.searchResult.Width * widthScale; |
|
444 |
searchFocus.Height = item.searchResult.Height * widthScale; |
|
445 |
|
|
446 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ZoomTo(new Rect |
|
475 |
if (item.searchResult != null) |
|
447 | 476 |
{ |
448 |
X =item.searchResult.Left * widthScale, |
|
449 |
Y = item.searchResult.Top * heightScale, |
|
450 |
Width = ( item.searchResult.Width * widthScale *7), |
|
451 |
Height = (item.searchResult.Height * heightScale *7) |
|
452 |
}); |
|
477 |
Canvas.SetLeft(searchFocus, item.searchResult.Left * widthScale); |
|
478 |
Canvas.SetTop(searchFocus, item.searchResult.Top * heightScale); |
|
479 |
searchFocus.Width = item.searchResult.Width * widthScale; |
|
480 |
searchFocus.Height = item.searchResult.Height * widthScale; |
|
481 |
|
|
482 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ZoomTo(new Rect |
|
483 |
{ |
|
484 |
X = item.searchResult.Left * widthScale, |
|
485 |
Y = item.searchResult.Top * heightScale, |
|
486 |
Width = (item.searchResult.Width * widthScale * 7), |
|
487 |
Height = (item.searchResult.Height * heightScale * 7) |
|
488 |
}); |
|
489 |
} |
|
453 | 490 |
|
454 | 491 |
//extractor.SavePageTextToFile(item.PageNo - 1, @"C:\Users\kts\AppData\Local\Temp\MARKUS\savepageText\text.txt"); |
455 | 492 |
//extractor.SavePreprocessedPagePreview(item.PageNo - 1, $"C:\\Users\\kts\\AppData\\Local\\Temp\\MARKUS\\savepageText\\{(item.PageNo - 1).ToString()}.png"); |
456 | 493 |
}); |
457 | 494 |
} |
495 |
|
|
496 |
|
|
458 | 497 |
} |
459 | 498 |
} |
내보내기 Unified diff