*控件*有横向和竖向的滚动条的DataGrid(横向支持从第几列滚动)

2023-10-06 21:42

本文主要是介绍*控件*有横向和竖向的滚动条的DataGrid(横向支持从第几列滚动),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

(不好意思,刚才有人要横竖都有,我就改了一下,可以都出现横向和竖向滚动,q其实我觉得没必要了,要不然,微软干嘛要用PAGESIZE来控制呀)

目前在论坛有很多的人问有滚动条的DATAGRID,所以我就急急忙忙的做了一个,当然了,功能就是滚动条,不过我做好了发现分页好象不行了,没办法呀,有时间我还要给它做一个分页控件,一下是我的代码,有兴趣的人可以考回去,自己完善一下,给它加一个分页(我的说的分页不行,好象是分页到上面去了),由于我不多考虑,时间很紧,上面问题也很多,望大家改改吧。
用法:FixedColumns:你要滚动横向,从哪一列开始

ShowScrollMode:你要横向滚动,还是竖项滚动

XScrollBarWidth:横滚动条的宽度
YScrollBarWidth:竖滚动条的高度

记住,你先设置ShowScrollMode,然后ScrollBarWidth的宽度,

你可能设置FixedColumns的时候回发现前面的几列不见了,由于你没有给前面几列没设置宽度

所以你在添加列的时候还要给没一列加一个宽度,会的吧,属性编辑器中加
注:你有横滚动时,允许分页会出现两个分页符,你可以设置横滚动的高度挡住它,呵呵,没多时间去改了,我要做一个很大的项目了,望见谅!

Imports System.ComponentModel
Imports System.Web.UI
Imports System.Drawing
Imports System.Web
Imports System.Web.UI.WebControls

<DefaultProperty("Text"), ToolboxData("<{0}:XYScrollDataGrid runat=server></{0}:XYScrollDataGrid>")> _
Public Class XYScrollDataGrid
    Inherits System.Web.UI.WebControls.DataGrid

    Private mScrollWidth As Unit
    Private mDataMode As DataModeType
    Private mFixedColumns As Integer
    Private mShowScrollDataMode As ShowScrollDataMode
    Private ymScrollWidth As Unit

    Public Enum ShowScrollDataMode
        XScroll
        YScroll
        Both
        None
    End Enum

    Public Enum DataModeType
        可変行Scroll
        固定行Scroll
    End Enum

