예제 #1
0
        private void newSite(object sender, EventArgs e)
        {
            var d = new Reclamation.TimeSeries.Forms.ImportForms.AddSite(DB);

            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                DB.AddSiteWithTemplate(CurrentFolder, d.SeriesCatalog, d.SiteName, d.SiteID,
                                       d.State, d.Elevation, d.Lat, d.Lon, d.TimeZone, d.Install, d.Program);
                DatabaseChanged();
            }
        }
예제 #2
0
파일: PiscesForm.cs 프로젝트: woohn/Pisces
        private void newSite(object sender, EventArgs e)
        {
            var d = new Reclamation.TimeSeries.Forms.ImportForms.AddSite(DB);

            DB.SuspendTreeUpdates();
            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                double lat  = 0;
                double lon  = 0;
                double elev = 0;

                double.TryParse(d.Lat, out lat);
                double.TryParse(d.Lon, out lon);
                double.TryParse(d.Elevation, out elev);

                DB.AddSiteWithTemplate(CurrentFolder, d.SeriesCatalog, d.SiteName, d.SiteID,
                                       d.State, elev, lat, lon, d.TimeZone, d.Install, d.Program);
                DB.ResumeTreeUpdates();
                DatabaseChanged();
            }
        }
예제 #3
0
파일: PiscesForm.cs 프로젝트: usbr/Pisces
        private void newSite(object sender, EventArgs e)
        {
            var d = new Reclamation.TimeSeries.Forms.ImportForms.AddSite(DB);
            DB.SuspendTreeUpdates();
            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                double lat = 0;
                double lon = 0;
                double elev = 0;

                double.TryParse(d.Lat, out lat);
                double.TryParse(d.Lon, out lon);
                double.TryParse(d.Elevation, out elev);

                DB.AddSiteWithTemplate(CurrentFolder, d.SeriesCatalog, d.SiteName, d.SiteID, 
                    d.State, elev, lat, lon, d.TimeZone, d.Install,d.Program);
                DB.ResumeTreeUpdates();
                DatabaseChanged();
            }
        }