コード例 #1
0
        public MapIndividuals(List <MapLocation> locations, string year, Form mapForm)
        {
            InitializeComponent();
            this.mapForm   = mapForm;
            this.locations = locations;
            dgIndividuals.AutoGenerateColumns = false;
            dgIndividuals.DataSource          = new SortableBindingList <MapLocation>(this.locations);
            reportFormHelper = new ReportFormHelper(this, this.Text, dgIndividuals, this.ResetTable, "Map Individuals");
            italicFont       = new Font(dgIndividuals.DefaultCellStyle.Font, FontStyle.Italic);
            reportFormHelper.LoadColumnLayout("MapIndividualColumns.xml");
            tsRecords.Text = this.locations.Count + " Records. " + Properties.Messages.Hints_Individual;
            MapLocation mostCommon = this.locations.MostCommon();
            string      titleText  = mostCommon.Location.ToString();

            if (mapForm is TimeLine)
            {
                titleText += " in " + year;
            }
            this.Text = this.locations.Count < 2 ? titleText : "Centred near " + titleText;
            DatabaseHelper.GeoLocationUpdated += new EventHandler(DatabaseHelper_GeoLocationUpdated);
        }