当前位置: 首页>>代码示例>>C#>>正文


C# INavigation类代码示例

本文整理汇总了C#中INavigation的典型用法代码示例。如果您正苦于以下问题:C# INavigation类的具体用法?C# INavigation怎么用?C# INavigation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


INavigation类属于命名空间,在下文中一共展示了INavigation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

 public void Init()
 {
     var mock = MockRepository.GenerateMock(typeof(IWebDriver), new[] { typeof(IJavaScriptExecutor) });
     this.webDriver = (IWebDriver)mock;
     this.javaScriptExecutor = (IJavaScriptExecutor)mock;
     this.navigation = MockRepository.GenerateStub<INavigation>();
 }
开发者ID:pbakshy,项目名称:Selenol,代码行数:7,代码来源:TestNavigationExtensions.cs

示例2: ExpenseViewModel

		public ExpenseViewModel(INavigation navigation)
		{
			_navigation = navigation;
			_expenseService = DependencyService.Get<IExpenseService>();

			SelectedDate = DateTime.Now;
			LoadData();

			MessagingCenter.Subscribe<AddViewModel, Expense>(this, "AddExpense", async (sender, arg) =>
				{
					try
					{
						await _expenseService.AddExpenseAsync(arg).ConfigureAwait(false);
					}
					catch (Exception ex)
					{
						Debug.WriteLine("Error occured during insertion : "+ex.Message);
					}
					LoadData();
				});
			MessagingCenter.Subscribe<ExpenseItemViewModel, int>(this, "DeleteExpense", async (sender, arg) =>
				{
					try
					{
						await _expenseService.DeleteExpenseAsync(arg).ConfigureAwait(false);
					}
					catch (Exception ex)
					{
						Debug.WriteLine("Error occured during delete of expense : "+ex.Message);
					}
					LoadData();
				});
		}
开发者ID:Benesss,项目名称:ExpenseForms,代码行数:33,代码来源:ExpenseViewModel.cs

示例3: CustomerTabbedPage

        public CustomerTabbedPage(INavigation navigation, Account account)
        {
            // since we're modally presented this tabbed view (because Android doesn't natively support nested tabs),
            // this tool bar item provides a way to get back to the Customers list
            ToolbarItems.Add(new ToolbarItem(TextResources.Customers_Orders_CustomerTabbedPage_BackToCustomers, null, async () => await navigation.PopModalAsync()));

            CustomerDetailPage customerDetailPage = new CustomerDetailPage()
            {
                BindingContext = new CustomerDetailViewModel(account) { Navigation = this.Navigation },
                Title = TextResources.Customers_Detail_Tab_Title,
                Icon = new FileImageSource() { File = "CustomersTab" } // only used  on iOS
            };

            CustomerOrdersPage customerOrdersPage = new CustomerOrdersPage()
            {
                BindingContext = new OrdersViewModel(account) { Navigation = this.Navigation },
                Title = TextResources.Customers_Orders_Tab_Title,
                Icon = new FileImageSource() { File = "ProductsTab" } // only used  on iOS
            };

            CustomerSalesPage customerSalesPage = new CustomerSalesPage()
            {
                BindingContext = new CustomerSalesViewModel(account) { Navigation = this.Navigation },
                Title = TextResources.Customers_Sales_Tab_Title,
                Icon = new FileImageSource() { File = "SalesTab" } // only used  on iOS
            };

            Children.Add(customerDetailPage);
            Children.Add(customerOrdersPage);
            Children.Add(customerSalesPage);
        }
开发者ID:kirillg,项目名称:demo-xamarincrm,代码行数:31,代码来源:CustomerTabbedPage.cs

