예제 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.LogEntriesList);

            this.listViewLogEntries = this.FindViewById <ListView>(Resource.Id.listViewLogEntries);

            try
            {
                this.timeTrackerWorkspace = CentralStation.Instance.Ainject.ResolveType <ITimeTrackerWorkspace>();
                ////var entry = new TrackLocationLogEntry { LogEntry = Constants.EntryPerimeter, TrackLocationId = 1 };
                ////entry.SetLogDateTime(DateTime.Now);
                ////int response = this.timeTrackerWorkspace.SaveTrackLocationLogEntry(entry);

                var trackLocations = this.timeTrackerWorkspace.GetTrackLocationLogEntries().ToList();
                this.listViewLogEntries.Adapter           = new TrackLocationLogEntryListAdapter(this, trackLocations);
                this.listViewLogEntries.TextFilterEnabled = true;

                this.listViewLogEntries.ItemClick += (sender, e) =>
                {
                    var backToMain = new Intent(this, typeof(MainActivity));
                    this.StartActivity(backToMain);
                };
            }
            catch (Exception ex)
            {
                Log.Error(this.GetType().Name, ex.StackTrace);
            }
        }
예제 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.LogEntriesList);

            this.listViewLogEntries = this.FindViewById<ListView>(Resource.Id.listViewLogEntries);

            try
            {
                this.timeTrackerWorkspace = CentralStation.Instance.Ainject.ResolveType<ITimeTrackerWorkspace>();
                ////var entry = new TrackLocationLogEntry { LogEntry = Constants.EntryPerimeter, TrackLocationId = 1 };
                ////entry.SetLogDateTime(DateTime.Now);
                ////int response = this.timeTrackerWorkspace.SaveTrackLocationLogEntry(entry);

                var trackLocations = this.timeTrackerWorkspace.GetTrackLocationLogEntries().ToList();
                this.listViewLogEntries.Adapter = new TrackLocationLogEntryListAdapter(this, trackLocations);
                this.listViewLogEntries.TextFilterEnabled = true;

                this.listViewLogEntries.ItemClick += (sender, e) =>
                {
                    var backToMain = new Intent(this, typeof(MainActivity));
                    this.StartActivity(backToMain);
                };
            }
            catch (Exception ex)
            {
                Log.Error(this.GetType().Name, ex.StackTrace);
            }
        }
예제 #3
0
 public PerimeterWatchDog(ICoreApplicationContext coreApplicationContext, IDistanceCalculator distanceCalculator, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coreApplicationContext = coreApplicationContext;
     this.distanceCalculator     = distanceCalculator;
     this.timeTrackerWorkspace   = timeTrackerWorkspace;
 }
예제 #4
0
 public CoreApplicationContext(ICoordinateGeocoder coordinateGeocoder, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coordinateGeocoder = coordinateGeocoder;
     this.timeTrackerWorkspace = timeTrackerWorkspace;
 }
예제 #5
0
 public CoreApplicationContext(ICoordinateGeocoder coordinateGeocoder, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coordinateGeocoder   = coordinateGeocoder;
     this.timeTrackerWorkspace = timeTrackerWorkspace;
 }
예제 #6
0
 public PerimeterWatchDog(ICoreApplicationContext coreApplicationContext, IDistanceCalculator distanceCalculator, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coreApplicationContext = coreApplicationContext;
     this.distanceCalculator = distanceCalculator;
     this.timeTrackerWorkspace = timeTrackerWorkspace;
 }