public static ColumnFormatInfo MakeHtml(string html) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Html; rv.Html = html; return(rv); }
public static ColumnFormatInfo MakeRedirectButton(ButtonTypesEnum buttonType, string url, string buttonText) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Redirect; rv.ButtonType = buttonType; rv.Url = url; rv.Text = buttonText; return(rv); }
public static ColumnFormatInfo MakeDownloadButton(ButtonTypesEnum buttonType, Guid?fileID, string buttonText = null) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Download; rv.ButtonType = buttonType; rv.FileID = fileID; rv.Text = buttonText ?? "下载"; return(rv); }
public static ColumnFormatInfo MakeDownloadButton(ButtonTypesEnum buttonType, Guid?fileID, string buttonText = null, string buttonclass = null) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Download; rv.ButtonType = buttonType; rv.FileID = fileID; rv.Text = buttonText ?? Program._localizer["Download"]; rv.ButtonClass = buttonclass; return(rv); }
public static ColumnFormatInfo MakeScriptButton(ButtonTypesEnum buttonType, string url, string buttonText, string buttonID = null, string script = "") { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Script; rv.ButtonType = buttonType; rv.Url = url; rv.Text = buttonText; rv.ButtonID = buttonID; rv.Script = script; return(rv); }
public static ColumnFormatInfo MakeHtml(string html) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Html; rv.Html = html; if (string.IsNullOrEmpty(rv.Html) == false) { rv.Html += "<script></script>"; } return(rv); }
public static ColumnFormatInfo MakeViewButton(ButtonTypesEnum buttonType, Guid?fileID, int?width = null, int?height = null, string title = null, string windowID = null, string buttonText = null, bool resizable = true) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.ViewPic; rv.ButtonType = buttonType; rv.FileID = fileID; rv.Width = width; rv.Height = height; rv.WindowID = windowID; rv.Text = buttonText ?? "预览"; rv.Title = title ?? "预览"; rv.Resizable = resizable; return(rv); }
public static ColumnFormatInfo MakeDialogButton(ButtonTypesEnum buttonType, string url, string buttonText, int?width, int?height, string title = null, string buttonID = null, bool showDialog = true, bool resizable = true) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Dialog; rv.ButtonType = buttonType; rv.Url = url; rv.Width = width; rv.Height = height; rv.Text = buttonText; rv.Title = title; rv.ButtonID = buttonID; rv.ShowDialog = showDialog; rv.Resizable = resizable; return(rv); }
public static ColumnFormatInfo MakeScriptButton(ButtonTypesEnum buttonType, string url, int?width, int?height, string windowID, string buttonText, string title = null, string buttonID = null, string script = "") { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Script; rv.ButtonType = buttonType; rv.Url = url; rv.Width = width; rv.Height = height; rv.WindowID = windowID; rv.Text = buttonText; rv.Title = title; rv.ButtonID = buttonID; rv.Script = script; return(rv); }
public static ColumnFormatInfo MakeViewButton(ButtonTypesEnum buttonType, Guid?fileID, int?width = null, int?height = null, string title = null, string windowID = null, string buttonText = null, bool resizable = true, bool maxed = false) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.ViewPic; rv.ButtonType = buttonType; rv.FileID = fileID; rv.Width = width; rv.Height = height; rv.WindowID = windowID; rv.Text = buttonText ?? Program._localizer["Preview"]; rv.Title = title ?? Program._localizer["Preview"]; rv.Resizable = resizable; rv.Maxed = maxed; return(rv); }
public static ColumnFormatInfo MakeButton(ButtonTypesEnum buttonType, string url, string buttonText, int?width, int?height, string title = null, string buttonID = null, bool resizable = true, bool maxed = false, string buttonclass = null, RedirectTypesEnum rtype = RedirectTypesEnum.Layer) { ColumnFormatInfo rv = new ColumnFormatInfo(); rv.FormatType = ColumnFormatTypeEnum.Button; rv.ButtonType = buttonType; rv.Url = url; rv.Width = width; rv.Height = height; rv.Text = buttonText; rv.Title = title; rv.ButtonID = buttonID; rv.Resizable = resizable; rv.Maxed = maxed; rv.ButtonClass = buttonclass; rv.RType = rtype; return(rv); }