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); } }
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; }