public FieldDetail() { InitializeComponent(); _cropDataContext = new CropDataContext(); _regionDataContext = new RegionDataContext(); _service = new FieldService(); _fieldDataAccessLayer = new FieldDataAccessLayer(); _fieldCropDataAccessLayer = new FieldCropDataAccessLayer(); _fieldSuveryResult = new FieldSurveyResult(); App.RegionalCultureOverride = Thread.CurrentThread.CurrentCulture = new CultureInfo("zh-CN"); App.UICultureOverride = Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN"); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); SystemTray.ProgressIndicator = new ProgressIndicator(); SetProgressIndicator(true); SystemTray.ProgressIndicator.Text = AppResources.FarmerFieldLoadingTxt; _dataAccessLayer = new FieldDataAccessLayer(); _dataContext = new FieldDataContext(); _dataContext.GetFieldDataContext((data) => { _data = data; listFarm.ItemsSource = _data; SystemTray.ProgressIndicator.Text = AppResources.FarmerFieldLoadedComplementTxt; SetProgressIndicator(false); }); }
public FieldCreator() { InitializeComponent(); ((PivotItem)bodyPiv.Items[0]).Header = "基本信息"; _guid = new Guid(); _cropDataContext = new CropDataContext(); _regionDataContext = new RegionDataContext(); _fieldSuveryResult = new FieldSurveyResult(); _regionDataContext.GetAllRegions((data) => { _regionData = data; esRegion.DataContext = new ExpanderSelectorDataContext(_regionData.ToList<object>()); _service = new FieldService(); _fieldDataAccessLayer = new FieldDataAccessLayer(); _field = new Field(); _fieldCropList = new List<FieldCrop>(); }); App.RegionalCultureOverride = Thread.CurrentThread.CurrentCulture = new CultureInfo("zh-CN"); App.UICultureOverride = Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN"); }
public FieldDataContext() { _service = new FieldService(); _dataAccessLayer = new FieldDataAccessLayer(); _cropDataAccessLayer = new FieldCropDataAccessLayer(); }