Ejemplo n.º 1
0
 public Invoice()
 {
     InitializeComponent();
     Dispatcher.InvokeAsync(() => {
         DashboardCollaborator model = ObjectPool.Instance.Resolve <DashboardCollaborator>();
         if (this.DataContext == null && model != null)
         {
             this.DataContext = model;
         }
     });
 }
Ejemplo n.º 2
0
        private void InitializeModels()
        {
            OrderCollaborator     order  = new OrderCollaborator();
            MasterCollaborator    master = new MasterCollaborator();
            DashboardCollaborator report = new DashboardCollaborator();
            StockCollaborator     stock  = new StockCollaborator();

            ObjectPool.Instance.Register <OrderCollaborator>().ImplementedBy(order);
            ObjectPool.Instance.Register <MasterCollaborator>().ImplementedBy(master);
            ObjectPool.Instance.Register <DashboardCollaborator>().ImplementedBy(report);
            ObjectPool.Instance.Register <StockCollaborator>().ImplementedBy(stock);
        }
Ejemplo n.º 3
0
 protected override void OnInitialized(EventArgs e)
 {
     base.OnInitialized(e);
     Task.Run(() => {
         Dispatcher.Invoke(() => {
             DashboardCollaborator model = ObjectPool.Instance.Resolve <DashboardCollaborator>();
             if (this.DataContext == null && model != null)
             {
                 this.DataContext = model;
             }
         });
     });
 }