//[Conditional("VerticalDistribution")] //private void InitData() //{ // pcData.Controls.Clear(); // ucDataAnalysisData ucData = new ucDataAnalysisData(); // pcData.Controls.Add(ucData); //} public wfDataAnalysis(int iIndex, ucExhaustData uc) { InitializeComponent(); index = iIndex; ucEdata = uc; viewNavigator = new ModulesNavigator(Program.frmMain.Ribbon, pcChart); InitializeUI(); InitBarItemLinks(); if (!mvvmContext1.IsDesignMode) { InitializeBindings(); } }
public frmMain() { TaskbarHelper.InitDemoJumpList(TaskbarAssistant.Default, this); InitializeComponent(); SkinHelper.InitSkinGallery(rgbiSkins); RibbonButtonsInitialize(); modulesNavigator = new ModulesNavigator(ribbonControl1, pcMain); zoomManager = new ZoomManager(ribbonControl1, modulesNavigator, beiZoom); InitNavBarItemLinks(); NavigationInitialize(); SetPageLayoutStyle(); guideGenerator = new GuideGenerator(); guideGenerator.CreateWhatsThisItem(ribbonControl1, () => { return this; }); MainPresenter = new fmMainPresenter(this); }
/// <summary> /// Init /// </summary> protected override void InitializeBindings() { try { viewNavigator = new ModulesNavigator(Program.frmMain.Ribbon, pcClient); InitBarItemLinks(); mvvmContext1.SetViewModel(typeof(CalibrationViewModel.DebugModel), CalibrationViewModel.VM.Debug); var fluent = mvvmContext1.OfType <CalibrationViewModel.DebugModel>(); // AddBinding(fluent.SetBinding(sbExitCalibrationMode, uc => uc.Visible, x => x.Mode)); AddBinding(fluent.SetBinding(rgSpectralView, r => r.SelectedIndex, x => x.Type)); Messenger.Default.Register <string>(this, typeof(CalibrationViewModel.DebugModel).Name, action); Messenger.Default.Register(this, typeof(CalibrationViewModel.AccelerationModel).Name, (CalibrationViewModel.AccelerationModel m) => { ErrorLog.Error("刷新控件目录:" + DateTime.Now.ToString("HH:mm:ss fff")); InitControlDicValue(); }); CalibrationViewModel.VM.ModelChanged += (sender, arg) => { if (arg.ModelName == typeof(CalibrationViewModel.DebugModel).Name) { action(); } }; ResultDataViewModel.VM.ModelChanged += (sender, arg) => { if (arg.ModelName == "CloseAPP") { ExitCalibrationMode(); } }; base.InitializeBindings(); } catch (Exception ex) { ErrorLog.Error(ex.StackTrace.ToString()); } }
public ZoomManager(RibbonControl ribbon, ModulesNavigator modulesNavigator, BarEditItem beItem) { this.ribbon = ribbon; this.modulesNavigator = modulesNavigator; this.beiZoom = beItem; this.beiZoom.HiddenEditor += new DevExpress.XtraBars.ItemClickEventHandler(this.beiZoom_HiddenEditor); this.beiZoom.ShownEditor += new DevExpress.XtraBars.ItemClickEventHandler(this.beiZoom_ShownEditor); }