📄 data.vb
字号:
Imports System.Configuration.ConfigurationManager
Imports System.io
Public Module Data
'新版网络硬盘使用全局变量
Public C_LargeUseDir As Long = CLng(AppSettings("UseDirLimit"))
Public C_LargeManagerDir As Long = CLng(AppSettings("ManagerDirLimit"))
Public C_ServerDir As String = AppSettings("ChongYuanDirServer").ToString
Public Const C_ShareFileXmlMapPath As String = "~/App_Data/XML/ShareFile.xml"
Public Const C_ShareDirXmlMapPath As String = "~/App_Data/XML/ShareDir.xml"
Public Const C_TextExtendXmlMapPath As String = "~/App_Data/XML/TextExtend.xml"
Public Const C_MainShortMsgXmlMapPath As String = "~/App_Data/XML/MainShortMsg.xml"
Public Const C_LoginNameXmlMapPath As String = "~/App_Data/XML/LoginName.xml"
Public Const C_foldergifMapPath As String = "~/images/folder.gif"
Public Const C_smilefacegifMapPath As String = "~/filetype/smileface.gif"
Public Const C_homegifMapPath As String = "~/images/home.gif"
'GridView头排序图象标签用
Public Const C_strImgAsc As String = "<img src=../images/sort_asc.gif border=0>"
Public Const C_strImgDesc As String = "<img src=../images/sort_desc.gif border=0>"
'新版网络硬盘使用全局变量
'Access数据库使用
'Public Const C_strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(AppSettings("databasepath"))
Public Const C_LoginLogXmlMapPath As String = "~/App_Data/XML/LoginLog.xml"
Public Const C_ErrorLogXmlMapPath As String = "~/App_Data/XML/ErrorLog.xml"
Public Const C_TongJiByXQXmlMapPath As String = "~/App_Data/XML/XiaoQu.xml"
Public Const C_DebugFileName As String = "f:\webdisk\app_data\debug.txt"
Public Encoding As System.Text.Encoding = System.Text.Encoding.Default
'登录用户的权限,超级管理员,一般管理员,普通用户
Enum LoginType As Integer
NOUSER
NORMALUSER
NORMALMANAGER
SUPUERMANAGER
PASSWORDERROR
OTHER '出错或异常
End Enum
Public Class clsDebug
Public Shared Sub DebugFileOut(ByVal ex As Exception, ByVal strOtherMsg As String)
Dim DebugStream As New StreamWriter(C_DebugFileName, True)
DebugStream.WriteLine(Now.ToString)
DebugStream.WriteLine(ex.Source)
DebugStream.WriteLine(ex.StackTrace)
DebugStream.WriteLine(ex.Message)
DebugStream.WriteLine(strOtherMsg)
DebugStream.Flush()
DebugStream.Close()
DebugStream = Nothing
End Sub
Public Shared Sub DebugFileOut(ByVal ex As Exception)
Dim DebugStream As New StreamWriter(C_DebugFileName, True)
DebugStream.WriteLine(Now.ToString)
DebugStream.WriteLine(ex.Source)
DebugStream.WriteLine(ex.StackTrace)
DebugStream.WriteLine(ex.Message)
DebugStream.Flush()
DebugStream.Close()
DebugStream = Nothing
End Sub
Public Shared Sub DebugFileOut(ByVal strMsg As String)
Dim DebugStream As New StreamWriter(C_DebugFileName, True)
DebugStream.WriteLine(Now.ToString)
DebugStream.WriteLine(strMsg)
DebugStream.Flush()
DebugStream.Close()
DebugStream = Nothing
End Sub
Public Shared Function DebugFileRead(ByVal DebugFileName As String) As String
Dim strRen As String
Dim DebugStream As New StreamReader(C_DebugFileName, True)
strRen = DebugStream.ReadToEnd
DebugStream.Close()
DebugStream = Nothing
Return strRen
End Function
End Class
End Module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -