private FDConfigView() { InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { return; } _ptrPlayback = yoseen.YoseenPlayback.YoseenPlayback_Create(); if (_ptrPlayback == IntPtr.Zero) { throw new Exception("YoseenPlayback_Create, fail"); } _clsDevice = App.Instance.dcService._clsDevice; //toolbar _toolArray = new ToggleButton[(int)ToolType.Max]; _toolArray[(int)ToolType.Mouse] = btnMouse; _toolArray[(int)ToolType.Select] = btnSelect; //_toolArray[(int)ToolType.Shield] = btnShield; _toolArray[(int)ToolType.Crop] = btnCrop; btnMouse.PreviewMouseDown += btnTool_PreviewMouseDown; btnSelect.PreviewMouseDown += btnTool_PreviewMouseDown; //btnShield.PreviewMouseDown += btnTool_PreviewMouseDown; btnCrop.PreviewMouseDown += btnTool_PreviewMouseDown; _clsConfig = configCanvas.ClsConfig; pgConfig.SelectedObject = _clsConfig; }
public ShellView() { InitializeComponent(); // _dcService = App.Instance.dcService; _clsHead = _dcService._clsHead; _clsDevice = _dcService._clsDevice; _clsFDConfig = _dcService._clsFDConfig; // _recordService = App.Instance.dataAccess.ServiceDataRecord; _records = new ObservableCollection <DataRecord>(); lvRecord.ItemsSource = _records; _recordTotalCount = 0; // _busiManager = App.Instance.busiManager; // _warden = App.Instance.warden; _onvifDevice = _warden.visDevice; // _delFrameRecved_UI = _funcFrameRecved_UI; _visDelFrameRecved_UI = _visFuncFrameRecved_UI; fdCanvas._delUpdateIR = _funcUpdateIR; fdCanvas._delEndUpdate = _funcEndUpdate; setFaceDispType(); _intToBrushConverter = (IntToBrushConverter)this.Resources["intToBrushConverter"]; _intToBrushConverter.BrushNormal = Brushes.Green; _intToImageSourceConverter = (IntToImageSourceConverter)this.Resources["intToImageSourceConverter"]; _intToImageSourceConverter.ImageNormal = (ImageSource)this.Resources["normalDrawingImage"]; _intToImageSourceConverter.ImageAbnormal = (ImageSource)this.Resources["abnormalDrawingImage"]; // _clsHead.PropertyChanged += _clsHead_PropertyChanged; _clsDevice.PropertyChanged += _clsDevice_PropertyChanged; // _timer = new DispatcherTimer(); _timer.Interval = App.Const_UpdateDelta; _timer.Tick += _timer_Tick; _timer.Start(); imgLogo.Source = AppStatic.BmpLogo; // this.MouseDoubleClick += ShellView_MouseDoubleClick; this.Loaded += ShellView_Loaded; }
private SystemConfigView() { InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { return; } this.Owner = App.Instance.shellView; // _dcService = App.Instance.dcService; _clsDevice = _dcService._clsDevice; _clsHead = _dcService._clsHead; pgDevice.SelectedObject = _clsDevice; pgHead.SelectedObject = _clsHead; }