public ThoughtRecordListModel(IDatabaseService db) { stringLoader = new StringResourceService("PageTitles"); Title = Title = ResourceLoader.GetForCurrentView("PageTitles").GetString("MyThoughtRecordsTitle"); database = db; Situations = new ObservableCollection <Situation>(); }
public ThoughtRecordDisplayModel(IDatabaseService db) { database = db; thoughtRecordService = new ThoughtRecordService(); stringLoader = new StringResourceService("PageTitles"); Title = stringLoader.GetString("MyThoughtRecordsTitle"); SectionTitles = thoughtRecordService.GetTitleModel(); }
/// <summary> /// These constructors are called by the App class to initialize /// </summary> public NavigationParameterModel(IDatabaseService databaseService, LicenseInformation licenseInformation, IStringResourceService stringResourceService) { DatabaseService = databaseService; LicenseInformation = licenseInformation; StringResourceService = stringResourceService; }
public NavigationParameterModel(IDatabaseService databaseService, LicenseInformation licenseInformation, IStringResourceService stringResourceService, VoiceCommandActivatedEventArgs voiceCommandArgs) { DatabaseService = databaseService; LicenseInformation = licenseInformation; StringResourceService = stringResourceService; VoiceCommandActivatedEventArgs = voiceCommandArgs; }
private void InitializeOrUpdateStringLoader(string fileName) { if (stringLoader == null) { stringLoader = new StringResourceService(fileName); } else { stringLoader.SetFile(fileName); } }
public ThoughtRecordEditModel(IDatabaseService db) { stringLoader = new StringResourceService("PageTitles"); newThoughtRecordTitle = stringLoader.GetString("NewThoughtRecordPageTitle"); editThoughtRecordTitle = stringLoader.GetString("EditThoughtRecordPageTitle"); thoughtRecordService = new ThoughtRecordService(); SectionTitles = thoughtRecordService.GetTitleModel(); database = db; CreateNewThoughtRecord(); commandsEnabled = true; IsCurrentDataSaved = true; }
public ThoughtRecordEditModel(int thoughtRecordId, IDatabaseService db) { stringLoader = new StringResourceService("PageTitles"); newThoughtRecordTitle = stringLoader.GetString("NewThoughtRecordPageTitle"); editThoughtRecordTitle = stringLoader.GetString("EditThoughtRecordPageTitle"); Title = editThoughtRecordTitle; thoughtRecordService = new ThoughtRecordService(); SectionTitles = thoughtRecordService.GetTitleModel(); database = db; InitializeThoughtRecord(thoughtRecordId); DefaultInputText = thoughtRecordService.GetDefaultInputText(); commandsEnabled = true; }
public string Convert(ResolutionContext context) { var sourceValue = (bool)context.SourceValue; if (_stringResourceService == null) { _stringResourceService = EngineContext.Current.Resolve <IStringResourceService>(); } if (sourceValue) { return(_stringResourceService.GetResourceValue(MappingConstants.Texts.True)); } return(_stringResourceService.GetResourceValue(MappingConstants.Texts.False)); }
public string Convert(ResolutionContext context) { var sourceValue = context.SourceValue.ToStringOrEmpty(); if (!string.IsNullOrEmpty(sourceValue)) { return(sourceValue); } if (context.Parent != null && (context.Parent.SourceType.Name.StartsWith("Editable") || context.Parent.DestinationType.Name.StartsWith("Editable"))) { return(null); } if (_stringResourceService == null) { _stringResourceService = EngineContext.Current.Resolve <IStringResourceService>(); } var result = _stringResourceService.GetResourceValue(MappingConstants.Texts.Empty); return(result); }
public HelpModel() { stringLoader = new StringResourceService("PageTitles"); Title = stringLoader.GetString("HelpPageTitle"); InitializeContent(); }
public InformationModel() { stringLoader = new StringResourceService("PageTitles"); Title = stringLoader.GetString("InformationPageTitle"); InitializeContent(); }
public HomeController(IStringResourceService _stringResourceService) { this.stringResourceService = _stringResourceService; }