Ejemplo n.º 1
0
        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);
            var moduleLocator = GetService <Services.IModuleLocator>();

            quoteView = moduleLocator.GetModule(ModuleType.QuoteView) as QuoteView;
            ViewModelHelper.EnsureModuleViewModel(quoteView, ViewModel, ViewModel.SelectedEntityKey);
            quoteView.Dock       = DockStyle.Fill;
            quoteView.Parent     = pnlView;
            quoteView.DataSource = ViewModel.GetOpportunities();
        }
        void UpdateColors()
        {
            var moduleLocator = GetService <Services.IModuleLocator>();

            if (moduleLocator == null || !moduleLocator.IsModuleLoaded(ModuleType.QuoteView))
            {
                return;
            }
            QuoteView quoteView = moduleLocator.GetModule(ModuleType.QuoteView) as QuoteView;

            if (ViewModel != null)
            {
                ItemsLayer.ItemStyle.Fill = quoteView.GetStageColor(ViewModel.Stage);
            }
        }