#Region "プロパティ"
#Region "親クラスから継承された表示プロパティ"

    <NotifyParentProperty(True), Browsable(False), _
    EditorBrowsable(EditorBrowsableState.Advanced)> _
    Public Overrides Property AutoGenerateColumns() As Boolean
        Get
            Return MyBase.AutoGenerateColumns
        End Get
        Set(ByVal Value As Boolean)
            MyBase.AutoGenerateColumns = False
        End Set
    End Property

    <NotifyParentProperty(True), Browsable(False), _
    EditorBrowsable(EditorBrowsableState.Advanced)> _
    Public Shadows Property DataMember() As String
        Get
            Return MyBase.DataMember
        End Get
        Set(ByVal Value As String)
            MyBase.DataMember = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
     Public Overrides Property AllowCustomPaging() As Boolean
        Get
            Return MyBase.AllowCustomPaging
        End Get
        Set(ByVal Value As Boolean)
            MyBase.AllowCustomPaging = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property AllowPaging() As Boolean
        Get
            Return MyBase.AllowPaging
        End Get
        Set(ByVal Value As Boolean)
            MyBase.AllowPaging = Value
        End Set
    End Property

    <NotifyParentProperty(True), _
    Browsable(False), EditorBrowsable(EditorBrowsableState.Advanced)> _
    Public Overrides Property AllowSorting() As Boolean
        Get
            Return MyBase.AllowSorting
        End Get
        Set(ByVal Value As Boolean)
            MyBase.AllowSorting = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides ReadOnly Property AlternatingItemStyle() As TableItemStyle
        Get
            Return MyBase.AlternatingItemStyle
        End Get
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property BackColor() As Color
        Get
            Return MyBase.BackColor
        End Get
        Set(ByVal Value As Color)
            MyBase.BackColor = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
        Public Overrides Property BackImageUrl() As String
        Get
            Return MyBase.BackImageUrl
        End Get
        Set(ByVal Value As String)
            MyBase.BackImageUrl = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property BorderColor() As Color
        Get
            Return MyBase.BorderColor
        End Get
        Set(ByVal Value As Color)
            MyBase.BorderColor = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property BorderStyle() As BorderStyle
        Get
            Return MyBase.BorderStyle
        End Get
        Set(ByVal Value As BorderStyle)
            MyBase.BorderStyle = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property BorderWidth() As Unit
        Get
            Return MyBase.BorderWidth
        End Get
        Set(ByVal Value As Unit)
            MyBase.BorderWidth = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
       Public Overrides Property CellPadding() As Integer
        Get
            Return MyBase.CellPadding
        End Get
        Set(ByVal Value As Integer)
            MyBase.CellPadding = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property CellSpacing() As Integer
        Get
            Return MyBase.CellSpacing
        End Get
        Set(ByVal Value As Integer)
            MyBase.CellSpacing = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides ReadOnly Property Columns() As DataGridColumnCollection
        Get
            Return MyBase.Columns
        End Get
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property EditItemIndex() As Integer
        Get
            Return MyBase.EditItemIndex
        End Get
        Set(ByVal Value As Integer)
            MyBase.EditItemIndex = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides ReadOnly Property EditItemStyle() As TableItemStyle
        Get
            Return MyBase.EditItemStyle
        End Get
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property Enabled() As Boolean
        Get
            Return MyBase.Enabled
        End Get
        Set(ByVal Value As Boolean)
            MyBase.Enabled = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides ReadOnly Property FooterStyle() As TableItemStyle
        Get
            Return MyBase.FooterStyle
        End Get
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property ForeColor() As Color
        Get
            Return MyBase.ForeColor
        End Get
        Set(ByVal Value As Color)
            MyBase.ForeColor = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property GridLines() As GridLines
        Get
            Return MyBase.GridLines
        End Get
        Set(ByVal Value As GridLines)
            MyBase.GridLines = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides ReadOnly Property HeaderStyle() As TableItemStyle
        Get
            Return MyBase.HeaderStyle
        End Get
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property Height() As Unit
        Get
            Return MyBase.Height
        End Get
        Set(ByVal Value As Unit)
            MyBase.Height = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property HorizontalAlign() As HorizontalAlign
        Get
            Return MyBase.HorizontalAlign
        End Get
        Set(ByVal Value As HorizontalAlign)
            MyBase.HorizontalAlign = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides ReadOnly Property ItemStyle() As TableItemStyle
        Get
            Return MyBase.ItemStyle
        End Get
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides ReadOnly Property PagerStyle() As DataGridPagerStyle
        Get
            Return MyBase.PagerStyle
        End Get
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property PageSize() As Integer
        Get
            Return MyBase.PageSize
        End Get
        Set(ByVal Value As Integer)
            MyBase.PageSize = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
       Public Overrides Property ShowFooter() As Boolean
        Get
            Return MyBase.ShowFooter
        End Get
        Set(ByVal Value As Boolean)
            MyBase.ShowFooter = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
           Public Overrides Property ShowHeader() As Boolean
        Get
            Return MyBase.ShowHeader
        End Get
        Set(ByVal Value As Boolean)
            MyBase.ShowHeader = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property Visible() As Boolean
        Get
            Return MyBase.Visible
        End Get
        Set(ByVal Value As Boolean)
            MyBase.Visible = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
    Public Overrides Property Width() As Unit
        Get
            Return MyBase.Width
        End Get
        Set(ByVal Value As Unit)
            MyBase.Width = Value
        End Set
    End Property

    <NotifyParentProperty(True)> _
       Public Overrides Property CssClass() As String
        Get
            Return MyBase.CssClass
        End Get
        Set(ByVal Value As String)
            MyBase.CssClass = Value
        End Set
    End Property
