public static bool? ShowDialog(Window window, DialogType dialogType, int selectedListFamilyId, ListChild selectedListChild)
        {
            ListChildInfoDialog listChildInfoDialog = null;
            switch (dialogType)
            {
                case DialogType.Add:
                    listChildInfoDialog = new ListChildInfoDialog(selectedListFamilyId);
                    break;
                case DialogType.Edit:
                    listChildInfoDialog = new ListChildInfoDialog(selectedListChild);
                    break;
            }

            if (listChildInfoDialog != null)
            {
                listChildInfoDialog.Owner = window;
                return listChildInfoDialog.ShowDialog().Value;
            }
            return null;
        }
        public static bool?ShowDialog(Window window, DialogType dialogType, int selectedListFamilyId, ListChild selectedListChild)
        {
            ListChildInfoDialog listChildInfoDialog = null;

            switch (dialogType)
            {
            case DialogType.Add:
                listChildInfoDialog = new ListChildInfoDialog(selectedListFamilyId);
                break;

            case DialogType.Edit:
                listChildInfoDialog = new ListChildInfoDialog(selectedListChild);
                break;
            }

            if (listChildInfoDialog != null)
            {
                listChildInfoDialog.Owner = window;
                return(listChildInfoDialog.ShowDialog().Value);
            }
            return(null);
        }
Example #3
0
 /// <summary>
 /// 显示 ListChildInfoDialog
 /// </summary>
 private void ShowListChildInfoDialog(DialogType dialogType)
 {
     ListChildInfoDialog.ShowDialog(this, dialogType, selectedListFamily.Id, listChildrenDisplayPart.SelectedListChild);
     ReadListChildren();
 }