개정판 afaa7c92
issue #1038: mainmenu 에 page changed 와 changing 을 구분하여 각 컨트롤을 업데이트 하도록 수정.썸네일 프로퍼티 수정.
Change-Id: I663a283feeff15f2513605ff2da89763da345540
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
34 | 34 |
|
35 | 35 |
private void Sample_Loaded(object sender, RoutedEventArgs e) |
36 | 36 |
{ |
37 |
//측정 |
|
38 |
//Stopwatch sw = new Stopwatch(); |
|
39 |
//sw.Start(); |
|
40 |
InitializeComponent(); |
|
41 |
//System.Diagnostics.Debug.WriteLine("Sample() : " + sw.ElapsedMilliseconds.ToString() + "ms"); |
|
42 |
|
|
43 |
_Initialize = true; |
|
44 |
lstSelectComment.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(lstSelectComment_SelectionChanged); |
|
37 |
if(!_Initialize) |
|
38 |
{ |
|
39 |
InitializeComponent(); |
|
40 |
//System.Diagnostics.Debug.WriteLine("Sample() : " + sw.ElapsedMilliseconds.ToString() + "ms"); |
|
45 | 41 |
|
42 |
_Initialize = true; |
|
43 |
this.lstSelectComment.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(lstSelectComment_SelectionChanged); |
|
44 |
this.ImgListbox.SelectionChanged += new SelectionChangedEventHandler(ImgListbox_SelectionChanged); |
|
45 |
} |
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
//private void ImgListbox_MouseDoubleClick(object sender, MouseButtonEventArgs e) |
... | ... | |
151 | 151 |
} |
152 | 152 |
|
153 | 153 |
private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) |
154 |
{ |
|
155 |
Logger.sendCheckLog("ImgListbox_SelectionChanged", 1); |
|
154 |
{ |
|
156 | 155 |
if (ImgListbox.SelectedItem != null) |
157 | 156 |
{ |
158 | 157 |
int _PageNo = -1; |
... | ... | |
162 | 161 |
_PageNo = this.CurrentPage.PageNumber; |
163 | 162 |
}; |
164 | 163 |
|
165 |
if (_PageNo != ((ImgListbox.SelectedItem as ThumbnailItem).PageNumber)) |
|
164 |
int nextpage = ((ImgListbox.SelectedItem as ThumbnailItem).PageNumber); |
|
165 |
if(_PageNo != nextpage) |
|
166 | 166 |
{ |
167 |
var _page = this._thumbnailItems.Where(item => item.PageNumber == (ImgListbox.SelectedItem as ThumbnailItem).PageNumber); |
|
168 |
if (_page.Count() > 0) |
|
169 |
{ |
|
170 |
ThumbnailItem _item = _page.First(); |
|
171 |
setPageChange(_item); |
|
172 |
} |
|
167 |
GotoPage(nextpage); |
|
173 | 168 |
} |
169 |
|
|
174 | 170 |
} |
175 | 171 |
} |
176 | 172 |
|
... | ... | |
192 | 188 |
{ |
193 | 189 |
ThumbnailItem _item = _page.First(); |
194 | 190 |
setPageChange(_item); |
195 |
this.ImgListbox.SelectedIndex = _pageNumber - 1;
|
|
196 |
this.ImgListbox.ScrollIntoView(_pageNumber - 1);
|
|
191 |
//this.ImgListbox.SelectedIndex = _pageNumber - 1;
|
|
192 |
//this.ImgListbox.ScrollIntoView(_item);
|
|
197 | 193 |
} |
198 | 194 |
} |
199 | 195 |
} |
... | ... | |
210 | 206 |
if (thumbnailItem != null) |
211 | 207 |
{ |
212 | 208 |
if (PageChanging != null) |
213 |
{ |
|
214 |
//강인구 수정(페이지가 같을 경우 이동 안함) |
|
215 |
if (CurrentPage != null && CurrentPage == thumbnailItem) |
|
216 |
{ |
|
217 |
return; |
|
218 |
} |
|
219 |
|
|
209 |
{ |
|
210 |
//if(CurrentPage != null && CurrentPage.PageNumber == _NextPage.PageNumber) |
|
211 |
//{ |
|
212 |
// return; |
|
213 |
//} |
|
220 | 214 |
this.CurrentPage = _NextPage; |
221 | 215 |
_NextPage = thumbnailItem; |
222 | 216 |
PageChanging(this, new PageChangeEventArgs |
... | ... | |
368 | 362 |
|
369 | 363 |
public void SetNextPage() |
370 | 364 |
{ |
371 |
Logger.sendCheckLog("pageNavigator_PageChanging_SetNextPage", 1); |
|
372 | 365 |
CurrentPage = _NextPage; |
373 | 366 |
PageChange(_NextPage); |
374 | 367 |
} |
375 | 368 |
|
376 | 369 |
private void PageChange(ThumbnailItem thumbitem) |
377 |
{ |
|
378 |
Logger.sendCheckLog("pageNavigator_PageChanging_PageChange", 1); |
|
370 |
{ |
|
379 | 371 |
if (PageChanged != null) |
380 | 372 |
{ |
381 | 373 |
var uri = _DefaultUri.Replace("{PageNo}", thumbitem.PageNumber.ToString()); |
... | ... | |
389 | 381 |
else |
390 | 382 |
ImgListbox.ScrollIntoView(_thumbnailItems.Count() - 1); |
391 | 383 |
|
392 |
//txtCurentPageNo.Text = (_itemIndex + 1).ToString(); |
|
393 |
|
|
394 |
//txtCurentPageNo.Text = this.CurrentPage.PageNumber.ToString(); |
|
395 |
|
|
396 | 384 |
var _DocPages = _PageList.Where(p => p.PAGE_NUMBER == thumbitem.PageNumber); |
397 | 385 |
|
398 | 386 |
if (_DocPages.Count() > 0) |
내보내기 Unified diff