Exemplo n.º 1
0
 public Orders()
     : base(CreateViewModel <OrderCollectionViewModel>)
 {
     InitializeComponent();
     GalleryItemAppearances.Apply(galleryQuickReports);
     //
     CollectionUIViewModel = DevExpress.Mvvm.POCO.ViewModelSource.Create <CollectionUIViewModel>();
     CollectionPresenter   = CreateCollectionPresenter();
     CollectionPresenter.ReloadEntities();
     //
     BindCommands();
     //
     InitViewKind();
     InitViewLayout();
 }
Exemplo n.º 2
0
        public void execute(InputDto input)
        {
            presenter = new ConsoleListPresenter();

            inputAdapter = new InputAdapterDto();

            String[] colors       = input.Colors;
            String[] removeColors = input.Removecolors;

            List <String> listColors       = convertToList(colors);
            List <String> listRemoveColors = convertToList(removeColors);

            addAdaptedListsToInputAdapter(inputAdapter, listColors, listRemoveColors);

            performOperation(ApplicationConstants.Operation.COMPLETED_LIST);
            performOperation(ApplicationConstants.Operation.REMOVED_LIST);
        }
Exemplo n.º 3
0
 public Employees()
     : base(CreateViewModel <EmployeeCollectionViewModel>)
 {
     InitializeComponent();
     GalleryItemAppearances.Apply(galleryQuickLetters);
     layoutView.Appearance.FieldCaption.ForeColor            = ColorHelper.DisabledTextColor;
     layoutView.Appearance.FieldCaption.Options.UseForeColor = true;
     //
     CollectionUIViewModel = DevExpress.Mvvm.POCO.ViewModelSource.Create <CollectionUIViewModel>();
     CollectionPresenter   = CreateCollectionPresenter();
     CollectionPresenter.ReloadEntities();
     //
     BindCommands();
     //
     InitViewKind();
     InitViewLayout();
     InitEditors();
 }
Exemplo n.º 4
0
        public void Build()
        {
            Result = new MapPresenter();

            Result.Parent = null;

            TextFieldPresenter classNameFieldPresenter = new TextFieldPresenter();
            classNameFieldPresenter.FormatString = "Class Name: {0}";

            Result["ClassNamePresentation"] = classNameFieldPresenter;

            AddFieldBinding(classNameFieldPresenter, "ClassName");

            CollectionPresenter studentsPresenter = new CollectionPresenter();

            Result["StudentsPresenter"] = studentsPresenter;

            AddCollectionBinding(studentsPresenter, "People");
        }
Exemplo n.º 5
0
        public void Build()
        {
            Result = new PropertyMapPresenter();

            Result.Parent = null;

            TextFieldPresenter orgNameFieldPresenter = new TextFieldPresenter();
            orgNameFieldPresenter.FormatString = "Org Name: {0}";

            Result["OrgNamePresentation"] = orgNameFieldPresenter;

            AddFieldBinding(orgNameFieldPresenter, "OrgName");

            CollectionPresenter studentsPresenter = new CollectionPresenter();

            Result["StudentsPresenter"] = studentsPresenter;

            AddCollectionBinding(studentsPresenter, "People");
        }
Exemplo n.º 6
0
 public Customers()
     : base(typeof(CustomerCollectionViewModel))
 {
     InitializeComponent();
     GalleryItemAppearances.Apply(galleryQuickReports);
     layoutView.Appearance.FieldCaption.ForeColor             = ColorHelper.DisabledTextColor;
     layoutView.Appearance.FieldCaption.Options.UseForeColor  = true;
     lvEmployees.Appearance.FieldCaption.ForeColor            = ColorHelper.DisabledTextColor;
     lvEmployees.Appearance.FieldCaption.Options.UseForeColor = true;
     //
     CollectionUIViewModel = DevExpress.Mvvm.POCO.ViewModelSource.Create <CollectionUIViewModel>();
     CollectionPresenter   = CreateCollectionPresenter();
     CollectionPresenter.ReloadEntities(mvvmContext);
     //
     BindCommands();
     //
     InitViewKind();
     InitViewLayout();
 }
