Пример #1
0
        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();
        }
Пример #2
0
 public void Dispose()
 {
     if (_radars != null)
     {
         _radars.Dispose();
     }
     _radars = null;
 }