コード例 #1
0
        /// <summary>
        /// Return choosed element.
        /// </summary>
        internal TableElement ShowDialogWithResult(TableElement selectedElement)
        {
            int selectedIndex = -1;

            if (selectedElement != null)
            {
                for (int i = 0; i < allItems.Length; i++)
                {
                    if (allItems[i].GetId() == selectedElement.GetId())
                    {
                        selectedIndex = i;
                        break;
                    }
                }
            }
            InitItems(selectedIndex);
            ShowDialog();
            return(okPress? dialogRes : null);
        }