예제 #1
0
        protected override void OnSelect()
        {
            var formService = IoCContainer.Get <IFormService>();

            var form =
                Filter == null
                    ? formService.CreateDtoListForm(ListFormMode.Choose, Dto)
                    : formService.CreateDtoListForm(ListFormMode.Choose, Dto, Filter);

            form.StartPosition = FormStartPosition.CenterParent;

            var dialogResult = form.ShowDialog(ParentForm);

            if (SelectDialogClosed != null)
            {
                var args = new DialogClosedEventArgs(dialogResult);
                SelectDialogClosed(this, args);
            }

            if (dialogResult == DialogResult.OK)
            {
                Dto = form.Dto;
            }
        }
예제 #2
0
 private async void ReferenceEditor_SelectDialogClosed(object sender, DialogClosedEventArgs e)
 {
     await OnRefreshAsync();
 }