public SpeedTrap(SpeedTrapLocation location)
        {
            this.InitializeComponent();

            latText.Text  = location.Latitude.ToString();
            longText.Text = location.Longitude.ToString();
            //Remember that CreatedAt was a nullable type? We have to make sure there is a value in here, just to be safe
            if (location.CreatedAt.HasValue)
            {
                datePanel.Visibility = Windows.UI.Xaml.Visibility.Visible;
                dateText.Text        = location.CreatedAt.Value.ToString();
            }
        }
        public SpeedTrap(SpeedTrapLocation location)
        {
            this.InitializeComponent();

            latText.Text = location.Latitude.ToString();
            longText.Text = location.Longitude.ToString();
            //Remember that CreatedAt was a nullable type? We have to make sure there is a value in here, just to be safe
            if (location.CreatedAt.HasValue)
            {
                datePanel.Visibility = Windows.UI.Xaml.Visibility.Visible;
                dateText.Text = location.CreatedAt.Value.ToString();
            }
        }
Esempio n. 3
0
        private async void Submit_Click(object sender, RoutedEventArgs e)
        {
            var trapLocation = new SpeedTrapLocation()
            {
                Latitude  = this.latitude,
                Longitude = this.longitude
            };

            await speedTrapLocationTable.InsertAsync(trapLocation);

            Flyout f = this.Parent as Flyout;

            f.IsOpen = false;
        }
        private async void Submit_Click(object sender, RoutedEventArgs e)
        {

            var trapLocation = new SpeedTrapLocation()
            {
                Latitude = this.latitude,
                Longitude = this.longitude
            };

            await speedTrapLocationTable.InsertAsync(trapLocation);

            Flyout f = this.Parent as Flyout;
            f.IsOpen = false;

        }