コード例 #1
0
        public EditableListSelectorController(IBaseCustomView view, Type targetType)
            : base(view)
        {
            this.targetType = targetType;
            Debug.Assert(targetType != null);
            Debug.Assert(typeof(UiBase).IsAssignableFrom(targetType));

            DataViewSourceChanged(new DataViewParameter(BusinessObject.Declared.FirstOrDefault(x => x.UiDataType == targetType), null));
        }
コード例 #2
0
        public DefaultCustomController(IBaseCustomView view)
        {
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }

            this.view       = view;
            view.AddBOItem += view_AddBOItem;
            view.DelBOItem += view_DelBOItem;
            //view.ForwardListSelected += view_ForwardListSelected;
            view.MainGridSelectionChanged += view_MainGridSelectionChanged;
            view.StartSearch += view_StartSearch;

            this.SetViewDataSource = x => this.view.GridDataSource = x;
            dataViewSourceHandler  = AppServices.Instance.DataViewSource.Register(DataViewSourceChanged);
        }