Exemplo n.º 7
0
 public Orders()
     : base(typeof(OrderCollectionViewModel))
 {
     InitializeComponent();
     GalleryItemAppearances.Apply(galleryQuickReports);
     //
     CollectionUIViewModel = DevExpress.Mvvm.POCO.ViewModelSource.Create <CollectionUIViewModel>();
     CollectionPresenter   = CreateCollectionPresenter();
     CollectionPresenter.ReloadEntities(mvvmContext);
     //
     BindCommands();
     //
     InitViewKind();
     InitViewLayout();
     InitEditors();
     //netcore3
     biPrintSubItem.Enabled      = false;
     biNewOrder.Enabled          = false;
     galleryQuickReports.Enabled = false;
     biMap.Enabled = false;
 }
Exemplo n.º 8
0
        void AddCollectionBinding(CollectionPresenter collectionPresenter, string sourcePropName)
        {
            OneWayCollectionValueBindingWithPath<Person, IPresentationTreeNode, IEnumerable<Person>, ObservableCollection<IPresentationTreeNode>> collectionFieldBinding =
                new OneWayCollectionValueBindingWithPath<Person, IPresentationTreeNode, IEnumerable<Person>, ObservableCollection<IPresentationTreeNode>>();

            collectionFieldBinding.SourceObj = TheClass;
            collectionFieldBinding.SourcePathLinks = new List<BindingPathLink<object>>
            {
                new BindingPathLink<object>(sourcePropName)
            };

            collectionFieldBinding.TargetObj = collectionPresenter;
            collectionFieldBinding.TargetPathLinks = new List<BindingPathLink<object>>
            {
                new BindingPathLink<object>("ObservableChildren")
            };

            collectionFieldBinding.SourceToTargetDelegate = GetPersonMap;

            collectionFieldBinding.Bind();

            TheBindingsAProp.SetProperty(collectionPresenter, collectionFieldBinding);
        }
Exemplo n.º 9
0
 public Products()
     : base(typeof(ProductCollectionViewModel))
 {
     InitializeComponent();
     GalleryItemAppearances.Apply(galleryQuickReports);
     layoutView.Appearance.FieldCaption.ForeColor            = ColorHelper.DisabledTextColor;
     layoutView.Appearance.FieldCaption.Options.UseForeColor = true;
     colDescription.AppearanceCell.ForeColor            = ColorHelper.DisabledTextColor;
     colDescription.AppearanceCell.Options.UseForeColor = true;
     //
     CollectionUIViewModel = DevExpress.Mvvm.POCO.ViewModelSource.Create <CollectionUIViewModel>();
     CollectionPresenter   = CreateCollectionPresenter();
     CollectionPresenter.ReloadEntities(mvvmContext);
     //
     BindCommands();
     //
     InitViewKind();
     InitViewLayout();
     InitEditors();
     //netcore3
     galleryQuickReports.Enabled = false;
     biPrintSubItem.Enabled      = false;
     biSalesAnalysis.Enabled     = false;
 }
Exemplo n.º 10
0
 protected override void OnDisposing()
 {
     CollectionPresenter.Dispose();
     UnsubscribeProductView();
     base.OnDisposing();
 }
Exemplo n.º 11
0
 protected override void OnDisposing()
 {
     CollectionPresenter.Dispose();
     base.OnDisposing();
 }
Exemplo n.º 12
0
 protected override void OnDisposing()
 {
     CollectionPresenter.Dispose();
     UnsubscribeOrderViewEvents();
     base.OnDisposing();
 }
 public ControllerCollection(CollectionPresenter presenter, CollectionProcess process)
 {
     this.presenter = presenter;
     this.process   = process;
 }