コード例 #1
0
ファイル: MapPin.cs プロジェクト: Lichwa/JakDojadeXamarin
 public MapPin(string title, DB_station station, PinType pinType = PinType.RegularPin, PinSize pinSize = PinSize.Big, Action<MapPin> tappedCallback2 = null)
 {
     m_title = title;
     m_station = station;
     m_pinType = pinType;
     m_pinSize = pinSize;
     m_tappedCallback = tappedCallback2;
     createPin(title, pinType);
 }
コード例 #2
0
ファイル: Database.cs プロジェクト: Lichwa/JakDojadeXamarin
        public static List<DB_station> New(List<string[]> data)
        {
            List<DB_station> result = new List<DB_station>();

            foreach (string[] row in data)
            {
                // Convert string[] to class' fields.
                string post_id = row[0];
                string post_name = row[1];
                string street = row[2];
                float longitude = row[3] == @"\N" ? 0f : float.Parse(row[3]);
                float latitude = row[3] == @"\N" ? 0f : float.Parse(row[4]);

                // Add new row into DB.
                DB_station communication_line = new DB_station(post_id, post_name, street, longitude, latitude);
                result.Add(communication_line);
            }

            return result;
        }