//###################################################################################
        //################################### Construtors ###################################
        //###################################################################################

        #region Construtors
        
        public SettingViewModel(SettingModel settingModel) {

            this.BaseSettingViewModel = new BaseSettingViewModel(settingModel.Name, settingModel.TargetDuration, settingModel.StartOffsetDuration);
            this.EvaluationSettingViewModel = new EvaluationSettingViewModel(settingModel.IsUsedEvaluation, settingModel.IsRecordSamplesEvaluation, settingModel.SampleBufferSize, settingModel.AccelerometerThreshold, settingModel.GyrometerThreshold, settingModel.StepDistance, settingModel.PeakJoinDistance);
            this.AccerlerometerSettingViewModel = new AccelerometerSettingViewModel(settingModel.IsUsedAccelerometer, settingModel.IsRecordSamplesAccelerometer, settingModel.ReportIntervalAccelerometer);
            this.GyrometerSettingViewModel = new GyrometerSettingViewModel(settingModel.IsUsedGyrometer, settingModel.IsRecordSamplesGyrometer, settingModel.ReportIntervalGyrometer);
            this.QuaternionSettingViewModel = new QuaternionSettingViewModel(settingModel.IsUsedQuaternion, settingModel.IsRecordSamplesQuaternion, settingModel.ReportIntervalQuaternion);
            this.GeolocationSettingViewModel = new GeolocationSettingViewModel(settingModel.IsUsedGeolocation, settingModel.IsRecordSamplesGeolocation, settingModel.ReportIntervalGeolocation);
        }
 internal static async void SaveGlobalSettingModelAysnc(SettingModel settingModel)
 {
     if (settingModel != null)
     {
         string jsonString = JsonConvert.SerializeObject(settingModel);
         StorageFolder targetFolder = await FindStorageFolder(_metaDataPath);
         await SaveJsonStringToFile(jsonString, targetFolder, _settingMetaDataFilename);
     }
 }
        //###################################################################################
        //##################################### Methods #####################################
        //###################################################################################

        public static MeasurementModel NewDefaultMeasurementModel(SettingModel settingModel)
        {
            MeasurementModel createMeasurementModel = new MeasurementModel();
            createMeasurementModel.Id = String.Format("{0}", DateTime.Now.Ticks);
            createMeasurementModel.Filename = String.Format("Measurement_{0}.bin", createMeasurementModel.Id);
            createMeasurementModel.CreateDateTime = DateTime.Now;
            if (settingModel != null)
            {
                createMeasurementModel.Setting = settingModel;
            }
            else
            {
                createMeasurementModel.Setting = SettingModel.DefaultSettingModel();
            }
            createMeasurementModel.DataSets = MeasurementDataSets.NewDefaultMeasurementDataSets();
            return createMeasurementModel;
        }
 public async Task AnalyseDataSetsAsync(string filename, SettingModel setting)
 {
     if (setting.IsUsedAccelerometer && setting.IsRecordSamplesAccelerometer)
     {
         await accelerometerDataSet.AnalyseDataSetAsync(filename);
     } 
     if (setting.IsUsedGyrometer && setting.IsRecordSamplesGyrometer)
     {
         await gyrometerDataSet.AnalyseDataSetAsync(filename);
     }
     if (setting.IsUsedQuaternion && setting.IsRecordSamplesQuaternion)
     {
         await quaterionDataSet.AnalyseDataSetAsync(filename);
     }
     if (setting.IsUsedGeolocation && setting.IsRecordSamplesGeolocation)
     {
         await geolocationDataSet.AnalyseDataSetAsync(filename);
     }
     if (setting.IsUsedEvaluation && setting.IsRecordSamplesEvaluation)
     {
         await evaluationDataSet.AnalyseDataSetAsync(filename);
     }
     return;
 }
        //###################################################################################
        //##################################### Methods #####################################
        //###################################################################################

        public static SettingModel DefaultSettingModel()
        {
            SettingModel defaultSettingModel = new SettingModel();
            defaultSettingModel.Name = "NeueMessung";
            defaultSettingModel.TargetDuration = TimeSpan.MinValue;
            defaultSettingModel.StartOffsetDuration = TimeSpan.MinValue;
            defaultSettingModel.IsUsedEvaluation = true;
            defaultSettingModel.IsRecordSamplesEvaluation = true;
            defaultSettingModel.SampleBufferSize = 500;
            defaultSettingModel.AccelerometerThreshold = 1.5d;
            defaultSettingModel.GyrometerThreshold = 150d;
            defaultSettingModel.StepDistance = 300;
            defaultSettingModel.PeakJoinDistance = 150;
            defaultSettingModel.IsUsedAccelerometer = true;
            defaultSettingModel.IsRecordSamplesAccelerometer = true;
            defaultSettingModel.ReportIntervalAccelerometer = 20;
            defaultSettingModel.IsUsedGyrometer = true;
            defaultSettingModel.IsRecordSamplesGyrometer = true;
            defaultSettingModel.ReportIntervalGyrometer = 20;
            defaultSettingModel.IsUsedQuaternion = true;
            defaultSettingModel.IsRecordSamplesQuaternion = true;
            defaultSettingModel.ReportIntervalQuaternion = 20;
            defaultSettingModel.IsUsedGeolocation = false;
            defaultSettingModel.IsRecordSamplesGeolocation = true;
            defaultSettingModel.ReportIntervalGeolocation = 20;
            return defaultSettingModel;
        }
        public bool UpdateGlobalSetting(SettingViewModel updateSettingViewModel) 
        {
            bool isUpdated = false;

            if (updateSettingViewModel != null)
            {
                this._globalSetting = new SettingModel(updateSettingViewModel);
                isUpdated = true;
                OnGlobalSettingUpdated(EventArgs.Empty);
            }
            return isUpdated;
        }