Inheritance: INotifyPropertyChanged
示例#1
0
        public MainWindowViewModel()
        {
            Trace.Listeners.Add(new DelegateTraceListener(null,LogLineAction ));
            Trace.TraceInformation("Initializing...");

            dispatcher = Dispatcher.CurrentDispatcher;

            StatusText = "Ready";
            State = UpdateState.Ready;
            ProgressMax = 100;
            
            Options = new OptionsViewModel();
            Update = new UpdateModel();
            MirrorProviders = new List<IMirrorProvider> {new EmuleSecurity(), new BlocklistMirrorProvider()};
            LaunchHelpCommand = new DelegateCommand(LaunchHelp);
            StartCommand = new DelegateCommand(Start, IsStartEnabled);
            applicationEnumerator = new ApplicationEnumerator();
            downloader = new FilterDownloader();
            
            progress = new Progress<ProgressModel>(ProgressHandler);
            cancellationToken = new CancellationTokenSource();
        }
示例#2
0
        public MainWindowViewModel()
        {
            //Trace.TraceInformation("Initializing...");
            //Trace.Listeners.Add(new DelegateTraceListener(null,LogLineAction ));

            dispatcher = Dispatcher.CurrentDispatcher;

            StatusText  = "Ready";
            State       = UpdateState.Ready;
            ProgressMax = 100;

            Options               = new OptionsViewModel();
            Update                = new UpdateModel();
            MirrorProviders       = MirrorProvidersFactory.Get();
            LaunchHelpCommand     = new DelegateCommand(LaunchHelp);
            ShowOptionsCommand    = new DelegateCommand(ShowOptions);
            ShowLogCommand        = new DelegateCommand(ShowLog);
            StartCommand          = new DelegateCommand(Start, IsStartEnabled);
            applicationEnumerator = new ApplicationEnumerator();
            downloader            = new FilterDownloader();

            cancellationToken = new CancellationTokenSource();
        }
示例#3
0
        public MainWindowViewModel()
        {
            Trace.Listeners.Add(new DelegateTraceListener(null, LogLineAction));
            Trace.TraceInformation("Initializing...");

            dispatcher = Dispatcher.CurrentDispatcher;

            StatusText  = "Ready";
            State       = UpdateState.Ready;
            ProgressMax = 100;

            Options         = new OptionsViewModel();
            Update          = new UpdateModel();
            MirrorProviders = new List <IMirrorProvider> {
                new EmuleSecurity(), new BlocklistMirrorProvider()
            };
            LaunchHelpCommand     = new DelegateCommand(LaunchHelp);
            StartCommand          = new DelegateCommand(Start, IsStartEnabled);
            applicationEnumerator = new ApplicationEnumerator();
            downloader            = new FilterDownloader();

            progress          = new Progress <ProgressModel>(ProgressHandler);
            cancellationToken = new CancellationTokenSource();
        }