示例4: SearchViewModel

        public SearchViewModel(INavigation navigation)
        {
            if (navigation != null)
                _navigation = navigation;
            FindCommand = new Command<String>(searchText =>
            {
                this.SearchPattern = searchText;
                TwitterClient client = TwitterClient.GetInstance();
                IEnumerable<ITweet> tweets = client.SearchTweets(SearchPattern);
                TweetsFoundCollection = new ObservableCollection<ITweet>(tweets);
            }
                );

            ToMainCommand = new Command(async () =>
            {
                if (_navigation != null)
                    await _navigation.PopAsync();
            });

            SignupCommand = new Command<Object>(signup =>
            {
                TwitterClient client = TwitterClient.GetInstance();
                var tweet = signup as ITweet;
                if (tweet != null)
                {
                    Int64 id = tweet.CreatedBy.Id;
                    client.FollowUser(id);
                }
            },
                value => { return TweetsFoundCollection != null; });
        }
开发者ID:stanbav,项目名称:TwitterClient,代码行数:31,代码来源:SearchViewModel.cs

示例5: MainViewModel

        public MainViewModel(INavigation navigation)

        {

            _navigation = navigation;        
            
        }
开发者ID:karl-henrik,项目名称:trivselmaskinen.app,代码行数:7,代码来源:MainViewModel.cs

示例6: ContactListViewModel

        public ContactListViewModel(INavigation navigation)
        {
            _navigation = navigation;
            _contactsService = ServiceLocator.ContactsService;

            Contacts = new ObservableCollection<Contact>();
        }
开发者ID:joncortez,项目名称:SeattleCodeCamp2015,代码行数:7,代码来源:ContactListViewModel.cs

示例7: EventDetailsViewModel

 public EventDetailsViewModel(INavigation navigation, FeaturedEvent e) : base(navigation)
 {
     Event = e;
     Sponsors = new ObservableRangeCollection<Sponsor>();
     if (e.Sponsor != null)
         Sponsors.Add(e.Sponsor);
 }
开发者ID:RobGibbens,项目名称:app-evolve,代码行数:7,代码来源:EventDetailsViewModel.cs

示例8: AccountSettingsViewModel

		public AccountSettingsViewModel(
			INavigation navigation,
			IAppSettings appSettings)
			: base(navigation)
		{
			this.appSettings = appSettings;
		}
开发者ID:kamilkk,项目名称:MyVote,代码行数:7,代码来源:AccountSettingsViewModel.cs

示例9: TryFindPrincipal

        private object TryFindPrincipal(StateManager stateManager, INavigation navigation, object dependentEntity)
        {
            if (navigation.PointsToPrincipal)
            {
                return _getterSource.GetAccessor(navigation).GetClrValue(dependentEntity);
            }

            // TODO: Perf
            foreach (var principalEntry in stateManager.StateEntries
                .Where(e => e.EntityType == navigation.ForeignKey.ReferencedEntityType))
            {
                if (navigation.IsCollection())
                {
                    if (_collectionAccessorSource.GetAccessor(navigation).Contains(principalEntry.Entity, dependentEntity))
                    {
                        return principalEntry.Entity;
                    }
                }
                else if (_getterSource.GetAccessor(navigation).GetClrValue(principalEntry.Entity) == dependentEntity)
                {
                    return principalEntry.Entity;
                }
            }

            return null;
        }
开发者ID:charlyraffellini,项目名称:EntityFramework,代码行数:26,代码来源:ForeignKeyValueGenerator.cs

示例10: ContactViewModel

 public ContactViewModel(INavigation navigation, Contact contact)
 {
     _navigation = navigation;
     _contactData = new ContactDataService();
     FillingCurrentContact(contact);
     AddContactCommand = new Command(() => NewContact(contact));
 }
开发者ID:kosomgua,项目名称:AddressBook,代码行数:7,代码来源:ContactViewModel.cs

示例11: FindBleViewModel

		public FindBleViewModel (INavigation navigation, bool selMeuSkey)
		{
			fim = false;
			this.selMeuSkey = selMeuSkey;
			App.gateSkey = null;  //sKey selecionada se for scan para gateDevice
			keySelecionada = null; //resultado da acao de click em item da lista de sKeys encontrados
			if (selMeuSkey || App.gateSkeys == null)
				devices = new ObservableCollection<BleDevice> ();
			else
				devices = new ObservableCollection<BleDevice> (App.gateSkeys);  //Skeys do ultimo scan

			if (selMeuSkey && MySafetyDll.MySafety.isScanning)
				((App)Application.Current).mysafetyDll.cancelScan ();

			((App)Application.Current).mysafetyDll.Scan += mysafetyDll_Scan;
			_navigation = navigation;

			FindCommand = new Command ((key) => {
				findBleButton = (Button)key;
				scanSkeys ();
			});

			//
			if (devices.Count () == 0)
				scanSkeys ();
		}
