public Restaurant_Card_Page2() { Title = "添加餐饮终端普查-经营信息"; InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); ModeOfCooperation.SelectedIndex = ModeOfCooperation.ItemsSource.Count - 1; this.PrivateRoomes.Text = ""; this.TableNumber.Text = ""; this.Seats.Text = ""; this.ShowcaseNum.Text = ""; }
public ProfilePage() { CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); InitializeComponent(); if (Device.RuntimePlatform != Device.iOS) { ToolbarItems.Remove(LogoutToolbarItem); } }
public SearchPage() { InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); var bar = new ToolbarItem("\uf029", "", () => { }); bar.SetBinding(ToolbarItem.CommandProperty, "ScanCodeCommand"); this.ToolbarItems.Add(bar); search_bar.PlacesRetrieved += Search_Bar_PlacesRetrieved; search_bar.TextChanged += Search_Bar_TextChanged; search_bar.MinimumSearchText = 2; results_list.ItemSelected += Results_List_ItemSelected; }
public ViewLocation() { Title = "定位当前位置"; InitializeComponent(); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); //DependencyService.Get<IToolbarItemBadgeService>().SetBadge(this, MapSetting, "3", Color.Red, Color.White); //108.941338,34.364438 map.ShowCompass = true; map.IsVisible = true; map.Loaded += Map_Loaded; }
public AddProducts() { //Title = action + "商品"; InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); var bar = new ToolbarItem("\uf0c7", "", () => { }); bar.SetBinding(ToolbarItem.CommandProperty, "SaveProductCmd"); this.ToolbarItems.Add(bar); this.AnnualSales.IsEnabled = false; }
//private INavigationService _navigationService; public Networks() { InitializeComponent(); //var bar = new ToolbarItem("\uf015", "", () => //{ // //Device.BeginInvokeOnMainThread(() => // //{ // // DisplayAlert("提示", "抱歉,功能稍后开放...", "取消"); // //}); //}); //bar.SetBinding(ToolbarItem.CommandProperty, "GotoHomeCmd"); //this.ToolbarItems.Remove(bar); //MessagingCenter.Subscribe<NavigationMessage>(this, "GotoHomeToolbarItem", (args) => //{ // this.ToolbarItems.Add(bar); //}); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); Title = "我的网点列表"; }
//public List<TraditionSalesInfo> Products = new List<TraditionSalesInfo>(); public Tradition_Card_Page3() { Title = "添加传统终端普查-合作信息"; InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); // //var moreAction = new MenuItem { Text = "More" }; //moreAction.SetBinding(MenuItem.CommandParameterProperty, new Binding(".")); //moreAction.Clicked += async (sender, e) => { // var mi = ((MenuItem)sender); // Debug.WriteLine("More Context Action clicked: " + mi.CommandParameter); //}; //var deleteAction = new MenuItem { Text = "Delete", IsDestructive = true }; // red background //deleteAction.SetBinding(MenuItem.CommandParameterProperty, new Binding(".")); //deleteAction.Clicked += async (sender, e) => { // var mi = ((MenuItem)sender); // Debug.WriteLine("Delete Context Action clicked: " + mi.CommandParameter); //}; //// add to the ViewCell's ContextActions property //ContextActions.Add(moreAction); //ContextActions.Add(deleteAction); //this.ContextDemoList.SeparatorVisibility = SeparatorVisibility.None; //this.ContextDemoList.SeparatorColor = Color.Gray; //Effects.Add(Effect.Resolve($"MyEffects.ListViewHighlightEffect")); this.ContextDemoList.Effects.Add(Effect.Resolve($"MyCensus.ListViewHighlightEffect")); //product = new TraditionSalesInfo() { ProductName = "雪花纯生" }; //Products.Add(product); //this.ContextDemoList.ItemsSource = Products; }
//Timer _dispatcherTimer; //计数 //int sec = 10; public SiteMap() { InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); //tick为执行防范 //TimerCallback timerDelegate = new TimerCallback(Tick); //_dispatcherTimer = new Timer(timerDelegate, null, 0, 1000); Title = "定位当前位置"; //http://www.cnblogs.com/jtang/p/4698496.html //http://www.cnblogs.com/loda7023link/p/6443225.html var bar = new ToolbarItem("\uf013", "", () => { Device.BeginInvokeOnMainThread(() => { //DisplayAlert("提示", "抱歉,功能稍后开放...", "取消"); }); }); ToolbarItems.Add(bar); //DependencyService.Get<IToolbarItemBadgeService>().SetBadge(this, MapSetting, "3", Color.Red, Color.White); //108.941338,34.364438 map.ShowCompass = true; map.IsVisible = true; map.Loaded += Map_Loaded; }
public UpdatePage() { InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); }
public TraditionViewCard() { InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); //this.ProductListView.BindingContext = new List<string>() { "1", "2", "3", "4" }; }
public Restaurant_Card_Page3() { Title = "添加餐饮终端普查-合作信息"; InitializeComponent(); CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, true); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); this.ContextDemoList.Effects.Add(Effect.Resolve($"MyCensus.ListViewHighlightEffect")); }
public MainPage() { InitializeComponent(); /* * Unity.Exceptions.ResolutionFailedException: Resolution of the dependency failed, type = 'System.Object', name = 'MainPage'. * Exception occurred while: Calling constructor MyCensus.Views.MainPage(). * Exception is: ArgumentNullException - Value cannot be null. * Parameter name: activated * ----------------------------------------------- * At the time of the exception, the container was: * Resolving MyCensus.Views.MainPage,MainPage (mapped from System.Object, MainPage) * Calling constructor MyCensus.Views.MainPage() * * * Unhandled Exception: * * Unity.Exceptions.ResolutionFailedException: Resolution of the dependency failed, type = 'System.Object', name = 'MainPage'. * Exception occurred while: Calling constructor MyCensus.Views.MainPage(). * Exception is: ArgumentNullException - Value cannot be null. * Parameter name: activated * ----------------------------------------------- * At the time of the exception, the container was: * Resolving MyCensus.Views.MainPage,MainPage (mapped from System.Object, MainPage) * Calling constructor MyCensus.Views.MainPage() * 出现了 */ try { CustomNavigationPage.SetTitleIcon(this, "icon.png"); CustomNavigationPage.SetHasNavigationBar(this, true); CustomNavigationPage.SetHasBackButton(this, false); CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0)); CustomNavigationPage.SetTitleColor(this, Color.White); CustomNavigationPage.SetSubtitleColor(this, Color.White); CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Start); CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large)); CustomNavigationPage.SetHasShadow(this, true); CustomNavigationPage.SetTitlePadding(this, new Thickness(0, 0, 0, 0)); //渐变从左到右 CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#5178bd"), Color.FromHex("#7fadf7"))); CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.RightToLeft); this.CurrentPageChanged += Tabs_CurrentPageChanged; } catch (Exception ex) { System.Diagnostics.Debug.Print(ex.Message); } //MessagingCenter.Unsubscribe<Tradition_Card_Page3ViewModel, string>(this, "page"); //MessagingCenter.Subscribe<Tradition_Card_Page3ViewModel, string>(this, "page", (arg1, arg2) => { // DisplayAlert("提示",""+ arg2, "Ok"); //}); //if (tab != 0) // DisplayAlert("提示", "" + tab, "Ok"); this.Children.Add(new HomePage() { Title = "首页", Icon = "fa-home" }); this.Children.Add(new SiteMap() { Title = "位置", Icon = "fa-map-marker" }); this.Children.Add(new MyTask() { Title = "任务", Icon = "fa-windows" }); this.Children.Add(new Networks() { Title = "网点", Icon = "fa-bullseye" }); this.Children.Add(new MenuPage() { Title = "我", Icon = "fa-user" }); //int indextab = 0; //var pages = Children.GetEnumerator(); //pages.MoveNext(); // First page //pages.MoveNext(); // Second page //pages.MoveNext(); // Second page //CurrentPage = pages.Current; //TabbedPage tp = new TabbedPage(); //tp.Children.Add(new PageFriends()); //tp.Children.Add(new PageSnap()); //tp.Children.Add(new PageNotes()); //tp.CurrentPage = tp.Children[1]; //MessagingCenter.Subscribe<NavigationMessage>(this, "tabpage", (args) => { // //DisplayAlert("提示", "" + args.Paremeter, "Ok"); // //Tabs_PagesChanged(null,null); // //this.SelectedItem = new Networks() // //{ // // Title = "网点", // // Icon = "fa-bullseye" // //}; // //MessagingCenter.Unsubscribe<NavigationMessage>(this, "tabpage"); //}); // //if (indextab != 0) // CurrentPage = Children[3]; }