// /////////////////////////////////////////////////////////////////////////////////////////// public PageRun(IRunMode runMode, IDeviceGps gps, IDeviceAcceleromter accelerometer, PageMain parentPage, bool demoMode) { InitializeComponent(); Debug.LogToFileMethod(); NavigationPage.SetHasBackButton(this, false); NavigationPage.SetHasNavigationBar(this, false); gpsProvider = gps; accelerometerProvider = accelerometer; runModeProvider = runMode; pageNavigation = parentPage; isDemoMode = demoMode; var speedoFilter = Settings.GetValueOrDefault(Settings.SpeedoFilter, 1); var filterSize = speedoFilter * 10; Debug.LogToFile("filter mode: " + Tools.ToFilterMode(speedoFilter)); // default = 1*10 = 10 samples = medium // 0 = off // strong = 2*10 = 20 samples movingAverageForDisplay = new MovingAverage(filterSize); isAccelerationMode = runModeProvider.Mode.Equals(RunModeAcceleration.Mode); InitLayout(); }
public App() { Debug.Init(); Debug.LogToFileMethod(); pageMain = new PageMain(); // the root page of the app MainPage = new NavigationPage(pageMain); }
public void Dispose() // IDisposable { imgButtonBack.Source = null; imgButtonBack.GestureRecognizers.RemoveAt(0); imgButtonBack = null; tgrButtonBack.Tapped -= OnButtonBackTapped; tgrButtonBack = null; lblCaption = null; imgButtonHelp.Source = null; imgButtonHelp.GestureRecognizers.RemoveAt(0); imgButtonHelp = null; tgrButtonHelp.Tapped -= OnButtonHelpTapped; tgrButtonHelp = null; lblHelp = null; imgCalibAnim1.Source = null; imgCalibAnim1.SizeChanged -= OnLayoutSizeChanged; imgCalibAnim1 = null; imgCalibAnim2.Source = null; imgCalibAnim2 = null; imgCalibAnim3.Source = null; imgCalibAnim3 = null; imgCalibAnim4.Source = null; imgCalibAnim4 = null; lblText.SizeChanged -= OnLayoutSizeChanged; lblText = null; btnOk.Image = null; btnOk.Clicked -= OnButtonOkClicked; btnOk = null; vehicle = null; accelerometerProvider = null; accelerometerRecorder = null; soundProvider = null; calibrationFilter = null; pageNavigation = null; }
public PageCalibration(DataItemVehicle item, IDeviceAcceleromter accelerometer, IDeviceSound sound, PageMain parentPage) { InitializeComponent(); Debug.LogToFileMethod(); NavigationPage.SetHasBackButton(this, false); NavigationPage.SetHasNavigationBar(this, false); vehicle = item; accelerometerProvider = accelerometer; soundProvider = sound; state = CalibrationState.Init; timeMilliSeconds = 0; calibrationFilter = new MovingAverage(SAMPLE_DURATION_MS / SAMPLE_INTERVAL_MS); calibration = 0; pageNavigation = parentPage; accelerometerRecorder = new AccelerometerRecorder(false); // false: do not use queue mode InitLayout(); }