示例#1
0
文件: GPSPush.cs 项目: nodoid/GPSPush
        public App()
        {
            App.Self = this;
            ChangedClass = new ChangedEvent();

            // we need give the co-ordinates an initial value
            Longitude = 53.431;
            Latitude = -2.956;

            this.ChangedClass.Change += (object s, ChangedEventArgs ea) =>
            {
                if (ea.ModuleName == "location")
                {
                    var locdata = ea.Id.Split(',').ToArray();
                    Longitude = double.Parse(locdata[1]);
                    Latitude = double.Parse(locdata[0]);

                    ChangedClass.BroadcastIt("updated-location", ".");
                }
            };

            MainPage = new MapPage();
        }
示例#2
0
        public App()
        {
            App.Self     = this;
            ChangedClass = new ChangedEvent();

            // we need give the co-ordinates an initial value
            Longitude = 53.431;
            Latitude  = -2.956;

            this.ChangedClass.Change += (object s, ChangedEventArgs ea) =>
            {
                if (ea.ModuleName == "location")
                {
                    var locdata = ea.Id.Split(',').ToArray();
                    Longitude = double.Parse(locdata[1]);
                    Latitude  = double.Parse(locdata[0]);

                    ChangedClass.BroadcastIt("updated-location", ".");
                }
            };

            MainPage = new MapPage();
        }