#End Region

    <Category("モード選択"), DefaultValue(GetType(Unit), "0px"), _
       Description("スクロールの幅")> _
    Public Property YScrollBarHeight() As Unit
        Get
            Return ymScrollWidth
        End Get

        Set(ByVal Value As Unit)
            ymScrollWidth = Value
        End Set
    End Property

    <Category("モード選択"), DefaultValue(GetType(Unit), "0px"), _
       Description("スクロールの幅")> _
    Public Property XScrollBarWidth() As Unit
        Get
            '設定値を戻す
            Return mScrollWidth
        End Get

        Set(ByVal Value As Unit)
            '設定値
            mScrollWidth = Value
        End Set
    End Property

    <Category("モード選択"), DefaultValue(0), _
       Description("固定行の個数")> _
       Public Property FixedColumns() As Integer
        Get
            If mShowScrollDataMode = ShowScrollDataMode.XScroll Then
                Return mFixedColumns
            End If
        End Get

        Set(ByVal Value As Integer)
            If mShowScrollDataMode = ShowScrollDataMode.XScroll Then
                If Me.Columns.Count < Value And Not Me.Columns.Count = 0 Then
                    mFixedColumns = Me.Columns.Count
                ElseIf Value < 0 Then
                    mFixedColumns = 0
                Else
                    mFixedColumns = Value
                End If
            End If
        End Set
    End Property

    <Category("モード選択"), DefaultValue(GetType(ShowScrollDataMode), "XScroll"), _
     Description("XScroll")> _
        Public Property ShowScrollMode() As ShowScrollDataMode
        Get
            Return mShowScrollDataMode
        End Get
        Set(ByVal Value As ShowScrollDataMode)
            mShowScrollDataMode = Value
        End Set
    End Property
