Пример #1
0
        public StatusView()
        {
            InitializeComponent();

              ChannelAdvisorInventoryDataViewModel caInventoryVm = new ChannelAdvisorInventoryDataViewModel();
              StatusControl caInventoryVmStatus = new StatusControl(caInventoryVm);
              caInventoryVmStatus.exp.IsExpanded = true;
              stkStatuses.Children.Add(caInventoryVmStatus);

              FbaInventoryDataViewModel fbaInventoryVm = new FbaInventoryDataViewModel();
              StatusControl fbaInventoryVmStatus = new StatusControl(fbaInventoryVm);
              fbaInventoryVmStatus.exp.IsExpanded = true;
              stkStatuses.Children.Add(fbaInventoryVmStatus);

              VendorDataFtpViewModel ftpVm = new VendorDataFtpViewModel();
              StatusControl ftpVmStatus = new StatusControl(ftpVm);
              ftpVmStatus.exp.IsExpanded = true;
              stkStatuses.Children.Add(ftpVmStatus);

              AmazonListingDataViewModel amzListingVm = new AmazonListingDataViewModel();
              StatusControl amzListingVmStatus = new StatusControl(amzListingVm);
              amzListingVmStatus.exp.IsExpanded = true;
              stkStatuses.Children.Add(amzListingVmStatus);

              ChannelAdvisorSalesDataViewModel caSalesVm = new ChannelAdvisorSalesDataViewModel();
              StatusControl caSalesVmStatus = new StatusControl(caSalesVm);
              caSalesVmStatus.exp.IsExpanded = true;
              stkStatuses.Children.Add(caSalesVmStatus);

              FbaSalesDataViewModel fbaSalesVm = new FbaSalesDataViewModel();
              StatusControl fbaSalesVmStatus = new StatusControl(fbaSalesVm);
              fbaSalesVmStatus.exp.IsExpanded = true;
              stkStatuses.Children.Add(fbaSalesVmStatus);

              FbaPrepDataViewModel fbaPrepVm = new FbaPrepDataViewModel();
              StatusControl fbaPrepVmStatus = new StatusControl(fbaPrepVm);
              fbaPrepVmStatus.exp.IsExpanded = true;
              stkStatuses.Children.Add(fbaPrepVmStatus);

              List<UpdatableViewModelBase> viewModels = new List<UpdatableViewModelBase>();

              bool updateAll = false;

              if (updateAll)
              {
            viewModels.Add(ftpVm);
            viewModels.Add(caSalesVm);
            viewModels.Add(amzListingVm);
            viewModels.Add(fbaSalesVm);
            viewModels.Add(caInventoryVm);
            viewModels.Add(fbaInventoryVm);
            viewModels.Add(fbaPrepVm);
              }

              StatusMonitor monitor = new StatusMonitor(viewModels);
              monitor.BeginChecking();
        }
Пример #2
0
        public StatusView()
        {
            InitializeComponent();

            ChannelAdvisorInventoryDataViewModel caInventoryVm = new ChannelAdvisorInventoryDataViewModel();
            StatusControl caInventoryVmStatus = new StatusControl(caInventoryVm);

            caInventoryVmStatus.exp.IsExpanded = true;
            stkStatuses.Children.Add(caInventoryVmStatus);

            FbaInventoryDataViewModel fbaInventoryVm       = new FbaInventoryDataViewModel();
            StatusControl             fbaInventoryVmStatus = new StatusControl(fbaInventoryVm);

            fbaInventoryVmStatus.exp.IsExpanded = true;
            stkStatuses.Children.Add(fbaInventoryVmStatus);

            VendorDataFtpViewModel ftpVm       = new VendorDataFtpViewModel();
            StatusControl          ftpVmStatus = new StatusControl(ftpVm);

            ftpVmStatus.exp.IsExpanded = true;
            stkStatuses.Children.Add(ftpVmStatus);

            AmazonListingDataViewModel amzListingVm = new AmazonListingDataViewModel();
            StatusControl amzListingVmStatus        = new StatusControl(amzListingVm);

            amzListingVmStatus.exp.IsExpanded = true;
            stkStatuses.Children.Add(amzListingVmStatus);

            ChannelAdvisorSalesDataViewModel caSalesVm = new ChannelAdvisorSalesDataViewModel();
            StatusControl caSalesVmStatus = new StatusControl(caSalesVm);

            caSalesVmStatus.exp.IsExpanded = true;
            stkStatuses.Children.Add(caSalesVmStatus);

            FbaSalesDataViewModel fbaSalesVm       = new FbaSalesDataViewModel();
            StatusControl         fbaSalesVmStatus = new StatusControl(fbaSalesVm);

            fbaSalesVmStatus.exp.IsExpanded = true;
            stkStatuses.Children.Add(fbaSalesVmStatus);

            FbaPrepDataViewModel fbaPrepVm       = new FbaPrepDataViewModel();
            StatusControl        fbaPrepVmStatus = new StatusControl(fbaPrepVm);

            fbaPrepVmStatus.exp.IsExpanded = true;
            stkStatuses.Children.Add(fbaPrepVmStatus);

            List <UpdatableViewModelBase> viewModels = new List <UpdatableViewModelBase>();

            bool updateAll = false;

            if (updateAll)
            {
                viewModels.Add(ftpVm);
                viewModels.Add(caSalesVm);
                viewModels.Add(amzListingVm);
                viewModels.Add(fbaSalesVm);
                viewModels.Add(caInventoryVm);
                viewModels.Add(fbaInventoryVm);
                viewModels.Add(fbaPrepVm);
            }

            StatusMonitor monitor = new StatusMonitor(viewModels);

            monitor.BeginChecking();
        }