개정판 129ca191
issue #923: fixed save changed controls logic
Change-Id: I434adb979a8adcf0407d75504e0ecfc48085f988
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
51 | 51 |
private List<DOCPAGE> _PageList = null; |
52 | 52 |
private string _DefaultUri = null; |
53 | 53 |
public ThumbnailItem CurrentPage = null; |
54 |
///public ThumbnailItem _NextPage = null; |
|
55 | 54 |
public int PageCount = 0; |
56 | 55 |
|
57 | 56 |
private bool _Initialize; |
... | ... | |
143 | 142 |
SetCommentPages(); |
144 | 143 |
} |
145 | 144 |
|
145 |
/// <summary> |
|
146 |
/// called when image list box's selection is changed |
|
147 |
/// </summary> |
|
148 |
/// <param name="sender"></param> |
|
149 |
/// <param name="e"></param> |
|
146 | 150 |
private void ImgListbox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) |
147 | 151 |
{ |
148 | 152 |
if (ImgListbox.SelectedItem != null) |
149 | 153 |
{ |
150 | 154 |
int _CurrentPageNo = -1; |
151 |
if (this.CurrentPage != null) _CurrentPageNo = this.CurrentPage.PageNumber; |
|
155 |
if (this.CurrentPage != null) |
|
156 |
{ |
|
157 |
this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null); /// save controls |
|
158 |
_CurrentPageNo = this.CurrentPage.PageNumber; |
|
159 |
} |
|
152 | 160 |
|
153 |
int iPageNo = ((ImgListbox.SelectedItem as ThumbnailItem).PageNumber); |
|
161 |
this.CurrentPage = ImgListbox.SelectedItem as ThumbnailItem; |
|
162 |
int iPageNo = this.CurrentPage.PageNumber; |
|
154 | 163 |
if(_CurrentPageNo != iPageNo) |
155 | 164 |
{ |
156 |
///this.CurrentPage = this._NextPage; |
|
157 |
///this._NextPage = thumbnailItem; |
|
158 | 165 |
PageChanging(this, new PageChangeEventArgs |
159 | 166 |
{ |
160 | 167 |
CurrentPage = this._PageList.Where(p => p.PAGE_NUMBER == iPageNo).First(), |
... | ... | |
168 | 175 |
if(border!= null) |
169 | 176 |
{ |
170 | 177 |
IEnumerable<ScrollViewer> scrollViewer = border.ChildrenOfType<ScrollViewer>(); |
171 |
|
|
172 | 178 |
} |
173 | 179 |
} |
174 | 180 |
|
... | ... | |
214 | 220 |
if ((PageChanged != null) && (thumbitem != null)) |
215 | 221 |
{ |
216 | 222 |
var uri = _DefaultUri.Replace("{PageNo}", thumbitem.PageNumber.ToString()); |
217 |
//var _thumbitem = _thumbnailItems.Where(item => item.PageNumber == DocPage.PageNumber).First(); |
|
218 | 223 |
|
219 | 224 |
var _DocPages = _PageList.Where(p => p.PAGE_NUMBER == thumbitem.PageNumber); |
220 | 225 |
if (_DocPages.Count() > 0) |
내보내기 Unified diff