#End Region

    Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
        Dim tmpArrayList As Hashtable

        tmpArrayList = New Hashtable
        tmpArrayList.Add("Z-INDEX", Style.Item("Z-INDEX"))
        tmpArrayList.Add("LEFT", Style.Item("LEFT"))
        tmpArrayList.Add("POSITION", Style.Item("POSITION"))
        tmpArrayList.Add("TOP", Style.Item("TOP"))

        Me.Style.Remove("Z-INDEX")
        Me.Style.Remove("LEFT")
        Me.Style.Remove("POSITION")
        Me.Style.Remove("TOP")

        writer.Write("<div" & " id='" & Me.ID & "_All' style='")
        writer.Write("Z-INDEX: " & tmpArrayList("Z-INDEX") & ";")
        writer.Write("LEFT: " & tmpArrayList("LEFT") & ";")
        writer.Write("POSITION: " & tmpArrayList("POSITION") & ";")
        writer.Write("TOP: " & tmpArrayList("TOP") & "' ms_positioning = 'FlowLayout'>")

        FixedColumnDataGrid(writer)
        writer.Write("</div>")
    End Sub

    Private Sub FixedColumnDataGrid(ByVal output As System.Web.UI.HtmlTextWriter)
        Dim divStyle As String
        Dim widthOne As String
        Dim widthTwo As String
        Dim heightOne As String
        Dim heightTwo As String
        Dim visiableColumn() As Boolean
        Dim k As Integer

        ReDim visiableColumn(Me.Columns.Count - 1)

        For i As Integer = 0 To Me.Columns.Count - 1
            visiableColumn(i) = Me.Columns(i).Visible
        Next

        k = 0

        For i As Integer = 0 To mFixedColumns - 1

            For j As Integer = k To Me.Columns.Count - 1

                If Me.Columns.Item(j).Visible Then

                    widthOne = CStr((Val(widthOne) + Val(Me.Columns(j).HeaderStyle.Width.ToString)))
                    k = j + 1

                    Exit For
                End If
            Next
        Next
        widthOne = CType(Val(widthOne) + 1 + Val(CellSpacing) * mFixedColumns, String)
        If mFixedColumns = 0 Then
            widthOne = "0"
        End If
        widthTwo = mScrollWidth.ToString
        heightTwo = mScrollWidth.ToString
        OutPutLayout(widthOne, widthTwo, heightOne, heightTwo, visiableColumn, output)
    End Sub

    Private Sub OutPutLayout(ByVal widthOne As String, ByVal widthTwo As String, _
    ByVal heightOne As String, ByVal heightTwo As String, _
    ByVal visiableColumn As Boolean(), _
    ByVal output As System.Web.UI.HtmlTextWriter)
        output.Write("<table cellSpacing='0' cellPadding='0' border='0'>")
        If ShowScrollMode = ShowScrollDataMode.None Then
            output.Write("<tr>")
            If Not Me.Columns.Count <= mFixedColumns Then
                Call ShowLeft("", output)
            End If

            output.Write("</tr>")
        ElseIf ShowScrollMode = ShowScrollDataMode.XScroll Then
            output.Write("<tr>")
            Call ShowLeft(widthOne, output)
            If Not Me.Columns.Count <= mFixedColumns Then
                Call ShowRight(widthTwo, output)
            End If
            output.Write("</tr>")
        ElseIf ShowScrollMode = ShowScrollDataMode.YScroll Then
            output.Write("<tr>")
            ShowTop(heightOne, output)
            output.Write("</tr>")
            If Not Me.Columns.Count <= mFixedColumns Then
                output.Write("<tr>")
                Call ShowBottom(heightTwo, output)
                output.Write("</tr>")
            End If
        ElseIf ShowScrollMode = ShowScrollDataMode.Both Then
            output.Write("<tr>")
            ShowTop(heightOne, output)
            output.Write("</tr>")
            If mFixedColumns = 0 Then
                output.Write("<tr>")
                Call BothScroll(heightTwo, output)
                output.Write("</tr>")
            End If
        End If
        For i As Integer = 0 To Me.Columns.Count - 1
            Me.Columns.Item(i).Visible = visiableColumn(i)
        Next
        output.Write("</table>")
    End Sub

    Private Sub BothScroll(ByVal width As String, ByVal output As System.Web.UI.HtmlTextWriter)
        Dim divStyle As String

        output.Write("<td valign='top'>")

        divStyle = "<DIV id='" & Me.ID & "_DivBottom' style='OVERFLOW-Y: scroll; OVERFLOW-X: scroll;HEIGHT: " & _
                            Me.YScrollBarHeight.ToString & "; WIDTH: " & Me.XScrollBarWidth.ToString & ";" & _
                " BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; " & _
                            "' ms_positioning = 'GridLayout' > "
        output.Write(divStyle)

        For i As Integer = 0 To Me.Items.Count - 1
            Me.Items(i).Visible = True
        Next

        For i As Integer = 0 To Me.Items.Count - 1
            Me.Items(i).Attributes("id") = Me.ID & "TRD" & i
        Next

        Me.Style("BORDER-STYLE") = "none"
        Me.ShowHeader = False
        MyBase.Render(output)
        Me.ShowHeader = True

        output.Write("</DIV>")
        output.Write("</td>")
    End Sub

    Private Sub ShowLeft(ByVal width As String, ByVal output As System.Web.UI.HtmlTextWriter)
        Dim divStyle As String
        output.Write("<td valign='top'>")
        divStyle = "<DIV id='" & Me.ID & "_DivLeft' style='OVERFLOW-X: hidden; WIDTH: " & _
                            width & ";" _
                            & " BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; " & _
                            "' ms_positioning = 'GridLayout' > "
        output.Write(divStyle)

        If Me.mShowScrollDataMode = ShowScrollDataMode.None Then
            For i As Integer = 0 To Me.Items.Count - 1
                Me.Items(i).Attributes("id") = Me.ID & "TRD" & i
            Next

        Else
            For i As Integer = 0 To Me.Items.Count - 1
                Me.Items(i).Attributes("id") = Me.ID & "TRL" & i
            Next
        End If
        Me.Style("BORDER-STYLE") = "none"
        MyBase.Render(output)
        output.Write("</DIV>")
        output.Write("</td>")
    End Sub

    Private Sub ShowRight(ByVal width As String, ByVal output As System.Web.UI.HtmlTextWriter)
        Dim divStyle As String

        output.Write("<td valign='top'>")
        divStyle = "<DIV id='" & Me.ID & "_DivRight' style='OVERFLOW-X: scroll; WIDTH: " & _
                            width & ";" & _
                " BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; " & _
                            "' ms_positioning = 'GridLayout' > "
        output.Write(divStyle)
        If Not ShowScrollMode = ShowScrollDataMode.None Then
            For i As Integer = 0 To mFixedColumns - 1
                For j As Integer = 0 To Me.Columns.Count - 1
                    If Me.Columns.Item(j).Visible Then
                        Me.Columns.Item(j).Visible = False
                        Exit For
                    End If
                Next
            Next
        End If

        For i As Integer = 0 To Me.Items.Count - 1
            Me.Items(i).Attributes("id") = Me.ID & "TRR" & i
        Next
        Me.Style("BORDER-STYLE") = "none"
        MyBase.Render(output)
        output.Write("</DIV>")
        output.Write("</td>")
    End Sub

    Private Sub ShowTop(ByVal height As String, ByVal output As System.Web.UI.HtmlTextWriter)

        Dim divStyle As String

        output.Write("<td valign='bottom'>")

        divStyle = "<DIV id='" & Me.ID & "_DivTop' style='BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; " & _
                            "' ms_positioning = 'GridLayout' > "
        output.Write(divStyle)

        For i As Integer = 0 To Me.Items.Count - 1
            Me.Items(i).Visible = False
        Next
        For i As Integer = 0 To Me.Items.Count - 1
            Me.Items(i).Attributes("id") = Me.ID & "TRD" & i
        Next
        Me.Style("BORDER-STYLE") = "none"
        Me.ShowFooter = False
        MyBase.Render(output)
        output.Write("</DIV>")
        output.Write("</td>")
    End Sub

    Private Sub ShowBottom(ByVal height As String, ByVal output As System.Web.UI.HtmlTextWriter)

        Dim divStyle As String

        output.Write("<td valign='top'>")

        divStyle = "<DIV id='" & Me.ID & "_DivBottom' style='OVERFLOW-Y: scroll; HEIGHT: " & _
                            Me.YScrollBarHeight.ToString & ";" & _
                " BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; " & _
                            "' ms_positioning = 'GridLayout' > "
        output.Write(divStyle)

        For i As Integer = 0 To Me.Items.Count - 1
            Me.Items(i).Visible = True
        Next

        For i As Integer = 0 To Me.Items.Count - 1
            Me.Items(i).Attributes("id") = Me.ID & "TRD" & i
        Next

        Me.Style("BORDER-STYLE") = "none"
        Me.ShowHeader = False
        MyBase.Render(output)
        Me.ShowHeader = True

        output.Write("</DIV>")
        output.Write("</td>")
    End Sub
