• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# INavigation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: PollResultsPageViewModel

		public PollResultsPageViewModel(
			INavigation navigation,
			IObjectFactory<IPollResults> objectFactory,
			IObjectFactory<IPoll> pollFactory,
			IObjectFactory<IPollComment> pollCommentFactory,
			IMessageBox messageBox
#if NETFX_CORE
			, IShareManager shareManager,
			ISecondaryPinner secondaryPinner
#endif // NETFX_CORE
			)
			: base(navigation)
		{
			this.objectFactory = objectFactory;
			this.pollFactory = pollFactory;
			this.pollCommentFactory = pollCommentFactory;
			this.messageBox = messageBox;

			this.PollComments = new ObservableCollection<PollCommentViewModel>();

#if NETFX_CORE
			this.shareManager = shareManager;
			this.secondaryPinner = secondaryPinner;
#endif // NETFX_CORE
		}
开发者ID:kamilkk,项目名称:MyVote,代码行数:25,代码来源:PollResultsPageViewModel.cs


示例17: FundsTransferViewModel

		public FundsTransferViewModel (INavigation navigation, Page currentPage)
		{
			Navigation = navigation;
			CancelCommand = new Command(async () => await Navigation.PopAsync());
			TransferCommand = new Command(async () => await currentPage.DisplayAlert("Transfer", "Success", "Ok"));

		}
开发者ID:nishanil,项目名称:MobileBanking-Forms,代码行数:7,代码来源:FundsTransferViewModel.cs


示例18: MainViewModel

 public MainViewModel(INavigation navigation)
 {
     _navigation = navigation;
     _database = new Database();
     Contacts = new ObservableCollection<Contact>(_database.SearchContacts(""));
     AddCommand = new Command(ShowAddWindow);
 }
开发者ID:SabotageAndi,项目名称:SpecFlow.Plus.Examples,代码行数:7,代码来源:MainViewModel.cs


示例19: ContactListViewModel

 public ContactListViewModel (INavigation navigation)
 {
     _navigation = navigation;
     _contactData = new ContactDataService();
     OpenContactPageCommand = new Command(OpenContactPage);
     DeleteCommand = new Command<int>(Delete);
     ReloadDataCommand = new Command(ReloadData);
  }
开发者ID:kosomgua,项目名称:AddressBook,代码行数:8,代码来源:ContactListViewModel.cs


示例20: NewUserViewModel

 public NewUserViewModel(INavigation nav)
 {
     SendEmail = new Command (async () => {
         if(String.IsNullOrEmpty(Email)) return;
         //send email
         await nav.PopAsync();
     });
 }
开发者ID:BlackhoefStudios,项目名称:DropIt,代码行数:8,代码来源:NewUserViewModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# INavigationManager类代码示例发布时间:2022-05-24
下一篇:
C# INancyEngine类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap