public App(BootstrapBase bootstrap) { InitializeComponent(); bootstrap.Start(); MainPage = new Views.MainPage(); }
public App(BootstrapBase bootstrap) { InitializeComponent(); bootstrap.Start(); // MainPage = new MainPage(); MainPage = new NavigationPage(new MainPage()); }
public override bool WillFinishLaunching (UIApplication application, NSDictionary launchOptions) { Window = new UIWindow (UIScreen.MainScreen.Bounds); navigation = new NavigationService (Window); //сопоставление ключей и вьюшек navigation.Register (TouchConstant.Pages.DashboardViewKey,typeof(DashboardView)); navigation.Register (TouchConstant.Pages.ScheduleViewKey,typeof(ScheduleView)); navigation.Register (TouchConstant.Pages.AboutViewKey,typeof(AboutView)); navigation.Register (TouchConstant.Pages.InfoStationViewKey,typeof(InfoStationView)); //позволяет с помощью ключа оборачивать вьюку в UINavigationController navigation.ConvertView<UIViewController>(view=>{ var navController= new UINavigationController (view); return navController; },"navController"); //билдер для Bootstrap bootstrap = new TouchBootstrapBuilder (new CoiocToEasyContainer ()).WithNavigation (navigation).Build (); return true; }
public static BootstrapActionLinkButton BackButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class { return(bootstrap.ActionLinkButton(result).Title("Wstecz").PrependIcon(FontAwesome.arrow_left)); }
public static BootstrapButton <TModel> ConfirmDeleteButton <TModel>(this BootstrapBase <TModel> bootstrap) where TModel : class { return(bootstrap.Button().Style(ButtonStyle.Danger).PrependIcon(FontAwesome.remove).Text("Usuń").TriggerModal("deleteConfirm")); }
public static BootstrapActionLinkButton DeleteButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class { return(bootstrap.ActionLinkButton(result).Style(ButtonStyle.Danger).PrependIcon(FontAwesome.remove)); }
public static BootstrapActionLinkButton EditButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class { return(bootstrap.ActionLinkButton(result).Style(ButtonStyle.Warning).PrependIcon(FontAwesome.pencil)); }
public static BootstrapActionLinkButton ListButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class { return(bootstrap.ActionLinkButton(result).PrependIcon(FontAwesome.list).Style(ButtonStyle.Info).Text(result.Title)); }
public static BootstrapButton <TModel> SubmitFilterButton <TModel>(this BootstrapBase <TModel> bootstrap) where TModel : class { return(bootstrap.SubmitButton().Text("Filtruj").PrependIcon(FontAwesome.filter).Style(ButtonStyle.Warning)); }
public static MvcHtmlString GridPager <TModel>(this HtmlHelper <TModel> htmlHelper, int pageIndex, PageSize pageSize, int totalRows) { var btnGroup = new TagBuilder("div"); btnGroup.AddCssClass("btn-group"); var pagerBuilder = new StringBuilder(); var bootstrap = new BootstrapBase <TModel>(htmlHelper); var pagesCount = (totalRows + (int)pageSize - 1) / (int)pageSize; var maxPagerSize = 10; if (maxPagerSize > pagesCount) { maxPagerSize = pagesCount; } var pages = Enumerable.Range(1, pagesCount).ToList(); while (pages.Count() > maxPagerSize) { var activeIndex = pages.IndexOf(pageIndex); var startDistance = 0 + activeIndex; var endDistance = pages.Count - 1 - activeIndex; if (startDistance > endDistance) { pages.RemoveAt(0); } else { pages.RemoveAt(pages.Count - 1); } } // First pagerBuilder.AppendLine(( bootstrap.Button() .Text(string.Empty) .PrependIcon(FontAwesome.angle_double_left) .Style(ButtonStyle.Info) .Class("BtnPageIndex") .Value("1") .Disabled(pageIndex == 1) as IHtmlString).ToString()); // Previous pagerBuilder.AppendLine(( bootstrap.Button() .Text(string.Empty) .PrependIcon(FontAwesome.angle_left) .Style(ButtonStyle.Warning) .Class("BtnPageIndex") .Value((pageIndex - 1).ToString()) .Disabled(pageIndex == 1) as IHtmlString).ToString()); // Pages foreach (var page in pages) { var buttonStyle = page == pageIndex ? ButtonStyle.Primary : ButtonStyle.Default; pagerBuilder.AppendLine(( bootstrap.Button() .Text(page.ToString()) .Class("BtnPageIndex") .Value(page.ToString()) .Style(buttonStyle) as IHtmlString).ToString()); } // Next pagerBuilder.AppendLine(( bootstrap.Button() .Text(string.Empty) .PrependIcon(FontAwesome.angle_right) .Style(ButtonStyle.Warning) .Class("BtnPageIndex") .Value((pageIndex + 1).ToString()) .Disabled(pageIndex == pagesCount) as IHtmlString).ToString()); // Last pagerBuilder.AppendLine(( bootstrap.Button() .Text(string.Empty) .PrependIcon(FontAwesome.angle_double_right) .Style(ButtonStyle.Info) .Class("BtnPageIndex") .Value(pagesCount.ToString()) .Disabled(pageIndex == pagesCount) as IHtmlString).ToString()); btnGroup.InnerHtml = pagerBuilder.ToString(); return(MvcHtmlString.Create(btnGroup.ToString())); }
public static BootstrapActionLink ListGroupItem <TModel>(this BootstrapBase <TModel> bootstrap, string text, ActionResult result) where TModel : class { return(bootstrap.ActionLink(text, result).Class("list-group-item")); }
public static BootstrapActionLinkButton BackButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionResult result) where TModel : class { return(bootstrap.ActionLinkButton("Powrót", result).PrependIcon(FontAwesome.arrow_left)); }
public static BootstrapActionLinkButton ListButton <TModel>(this BootstrapBase <TModel> bootstrap, string linkText, ActionResult result) where TModel : class { return(bootstrap.ActionLinkButton(linkText, result).Title(linkText).PrependIcon(FontAwesome.list).Style(ButtonStyle.Warning)); }
protected BootstrapBase(IIocContainer container) { IocContainer = container; _locator = this; }
public static BoxBuilder <TModel> Begin <TModel>(this BootstrapBase <TModel> bootstrap, Box box) { return(new BoxBuilder <TModel>(bootstrap.Html, box)); }
public static BootstrapButton <TModel> SubmitSaveButton <TModel>(this BootstrapBase <TModel> bootstrap) where TModel : class { return(bootstrap.SubmitButton().Text("Zapisz").PrependIcon(FontAwesome.save).Style(ButtonStyle.Primary)); }
public static BootstrapButton <TModel> SubmitDeleteButton <TModel>(this BootstrapBase <TModel> bootstrap) where TModel : class { return(bootstrap.SubmitButton().Text("Usuń").PrependIcon(FontAwesome.remove).Style(ButtonStyle.Danger)); }
public static BootstrapActionLink ActionLink <TModel>(this BootstrapBase <TModel> bootstrap, string text, ActionMap siteMapAction) where TModel : class { return(bootstrap.ActionLink(text, siteMapAction.ActionName, siteMapAction.ControllerName).RouteValues(siteMapAction.RouteValues)); }
public static BootstrapActionLinkButton ActionLinkButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap siteMapAction) where TModel : class { return(bootstrap.ActionLinkButton(siteMapAction.Title, siteMapAction.ActionName, siteMapAction.ControllerName).RouteValues(siteMapAction.RouteValues)); }
public static BootstrapActionLinkButton AddButton <TModel>(this BootstrapBase <TModel> bootstrap, ActionMap result) where TModel : class { return(bootstrap.ActionLinkButton(result).Style(ButtonStyle.Success).PrependIcon(FontAwesome.plus)); }