Пример #1
0
        void MAddressHistorySelector_ItemSelected(object sender, ItemSelectedEventArgs <EditorListViewInfo> e)
        {
            EditorListViewInfo viewInfo = e.SelectedItem;

            if (viewInfo.SelectedIndex.HasValue)
            {
                int selectedIndex = viewInfo.SelectedIndex.Value;

                if (selectedIndex < viewInfo.FirstVisibleIndex + mWordEditorList.VisibleEditorCount)
                {
                    mWordEditorList.FirstVisibleIndex = viewInfo.FirstVisibleIndex;
                    mWordEditorList[viewInfo.SelectedIndex.Value - viewInfo.FirstVisibleIndex].Focus(viewInfo.FocusedField, null);
                }
                else
                {
                    mWordEditorList.MakeIndexVisible(selectedIndex);
                }
            }
            else
            {
                mWordEditorList.FirstVisibleIndex = viewInfo.FirstVisibleIndex;
            }
        }
Пример #2
0
 protected void OnItemSelected(ItemSelectedEventArgs <T> e) => ItemSelected?.Invoke(this, e);