コード例 #1
0
ファイル: Radar.xaml.cs プロジェクト: wwkkww1983/TestTool
        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
ファイル: Radar.xaml.cs プロジェクト: wwkkww1983/TestTool
 public void Dispose()
 {
     if (_radars != null)
     {
         _radars.Dispose();
     }
     _radars = null;
 }