예제 #1
0
        private async Task InitDataResources()
        {
            UIFunctions.SetFieldsFromResources(typeof(PropertyDialog));

            UIFunctions.SetFieldsFromResources(typeof(MainPage));

            await this.CheckIfDataBaseExist();

            await ContractorsContext.SetCurrentAsync();
        }
예제 #2
0
        private static async Task SetCurrentContext()
        {
            await DataTypeFactory.SetCurrentAsync(new Type[] { typeof(Contractor) });

            mCurrent = new ContractorsContext();

            mCurrent.noImage = await GetNoImageSplash();

            mCurrent.Items = new ObservableCollection <Contractor>();

            foreach (var item in await ContractorsRepository.Current.GetItems())
            {
                mCurrent.Items.Add(item);
            }
        }