Exemplo n.º 1
0
 public void AddDefaultMarker(CreatePunkt crPunkt, GMapMarker demoMarker)
 {
     currentMarker          = new GMapMarker(gMapControl.Position);
     currentMarker.Shape    = new CustomMarkerRed(this, currentMarker, crPunkt.tbPunktName.Text);
     currentMarker.Position = demoMarker.Position;
     gMapControl.Markers.Add(currentMarker);
 }
Exemplo n.º 2
0
        private void cmAddPunkt_Click(object sender, RoutedEventArgs e)
        {
            CreatePunkt crPunkt = new CreatePunkt();

            crPunkt.tbPunktX.Text = MainWindow.NewMarker.Position.Lng.ToString();
            crPunkt.tbPunktY.Text = MainWindow.NewMarker.Position.Lat.ToString();
            if (crPunkt.ShowDialog().Value == false)
            {
                MainWindow.AddDefaultMarker(crPunkt, MainWindow.NewMarker);
                MainWindow.NewMarker.Clear();
            }
        }
Exemplo n.º 3
0
        private void cmEditPunkt_Click(object sender, RoutedEventArgs e)
        {
            ContextDb    dbContext = new ContextDb(@"Data Source=(localdb)\v11.0;initial catalog = BanksDB.mdf;Integrated Security=True");
            CreatePunkt  crPunkt   = new CreatePunkt();
            CreateBank   crBank    = new CreateBank();
            Label        label     = (Label)Popup.Child;
            List <Punkt> punkts    = dbContext.Punkt.Where(p => p.NamePunkt == label.Content.ToString()).Select(s => s).ToList();

            crPunkt.DataContext                = punkts;
            crPunkt.btAddBank.Content          = "Изменить курс";
            crPunkt.btCreatePunktOk.Visibility = System.Windows.Visibility.Collapsed;
            crPunkt.btEditPunkt.Visibility     = System.Windows.Visibility.Visible;
            if (crPunkt.ShowDialog().HasValue)
            {
                crPunkt.Close();
            }
        }