Beispiel #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);
            }
        }
        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);
            }
        }
Beispiel #3
0
 public PerimeterWatchDog(ICoreApplicationContext coreApplicationContext, IDistanceCalculator distanceCalculator, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coreApplicationContext = coreApplicationContext;
     this.distanceCalculator     = distanceCalculator;
     this.timeTrackerWorkspace   = timeTrackerWorkspace;
 }
 public CoreApplicationContext(ICoordinateGeocoder coordinateGeocoder, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coordinateGeocoder = coordinateGeocoder;
     this.timeTrackerWorkspace = timeTrackerWorkspace;
 }
Beispiel #5
0
 public CoreApplicationContext(ICoordinateGeocoder coordinateGeocoder, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coordinateGeocoder   = coordinateGeocoder;
     this.timeTrackerWorkspace = timeTrackerWorkspace;
 }
 public PerimeterWatchDog(ICoreApplicationContext coreApplicationContext, IDistanceCalculator distanceCalculator, ITimeTrackerWorkspace timeTrackerWorkspace)
 {
     this.coreApplicationContext = coreApplicationContext;
     this.distanceCalculator = distanceCalculator;
     this.timeTrackerWorkspace = timeTrackerWorkspace;
 }