예제 #1
0
 public ThreadedToolbarPanel(IEventAggregator eventAggregator, ThreadedStatusBar statusBar)
 {
     _eventAggregator = eventAggregator;
     _statusBar       = statusBar;
     InitializeComponent();
     _bgWorker = new BackgroundWorker
     {
         WorkerReportsProgress      = true,
         WorkerSupportsCancellation = true
     };
     _bgWorker.DoWork          += WorkerMethod;
     _bgWorker.ProgressChanged += HandleProgressChanged;
     statusBar.ShowReady();
 }
예제 #2
0
        public void OnLoad()
        {
            LoadResources();

            var statusBarRegion = _regionManager.GetRegion("statusBarRegion");
            var statusBar       = new ThreadedStatusBar();

            statusBarRegion.AddView(statusBar);

            var region = _regionManager.GetRegion("toolbarTrayRegion");

            region.AddView(new ThreadedToolbarPanel(_eventAggregator, statusBar));

            var region2 = _regionManager.GetRegion("rightSideMenu");

            _progressBarHelper = new ProgressBarHelper(_eventAggregator);
            region2.AddView(_progressBarHelper.ProgressBar);
        }