Ejemplo n.º 1
0
 public ApplicationSensorViewModel(ApplicationViewModel setOwner, SensorWindow sensorWindow)
 {
     OwnerContext = setOwner;
     OwnerWindow  = sensorWindow;
     OwnerWindow.MainMap.OnPositionChanged += delegate(PointLatLng point) { OnPropertyChanged(nameof(CalculationInfo)); };
     OwnerWindow.MainMap.Loaded            += delegate(object sender, System.Windows.RoutedEventArgs e) { ResetAdjustmentCommand.Execute(null); };
 }
Ejemplo n.º 2
0
        public CustomMarkerRed(SensorWindow window, GMapMarker marker, string title)
        {
            this.InitializeComponent();

            this.MainWindow = window;
            this.Marker     = marker;

            Popup = new Popup();
            Label = new Label();

            this.Loaded              += new RoutedEventHandler(CustomMarkerDemo_Loaded);
            this.SizeChanged         += new SizeChangedEventHandler(CustomMarkerDemo_SizeChanged);
            this.MouseEnter          += new MouseEventHandler(MarkerControl_MouseEnter);
            this.MouseLeave          += new MouseEventHandler(MarkerControl_MouseLeave);
            this.MouseMove           += new MouseEventHandler(CustomMarkerDemo_MouseMove);
            this.MouseLeftButtonUp   += new MouseButtonEventHandler(CustomMarkerDemo_MouseLeftButtonUp);
            this.MouseLeftButtonDown += new MouseButtonEventHandler(CustomMarkerDemo_MouseLeftButtonDown);

            Popup.Placement = PlacementMode.Mouse;
            {
                Label.Background      = Brushes.Blue;
                Label.Foreground      = Brushes.White;
                Label.BorderBrush     = Brushes.WhiteSmoke;
                Label.BorderThickness = new Thickness(2);
                Label.Padding         = new Thickness(5);
                Label.FontSize        = 22;
                Label.Content         = title;
            }
            Popup.Child = Label;
        }