Beispiel #1
0
        public MainViewModel(IDialogCoordinator instance)
        {
            _dialogCoordinator = instance;
            IsVisibleNext      = true;
            Mediator.Instance.Register((x) =>
            {
                this.PageIndex = (int)x;
                if (PageIndex >= 1)
                {
                    IsVisiblePrev = true;
                }
                else
                {
                    IsVisiblePrev = false;
                }
            }, ViewModelMessages.IndexPage);
            this.PageIndex   = 0;
            SqlViewModel     = new SqlViewModel(this);
            ConnectViewModel = new ConnectViewModel(this);
            SpListViewModel  = new SPListViewModel(this, ConnectViewModel);
            MonitorViewModel = new MonitorViewModel(this, SqlViewModel, ConnectViewModel, SpListViewModel);
            ColumnsViewModel = new ColumnsViewModel(this, SpListViewModel);
            ReadyViewModel   = new ReadyViewModel(this);

            _finishCommand = new Command(FinishCommandFunc);
            _nextCommand   = new Command(NextCommandFunc);
            _prevCommand   = new Command(PrevCommandFunc);
            PageChanged   += MainViewModel_PageChanged;
        }
Beispiel #2
0
        public MonitorViewModel(MainViewModel instance, SqlViewModel sqlViewModel, ConnectViewModel connectViewModel, SPListViewModel spListViewModel)
        {
            _mainViewModel    = instance;
            IsBusy            = false;
            _sqlViewModel     = sqlViewModel;
            _connectViewModel = connectViewModel;
            _spListViewModel  = spListViewModel;
            position          = null;
            _worker           = new BackgroundWorker
            {
                WorkerSupportsCancellation = true,
                WorkerReportsProgress      = true
            };
            _worker.DoWork             += _worker_DoWork;
            _worker.RunWorkerCompleted += _worker_RunWorkerCompleted;

            CancelTransferCommand = new Command(CancelTransfer);
            _transferCommand      = new Command(TransferCommandFunc);
        }
Beispiel #3
0
        public ColumnsViewModel(MainViewModel instance, SPListViewModel spListViewModel)
        {
            _mainViewModel = instance;

            _spListViewModel = spListViewModel;
        }