End Class

这篇关于*控件*有横向和竖向的滚动条的DataGrid(横向支持从第几列滚动)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/154091

相关文章

一文教你解决Python不支持中文路径的问题

《一文教你解决Python不支持中文路径的问题》Python是一种广泛使用的高级编程语言,然而在处理包含中文字符的文件路径时,Python有时会表现出一些不友好的行为,下面小编就来为大家介绍一下具体的... 目录问题背景解决方案1. 设置正确的文件编码2. 使用pathlib模块3. 转换路径为Unicod

禁止HTML页面滚动的操作方法

《禁止HTML页面滚动的操作方法》:本文主要介绍了三种禁止HTML页面滚动的方法:通过CSS的overflow属性、使用JavaScript的滚动事件监听器以及使用CSS的position:fixed属性,每种方法都有其适用场景和优缺点,详细内容请阅读本文,希望能对你有所帮助... 在前端开发中,禁止htm

定价129元!支持双频 Wi-Fi 5的华为AX1路由器发布

《定价129元!支持双频Wi-Fi5的华为AX1路由器发布》华为上周推出了其最新的入门级Wi-Fi5路由器——华为路由AX1,建议零售价129元,这款路由器配置如何?详细请看下文介... 华为 Wi-Fi 5 路由 AX1 已正式开售,新品支持双频 1200 兆、配有四个千兆网口、提供可视化智能诊断功能,建

