Пример #1
0
        private static void CreateRadarWindow()
        {
            if (_radarWindow == null)
            {
                Logger.Debug("Loading MapUI");

                _radarWindow = new MapWindow();

                DataModel.PropertyChanged += (sender, args) =>
                {
                    if (args.PropertyName == "IsRadarWindowVisible")
                    {
                        if (DataModel.IsRadarWindowVisible)
                        {
                            _radarWindow.Show();
                        }
                        else
                        {
                            _radarWindow.Hide();
                        }
                    }
                };

                _radarWindow.Closed += (a, b) =>
                {
                    DataModel.IsRadarWindowVisible = false;
                    _radarWindow = null;
                };
            }
        }
Пример #2
0
        private static void CreateRadarWindow()
        {
            if (_radarWindow == null)
            {
                Logger.Debug("Loading MapUI");

                _radarWindow = new MapWindow();

                DataModel.PropertyChanged += (sender, args) =>
                {
                    if (args.PropertyName == "IsRadarWindowVisible")
                    {
                        if (DataModel.IsRadarWindowVisible)
                        {
                            _radarWindow.Show();
                        }
                        else
                        {
                            _radarWindow.Hide();
                        }
                    }
                };

                _radarWindow.Closed += (a, b) =>
                {
                    DataModel.IsRadarWindowVisible = false;
                    _radarWindow = null;
                };

            }
        }