Пример #1
0
        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;
        }
Пример #2
0
        public void DoMain()
        {
            //
            _dcService = new DeviceConfigService();
            _warden    = new YoseenWarden();

            _dataAccess  = new DataAccess(AppStatic.FileDb);
            _busiManager = new BusiManager();
            _busiManager.StartWork();

            //
            _clsHead = _dcService._clsHead;
            _clsHead.PropertyChanged += _clsHead_PropertyChanged;
            EnableScreenCapture(_clsHead.Misc_EnableScreenCapture);


            //
            ShellView shellView = new ShellView();

            _fdCanvas  = shellView.fdCanvas;
            _shellView = shellView;
            this.Run(_shellView);
        }