예제 #1
0
        public HotelFloorPlanViewModel()
        {
            var path = "QSF.Examples.MapControl.HotelFloorPlanExample.Data.";

            this.BaseSource            = MapSource.FromResource(path + "Hotel_base.shp", typeof(HotelFloorPlanViewModel));
            this.CorridorsSource       = MapSource.FromResource(path + "Hotel_Corridors.shp", typeof(HotelFloorPlanViewModel));
            this.ServiceRoomsSource    = MapSource.FromResource(path + "Hotel_ServiceRooms.shp", typeof(HotelFloorPlanViewModel));
            this.LiftsAndLaddersSource = MapSource.FromResource(path + "Hotel_LiftsAndLadders.shp", typeof(HotelFloorPlanViewModel));
            this.RoomsSource           = MapSource.FromResource(path + "Hotel_Rooms.shp", typeof(HotelFloorPlanViewModel));
            this.RoomsDataSource       = MapSource.FromResource(path + "Hotel_Rooms.dbf", typeof(HotelFloorPlanViewModel));

            this.RoomStates = new ObservableCollection <RoomState>();
            this.RoomStates.Add(new RoomState("Reserved", Color.FromHex("#A8A9AA")));
            this.RoomStates.Add(new RoomState("Free", Color.FromHex("#46B2D6")));
            this.RoomStates.Add(new RoomState("Service Room", Color.FromHex("#7E7E7E")));

            this.RegistrationText = "Reserve";

            this.RegisterCommand   = new Command(OnRegisterCommandExecuted);
            this.IsRegisterEnabled = false;

            this.ShapeStyleSelector = this.GetShapeStyleSelector();

            this.cancellation = new CancellationTokenSource();
        }
        public ShapeStyle()
        {
            InitializeComponent();

            var source = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp");

            this.reader.Source = source;
        }
예제 #3
0
        public ProgrammaticZoom()
        {
            InitializeComponent();

            var source = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp");

            this.reader.Source = source;
        }
예제 #4
0
        public SetBestView()
        {
            InitializeComponent();

            var assembly = this.GetType().Assembly;
            var source   = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp", assembly);

            this.reader.Source = source;
        }
        public MapGettingStartedXaml()
        {
            InitializeComponent();

            // >> map-gettingstarted-setting-source
            var source = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp");

            this.reader.Source = source;
            // << map-gettingstarted-setting-source
        }
예제 #6
0
        public ShapeLabelStyle()
        {
            InitializeComponent();

            var assembly   = this.GetType().Assembly;
            var source     = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp", assembly);
            var dataSource = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.dbf", assembly);

            this.reader.Source     = source;
            this.reader.DataSource = dataSource;
        }
예제 #7
0
        public LabelAttributeName()
        {
            InitializeComponent();

            // >> map-labels-settintsource
            var source     = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp");
            var dataSource = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.dbf");

            this.reader.Source     = source;
            this.reader.DataSource = dataSource;
            // << map-labels-settintsource
        }
        public InteractionMode()
        {
            InitializeComponent();

            // >> map-interactionmode-settintsource
            var source = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp");

            this.reader.Source = source;
            // << map-interactionmode-settintsource

            this.interactionModePicker.ItemsSource = Enum.GetValues(typeof(Telerik.XamarinForms.Map.InteractionMode));
        }
        public FirstLookView()
        {
            InitializeComponent();

            var souce      = MapSource.FromResource("QSF.Examples.MapControl.FirstLookExample.usa.shp", typeof(FirstLookView));
            var dataSource = MapSource.FromResource("QSF.Examples.MapControl.FirstLookExample.usa.dbf", typeof(FirstLookView));

            this.shapeReader.Source     = souce;
            this.shapeReader.DataSource = dataSource;

            this.BindingContext = new FirstLookViewModel();
        }
예제 #10
0
        public ProgrammaticSelection()
        {
            InitializeComponent();

            // >> map-selection-settintsource
            var source     = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp");
            var dataSource = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.dbf");

            this.reader.Source     = source;
            this.reader.DataSource = dataSource;
            // << map-selection-settintsource

            this.smPicker.ItemsSource = Enum.GetValues(typeof(Telerik.XamarinForms.Map.SelectionMode));
        }
        public MapGettingStartedCSharp()
        {
            // >> map-gettingstarted-csharp
            var map = new RadMap();

            var shapeFileLayer = new ShapefileLayer()
            {
                Reader = new MapShapeReader()
                {
                    Source = MapSource.FromResource("SDKBrowser.Examples.MapControl.world.shp")
                }
            };

            map.Layers.Add(shapeFileLayer);
            // << map-gettingstarted-csharp

            Content = map;
        }