Beispiel #1
0
        private void AddPinButton_Click(object sender, RoutedEventArgs e)
        {
            // add a new pin to the database and the list view. Then close the overlay
            if (_view == null || _storage == null)
            {
                return;
            }
            if (string.IsNullOrWhiteSpace(newPinNameBox?.Text))
            {
                return;
            }

            var pos = _view.PositionOfCurrentCentre();

            _storage.SetPin(pos.ToString(), newPinNameBox?.Text);
            newPinNameBox.Text = "";

            ThreadPool.QueueUserWorkItem(x => { ReloadPins(); });

            HidePinsOverlay();
        }