Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel()
        {
            AddReportsCommand  = new RelayCommand(ExecuteAddReportsCommand);
            RemoveCommand      = new RelayCommand(ExecuteRemoveCommand);
            RemoveAllCommand   = new RelayCommand(ExecuteRemoveAllCommand);
            SaveCommand        = new RelayCommand(ExecuteSaveCommand, CanExecuteSaveCommnd);
            SelectItemsCommand = new RelayCommand <CrlsReportDocument>(ExecuteSelectItemsCommand);
            OpenReportCommand  = new RelayCommand(ExecuteOpenReportCommand);

            Reports = new ReportCollection();
            BindingOperations.EnableCollectionSynchronization(Reports, _reportsLock);

            ProgressViewModel = new ProgressViewModel(0, 100, 0);

            ReportConnectionInfo = new ReportConnectionInfo(
                Settings.Default.Server,
                Settings.Default.Database,
                Settings.Default.Username,
                Settings.Default.Password,
                false);
        }