protected override async void OnInitialized(EventArgs e) { base.OnInitialized(e); if (WindowUtil.IsDesingMode()) { return; } await System.Threading.Tasks.Task.Yield(); await _mapNotification.InitCompletion; _locator = LocatorAndBorder.Instance; _radars = new RadarsCanvas(_locator); this.AddChild(_radars); _locator.OnMapRefreshed += _locator_OnMapRefreshed; _mouseEventSource.MouseDown.Subscribe(onMouseDown); activatingStatus = ActivatingStatus.Instance; _menuBarInfo = MenuBarsBaseInfo.Instance; _menuBarInfo.PropertyChanged += _menuBarInfo_PropertyChanged; _winformWindow = (System.Windows.Interop.HwndSource.FromDependencyObject(this) as System.Windows.Interop.HwndSource); _radars.InitHwndSourse(_winformWindow); _locator_OnMapRefreshed(); }
protected override async void OnInitialized(EventArgs e) { base.OnInitialized(e); if (WindowUtil.IsDesingMode()) { return; } await Task.Yield(); await _mapNotification.InitCompletion; _locatorBorder = LocatorAndBorder.Instance; _locatorBorder.OnMapRefreshed += OnRefreshed; activatingStatus = ActivatingStatus.Instance; _menuBarsInfo = MenuBarsBaseInfo.Instance; _menuBarsInfo.PropertyChanged += _menuBarsInfo_PropertyChanged; _statusBarInfo = StatusBarBaseInfomation.Instance; _statusBarInfo.PropertyChanged += _statusBarInfo_PropertyChanged; _mouseEventSource.MouseDown.Subscribe(downMouse); _mouseEventSource.MouseDoubleClick.Subscribe(doubleMouse); _mouseEventSource.MouseRightDown.Subscribe(rightMouse); _plottingInfomation = PlottingAreaSettingInfomation.Instance; _plottingInfomation.Locator = _locatorBorder.Locator; _plottingInfomation.PropertyChanged += _listPlottingArea_PropertyChanged; this.Children.Add(_plottingInfomation.Data); InputManager.Current.PreProcessInput += Current_PreProcessInput;//获取键盘输入事件 }
public RadarMuxerTrackDrawer(LocatorAndBorder locator) : base(locator) { SetColor(System.Windows.Media.Brushes.RoyalBlue, System.Windows.Media.Brushes.DarkGreen); EnumerateType = DynamicBaseCanvas.GeometryType.Circle; _receiver.TargetEvent += _receiver_TargetEvent; TimeOutHide = new TimeSpan(0, 0, 30); _menuBarInfo = MenuBarsBaseInfo.Instance; _menuBarInfo.PropertyChanged += _menuBarInfo_PropertyChanged; }
public TracksCanvasDrawer(LocatorAndBorder locator) { _locator = locator; _tracksData = new TracksCanvas(_locator); _tracksShow = _tracksData; if (IsVisibility) { addChildren(_tracksShow); } _tracksData.SetColor(_fill, _stroke); _locator.OnMapRefreshed += OnMapRefreshed; _menuBarsInfo = MenuBarsBaseInfo.Instance; _menuBarsInfo.PropertyChanged += menuBarsInfo_PropertyChanged; _timer = new System.Threading.Timer(callbackUpdateTimeOutTracks, null, 1000, 1000); OnMapRefreshed(); _selectedTargetDraw = SelectedTargetDraw.Instance; }
public CCTVNodeShow(LocatorAndBorder locator) { _locator = locator; _adjustment = new TrackAdjustment(); string path = System.IO.Directory.GetParent(System.Windows.Forms.Application.LocalUserAppDataPath).FullName; ConfigPath = System.IO.Path.Combine(path, "CCTVConfig.xml"); _config = ConfigFile <ConfigCCTV> .FromFile(ConfigPath); if (_config != null) { updateCCTVInfo(); } _locator.OnMapRefreshed += onMapRefreshed; _menuBarsInfo = MenuBarsBaseInfo.Instance; _menuBarsInfo.PropertyChanged += _menuBarsInfo_PropertyChanged; }
protected override async void OnInitialized(EventArgs e) { base.OnInitialized(e); if (WindowUtil.IsDesingMode()) { return; } await Task.Yield(); await _mapNotification.InitCompletion; _locator = LocatorAndBorder.Instance; _locator.OnMapRefreshed += updateLocation; _menuBarsInfo = MenuBarsBaseInfo.Instance; _menuBarsInfo.PropertyChanged += _menuBarsInfo_PropertyChanged; _statusBarInfo = StatusBarBaseInfomation.Instance; _statusBarInfo.PropertyChanged += _statusBarInfo_PropertyChanged; _mouseEventSource.MouseDown.Subscribe(downMouse); _mouseEventSource.MouseDoubleClick.Subscribe(doubleMouse); }