开发者ID:RobertoOFonseca,项目名称:MySafety,代码行数:26,代码来源:FindBleViewModel.cs

示例12: NewsViewModel

 public NewsViewModel(INavigation navigation) : base(navigation)
 {
     Items = new ObservableCollection<NewsItem>();
     Items.Add(new NewsItem() { Header = "Leksand till SHL", Text = "Leksand spelar i SHL 16/17! :)" });
     Items.Add(new NewsItem() { Header = "Microsoft köper Xamarin", Text = "Xamarin är nu gratis för alla!!" });
     Items.Add(new NewsItem() { Header = "Sogeti + Xamarin", Text = "Sogeti utbildar nya Xamarinutvecklare!" });
 }
开发者ID:dhindrik,项目名称:Xamarin-Education,代码行数:7,代码来源:NewsViewModel.cs

示例13: ChooseViewModel

        public ChooseViewModel(INavigation navi)
        {
            this.navigation = navi;

            this.likeMealCommand = new Command(async () =>
            {
                likedMeals.Add(Meal);
                if (!LoadNewMeal())
                {
					await this.LoadOverviewPage();
				}
            });

            this.dislikeMealCommand = new Command(async () =>
            {
                dislikedMeals.Add(Meal);
                if (!LoadNewMeal())
                {
					await this.LoadOverviewPage();
                }
            });

            this.enoughMealsCommand = new Command(async () =>
            {
				await this.LoadOverviewPage();
            });

            this.likedMeals = new List<Meal>();
            this.dislikedMeals = new List<Meal>();

			this.LoadNewMeal ();
        }
开发者ID:jacobduijzer,项目名称:WatEtenWeDezeWeek,代码行数:32,代码来源:ChooseViewModel.cs

示例14: SalesDashboardLeadsViewModel

        public SalesDashboardLeadsViewModel(Command pushTabbedLeadPageCommand, INavigation navigation = null)
            : base(navigation)
        {
            _PushTabbedLeadPageCommand = pushTabbedLeadPageCommand;

            _DataClient = DependencyService.Get<IDataClient>();

            Leads = new ObservableCollection<Account>();

            MessagingCenter.Subscribe<Account>(this, MessagingServiceConstants.SAVE_ACCOUNT, (account) =>
                {
                    var index = Leads.IndexOf(account);
                    if (index >= 0)
                    {
                        Leads[index] = account;
                    }
                    else
                    {
                        Leads.Add(account);
                    }
                    Leads = new ObservableCollection<Account>(Leads.OrderBy(l => l.Company));
                });

            IsInitialized = false;
        }
开发者ID:rrawla,项目名称:app-crm,代码行数:25,代码来源:SalesDashboardLeadsViewModel.cs

示例15: LeadDetailViewModel

        public LeadDetailViewModel(INavigation navigation, Account lead = null)
        {
            if (navigation == null)
            {
                throw new ArgumentNullException("navigation", "An instance of INavigation must be passed to the LeadDetailViewModel constructor.");
            }

            Navigation = navigation;

            if (lead == null)
            {
                Lead = new Account();
                this.Title = TextResources.Leads_NewLead;
            }
            else
            {
                Lead = lead;
                this.Title = lead.Company;
            }

            this.Icon = "contact.png";

            _DataClient = DependencyService.Get<IDataClient>();

            _GeoCodingService = DependencyService.Get<IGeoCodingService>();
        }
开发者ID:Arksutw,项目名称:app-crm,代码行数:26,代码来源:LeadDetailViewModel.cs


注:本文中的INavigation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。