CSS自定义浏览器滚动条样式完整代码

《CSS自定义浏览器滚动条样式完整代码》:本文主要介绍了如何使用CSS自定义浏览器滚动条的样式,包括隐藏滚动条的角落、设置滚动条的基本样式、轨道样式和滑块样式,并提供了完整的CSS代码示例,通过这些技巧,你可以为你的网站添加个性化的滚动条样式,从而提升用户体验,详细内容请阅读本文,希望能对你有所帮助...

C#实现WinForm控件焦点的获取与失去

《C#实现WinForm控件焦点的获取与失去》在一个数据输入表单中,当用户从一个文本框切换到另一个文本框时,需要准确地判断焦点的转移,以便进行数据验证、提示信息显示等操作,本文将探讨Winform控件... 目录前言获取焦点改变TabIndex属性值调用Focus方法失去焦点总结最后前言在一个数据输入表单

opencv 滚动条

参数介绍:createTrackbar( trackbarname , "hello" , &alpha_slider ,alpha_max ,  on_trackbar )  ;在标签中显示的文字(提示滑动条的用途) TrackbarName创建的滑动条要放置窗体的名字 “hello”滑动条的取值范围从 0 到 alpha_max (最小值只能为 zero).滑动后的值存放在

lvgl8.3.6 控件垂直布局 label控件在image控件的下方显示

在使用 LVGL 8.3.6 创建一个垂直布局,其中 label 控件位于 image 控件下方,你可以使用 lv_obj_set_flex_flow 来设置布局为垂直,并确保 label 控件在 image 控件后添加。这里是如何步骤性地实现它的一个基本示例: 创建父容器:首先创建一个容器对象,该对象将作为布局的基础。设置容器为垂直布局:使用 lv_obj_set_flex_flow 设置容器

Golang支持平滑升级的HTTP服务

前段时间用Golang在做一个HTTP的接口,因编译型语言的特性,修改了代码需要重新编译可执行文件,关闭正在运行的老程序,并启动新程序。对于访问量较大的面向用户的产品,关闭、重启的过程中势必会出现无法访问的情况,从而影响用户体验。 使用Golang的系统包开发HTTP服务,是无法支持平滑升级(优雅重启)的,本文将探讨如何解决该问题。 一、平滑升级(优雅重启)的一般思路 一般情况下,要实现平滑

sqlite不支持中文排序,采用java排序

方式一 不支持含有重复字段进行排序 /*** sqlite不支持中文排序,改用java排序* 根据指定的对象属性字段,排序对象集合,顺序* @param list* @param field* @return*/public static List sortListByField(List<?> list,String field){List temp = new ArrayList(

一款支持同一个屏幕界面同时播放多个视频的视频播放软件

GridPlayer 是一款基于 VLC 的免费开源跨平台多视频同步播放工具,支持在一块屏幕上同时播放多个视频。其主要功能包括: 多视频播放:用户可以在一个窗口中同时播放任意数量的视频,数量仅受硬件性能限制。支持多种格式和流媒体:GridPlayer 支持所有由 VLC 支持的视频格式以及流媒体 URL(如 m3u8 链接)。自定义网格布局:用户可以配置播放器的网格布局,以适应不同的观看需求。硬