public void ShowMainPage() { tabbedPage = new IconTabbedPage { Title = "Supermercado Rodriguez", BarTextColor = Color.White, BarBackgroundColor = Color.Red }; tabbedPage.Children.Add(new BonosView { Title = "Bonos", Icon = "fa-money" }); tabbedPage.Children.Add(new ComprasView { Title = "Compras", Icon = "fa-shopping-cart" }); tabbedPage.Children.Add(new ConfigView { Title = "Configuración", Icon = "fa-cogs" }); MainPage = new IconNavigationPage(tabbedPage) { BarTextColor = Color.White, BarBackgroundColor = Color.Red }; }
public App() { // The root page of your application //IconizeライブラリのIconTabbedPageを使用する為、TabbedPageの生成のみXAMLではなくC#で記載。 //※試したらXAMLでも書けました。 var TabbedPage = new IconTabbedPage { Title = "Twitter" }; foreach (var module in Plugin.Iconize.Iconize.Modules) { TabbedPage.Children.Add(new MainPage { BindingContext = new MainPageViewModel(), Icon = "fa-home" }); TabbedPage.Children.Add(new TweetPage { BindingContext = new TweetPageViewModel(), Icon = "fa-twitter" }); } MainPage = new IconNavigationPage(TabbedPage); }
public Application() { InitializeComponent(); Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule()) .With(new Plugin.Iconize.Fonts.EntypoPlusModule()) .With(new Plugin.Iconize.Fonts.IoniconsModule()) .With(new Plugin.Iconize.Fonts.MaterialModule()) .With(new Plugin.Iconize.Fonts.MeteoconsModule()) .With(new Plugin.Iconize.Fonts.SimpleLineIconsModule()) .With(new Plugin.Iconize.Fonts.TypiconsModule()) .With(new Plugin.Iconize.Fonts.WeatherIconsModule()); // The root page of your application var tabbedPage = new IconTabbedPage { Title = "Iconize" }; foreach (var module in Plugin.Iconize.Iconize.Modules) { var bc = new ModuleWrapper(module); var icon = module.Keys.FirstOrDefault(); tabbedPage.Children.Add(new Page1 { BindingContext = bc, Icon = icon }); } MainPage = new IconNavigationPage(tabbedPage); }
public App() { InitializeComponent(); MainPage = new IconNavigationPage(new iconize_testPage()); }
/// <summary> /// Initializes a new instance of the <see cref="App"/> class. /// </summary> public App() { InitializeComponent(); Plugin.Iconize.Iconize //.With(new Plugin.Iconize.Fonts.EntypoPlusModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule()) //.With(new Plugin.Iconize.Fonts.IoniconsModule()) //.With(new Plugin.Iconize.Fonts.JamIconsModule()) //.With(new Plugin.Iconize.Fonts.MaterialModule()) //.With(new Plugin.Iconize.Fonts.MeteoconsModule()) //.With(new Plugin.Iconize.Fonts.SimpleLineIconsModule()) //.With(new Plugin.Iconize.Fonts.TypiconsModule()) //.With(new Plugin.Iconize.Fonts.WeatherIconsModule()) ; // The root page of your application var tabbedPage = new IconTabbedPage { Title = "Iconize" }; tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetBarItemColor(Xamarin.Forms.Color.Yellow); tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetBarSelectedItemColor(Xamarin.Forms.Color.Black); tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom); for (int i = 0; i < Math.Min(Plugin.Iconize.Iconize.Modules.Count, 5); i++) { var module = Plugin.Iconize.Iconize.Modules[i]; Console.WriteLine("module " + module.FontName); var bc = new ModuleWrapper(module); var icon = module.Keys.FirstOrDefault(); tabbedPage.Children.Add(new Page1 { BindingContext = bc, Icon = icon }); } //foreach (var module in Plugin.Iconize.Iconize.Modules) //{ // var bc = new ModuleWrapper(module); // var icon = module.Keys.FirstOrDefault(); // tabbedPage.Children.Add(new Page1 // { // BindingContext = bc, // Icon = icon // }); //} MainPage = new IconNavigationPage(tabbedPage); }
public App() { Current = this; InitializeComponent(); var isLoggedIn = Properties.ContainsKey("IsLoggedIn") && (bool)Properties["IsLoggedIn"]; var cliente = Properties.ContainsKey("cliente") ? Properties["cliente"] : null; // we remember if they're logged in, and only display the login page if they're not if (isLoggedIn && cliente != null) { tabbedPage = new IconTabbedPage { Title = "Supermercado Rodriguez", BarTextColor = Color.White, BarBackgroundColor = Color.Red }; tabbedPage.Children.Add(new BonosView { Title = "Bonos", Icon = "fa-money" }); tabbedPage.Children.Add(new ComprasView { Title = "Compras", Icon = "fa-shopping-cart" }); tabbedPage.Children.Add(new ConfigView { Title = "Configuración", Icon = "fa-cogs" }); MainPage = new IconNavigationPage(tabbedPage) { BarTextColor = Color.White, BarBackgroundColor = Color.Red }; } else { MainPage = new Login(); } }
public App() { var tabbedPage = new TabbedPage(); tabbedPage.Children.Add(new OnePage { Title = "One", Icon = "spanner" }); tabbedPage.Children.Add(new TwoPage { Title = "Two" }); tabbedPage.Children.Add(new ThreePage { Title = "Three" }); MainPage = new IconNavigationPage(tabbedPage); }
private async void ListView_ItemSelectedAsync(object sender, SelectedItemChangedEventArgs e) { var item = e.SelectedItem as FDMasterDetailPageMenuItem; if (item == null) { return; } switch (item.Id) { case 0: Detail = new IconNavigationPage(new MainPage()); // search page break; case 1: Detail = new NavigationPage(new MealsListPage(true) { Title = "Sök Recept" }); // search with name page break; case 2: //bool isAuth = await VerifyFacebookAsync(); //if (isAuth) // Detail = new IconNavigationPage(new FavoritesPage()); Detail = new NavigationPage(new MealsListPage() { Title = "Gillade Recept" }); // saved recipes page break; //case 3: // Detail = new NavigationPage(new shoppingListPage()); // shopping list page // break; } /* * var page = (Page)Activator.CreateInstance(item.TargetType); * page.Title = item.Title; * * Detail = new NavigationPage(page); */ IsPresented = false; MasterPage.ListView.SelectedItem = null; }
public App() { // The root page of your application var tabbedPage = new IconTabbedPage { Title = "Iconize" }; foreach (var module in Plugin.Iconize.Iconize.Modules) { tabbedPage.Children.Add(new Page1 { BindingContext = new ModuleWrapper(module), Icon = module.Keys.FirstOrDefault() }); } MainPage = new IconNavigationPage(tabbedPage); }
private void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e) { var item = e.SelectedItem as RootPageMenuItem; if (item == null) { return; } var page = (Page)Activator.CreateInstance(item.TargetType); page.Title = item.Title; Detail = new IconNavigationPage(new NavigationPage(page)); IsPresented = false; MasterPage.ListView.SelectedItem = null; }
public App() { InitializeComponent(); Nav = new IconNavigationPage(new PageListing { ToolbarItems = { new IconToolbarItem { Icon = "fa-search", IconColor = Color.White, Command = new Command(() => { App.Nav.PushAsync(new PageSearch()); }), } }, }); Master = new PageMaster(); MainPage = Master; }
/// <summary> /// Initializes a new instance of the <see cref="App"/> class. /// </summary> public App() { InitializeComponent(); Plugin.Iconize.Iconize .With(new Plugin.Iconize.Fonts.EntypoPlusModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule()) .With(new Plugin.Iconize.Fonts.IoniconsModule()) .With(new Plugin.Iconize.Fonts.MaterialModule()) .With(new Plugin.Iconize.Fonts.MeteoconsModule()) .With(new Plugin.Iconize.Fonts.SimpleLineIconsModule()) .With(new Plugin.Iconize.Fonts.TypiconsModule()) .With(new Plugin.Iconize.Fonts.WeatherIconsModule()); // The root page of your application var tabbedPage = new IconTabbedPage { Title = "Iconize" }; tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetBarItemColor(Xamarin.Forms.Color.Green); tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetBarSelectedItemColor(Xamarin.Forms.Color.Black); foreach (var module in Plugin.Iconize.Iconize.Modules) { var bc = new ModuleWrapper(module); var icon = module.Keys.FirstOrDefault(); tabbedPage.Children.Add(new Page1 { BindingContext = bc, Icon = icon }); } MainPage = new IconNavigationPage(tabbedPage); }
private void welcomeUpgradeComplete(object sender, EventArgs e) { #region 首次登录时的LoginPage IUcLoginPage loginpage = getLoginPage(); loginpage.LoginSuccess += _ucLoginPageLoginSuccessEventHandler; #endregion _nvPage = new IconNavigationPage(loginpage as Page); _nvPage.BackgroundColor = Color.Blue; _nvPage.Pushed += new EventHandler <NavigationEventArgs>((sender2, e2) => { IUcPage p = e2.Page as IUcPage; if (p != null) { p.OnPushed(); } }); _nvPage.Popped += new EventHandler <NavigationEventArgs>((sender2, e2) => { IUcPage p = e2.Page as IUcPage; if (p != null) { p.OnPoped(); } }); MainPage = _nvPage; }
public App() { //The root page of your application MainPage = new IconNavigationPage(new MainPage()); }
private void CargarMaster(string s_cod, object v_entidad) { var Titulo = ""; Type TargetType = typeof(MasterDetailPage1Detail); lc_acc_menu entidad = new lc_acc_menu(); switch (s_cod) { case "pg_sincronizar": TargetType = typeof(pg_sincronizar); Titulo = "Sincronizar"; break; case "pg_empresa": TargetType = typeof(pg_empresa); Titulo = "Seleccionar Unidad"; break; case "pg_pro_tarea_ate": TargetType = typeof(pg_pro_tarea_ate); Titulo = "Atender Tarea"; VarGlobal.comentar = 0; break; case "pg_pro_tarea_ver": TargetType = typeof(pg_pro_tarea_ate); Titulo = "Verificar Tarea"; VarGlobal.comentar = 0; break; case "pg_pro_tarea_com": TargetType = typeof(pg_pro_tarea_ate); Titulo = "Comentar Tarea"; VarGlobal.comentar = 1; break; case "pg_pro_tarea_mas": TargetType = typeof(pg_pro_tarea_mas); Titulo = "Detalles de Tarea"; break; case "pg_pro_hallazgo_qry": TargetType = typeof(pg_pro_hallazgo_qry); if (VarGlobal.pro_hallazgo.cod_modulo == "OB") { Titulo = "Mis Observaciones Prev."; } else { Titulo = "Hallazgos"; } break; case "pg_pro_incidente_qry": TargetType = typeof(pg_pro_incidente_qry); Titulo = "Mis Reportes de Incidentes"; break; case "pg_pro_inspeccion_qry": TargetType = typeof(pg_pro_inspeccion_qry); Titulo = "Mis Inspecciones"; break; case "pg_pro_tarea_opc": TargetType = typeof(pg_pro_tarea_opc); Titulo = "Mis Tareas"; break; case "pg_pro_tarea_qry": TargetType = typeof(pg_pro_tarea_qry); Titulo = VarGlobal.ret_titulo; break; case "pg_pro_tarea_mnt": TargetType = typeof(pg_pro_tarea_mnt); Titulo = VarGlobal.pro_tarea.titulo; break; case "pg_pro_proyecto_qry": //TargetType = typeof(pg_pro_proyecto_qry); Titulo = "Mis Proyectos"; break; case "pg_pro_proyecto_dep": //TargetType = typeof(pg_pro_proyecto_dep); //Titulo = VarProyecto.titulo; break; case "pg_pro_veoregistro_qry": TargetType = typeof(pg_pro_veoregistro_qry); Titulo = "Mis Evaluaciones VEO"; break; } var page = (Page)Activator.CreateInstance(TargetType); page.Title = Titulo; Detail = new IconNavigationPage(page) { BarBackgroundColor = Color.FromHex("#0199DC"), }; IsPresented = false; MasterPage.ListView.SelectedItem = null; }
private async void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e) { VarGlobal.alerta_registro = true; Type TargetType = typeof(MasterDetailPage1Detail);; var item = e.SelectedItem as lc_acc_menu; if (item == null) { return; } var loadingPage = new pg_Loading(); await Navigation.PushPopupAsync(loadingPage); if (item.nom_menu == "Cerrar Sesión") { var popupAlert = new pg_confirmacion(new ent_mensaje { tip_mensaje = "INF", tit_mensaje = "@tento24", tex_mensaje = "¿Desea Cerrar Sesión?... se perderan los registros grabados en el dispositivo." }); var result = await popupAlert.Show(); await Navigation.PushPopupAsync(loadingPage); if (result) { VarGlobal.Limpiar(); DB = LocalDB.Instance; var usuario = DB.lc_acc_usuario.ToList(); string s_cod_usuario = ""; for (int i = 0; i < usuario.Count; i++) { s_cod_usuario = usuario[i].cod_usuario; } var eliminar = DB.lc_acc_usuario.Delete(x => x.cod_usuario == s_cod_usuario); VarGlobal.EliminarTodosRegistros(); await Navigation.PushModalAsync(new MainPage("sin_login")); await Navigation.RemovePopupPageAsync(loadingPage); return; } else { MainPage = new MasterDetailPage1(ruta); await Navigation.RemovePopupPageAsync(loadingPage); return; } } VarGlobal.cod_modulo_2do = ""; switch (item.cod_menu) { case "SINCRO": //Proyecto TargetType = typeof(pg_sincronizar); VarGlobal.cod_modulo = ""; break; case "UNIDAD": //Proyecto // Direccionar a Seleccionar Empresa //lc_acc_menu_Data o_Data = new lc_acc_menu_Data(); //o_Data.Eliminar(); VarGlobal.cod_empresa = ""; MainPage = new MasterDetailPage1("pg_empresa"); TargetType = typeof(pg_empresa); //VarGlobal.cod_unidad = ""; //VarGlobal.cod_modulo = ""; break; case "15_30_": //Proyecto //TargetType = typeof(pg_pro_proyecto_qry); VarGlobal.cod_modulo = "PG"; break; case "72_10_": //Inspección TargetType = typeof(pg_pro_inspeccion_qry); VarGlobal.pro_hallazgo = new lc_pro_hallazgo(); VarGlobal.cod_modulo = "IP"; VarGlobal.pro_hallazgo.cod_modulo = "IP"; //VarGlobal.pro_hallazgo.cod_modulo = "IP"; VarGlobal.cod_modulo_2do = "IP"; break; case "66_10_": //Observacion TargetType = typeof(pg_pro_hallazgo_qry); VarGlobal.pro_hallazgo = new lc_pro_hallazgo(); VarGlobal.pro_hallazgo.cod_modulo = "OB"; VarGlobal.cod_modulo = "OB"; VarGlobal.cod_modulo_2do = "OB"; VarGlobal.pro_hallazgo.cod_referencia = ""; break; case "69_10_": //Incidente TargetType = typeof(pg_pro_incidente_qry); VarGlobal.cod_modulo = "IN"; //VarGlobal.cod_modulo_2do = "IN"; break; case "85_10_": //Tarea TargetType = typeof(pg_pro_tarea_opc); break; case "62_10_": //VEO TargetType = typeof(pg_pro_veoregistro_qry); VarGlobal.cod_modulo = "VE"; break; } var page = (Page)Activator.CreateInstance(TargetType); page.Title = item.nom_menu; await Navigation.RemovePopupPageAsync(loadingPage); Detail = new IconNavigationPage(page) { BarBackgroundColor = Color.FromHex("#0199DC") }; ContarRegistros(); IsPresented = false; MasterPage.ListView.SelectedItem = null; }
protected override void OnInitialized() { InitializeComponent(); MainPage = new IconNavigationPage(new MainPage()); }