public static void AddHeaderButton(this IHtmlHelper helper, IHtmlContent content = null, string function = null, string url = null, BtnClass btn = BtnClass.Default, string icon = null, string identifier = null, string classes = null, string title = null, object attr = null) { var Provider = helper.GetService <IGeneralHelper>(); Provider.AddHeaderButton(helper, content, function, url, btn, icon, identifier, classes, title, attr); }
private void Form1_Load(object sender, EventArgs e) { DataSource.OnLogWrite += DataSourceOnOnLogWrite; var btns = BtnClass.GetSampleBtn(); int top = 0; foreach (var myBtn in btns) { Button b = new Button(); b.Click += (o, args) => { richTextBox1.Text = DataSource.GetColumn(myBtn.BtnGuid) .Select(a => a.Key + " - " + a.Value) .Aggregate((a1, b1) => a1 += b1 + "\n"); dataGridView1.DataSource = DataSource.GetDataTableType(1, myBtn.BtnGuid, "91.203.70.105:8110", "admin", "resto#test", new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, 1), new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month - 1))); }; b.Text = myBtn.BtnName; b.Top = top; top += 25; panel1.Controls.Add(b); } }
public static string GetButtonClass(BtnClass cls) { return(RazorConfig.Theme.GetButtonClass(cls)); }
public virtual string GetButtonClass(BtnClass type) { return("btn-" + type.ToString().ToLower()); }
public void AddToButtons(IHtmlContent content = null, string function = null, string url = null, BtnClass btn = BtnClass.Default, string icon = null, string identifier = null, string classes = null, string title = null, object attr = null) { if (url != null) { url = RazorUtils.ApplyConvension(url, AppParts.Route); } Buttons.Add(LinkModel.Make(content, function, url, btn, icon, identifier, classes, title, attr)); }
public virtual IHtmlContent Button(IHtmlHelper helper, string text, string function, string url, BtnClass btn, string icon, string identifier, IHtmlContent content, string classes, string title, object attr) { content = content != null ? content : (text == null ? null : helper.Word(text)); if (url != null) { url = RazorUtils.ApplyConvension(url, AppParts.Route); } LinkModel model = LinkModel.Make(content, function, url, btn, icon, identifier, classes, title, attr); return(helper.GetComponent("Buttons/Button", model)); }
public virtual void AddHeaderButton(IHtmlHelper helper, IHtmlContent content = null, string function = null, string url = null, BtnClass btn = BtnClass.Default, string icon = null, string identifier = null, string classes = null, string title = null, object attr = null) { if (url != null) { url = helper.GetService <IUIFileNameService>().ApplyConvension(url, AppParts.Route); } helper.HeaderModel().AddToButtons(content, function, url, btn, icon, identifier, classes, title, attr); }
public static LinkModel Make(IHtmlContent content = null, string function = null, string url = null, BtnClass btn = CodeShellCore.Web.Razor.BtnClass.Default, string icon = null, string identifier = null, string classes = null, string title = null, object attr = null) { return(new LinkModel { Text = content, Function = function, BtnClassEnum = btn, Url = url, IconClass = icon, Attrs = attr, Classes = classes, Title = title }); }
public string GetButtonClass(BtnClass type) { return(_inner.GetButtonClass(type)); }
public override IHtmlContent Button(IHtmlHelper helper, string text, string function, string url, BtnClass btn, string icon, string identifier, IHtmlContent content, string classes, string title, object attr) { if (identifier != null) { helper.AddToViewControls(new ControlDTO { Identifier = identifier?.ToLower(), ControlType = "Button" }); if (!helper.GetAccessibility(identifier?.ToLower()).Read) { return(null); } } return(base.Button(helper, text, function, url, btn, icon, identifier, content, classes, title, attr)); }
public override void AddHeaderButton(IHtmlHelper helper, IHtmlContent content = null, string function = null, string url = null, BtnClass btn = BtnClass.Default, string icon = null, string identifier = null, string classes = null, string title = null, object attr = null) { if (identifier != null) { var acc = proc.Process(helper, identifier, "HeaderButton"); if (!acc.Read) { return; } } base.AddHeaderButton(helper, content, function, url, btn, icon, identifier, classes, title, attr); }
public static string ButtonClass(this IHtmlHelper helper, BtnClass cls) { return(RazorUtils.GetButtonClass(cls)); }