├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── doc └── 姬娘 开发文档.docx └── source ├── App.config ├── Class ├── ApplicationEvents.vb ├── BilibiliApi.vb ├── Common.vb ├── DanmuEntry │ ├── DanmuEntry.vb │ ├── DatabaseUpgrader.vb │ └── UserInfo.vb ├── DanmuHttp.vb ├── DanmuParser │ ├── DanmuEventTransfer.vb │ ├── DmCmdParser.vb │ └── OpCodeParser.vb ├── DanmuSender │ ├── DanmuRepeatOptions.vb │ ├── DanmuSender.vb │ ├── DanmuSenderInfo.vb │ ├── DanmuSenderOptionLevel.vb │ ├── DanmuSenderOptionName.vb │ ├── RepeatDanmuInfo.vb │ ├── SendStatus.vb │ └── SentDanmuInfo.vb ├── Entity │ ├── APIPostResponseBaseEntity.vb │ ├── AnchorInRoomEntity.vb │ ├── ConfigEntity.vb │ ├── DanmuEntity.vb │ ├── DanmuFormatEntity.vb │ ├── DanmuServerInfoEntity.vb │ ├── LiveEntity.vb │ ├── LoginUrlEntity.vb │ ├── MainFormEntity.vb │ ├── ReportReasonEntity.vb │ ├── RoomAdminEntity.vb │ ├── RoomBlackViewerEntity.vb │ ├── RoomEntity.vb │ ├── RoomShieldInfoEntity.vb │ ├── RoomSilentInfoEntity.vb │ ├── RoomViewerInfoEntity.vb │ ├── ThanksHimeEntity.vb │ ├── UserInfoEntity.vb │ ├── UserSearchResultEntity.vb │ └── ViewerMedalEntity.vb ├── Events.vb ├── LightLiver.vb ├── LiveStreamPusher │ ├── LiveStreamPusher.vb │ ├── LiveStreamPusherInfo.vb │ └── WindowBase.vb ├── MedalUpgradeHime │ └── MedalUpgradeHime.vb ├── RaffleHime.vb ├── RandomEmoji.vb └── Tcp │ ├── ParsedEventArgs.vb │ ├── TcpEvents.vb │ ├── TcpListener.vb │ └── TcpPacketParser.vb ├── Control ├── FansInfoEditControl.Designer.vb ├── FansInfoEditControl.resx ├── FansInfoEditControl.vb ├── FunctionTestControl.Designer.vb ├── FunctionTestControl.resx ├── FunctionTestControl.vb ├── LiveRoomInfoControl.Designer.vb ├── LiveRoomInfoControl.resx ├── LiveRoomInfoControl.vb ├── PagerControl.Designer.vb ├── PagerControl.resx ├── PagerControl.vb ├── RankingListControl.Designer.vb ├── RankingListControl.resx ├── RankingListControl.vb ├── SettingControl.Designer.vb ├── SettingControl.resx └── SettingControl.vb ├── EnumDefine ├── ConnectMode.vb ├── CookieSource.vb ├── LoginResult.vb └── UserRole.vb ├── Form ├── DanmuControl │ ├── BlackViewerControl.Designer.vb │ ├── BlackViewerControl.resx │ ├── BlackViewerControl.vb │ ├── DanmuControl.Designer.vb │ ├── DanmuControl.resx │ ├── DanmuControl.vb │ ├── DanmuControlFunctionTest.vb │ ├── FrmDanmuColor.Designer.vb │ ├── FrmDanmuColor.resx │ ├── FrmDanmuColor.vb │ ├── FrmReportReason.Designer.vb │ ├── FrmReportReason.resx │ ├── FrmReportReason.vb │ ├── FrmRoomViewerManage.Designer.vb │ ├── FrmRoomViewerManage.resx │ ├── FrmRoomViewerManage.vb │ ├── FrmYanText.Designer.vb │ ├── FrmYanText.resx │ ├── FrmYanText.vb │ ├── IViewerManageBaseControl.vb │ ├── RoomAdminControl.Designer.vb │ ├── RoomAdminControl.resx │ ├── RoomAdminControl.vb │ ├── RoomGlobalSilentControl.Designer.vb │ ├── RoomGlobalSilentControl.resx │ ├── RoomGlobalSilentControl.vb │ ├── RoomShieldControl.Designer.vb │ ├── RoomShieldControl.resx │ ├── RoomShieldControl.vb │ ├── UserControlTestForm.Designer.vb │ ├── UserControlTestForm.resx │ ├── UserControlTestForm.vb │ ├── ViewerManageBaseControl.Designer.vb │ ├── ViewerManageBaseControl.vb │ ├── ViewerRemarkControl.Designer.vb │ ├── ViewerRemarkControl.resx │ └── ViewerRemarkControl.vb ├── FrmFansManage.Designer.vb ├── FrmFansManage.resx ├── FrmFansManage.vb ├── FrmLiveSetting.Designer.vb ├── FrmLiveSetting.resx ├── FrmLiveSetting.vb ├── FrmMain.Designer.vb ├── FrmMain.resx ├── FrmMain.vb ├── FrmPluginManage.Designer.vb ├── FrmPluginManage.resx ├── FrmPluginManage.vb ├── FrmSelectArea.Designer.vb ├── FrmSelectArea.resx ├── FrmSelectArea.vb ├── FrmThanksHime.Designer.vb ├── FrmThanksHime.resx ├── FrmThanksHime.vb └── Login │ ├── FrmLoginFromBrowser.Designer.vb │ ├── FrmLoginFromBrowser.resx │ ├── FrmLoginFromBrowser.vb │ ├── FrmLoginFromCookies.Designer.vb │ ├── FrmLoginFromCookies.resx │ ├── FrmLoginFromCookies.vb │ ├── FrmLoginFromQRCode.Designer.vb │ ├── FrmLoginFromQRCode.resx │ ├── FrmLoginFromQRCode.vb │ ├── FrmQuickLogin.Designer.vb │ ├── FrmQuickLogin.resx │ ├── FrmQuickLogin.vb │ └── LoginManager.vb ├── My Project ├── Application.Designer.vb ├── Application.myapp ├── AssemblyInfo.vb ├── Resources.Designer.vb ├── Resources.resx ├── Settings.Designer.vb ├── Settings.settings └── app.manifest ├── packages.config ├── res ├── CreateDb.sql ├── DanmuDisplayTemplete.html └── YanText.txt └── 姬娘.vbproj /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JiNiang(中文名:`姬娘`,下面都用`姬娘`表示) 2 | [bilibili](https://www.bilibili.com/)直播姬、弹幕姬、danmuku、各种姬,VB(新VB.NET)实现,***史上结构最乱项目(官方吐槽)*** 3 | 4 | ## Release 5 | [安装包(installer package)](https://github.com/shanxing2/JiNiang/releases) 6 | 7 | ## 框架版本 8 | .NET 4.6.1 9 | 10 | ## 引用 11 | ### NuGet 12 | 1.Install-Package System.ValueTuple -Version 4.5.0 13 | 2.Install-Package Microsoft.AspNet.WebApi.Client -Version 5.2.7 14 | 15 | 注:此Package依赖于Newtonsoft.Json,但是我们这个项目用不到,所以不需要也可以,可以在NuGet管理器中勾选 ‘强制卸载,即使有依赖项’,然后强制卸载依赖包Newtonsoft.Json。 16 | 17 | ### 第三方库 18 | * 1.[shanxinglib.dll](https://github.com/shanxing2/shanxinglib) 19 | * 2.[ShanXingTech.IO2.Database](https://github.com/shanxing2/ShanXingTech.IO2.Database) 20 | * 3.`姬娘`插件 21 | 22 | ## 错误 23 | 1.无法获取密钥文件“ShanXingTech.pfx”的 MD5 校验和。未能找到文件“*\ShanXingTech.pfx”。 24 | 解决方法: 25 | 右键项目——属性——签名,去掉勾选 “为程序集签名(A)”,或者选择(或创建)你自己的强名称密钥文件。 26 | 27 | ## FQA 28 | 1.软件运行不出现录界面,直接出现空白主界面。 29 | 解决:根据系统位数查看软件目录下是否自动生成 x86 或者 x64 文件夹,并且里面有一个名为 ‘SQLite.Interop.dll’ 的文件。如果有,查看 C:\ShanXingTech\Log 目录下是否有 log文件,如果有,打开,查看是否有类似 ‘无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。’log,如果有,打开电脑‘控制面板’,查看是否有‘[Microsoft Visual C++ 2015 Redistributable(X64或X86)](https://www.microsoft.com/zh-cn/download/details.aspx?id=53840)’,如果没有,请下载安装,安装完成后,重新打开姬娘再看是否可以解决。 30 | 31 | ## 已有功能(主要) 32 | 33 | * 自动更新在线人数、粉丝人数(更新间隔跟随发心跳包间隔); 34 | * 新粉丝关注提示; 35 | * 送礼提示&感谢、上船提示&感谢、欢迎老爷进直播间; 36 | * 发弹幕; 37 | * 退出时自动缓存最多100条记录,下次启动时如果没有新弹幕会再加载缓存的弹幕; 38 | * 一键快速开播(已有)以及OBS自动推流(暂未实现); 39 | * ***勋章升级提示*** 40 | 41 | ## TODO 42 | * 添加插件系统; 43 | * 可自定义部分弹幕展示格式(送礼、上船、老爷进直播间、新粉丝关注等,通过插件形式); 44 | * 弹幕只展示最新100条,减少资源占用(目前展示接收到的所有弹幕); 45 | * 发弹幕模块可分离,自由吸附到其他软件上,比如官方的弹幕姬; 46 | * 自动打开直播宝箱(可选); 47 | * 自动赠送包裹中的免费道具给主播(可选); 48 | * 听直播,只有声音没有视频,会不会省辣么一点点牛量呢???(当前B站用的协议,应该实现不了这个功能) 49 | * 礼物榜单/统计; 50 | * 注:插件系统做好之后,界面会大改! 51 | 52 | ## BUG反馈、建议、编程交流群、女装裙797522112←◡← 53 | Q群:[797522112](https://jq.qq.com/?_wv=1027&k=5MuFkkR) 胖头鱼煲汤好好次 54 | 55 | ## 小破站直播间 56 | [4236342](https://live.bilibili.com/4236342),[关注他](https://space.bilibili.com/52155851) 57 | 58 | ## 淘宝恰饭 59 | [胖头鱼煲汤好好次](http://shop68147918.taobao.com/) -------------------------------------------------------------------------------- /doc/姬娘 开发文档.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shanxing2/JiNiang/c4f610e9d0a4fa29244dc8b774f622ae070b1b5f/doc/姬娘 开发文档.docx -------------------------------------------------------------------------------- /source/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | <姬娘.My.MySettings> 13 | 14 | 姬娘 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /source/Class/ApplicationEvents.vb: -------------------------------------------------------------------------------- 1 | Imports Microsoft.VisualBasic.ApplicationServices 2 | Imports Microsoft.VisualBasic.Devices 3 | Imports ShanXingTech 4 | 5 | Namespace My 6 | ' 以下事件可用于 MyApplication: 7 | ' Startup:应用程序启动时在创建启动窗体之前引发。 8 | ' Shutdown:在关闭所有应用程序窗体后引发。如果应用程序非正常终止,则不会引发此事件。 9 | ' UnhandledException:在应用程序遇到未经处理的异常时引发。 10 | ' StartupNextInstance:在启动单实例应用程序且应用程序已处于活动状态时引发。 11 | ' NetworkAvailabilityChanged:在连接或断开网络连接时引发。 12 | Partial Friend Class MyApplication 13 | ' 注:在非Visual Studio中调试时才生效 14 | Private Sub MyApplication_UnhandledException(sender As Object, e As UnhandledExceptionEventArgs) Handles Me.UnhandledException 15 | If Not DanmuEntry.IsClosed Then 16 | Try 17 | DanmuEntry.Close(FrmMain.DanmuControl) 18 | Catch ex As Exception 19 | Logger.WriteLine(ex) 20 | End Try 21 | End If 22 | 23 | Logger.WriteLine(e.Exception) 24 | MessageBox.Show("程序遇到未处理异常,请关闭程序后重启程序", "温馨提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) 25 | End Sub 26 | End Class 27 | End Namespace 28 | -------------------------------------------------------------------------------- /source/Class/Common.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech 2 | 3 | Public NotInheritable Class Common 4 | #Region "常量" 5 | ''' 6 | ''' 观众弹幕模板(uid-ts-ct-nickname-timestamp-danmu) 7 | ''' 8 | Public Const ViewerDanmuTemplete As String = "
{4}
{5}
" 9 | ''' 10 | ''' 播主、自己(进自己直播间就是自己啦)弹幕模板 11 | ''' 12 | Public Const UpOrOwnDanmuTemplete As String = "{0} {1}
{2}" 13 | #End Region 14 | 15 | #Region "函数区" 16 | 17 | Public Shared Sub CopyToClipboard(ByVal data As String, ByRef tipsDisplayControl As Control) 18 | Try 19 | Clipboard.SetDataObject(data, False, 3, 100) 20 | Windows2.DrawTipsTask(tipsDisplayControl, "复制成功" & RandomEmoji.Happy, 1000, True) 21 | Catch ex As Exception 22 | Windows2.DrawTipsTask(tipsDisplayControl, "复制失败,请重新复制" & RandomEmoji.Helpless, 1000, False) 23 | End Try 24 | End Sub 25 | 26 | ''' 27 | ''' 显示操作结果 28 | ''' 29 | ''' 提示在哪里(控件或者窗口)显示 30 | ''' 31 | Public Shared Sub ShowOperateResultTask(ByVal ownerControl As Control, ByVal opRst As (Success As Boolean, Message As String, Result As String)) 32 | Windows2.DrawTipsTask(ownerControl, If(opRst.Success, "成功", opRst.Message), 1000, opRst.Success, False) 33 | End Sub 34 | 35 | ''' 36 | ''' 显示操作结果 37 | ''' 38 | ''' 提示在哪里(控件或者窗口)显示 39 | ''' 40 | Public Shared Sub ShowOperateResultTask(ByVal ownerControl As Control, ByVal success As Boolean) 41 | Windows2.DrawTipsTask(ownerControl, If(success, "成功", "失败"), 1000, success, False) 42 | End Sub 43 | 44 | ''' 45 | ''' 显示操作结果 46 | ''' 47 | ''' 提示在哪里(控件或者窗口)显示 48 | ''' 49 | ''' 提示 50 | ''' 倒计时,单位毫秒 51 | Public Shared Sub ShowOperateResultTask(ByVal ownerControl As Control, ByVal success As Boolean, ByVal tips As String, Optional ByVal timeout As Integer = 1000) 52 | Windows2.DrawTipsTask(ownerControl, tips, timeout, success, False) 53 | End Sub 54 | #End Region 55 | End Class 56 | -------------------------------------------------------------------------------- /source/Class/DanmuEntry/UserInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Net 2 | Imports ShanXingTech 3 | Imports 姬娘插件.Events 4 | 5 | Public Class UserInfo 6 | Public Property Id As String 7 | Public Property Nick As String 8 | ''' 9 | ''' 直播间短Id,没有的为 0 10 | ''' 11 | ''' 12 | Public Property RoomShortId As Integer 13 | ''' 14 | ''' 直播间真实Id 15 | ''' 16 | ''' 17 | 18 | Public Property RoomRealId As Integer 19 | 20 | Public Property Role As UserRole 21 | Public Property ViewRoom As LiveRoom 22 | Private m_Token As String 23 | Public ReadOnly Property Token() As String 24 | Get 25 | If Not m_Token.IsNullOrEmpty Then Return m_Token 26 | 27 | ' csrf_token 等于 cookies中的 bili_jct 28 | ' bili_jct=5211bc5dcd90e98a42c0bd35035f2673; 29 | Dim pattern = "bili_jct=([0-9a-z]+)" 30 | m_Token = Cookies?.ToKeyValuePairs.GetFirstMatchValue(pattern) 31 | 32 | Return m_Token 33 | End Get 34 | End Property 35 | Public Property Cookies As CookieContainer 36 | Public ReadOnly Property IsLogined() As Boolean 37 | Get 38 | Return Id IsNot Nothing 39 | End Get 40 | End Property 41 | Public Property SignDate As Date 42 | Public ReadOnly Property IsSigned As Boolean 43 | Get 44 | Return SignDate = Date.Now.Date 45 | End Get 46 | End Property 47 | 48 | Public Property SignRewards As String 49 | 50 | Public Property IsReceivedDoubleWatchAward() As Boolean 51 | ''' 52 | ''' 短id或者真实id,由用户输入或者程序自动从数据库中取的真实Id 53 | ''' 54 | ''' 55 | Public Property ViewedRoomId As Integer 56 | Public Property StoreCookies As Boolean 57 | 58 | End Class 59 | 60 | -------------------------------------------------------------------------------- /source/Class/DanmuHttp.vb: -------------------------------------------------------------------------------- 1 | Imports System.Net 2 | Imports System.Text 3 | Imports System.Text.RegularExpressions 4 | Imports System.Web.Script.Serialization 5 | Imports ShanXingTech 6 | Imports ShanXingTech.ExtensionFunc 7 | Imports ShanXingTech.Net2 8 | Imports ShanXingTech.Text2 9 | Imports 姬娘 10 | 11 | 12 | 13 | Public Class DanmuHttp 14 | Inherits DanmuEvents 15 | Implements IDisposable 16 | 17 | 18 | 19 | #Region "属性区" 20 | 21 | 22 | #End Region 23 | 24 | 25 | #Region "常量区" 26 | 27 | #End Region 28 | 29 | #Region "字段区" 30 | 'Private JsSerializer As JavaScriptSerializer 31 | Private m_StopWork As Boolean 32 | 33 | #End Region 34 | 35 | #Region "事件区" 36 | ''' 37 | ''' 弹幕内容改变事件 有弹幕更新时触发 38 | ''' 39 | Public Event ChatHistoryChanged As EventHandler(Of DanmuChangedEventArgs) 40 | ''' 41 | ''' 在线人数改变事件 42 | ''' 43 | Public Event OnlineChanged As EventHandler(Of OnlineChangedEventArgs) 44 | ''' 45 | ''' 关注人数改变事件 46 | ''' 47 | Public Event AttentionCountChanged As EventHandler(Of AttentionCountChangedEventArgs) 48 | ''' 49 | ''' 粉丝增加事件 50 | ''' 51 | Public Event AttentionIncreased As EventHandler(Of AttentionIncreasedEventArgs) 52 | ''' 53 | ''' 直播状态改变事件 54 | ''' 55 | Public Event LiveStatusChanged As EventHandler(Of LiveStatusChangedEventArgs) 56 | ''' 57 | '''投喂事件 有投喂时触发 58 | ''' 59 | Public Event Feeded As EventHandler(Of DanmuChangedEventArgs) 60 | ''' 61 | ''' 老爷(年费/月费)进入直播间时触发 62 | ''' 63 | Public Event VipEntered As EventHandler(Of VipEnteredEventArgs) 64 | #End Region 65 | 66 | #Region "构造函数区" 67 | ''' 68 | ''' 无参数的构造函数仅用作测试 69 | ''' 70 | Sub New() 71 | 'JsSerializer = New JavaScriptSerializer 72 | End Sub 73 | 74 | Sub New(ByRef loginedCookies As CookieContainer) 75 | aaa(DanmuEntry.User.ViewRoom.Id) 76 | End Sub 77 | #End Region 78 | 79 | #Region "IDisposable Support" 80 | ' 要检测冗余调用 81 | Private disposedValue As Boolean = False 82 | 83 | ' IDisposable 84 | Protected Overridable Sub Dispose(disposing As Boolean) 85 | ' 窗体内的控件调用Close或者Dispose方法时,isDisposed2的值为True 86 | If disposedValue Then Return 87 | 88 | ' TODO: 释放托管资源(托管对象)。 89 | If disposing Then 90 | ' 91 | End If 92 | 93 | ' TODO: 释放未托管资源(未托管对象)并在以下内容中替代 Finalize()。 94 | ' TODO: 将大型字段设置为 null。 95 | 96 | disposedValue = True 97 | End Sub 98 | 99 | ' TODO: 仅当以上 Dispose(disposing As Boolean)拥有用于释放未托管资源的代码时才替代 Finalize()。 100 | 'Protected Overrides Sub Finalize() 101 | ' ' 请勿更改此代码。将清理代码放入以上 Dispose(disposing As Boolean)中。 102 | ' Dispose(False) 103 | ' MyBase.Finalize() 104 | 'End Sub 105 | 106 | ' Visual Basic 添加此代码以正确实现可释放模式。 107 | Public Sub Dispose() Implements IDisposable.Dispose 108 | ' 请勿更改此代码。将清理代码放入以上 Dispose(disposing As Boolean)中。 109 | Dispose(True) 110 | ' TODO: 如果在以上内容中替代了 Finalize(),则取消注释以下行。 111 | 'GC.SuppressFinalize(Me) 112 | End Sub 113 | #End Region 114 | 115 | #Region "函数区" 116 | ''' 117 | ''' 无脑循环,一秒获取一次弹幕信息、人气 118 | ''' 119 | Private Sub aaa(ByVal roomId As String) 120 | Task.Run(action:=Async Sub() 121 | While Not m_StopWork 122 | Await DanmuEntry.UpdateRoomInfoAsync(ConnectMode.Http) 123 | 124 | ' 获取弹幕 125 | Dim getRst = Await DanmuEntry.GetDanmuAsync(roomId) 126 | Dim message = getRst.Message 127 | If getRst.NeedChangeChatHistory Then 128 | RaiseEvent ChatHistoryChanged(Nothing, New DanmuChangedEventArgs(message)) 129 | Await Task.Delay(1000) 130 | Else 131 | ' 不需要更新弹幕的话 直接等待下一个获取弹幕周期 132 | Await Task.Delay(1000) 133 | Continue While 134 | End If 135 | End While 136 | End Sub) 137 | End Sub 138 | 139 | Public Sub Close() 140 | m_StopWork = True 141 | End Sub 142 | 143 | #End Region 144 | End Class 145 | -------------------------------------------------------------------------------- /source/Class/DanmuParser/DanmuEventTransfer.vb: -------------------------------------------------------------------------------- 1 | Partial Class DmCmdParser 2 | 3 | Public Class DanmuEventTransfer 4 | 5 | #Region "字段区" 6 | ''' 7 | ''' 已经引发过的事件词典缓存 8 | ''' 9 | Private Shared m_RaisedEventCache As Dictionary(Of String, EventArgs) 10 | #End Region 11 | 12 | #Region "构造函数区" 13 | Shared Sub New() 14 | m_RaisedEventCache = New Dictionary(Of String, EventArgs)(StringComparison.OrdinalIgnoreCase) 15 | End Sub 16 | #End Region 17 | 18 | #Region "函数区" 19 | ''' 20 | ''' 引发事件 21 | ''' 22 | ''' 23 | ''' 24 | ''' 25 | Public Shared Sub Raise(Of T)(ByVal eventName As String, ByVal EventArgs As T) 26 | If eventName Is Nothing Then 27 | Throw New ArgumentNullException(String.Format(My.Resources.NullReference, NameOf(eventName))) 28 | End If 29 | If EventArgs Is Nothing Then 30 | Throw New ArgumentNullException(String.Format(My.Resources.NullReference, NameOf(EventArgs))) 31 | End If 32 | 33 | Dim e As EventArgs = Nothing 34 | If m_RaisedEventCache.TryGetValue(eventName, e) Then 35 | 36 | Else 37 | 38 | End If 39 | 40 | ' 反射是相对比较耗时的操作,所以已经引发过的事件可以缓存起来重用以提高效率 41 | If Not m_RaisedEventCache.TryGetValue(eventName, e) Then 42 | m_RaisedEventCache.Add(eventName, e) 43 | End If 44 | End Sub 45 | 46 | 47 | 48 | #End Region 49 | End Class 50 | 51 | End Class 52 | -------------------------------------------------------------------------------- /source/Class/DanmuParser/OpCodeParser.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech 2 | Imports ShanXingTech.ExtensionFunc 3 | Imports 姬娘.TcpPacketParser 4 | Imports 姬娘插件.Events 5 | Imports 姬娘插件.Utils 6 | 7 | ''' 8 | ''' 解析服务器推送过来的各种操作码 9 | ''' 10 | Public NotInheritable Class OpCodeParser 11 | Inherits DmCmdParser 12 | Implements IDisposable 13 | 14 | 15 | #Region "属性区" 16 | ''' 17 | ''' 当前登录用户Id 18 | ''' 19 | ''' 20 | Public ReadOnly Property UserId() As String 21 | ''' 22 | ''' Up Id 23 | ''' 24 | ''' 25 | Public ReadOnly Property UpId() As String 26 | #End Region 27 | 28 | #Region "字段区" 29 | Private m_TcpPacketDataBC As Concurrent.BlockingCollection(Of TcpPacketData) 30 | Private m_TryParseLoopTask As Task 31 | #End Region 32 | #Region "常量区" 33 | Private Const m_MaxCount As Integer = 100 34 | #End Region 35 | 36 | #Region "IDisposable Support" 37 | ' 要检测冗余调用 38 | Private disposedValue As Boolean = False 39 | 40 | ' IDisposable 41 | Protected Overrides Sub Dispose(disposing As Boolean) 42 | ' 窗体内的控件调用Close或者Dispose方法时,isDisposed2的值为True 43 | If disposedValue Then Return 44 | 45 | ' TODO: 释放托管资源(托管对象)。 46 | If disposing Then 47 | m_TcpPacketDataBC?.TryRelease(m_TryParseLoopTask) 48 | End If 49 | 50 | ' TODO: 释放未托管资源(未托管对象)并在以下内容中替代 Finalize()。 51 | ' TODO: 将大型字段设置为 null。 52 | 53 | 54 | disposedValue = True 55 | End Sub 56 | 57 | '' TODO: 仅当以上 Dispose(disposing As Boolean)拥有用于释放未托管资源的代码时才替代 Finalize()。 58 | 'Protected Overrides Sub Finalize() 59 | ' ' 请勿更改此代码。将清理代码放入以上 Dispose(disposing As Boolean)中。 60 | ' Dispose(False) 61 | ' MyBase.Finalize() 62 | 'End Sub 63 | 64 | ' Visual Basic 添加此代码以正确实现可释放模式。 65 | Public Overloads Sub Dispose() Implements IDisposable.Dispose 66 | ' 请勿更改此代码。将清理代码放入以上 Dispose(disposing As Boolean)中。 67 | Dispose(True) 68 | ' TODO: 如果在以上内容中替代了 Finalize(),则取消注释以下行。 69 | 'GC.SuppressFinalize(Me) 70 | End Sub 71 | #End Region 72 | 73 | #Region "构造函数区" 74 | ''' 75 | ''' 这个无参数的构造函数只应在测试的时候使用 76 | ''' 77 | Sub New() 78 | m_TcpPacketDataBC = New Concurrent.BlockingCollection(Of TcpPacketData)(m_MaxCount) 79 | End Sub 80 | 81 | ''' 82 | ''' 83 | ''' 84 | ''' 用户Id。传进来是为了区分观众或者自己 85 | ''' Up Id。传进来是为了区分Up或者房管 86 | Sub New(ByVal userId As String, ByVal upId As String, ByVal danmuFormatDic As Dictionary(Of String, DanmuFormatEntity.FormatInfo)) 87 | MyBase.New(danmuFormatDic) 88 | 89 | Me.UserId = userId 90 | Me.UpId = upId 91 | 92 | m_TcpPacketDataBC = New Concurrent.BlockingCollection(Of TcpPacketData)(m_MaxCount) 93 | 94 | m_TryParseLoopTask = Task.Run(AddressOf TryParseLoop) 95 | End Sub 96 | #End Region 97 | 98 | #Region "函数区" 99 | Public Sub ParseOpCodeTask(ByRef tcpPacketData As TcpPacketData) 100 | m_TcpPacketDataBC.TryAdd(tcpPacketData) 101 | End Sub 102 | 103 | Private Sub TryParseLoop() 104 | Try 105 | Debug.Print(Logger.MakeDebugString("OpCode解析器启动")) 106 | For Each tcpPacketData In m_TcpPacketDataBC.GetConsumingEnumerable 107 | ParseInternal(tcpPacketData) 108 | Next 109 | Catch ex As OperationCanceledException 110 | Debug.Print(Logger.MakeDebugString("OpCode解析器取消任务")) 111 | Catch ex As ObjectDisposedException 112 | Debug.Print(Logger.MakeDebugString("OpCode解析器取消任务")) 113 | Catch ex As Exception 114 | Logger.WriteLine(ex) 115 | Finally 116 | Debug.Print(Logger.MakeDebugString("OpCode解析器关闭")) 117 | End Try 118 | End Sub 119 | 120 | Private Sub ParseInternal(ByRef tcpPacketData As TcpPacketData) 121 | Select Case tcpPacketData.Header.OpCode 122 | Case OpCode.Cmd 123 | Try 124 | ParseCmd(tcpPacketData.Body, UserId, UpId) 125 | Catch ex As Exception 126 | Logger.WriteLine(ex) 127 | End Try 128 | Case OpCode.HeartBeatFromServer 129 | OnJoinLiveRoomSucceeded(New JoinLiveRoomSucceededEventArgs(CLng(Date.Now.ToTimeStampString(TimePrecision.Second)))) 130 | Case OpCode.HeartBeatToServer 131 | Debug.Print(Logger.MakeDebugString(tcpPacketData.ToString)) 132 | Case OpCode.JoinLiveRoom 133 | OnChatHistoryChanged(New DanmuChangedEventArgs(tcpPacketData.Body)) 134 | Case OpCode.Popularity 135 | OnOnlineChanged(New OnlineChangedEventArgs(CInt(tcpPacketData.Body))) 136 | Case Else 137 | Logger.WriteLine("无法识别信息:" & tcpPacketData.ToString & tcpPacketData.Body) 138 | End Select 139 | End Sub 140 | 141 | ''' 142 | ''' 解析包含Cmd的弹幕信息 143 | ''' 144 | ''' 145 | Protected Friend Overloads Sub ParseCmd(ByRef body As String) 146 | ParseCmd(body, Me.UserId, Me.UpId) 147 | End Sub 148 | 149 | ''' 150 | ''' 非B站协议产生的弹幕事件中转 151 | ''' 152 | ''' 153 | ''' 154 | ''' 155 | Public Overloads Shared Sub TransferDanmuEvent(Of T)(ByVal eventName As String, ByVal EventArgs As T) 156 | DmCmdParser.TransferDanmuEvent(eventName, EventArgs) 157 | End Sub 158 | 159 | #End Region 160 | End Class 161 | -------------------------------------------------------------------------------- /source/Class/DanmuSender/DanmuRepeatOptions.vb: -------------------------------------------------------------------------------- 1 | Public Enum DanmuRepeatOptions 2 | ''' 3 | ''' 阻塞重复弹幕直到下个可发时间点(阻塞期间不影响非重复弹幕) 4 | ''' 5 | Block = 0 6 | ''' 7 | ''' 合并重复弹幕 8 | ''' 9 | Merge 10 | End Enum -------------------------------------------------------------------------------- /source/Class/DanmuSender/DanmuSenderInfo.vb: -------------------------------------------------------------------------------- 1 | Imports 姬娘插件.Events 2 | 3 | Partial Class DanmuSender 4 | Public Class DanmuSenderInfo 5 | Inherits GuardInfo 6 | 7 | Public Property RoomId As String 8 | Public Property Token As String 9 | Public Property JoinedLiveRoomTimestamp As String 10 | Public Property CanSendDanmuType As DanmuType 11 | End Class 12 | 13 | End Class 14 | -------------------------------------------------------------------------------- /source/Class/DanmuSender/DanmuSenderOptionLevel.vb: -------------------------------------------------------------------------------- 1 | Partial Class DanmuSender 2 | 3 | Public Enum DanmuSenderOptionLevel 4 | A 5 | End Enum 6 | 7 | End Class 8 | -------------------------------------------------------------------------------- /source/Class/DanmuSender/DanmuSenderOptionName.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class DanmuSender 3 | 4 | Public Enum DanmuSenderOptionName 5 | ChangeDanmuColor 6 | ChangeDanmuRepeatitiveHandle 7 | UpdateJoinedLiveRoomTimestamp 8 | End Enum 9 | 10 | End Class 11 | -------------------------------------------------------------------------------- /source/Class/DanmuSender/RepeatDanmuInfo.vb: -------------------------------------------------------------------------------- 1 | Imports 姬娘插件.Events 2 | 3 | Partial Class DanmuSender 4 | Private Class RepeatDanmuInfo 5 | Inherits DanmuBase 6 | ''' 7 | ''' 待发送Ticks 8 | ''' 9 | ''' 10 | Public Property SendTicks As Long 11 | ''' 12 | ''' 重复次数 13 | ''' 14 | ''' 15 | Public Property Count As Integer 16 | ''' 17 | ''' 发送状态 18 | ''' 19 | ''' 20 | Public Property SendStatus As SendStatus 21 | End Class 22 | End Class 23 | -------------------------------------------------------------------------------- /source/Class/DanmuSender/SendStatus.vb: -------------------------------------------------------------------------------- 1 | Partial Class DanmuSender 2 | Enum SendStatus 3 | UnKnown 4 | ''' 5 | ''' 处理重复弹幕中 6 | ''' 7 | HandlingRepeat 8 | ''' 9 | ''' 排队中 10 | ''' 11 | Queuing 12 | '''' 13 | '''' 已出队 14 | '''' 15 | 'DeQueued 16 | ''' 17 | ''' 发送中 18 | ''' 19 | Sending 20 | ''' 21 | ''' 已发送 22 | ''' 23 | Sent 24 | End Enum 25 | 26 | End Class 27 | -------------------------------------------------------------------------------- /source/Class/DanmuSender/SentDanmuInfo.vb: -------------------------------------------------------------------------------- 1 | Imports 姬娘插件.Events 2 | 3 | Partial Class DanmuSender 4 | Private Class SentDanmuInfo 5 | Inherits DanmuBase 6 | 7 | Public Property SentTicks As Long 8 | End Class 9 | End Class 10 | -------------------------------------------------------------------------------- /source/Class/Entity/APIPostResponseBaseEntity.vb: -------------------------------------------------------------------------------- 1 | #Disable Warning ide1006 2 | 3 | 4 | Namespace APIPostResponseBaseEntity 5 | Public Class Root 6 | ''' 7 | ''' Code 8 | ''' 9 | Public Property code As Integer 10 | ''' 11 | ''' 12 | ''' 13 | Public Property msg As String 14 | ''' 15 | ''' 16 | ''' 17 | Public Property message As String 18 | 19 | Public Property ttl As Integer? 20 | End Class 21 | End Namespace 22 | #Enable Warning ide1006 -------------------------------------------------------------------------------- /source/Class/Entity/AnchorInRoomEntity.vb: -------------------------------------------------------------------------------- 1 | #Disable Warning ide1006 2 | 3 | Namespace AnchorInRoomEntity 4 | Public Class Official_verify 5 | ''' 6 | ''' Type 7 | ''' 8 | Public Property type() As Integer 9 | ''' 10 | ''' 11 | ''' 12 | Public Property desc() As String 13 | ''' 14 | ''' Role 15 | ''' 16 | Public Property role() As Integer 17 | End Class 18 | 19 | Public Class Info 20 | ''' 21 | ''' Uid 22 | ''' 23 | Public Property uid() As Integer 24 | ''' 25 | ''' 小母猪和她胖头鱼蜀黍 26 | ''' 27 | Public Property uname() As String 28 | ''' 29 | ''' https://i2.hdslb.com/bfs/face/074fe049c7d4bc47e3a6ae89906af5d0246a5ea1.jpg 30 | ''' 31 | Public Property face() As String 32 | ''' 33 | ''' 10000 34 | ''' 35 | Public Property rank() As String 36 | ''' 37 | ''' Identification 38 | ''' 39 | Public Property identification() As Integer 40 | ''' 41 | ''' Mobile_verify 42 | ''' 43 | Public Property mobile_verify() As Integer 44 | ''' 45 | ''' Platform_user_level 46 | ''' 47 | Public Property platform_user_level() As Integer 48 | ''' 49 | ''' Vip_type 50 | ''' 51 | Public Property vip_type() As Integer 52 | ''' 53 | ''' Official_verify 54 | ''' 55 | Public Property official_verify() As Official_verify 56 | End Class 57 | 58 | Public Class Master_level 59 | ''' 60 | ''' Level 61 | ''' 62 | Public Property level() As Integer 63 | ''' 64 | ''' Current 65 | ''' 66 | Public Property current() As List(Of Integer) 67 | ''' 68 | ''' Next 69 | ''' 70 | Public Property [next]() As List(Of Integer) 71 | ''' 72 | ''' Color 73 | ''' 74 | Public Property color() As Integer 75 | ''' 76 | ''' Anchor_score 77 | ''' 78 | Public Property anchor_score() As Integer 79 | ''' 80 | ''' Upgrade_score 81 | ''' 82 | Public Property upgrade_score() As Integer 83 | ''' 84 | ''' Master_level_color 85 | ''' 86 | Public Property master_level_color() As Integer 87 | ''' 88 | ''' >10000 89 | ''' 90 | Public Property sort() As String 91 | End Class 92 | 93 | Public Class Level 94 | ''' 95 | ''' 52155851 96 | ''' 97 | Public Property uid() As String 98 | ''' 99 | ''' 593600 100 | ''' 101 | Public Property cost() As String 102 | ''' 103 | ''' 1851795 104 | ''' 105 | Public Property rcost() As String 106 | ''' 107 | ''' 1385000 108 | ''' 109 | Public Property user_score() As String 110 | ''' 111 | ''' Vip 112 | ''' 113 | Public Property vip() As Integer 114 | ''' 115 | ''' 2018-07-16 03:11:05 116 | ''' 117 | Public Property vip_time() As String 118 | ''' 119 | ''' Svip 120 | ''' 121 | Public Property svip() As Integer 122 | ''' 123 | ''' 0000-00-00 00:00:00 124 | ''' 125 | Public Property svip_time() As String 126 | ''' 127 | ''' 2018-07-21 01:09:25 128 | ''' 129 | Public Property update_time() As String 130 | ''' 131 | ''' Master_level 132 | ''' 133 | Public Property master_level() As Master_level 134 | ''' 135 | ''' User_level 136 | ''' 137 | Public Property user_level() As Integer 138 | ''' 139 | ''' Color 140 | ''' 141 | Public Property color() As Integer 142 | ''' 143 | ''' Anchor_score 144 | ''' 145 | Public Property anchor_score() As Integer 146 | End Class 147 | 148 | Public Class Data 149 | ''' 150 | ''' Info 151 | ''' 152 | Public Property info() As Info 153 | ''' 154 | ''' Level 155 | ''' 156 | Public Property level() As Level 157 | ''' 158 | ''' San 159 | ''' 160 | Public Property san() As Integer 161 | End Class 162 | 163 | Public Class Root 164 | ''' 165 | ''' Code 166 | ''' 167 | Public Property code() As Integer 168 | ''' 169 | ''' success 170 | ''' 171 | Public Property msg() As String 172 | ''' 173 | ''' success 174 | ''' 175 | Public Property message() As String 176 | ''' 177 | ''' Data 178 | ''' 179 | Public Property data() As Data 180 | End Class 181 | End Namespace 182 | #Enable Warning ide1006 -------------------------------------------------------------------------------- /source/Class/Entity/ConfigEntity.vb: -------------------------------------------------------------------------------- 1 |  2 | ''' 3 | ''' 配置 4 | ''' 5 | Public Class ConfigEntity 6 | #Region "属性区" 7 | 'Property UserId As String 8 | ''' 9 | ''' 弹幕服务器连接方式 10 | ''' 11 | ''' 12 | Property ConnectionMode As ConnectMode 13 | ''' 14 | ''' 心跳间隔 15 | ''' 16 | ''' 17 | Property HeartbeatInterval As Integer 18 | ''' 19 | ''' 新消息提示(语音)间隔 20 | ''' 21 | ''' 22 | Property BrokeSilenceInterval As Integer 23 | ''' 24 | ''' 自动签到 25 | ''' 26 | ''' 27 | Property SignAuto As Boolean 28 | ''' 29 | ''' 开机感谢姬 30 | ''' 31 | ''' 32 | Property EnabledThanksHime As Boolean 33 | ''' 34 | ''' 开机关注姬 35 | ''' 36 | ''' 37 | Property EnabledAttentionHime As Boolean 38 | ''' 39 | ''' 开启欢迎姬 40 | ''' 41 | ''' 42 | Property EnabledWelcomeHime As Boolean 43 | ''' 44 | ''' 接受系统小喇叭公告 45 | ''' 46 | ''' 47 | Property EnabledSystemMessageHime As Boolean 48 | ''' 49 | ''' 自动领取双端观看直播奖励 50 | ''' 51 | ''' 52 | Property ReceiveDoubleWatchAwardAuto As Boolean 53 | ''' 54 | ''' 当收到新消息时闪烁窗口(任务栏图标) 55 | ''' 56 | ''' 57 | Property FlashWindowWhileReceiveDanmu As Boolean 58 | ''' 59 | ''' 观众勋章升级时提示 60 | ''' 61 | ''' 62 | Property EnabledMedalUpgradeHime As Boolean 63 | ''' 64 | ''' 显示用过的标题个数,默认值为 0 ,表示显示全部 65 | ''' 66 | ''' 67 | Property DisplayUesdTitleCount As Integer 68 | ''' 69 | ''' 感谢姬 70 | ''' 71 | ''' 72 | Property ThanksHime As ThanksHimeEntity 73 | ''' 74 | ''' 主窗体 75 | ''' 76 | ''' 77 | Property MainForm As MainFormEntity 78 | ''' 79 | ''' 弹幕格式 80 | ''' 81 | ''' 82 | Property DanmuFormat As DanmuFormatEntity 83 | 84 | #End Region 85 | 86 | #Region "构造函数区" 87 | Sub New() 88 | Me.ConnectionMode = ConnectMode.Tcp 89 | Me.HeartbeatInterval = 60 90 | MainForm = New MainFormEntity 91 | ThanksHime = New ThanksHimeEntity 92 | DanmuFormat = New DanmuFormatEntity 93 | End Sub 94 | #End Region 95 | End Class 96 | 97 | -------------------------------------------------------------------------------- /source/Class/Entity/DanmuServerInfoEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace DanmuServerInfoEntity 2 | #Disable Warning IDE1006 ' 命名样式 3 | Public Class Host_server_list 4 | Public Property host As String 5 | Public Property port As Integer 6 | Public Property wss_port As Integer 7 | Public Property ws_port As Integer 8 | End Class 9 | 10 | Public Class Server_list 11 | Public Property host As String 12 | Public Property port As Integer 13 | End Class 14 | 15 | Public Class Data 16 | Public Property refresh_row_factor As Double 17 | Public Property refresh_rate As Integer 18 | Public Property max_delay As Integer 19 | Public Property port As Integer 20 | Public Property host As String 21 | Public Property host_server_list As List(Of Host_server_list) 22 | Public Property server_list As List(Of Server_list) 23 | Public Property token As String 24 | End Class 25 | 26 | Public Class Root 27 | Inherits APIPostResponseBaseEntity.Root 28 | 29 | Public Property data As Data 30 | End Class 31 | #Enable Warning IDE1006 ' 命名样式 32 | End Namespace 33 | 34 | -------------------------------------------------------------------------------- /source/Class/Entity/LiveEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace LiveEntity 2 | #Disable Warning IDE1006 3 | 4 | Public Class List 5 | ''' 6 | ''' 21 7 | ''' 8 | Public Property id() As String 9 | ''' 10 | ''' 1 11 | ''' 12 | Public Property parent_id() As String 13 | ''' 14 | ''' 10 15 | ''' 16 | Public Property old_area_id() As String 17 | ''' 18 | ''' 视频唱见 19 | ''' 20 | Public Property name() As String 21 | ''' 22 | ''' 0 23 | ''' 24 | Public Property act_id() As String 25 | ''' 26 | ''' 1 27 | ''' 28 | Public Property pk_status() As String 29 | ''' 30 | ''' Hot_status 31 | ''' 32 | Public Property hot_status() As Integer 33 | ''' 34 | ''' 0 35 | ''' 36 | Public Property lock_status() As String 37 | ''' 38 | ''' https://i0.hdslb.com/bfs/vc/72b93ddafdf63c9f0b626ad546847a3c03c92b6f.png 39 | ''' 40 | Public Property pic() As String 41 | ''' 42 | ''' shipinchangjian 43 | ''' 44 | Public Property pinyin() As String 45 | ''' 46 | ''' 12 47 | ''' 48 | Public Property cate_id() As String 49 | ''' 50 | ''' 娱乐 51 | ''' 52 | Public Property parent_name() As String 53 | End Class 54 | 55 | Public Class Data 56 | ''' 57 | ''' Id 58 | ''' 59 | Public Property id() As Integer 60 | ''' 61 | ''' 娱乐 62 | ''' 63 | Public Property name() As String 64 | ''' 65 | ''' List 66 | ''' 67 | Public Property list() As List(Of List) 68 | End Class 69 | 70 | Public Class Root 71 | ''' 72 | ''' Code 73 | ''' 74 | Public Property code() As Integer 75 | ''' 76 | ''' success 77 | ''' 78 | Public Property msg() As String 79 | ''' 80 | ''' success 81 | ''' 82 | Public Property message() As String 83 | ''' 84 | ''' Data 85 | ''' 86 | Public Property data() As List(Of Data) 87 | End Class 88 | #Enable Warning IDE1006 89 | End Namespace 90 | 91 | 92 | -------------------------------------------------------------------------------- /source/Class/Entity/LoginUrlEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace LoginUrlEntity 2 | Public Class Data 3 | 4 | ''' 5 | ''' 6 | ''' 7 | ''' 8 | Public Property url As String 9 | 10 | ''' 11 | ''' 12 | ''' 13 | ''' 14 | Public Property oauthKey As String 15 | 16 | End Class 17 | 18 | 19 | 20 | Public Class Root 21 | Inherits APIPostResponseBaseEntity.Root 22 | ''' 23 | ''' 24 | ''' 25 | ''' 26 | Public Property status As String 27 | 28 | ''' 29 | ''' 30 | ''' 31 | ''' 32 | Public Property ts As Integer 33 | 34 | ''' 35 | ''' 36 | ''' 37 | ''' 38 | Public Property data As Data 39 | End Class 40 | End Namespace 41 | 42 | -------------------------------------------------------------------------------- /source/Class/Entity/MainFormEntity.vb: -------------------------------------------------------------------------------- 1 | Public Class MainFormEntity 2 | Private _Location As Point 3 | #Region "属性区" 4 | Property Opacity As Integer 5 | Property Location As Point 6 | Get 7 | ' 处理多个屏幕到一个屏幕转变的情况(横向) 8 | If _Location.X < 0 OrElse 9 | _Location.Y < 0 Then 10 | If Screen.AllScreens.Length = 1 Then 11 | Dim newX = Math.Abs(_Location.X) 12 | Dim newY = Math.Abs(_Location.Y) 13 | EnsureShowInScreen(newX, newY) 14 | _Location = New Point(newX, newY) 15 | Else 16 | EnsureShowInScreen(_Location.X, _Location.Y) 17 | End If 18 | Else 19 | EnsureShowInScreen(_Location.X, _Location.Y) 20 | End If 21 | Return _Location 22 | End Get 23 | Set 24 | _Location = Value 25 | End Set 26 | End Property 27 | 28 | Property Size As Size 29 | Property TopMost As Boolean 30 | #End Region 31 | 32 | #Region "构造函数区" 33 | Sub New() 34 | Opacity = 66 35 | End Sub 36 | #End Region 37 | 38 | #Region "函数区" 39 | Private Sub EnsureShowInScreen(ByRef x As Integer, ByRef y As Integer) 40 | ' 多屏最左上角 41 | Dim minPoint As New Point 42 | ' 多屏最右下角 43 | Dim maxPoint As New Point 44 | For Each scr In Screen.AllScreens 45 | If minPoint.X > scr.WorkingArea.X Then minPoint.X = scr.WorkingArea.X 46 | If minPoint.Y > scr.WorkingArea.Y Then minPoint.Y = scr.WorkingArea.Y 47 | 48 | If maxPoint.X < scr.WorkingArea.Width Then maxPoint.X = scr.WorkingArea.Width 49 | If maxPoint.Y < scr.WorkingArea.Height Then maxPoint.Y = scr.WorkingArea.Height 50 | Next 51 | If x < minPoint.X OrElse x > maxPoint.X Then 52 | x = 0 53 | End If 54 | If y < minPoint.Y OrElse y > maxPoint.Y Then 55 | y = 0 56 | End If 57 | End Sub 58 | #End Region 59 | End Class -------------------------------------------------------------------------------- /source/Class/Entity/ReportReasonEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace ReportReasonEntity 2 | Public Class Data 3 | 4 | ''' 5 | ''' 6 | ''' 7 | ''' 8 | Public Property id As Integer 9 | 10 | ''' 11 | ''' 12 | ''' 13 | ''' 14 | Public Property reason As String 15 | 16 | End Class 17 | 18 | Public Class Root 19 | Inherits APIPostResponseBaseEntity.Root 20 | 21 | ''' 22 | ''' 23 | ''' 24 | ''' 25 | Public Property data As List(Of Data) 26 | 27 | End Class 28 | End Namespace -------------------------------------------------------------------------------- /source/Class/Entity/RoomAdminEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace RoomAdminEntity 2 | Public Class Page 3 | #Disable Warning IDE1006 ' 命名样式 4 | Public Property page As Integer 5 | 6 | Public Property page_size As Integer 7 | Public Property total_page As Integer 8 | Public Property total_count As Integer 9 | End Class 10 | 11 | 12 | Public Class Data 13 | Public Property page As Page 14 | Public Property data As List(Of Detail) 15 | 16 | Public Class Detail 17 | Public Property uid As Integer 18 | Public Property uname As String 19 | Public Property face As String 20 | Public Property ctime As Date 21 | Public Property medal_name As String 22 | Public Property level As Integer 23 | End Class 24 | End Class 25 | 26 | 27 | Public Class Root 28 | Inherits APIPostResponseBaseEntity.Root 29 | Public Property data As Data 30 | End Class 31 | 32 | Public Class DisplayOnDgv 33 | Public Property 用户ID As Integer 34 | Public Property 用户名称 As String 35 | Public Property 任命时间 As Date 36 | 37 | End Class 38 | #Enable Warning IDE1006 ' 命名样式 39 | End Namespace 40 | 41 | -------------------------------------------------------------------------------- /source/Class/Entity/RoomBlackViewerEntity.vb: -------------------------------------------------------------------------------- 1 | #Disable Warning ide1006 2 | Namespace RoomBlackViewerEntity 3 | Public Class Data 4 | ''' 5 | ''' Id 6 | ''' 7 | Public Property id() As Integer 8 | ''' 9 | ''' Roomid 10 | ''' 11 | Public Property roomid() As Integer 12 | ''' 13 | ''' Uid 14 | ''' 15 | Public Property uid() As Integer 16 | ''' 17 | ''' Type 18 | ''' 19 | Public Property type() As Integer 20 | ''' 21 | ''' Adminid 22 | ''' 23 | Public Property adminid() As Integer 24 | ''' 25 | ''' 2018-12-21 22:33:22 26 | ''' 27 | Public Property block_end_time() As String 28 | ''' 29 | ''' 2018-12-21 21:33:22 30 | ''' 31 | Public Property ctime() As String 32 | ''' 33 | ''' 34 | ''' 35 | Public Property msg() As String 36 | ''' 37 | ''' 38 | ''' 39 | Public Property msg_time() As String 40 | ''' 41 | ''' 胖头鱼和他小母猪妹妹 42 | ''' 43 | Public Property uname() As String 44 | ''' 45 | ''' 小母猪和她胖头鱼哥哥 46 | ''' 47 | Public Property admin_uname() As String 48 | End Class 49 | 50 | Public Class Root 51 | Inherits APIPostResponseBaseEntity.Root 52 | ''' 53 | ''' Data 54 | ''' 55 | Public Shadows Property data() As List(Of Data) 56 | End Class 57 | 58 | Public Class DisplayOnDgv 59 | Public Property 黑名单Id As Integer 60 | Public Property 用户名称 As String 61 | Public Property 解禁时间 As Date 62 | 63 | End Class 64 | End Namespace 65 | #Enable Warning ide1006 -------------------------------------------------------------------------------- /source/Class/Entity/RoomShieldInfoEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace RoomShieldInfoEntity 2 | Public Class Shield_user_list 3 | #Disable Warning IDE1006 ' 命名样式 4 | Public Property uid As Integer 5 | Public Property uname As String 6 | End Class 7 | 8 | Public Class Shield_rules 9 | Public Property rank As Integer 10 | Public Property verify As Integer 11 | Public Property level As Integer 12 | End Class 13 | 14 | Public Class Data 15 | Public Property shield_user_list As List(Of Shield_user_list) 16 | Public Property keyword_list As List(Of String) 17 | Public Property shield_rules As Shield_rules 18 | End Class 19 | 20 | Public Class Root 21 | Inherits APIPostResponseBaseEntity.Root 22 | 23 | Public Property data As Data 24 | End Class 25 | #Enable Warning IDE1006 ' 命名样式 26 | End Namespace -------------------------------------------------------------------------------- /source/Class/Entity/RoomSilentInfoEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace RoomSilentInfoEntity 2 | Public Class Data 3 | #Disable Warning IDE1006 ' 命名样式 4 | Public Property type As String 5 | Public Property level As Integer 6 | Public Property second As Integer 7 | End Class 8 | 9 | Public Class Root 10 | Inherits APIPostResponseBaseEntity.Root 11 | Public Property data As Data 12 | End Class 13 | #Enable Warning IDE1006 ' 命名样式 14 | 15 | End Namespace 16 | -------------------------------------------------------------------------------- /source/Class/Entity/ThanksHimeEntity.vb: -------------------------------------------------------------------------------- 1 | Public Class ThanksHimeEntity 2 | #Region "属性区" 3 | Public Property DanmuRepeatitiveHandle As DanmuRepeatOptions 4 | #End Region 5 | 6 | 7 | #Region "构造函数区" 8 | Sub New() 9 | ' 默认用合并模式 10 | Me.DanmuRepeatitiveHandle = DanmuRepeatOptions.Merge 11 | End Sub 12 | #End Region 13 | End Class -------------------------------------------------------------------------------- /source/Class/Entity/UserInfoEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace UserInfoEntity 2 | #Disable Warning IDE1006 ' 命名样式 3 | Public Class Level_info 4 | ''' 5 | ''' 6 | ''' 7 | Public Property current_level() As Integer 8 | End Class 9 | 10 | Public Class Official_verify 11 | ''' 12 | ''' 13 | ''' 14 | Public Property type() As Integer 15 | ''' 16 | ''' 17 | ''' 18 | Public Property desc() As String 19 | ''' 20 | ''' 21 | ''' 22 | Public Property suffix() As String 23 | End Class 24 | 25 | Public Class Vip 26 | ''' 27 | ''' 28 | ''' 29 | Public Property vipType() As Integer 30 | ''' 31 | ''' 32 | ''' 33 | Public Property vipStatus() As Integer 34 | End Class 35 | 36 | Public Class Data 37 | ''' 38 | ''' 39 | ''' 40 | Public Property mid() As Integer 41 | ''' 42 | ''' 43 | ''' 44 | Public Property name() As String 45 | ''' 46 | ''' 保密 47 | ''' 48 | Public Property sex() As String 49 | ''' 50 | ''' 51 | ''' 52 | Public Property rank() As Integer 53 | ''' 54 | ''' 55 | ''' 56 | Public Property face() As String 57 | ''' 58 | ''' 59 | ''' 60 | Public Property regtime() As Integer 61 | ''' 62 | ''' 63 | ''' 64 | Public Property spacesta() As Integer 65 | ''' 66 | ''' 67 | ''' 68 | Public Property birthday() As String 69 | ''' 70 | ''' 71 | ''' 72 | Public Property sign() As String 73 | ''' 74 | ''' 75 | ''' 76 | Public Property level_info() As Level_info 77 | ''' 78 | ''' 79 | ''' 80 | Public Property official_verify() As Official_verify 81 | ''' 82 | ''' 83 | ''' 84 | Public Property vip() As Vip 85 | ''' 86 | ''' 87 | ''' 88 | Public Property toutu() As String 89 | ''' 90 | ''' 91 | ''' 92 | Public Property toutuId() As Integer 93 | ''' 94 | ''' 95 | ''' 96 | Public Property theme() As String 97 | ''' 98 | ''' 99 | ''' 100 | Public Property theme_preview() As String 101 | ''' 102 | ''' 103 | ''' 104 | Public Property coins() As Integer 105 | ''' 106 | ''' 107 | ''' 108 | Public Property im9_sign() As String 109 | ''' 110 | ''' 111 | ''' 112 | Public Property fans_badge() As Boolean 113 | End Class 114 | 115 | Public Class Root 116 | ''' 117 | ''' 118 | ''' 119 | Public Property status() As Boolean 120 | ''' 121 | ''' 122 | ''' 123 | Public Property data() As Data 124 | End Class 125 | #Enable Warning IDE1006 ' 命名样式 126 | 127 | End Namespace 128 | 129 | -------------------------------------------------------------------------------- /source/Class/Entity/ViewerMedalEntity.vb: -------------------------------------------------------------------------------- 1 | Namespace ViewerMedalEntity 2 | Public Class Data 3 | 4 | ''' 5 | ''' 6 | ''' 7 | ''' 8 | Public Property guard_type As Integer 9 | 10 | ''' 11 | ''' 当前等级积累亲密度(升级后清0) 12 | ''' 13 | ''' 14 | Public Property intimacy As Integer 15 | 16 | ''' 17 | ''' 18 | ''' 19 | ''' 20 | Public Property is_receive As Integer 21 | 22 | ''' 23 | ''' 上次佩戴时间戳(10位) 24 | ''' 25 | ''' 26 | Public Property last_wear_time As Long 27 | 28 | ''' 29 | ''' 勋章等级 30 | ''' 31 | ''' 32 | Public Property level As Integer 33 | 34 | ''' 35 | ''' 36 | ''' 37 | ''' 38 | Public Property lpl_status As Integer 39 | 40 | ''' 41 | ''' 42 | ''' 43 | ''' 44 | Public Property master_available As Integer 45 | 46 | ''' 47 | ''' 48 | ''' 49 | ''' 50 | Public Property master_status As Integer 51 | 52 | ''' 53 | ''' 54 | ''' 55 | ''' 56 | Public Property medal_id As Integer 57 | 58 | ''' 59 | ''' 60 | ''' 61 | ''' 62 | Public Property medal_name As String 63 | 64 | ''' 65 | ''' 66 | ''' 67 | ''' 68 | Public Property receive_channel As Integer 69 | 70 | ''' 71 | ''' 72 | ''' 73 | ''' 74 | Public Property receive_time As String 75 | 76 | ''' 77 | ''' 78 | ''' 79 | ''' 80 | Public Property source As Integer 81 | 82 | ''' 83 | ''' 勋章佩戴状态(0取下,1佩戴) 84 | ''' 85 | ''' 86 | Public Property status As Integer 87 | 88 | ''' 89 | ''' 90 | ''' 91 | ''' 92 | Public Property target_id As Integer 93 | 94 | ''' 95 | ''' 当日增长亲密度 96 | ''' 97 | ''' 98 | Public Property today_intimacy As Integer 99 | 100 | ''' 101 | ''' 102 | ''' 103 | ''' 104 | Public Property uid As Integer 105 | 106 | ''' 107 | ''' 两仪滚 108 | ''' 109 | ''' 110 | Public Property target_name As String 111 | 112 | ''' 113 | ''' 114 | ''' 115 | ''' 116 | Public Property target_face As String 117 | 118 | ''' 119 | ''' 120 | ''' 121 | ''' 122 | Public Property live_stream_status As Integer 123 | 124 | ''' 125 | ''' 126 | ''' 127 | ''' 128 | Public Property icon_code As Integer 129 | 130 | ''' 131 | ''' 132 | ''' 133 | ''' 134 | Public Property icon_text As String 135 | 136 | ''' 137 | ''' 138 | ''' 139 | ''' 140 | Public Property rank As String 141 | 142 | ''' 143 | ''' 144 | ''' 145 | ''' 146 | Public Property medal_color As Integer 147 | 148 | ''' 149 | ''' 150 | ''' 151 | ''' 152 | Public Property today_feed As Integer 153 | 154 | ''' 155 | ''' 当日限制(最多)增长亲密度 156 | ''' 157 | ''' 158 | Public Property day_limit As Integer 159 | 160 | ''' 161 | ''' 下一级所需亲密度 162 | ''' 163 | ''' 164 | Public Property next_intimacy As Integer 165 | 166 | ''' 167 | ''' 168 | ''' 169 | ''' 170 | Public Property score As Integer 171 | 172 | End Class 173 | 174 | 175 | Public Class Root 176 | Inherits APIPostResponseBaseEntity.Root 177 | ''' 178 | ''' 179 | ''' 180 | ''' 181 | Public Property data As Data 182 | End Class 183 | End Namespace 184 | -------------------------------------------------------------------------------- /source/Class/Events.vb: -------------------------------------------------------------------------------- 1 | ''' 2 | ''' 各种事件,包括弹幕,送礼,人气等 3 | ''' 4 | Public Class Events 5 | Public Class UserEnsuredEventArgs 6 | Inherits EventArgs 7 | 8 | Public ReadOnly Property MainForm As MainFormEntity 9 | Public ReadOnly Property LoginResult As LoginResult 10 | 11 | Public Sub New(ByVal mainForm As MainFormEntity, ByVal loginResult As LoginResult) 12 | Me.MainForm = mainForm 13 | Me.LoginResult = loginResult 14 | End Sub 15 | End Class 16 | End Class 17 | -------------------------------------------------------------------------------- /source/Class/LiveStreamPusher/LiveStreamPusher.vb: -------------------------------------------------------------------------------- 1 | 'Imports System.Text 2 | 'Imports System.Threading 3 | 'Imports ShanXingTech 4 | 'Imports ShanXingTech.Text2 5 | 'Imports ShanXingTech.Win32API 6 | 7 | 'Public Class LiveStreamPusher 8 | '#Region "事件区" 9 | ' Public Class ClickedEventArgs 10 | ' Inherits EventArgs 11 | 12 | ' ''' 13 | ' ''' 推流结果 14 | ' ''' 15 | ' ''' 16 | ' Public Property Sucess As Boolean 17 | ' ''' 18 | ' ''' 推流结果描述 19 | ' ''' 20 | ' ''' 21 | ' Public Property Message As String 22 | 23 | ' Public Sub New() 24 | ' End Sub 25 | 26 | ' Public Sub New(status As Boolean, message As String) 27 | ' Me.Sucess = status 28 | ' Me.Message = message 29 | ' End Sub 30 | ' End Class 31 | 32 | ' Public Event Clicked As EventHandler(Of ClickedEventArgs) 33 | '#End Region 34 | 35 | '#Region "字段区" 36 | ' Private m_LButtonDown As Integer 37 | ' Private m_LButtonUp As Integer 38 | 39 | 40 | '#End Region 41 | 42 | '#Region "构造函数区" 43 | ' Sub New() 44 | ' m_LButtonDown = -1 45 | ' m_LButtonUp = -1 46 | ' End Sub 47 | '#End Region 48 | 49 | '#Region "函数区" 50 | ' Public Sub Push() 51 | ' Dim lsp As LiveStreamPusherInfo 52 | 53 | 54 | ' Dim pushButtonHwnd = FindPushButton() 55 | ' If IntPtr.Zero = pushButtonHwnd Then 56 | ' Return 57 | ' End If 58 | 59 | ' If Win32API.IsWindowEnabled(pushButtonHwnd) Then 60 | ' ' 有些推流按钮是在控件组中,具体句柄很难查找,按照位置来定位比较容易些 61 | ' ' SendMessage(hwndOfBrowser, WM_MOUSEMOVE, 0, x + (y << 16)) 62 | ' m_LButtonDown = SendMessage(pushButtonHwnd, WM_LBUTTONDOWN, 0, lsp.OffsetLocation.X + (lsp.OffsetLocation.Y << 16)) 63 | ' If -1 = m_LButtonDown Then 64 | ' Return 65 | ' End If 66 | ' m_LButtonUp = SendMessage(pushButtonHwnd, WM_LBUTTONUP, 0, lsp.OffsetLocation.X + (lsp.OffsetLocation.Y << 16)) 67 | ' If -1 = m_LButtonUp Then 68 | ' Return 69 | ' End If 70 | 71 | ' GetPushStatus(lsp, pushButtonHwnd) 72 | ' End If 73 | ' End Sub 74 | 75 | ' Public Function Find(ByVal lsp As LiveStreamPusherInfo) As IntPtr 76 | ' Dim liveStreamPusherHwnd = Win32API.FindWindow(lsp.ClassName, lsp.Title) 77 | ' Dim isEqual = EnsureEqual(liveStreamPusherHwnd, lsp.StartPath) 78 | ' If isEqual Then 79 | ' Return liveStreamPusherHwnd 80 | ' End If 81 | 82 | ' Do 83 | ' liveStreamPusherHwnd = Win32API.FindWindowEx(IntPtr.Zero, liveStreamPusherHwnd, Nothing, Nothing) 84 | ' isEqual = EnsureEqual(liveStreamPusherHwnd, lsp.StartPath) 85 | ' If isEqual Then 86 | ' Exit Do 87 | ' End If 88 | ' Loop Until IntPtr.Zero = liveStreamPusherHwnd 89 | 90 | ' Return If(isEqual, liveStreamPusherHwnd, IntPtr.Zero) 91 | ' End Function 92 | 93 | ' Private Function EnsureEqual(ByVal hwnd As IntPtr, ByVal fileName As String) As Boolean 94 | ' If hwnd <> IntPtr.Zero Then 95 | ' Dim pid = GetWindowThreadProcessId(hwnd, 0) 96 | ' If pid < 0 Then 97 | ' Return False 98 | ' End If 99 | 100 | ' Dim proc = Process.GetProcessById(pid) 101 | ' If proc.MainModule.FileName.IsNullOrEmpty Then 102 | ' Return False 103 | ' End If 104 | 105 | ' If proc.MainModule.FileName <> fileName Then 106 | ' Return False 107 | ' End If 108 | ' End If 109 | 110 | ' Return True 111 | ' End Function 112 | 113 | ' Public Function FindPushButton(ByVal liveStreamPusherHwnd As IntPtr) As IntPtr 114 | ' Dim pushButtonHwnd As IntPtr 115 | ' pushButtonHwnd = Win32API.FindWindowEx(liveStreamPusherHwnd, pushButtonHwnd, Nothing, Nothing) 116 | ' End Function 117 | 118 | ' Private Sub GetPushStatus(ByVal lsp As LiveStreamPusherInfo, ByVal hWnd As IntPtr) 119 | ' Dim message As String = "成功" 120 | ' Dim pushSucess As Boolean 121 | 122 | ' Dim sb = StringBuilderCache.Acquire(255) 123 | ' GetWindowText(hWnd, sb, sb.Capacity * 2) 124 | ' If sb.Length > 0 Then 125 | ' If lsp.Title = StringBuilderCache.GetStringAndReleaseBuilder(sb) Then 126 | ' message = "推流成功" 127 | ' pushSucess = True 128 | ' Else 129 | ' message = "获取推流状态失败" 130 | ' End If 131 | ' Else 132 | ' message = "获取推流状态失败" 133 | ' End If 134 | 135 | ' RaiseEvent Clicked(Nothing, New ClickedEventArgs With { 136 | ' .Sucess = pushSucess, 137 | ' .Message = message 138 | ' }) 139 | ' End Sub 140 | 141 | ' Public Sub StopPush() 142 | 143 | ' End Sub 144 | '#End Region 145 | 'End Class 146 | -------------------------------------------------------------------------------- /source/Class/LiveStreamPusher/LiveStreamPusherInfo.vb: -------------------------------------------------------------------------------- 1 | Public Class LiveStreamPusherInfo 2 | Inherits WindowBase 3 | ''' 4 | ''' 进程名 5 | ''' 6 | ''' 7 | Public Property ProcessName As String 8 | ''' 9 | ''' 启动路径(包含文件名及后缀) 10 | ''' 11 | ''' 12 | Public Property StartPath As String 13 | ''' 14 | ''' 推流按钮 15 | ''' 16 | ''' 17 | Public Property ChildWindow As WindowBase 18 | ''' 19 | ''' 推流按钮的相对位置 20 | ''' 21 | ''' 22 | Public Property OffsetLocation As Point 23 | ' ChildWindowFromPoint ChildWindowFromPointEx WindowFromPoint 24 | End Class 25 | 26 | 27 | -------------------------------------------------------------------------------- /source/Class/LiveStreamPusher/WindowBase.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech.Win32API 2 | 3 | Public MustInherit Class WindowBase 4 | Public ReadOnly Property Hwnd As IntPtr 5 | 6 | ''' 7 | ''' 窗体类名 8 | ''' 9 | ''' 10 | Public ReadOnly Property ClassName As String 11 | ''' 12 | ''' 窗体标题 13 | ''' 14 | ''' 15 | Public ReadOnly Property Title As String 16 | ''' 17 | ''' 窗体是否可用 18 | ''' 19 | ''' 20 | Public ReadOnly Property Enabled As Boolean 21 | Get 22 | Return IsWindowEnabled(Hwnd) 23 | End Get 24 | End Property 25 | End Class -------------------------------------------------------------------------------- /source/Class/RaffleHime.vb: -------------------------------------------------------------------------------- 1 | ''' 2 | ''' 抽奖姬 3 | ''' 4 | Public Class RaffleHime 5 | 6 | End Class 7 | -------------------------------------------------------------------------------- /source/Class/RandomEmoji.vb: -------------------------------------------------------------------------------- 1 | Public Class RandomEmoji 2 | #Region "字段区" 3 | Private Shared ReadOnly m_Angry As String() 4 | Private Shared ReadOnly m_Happy As String() 5 | Private Shared ReadOnly m_Shock As String() 6 | Private Shared ReadOnly m_Sad As String() 7 | Private Shared ReadOnly m_Helpless As String() 8 | Private Shared ReadOnly m_Rand As Random 9 | 10 | #End Region 11 | 12 | #Region "构造函数区" 13 | ''' 14 | ''' 类构造函数 15 | ''' 类之内的任意一个静态方法第一次调用时调用此构造函数 16 | ''' 而且程序生命周期内仅调用一次 17 | ''' 18 | Shared Sub New() 19 | m_Angry = {",,Ծ‸Ծ,,", "(╯‵□′)╯︵┻━┻", "(╬゚д゚)▄︻┻┳═一"} 20 | m_Happy = {"=‿=✧", "●ω●", "(/ ▽ \\)", "(=・ω・=)", "(●'◡'●)ノ♥", "<(▰˘◡˘▰)>", "(⁄ ⁄•⁄ω⁄•⁄ ⁄)", "(ง,,• ᴗ •,,)ง ✧", ">ㅂ<ノ ☆"} 21 | m_Shock = {"Σ( ° △ °|||)︴", "┌( ಠ_ಠ)┘", "(゚Д゚≡゚д゚)!?", "∑(っ °Д °;)っ"} 22 | m_Sad = {">︿<", ">△<", "●︿●", "(´;ω;`)"} 23 | m_Helpless = {"◐▽◑", "ʅ(´◔౪◔)ʃ", "_(:3 」∠)_", "_(┐「ε:)_", "(°▽°)ノ", "←◡←", "_(•̀ᴗ•́ 」∠ ❀)_", "_φ(・ω・` )", "╮( ̄▽ ̄)╭"} 24 | 25 | m_Rand = New Random(Date.Now.Millisecond) 26 | End Sub 27 | #End Region 28 | 29 | #Region "函数区" 30 | ''' 31 | ''' 生气 32 | ''' 33 | ''' 34 | Public Shared Function Angry() As String 35 | Return RandomEmoji(m_Angry) 36 | End Function 37 | 38 | ''' 39 | ''' 开森 40 | ''' 41 | ''' 42 | Public Shared Function Happy() As String 43 | Return RandomEmoji(m_Happy) 44 | End Function 45 | 46 | ''' 47 | ''' 震惊 48 | ''' 49 | ''' 50 | Public Shared Function Shock() As String 51 | Return RandomEmoji(m_Shock) 52 | End Function 53 | 54 | ''' 55 | ''' 桑心 56 | ''' 57 | ''' 58 | Public Shared Function Sad() As String 59 | Return RandomEmoji(m_Sad) 60 | End Function 61 | 62 | ''' 63 | ''' 阔怜无助弱小 64 | ''' 65 | ''' 66 | Public Shared Function Helpless() As String 67 | Return RandomEmoji(m_Helpless) 68 | End Function 69 | 70 | Private Shared Function RandomEmoji(ByRef emojiArray As String()) As String 71 | Return emojiArray(m_Rand.Next(0, emojiArray.Length)) 72 | End Function 73 | #End Region 74 | End Class 75 | -------------------------------------------------------------------------------- /source/Class/Tcp/ParsedEventArgs.vb: -------------------------------------------------------------------------------- 1 | Imports 姬娘插件.Events 2 | 3 | Partial Public NotInheritable Class TcpPacketParser 4 | Public Class ParsedEventArgs 5 | Inherits EventArgs 6 | 7 | Public Sub New(tcpPackets As TcpPacketData) 8 | Me.TcpPacket = tcpPackets 9 | End Sub 10 | 11 | ''' 12 | ''' 解析到的tcp数据包 13 | ''' 14 | ''' 15 | Public ReadOnly Property TcpPacket As TcpPacketData 16 | End Class 17 | End Class 18 | -------------------------------------------------------------------------------- /source/Class/Tcp/TcpEvents.vb: -------------------------------------------------------------------------------- 1 | Partial Class TcpListener 2 | ''' 3 | ''' 发送心跳包完成事件 4 | ''' 5 | Public Class HeartBeatSendCompletedEventArgs 6 | Inherits EventArgs 7 | 8 | Public Sub New(connectMode As ConnectMode) 9 | Me.ConnectMode = connectMode 10 | End Sub 11 | 12 | Public ReadOnly Property ConnectMode As ConnectMode 13 | End Class 14 | 15 | ''' 16 | ''' 接收到TCP包数据事件 17 | ''' 18 | Public Class ReceiveChangedEventArgs 19 | Inherits EventArgs 20 | 21 | Public Sub New(data() As Byte) 22 | Me.Data = data 23 | End Sub 24 | 25 | ''' 26 | ''' 接收到的数据 27 | ''' 28 | ''' 29 | Public ReadOnly Property Data As Byte() 30 | End Class 31 | End Class 32 | -------------------------------------------------------------------------------- /source/Control/FansInfoEditControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Control/FansInfoEditControl.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel 2 | Imports System.Text 3 | Imports System.Text.RegularExpressions 4 | Imports ShanXingTech 5 | Imports ShanXingTech.IO2.Database 6 | Imports ShanXingTech.Net2 7 | 8 | Public Class FansInfoEditControl 9 | #Region "枚举" 10 | Enum EditMode 11 | 12 | 13 | Add 14 | 15 | Modify 16 | End Enum 17 | #End Region 18 | 19 | #Region "属性区" 20 | Private m_Mode As EditMode 21 | ''' 22 | ''' 编辑模式 23 | ''' 24 | ''' 25 | Public ReadOnly Property Mode As EditMode 26 | Get 27 | Return m_Mode 28 | End Get 29 | End Property 30 | 31 | Public Property OldRemark As String 32 | 33 | #End Region 34 | 35 | Sub New(ByVal editMode As EditMode) 36 | 37 | ' 此调用是设计器所必需的。 38 | InitializeComponent() 39 | 40 | ' 在 InitializeComponent() 调用之后添加任何初始化。 41 | txtRemark.MaxLength = 40 42 | dtpAttentionTime.Format = DateTimePickerFormat.Custom 43 | dtpAttentionTime.CustomFormat = "yyyy-MM-dd HH:mm:ss" 44 | 45 | Me.m_Mode = editMode 46 | InitControl(m_Mode) 47 | End Sub 48 | 49 | 50 | #Region "函数区" 51 | 52 | #End Region 53 | ''' 54 | ''' 55 | ''' 56 | ''' 57 | Public Sub InitControl(ByVal editMode As EditMode) 58 | Dim enabledEdit = (EditMode.Add = editMode) 59 | 60 | txtId.ReadOnly = Not enabledEdit 61 | txtId.BackColor = If(enabledEdit, SystemColors.Window, SystemColors.Control) 62 | ' 昵称无论怎样都不能自己编辑 63 | txtNick.ReadOnly = True 64 | txtNick.BackColor = SystemColors.Control 65 | OldRemark = txtRemark.Text.Trim 66 | dtpAttentionTime.Enabled = True 67 | txtRemark.ReadOnly = False 68 | txtRemark.BackColor = SystemColors.Window 69 | 70 | If m_Mode <> editMode Then 71 | m_Mode = editMode 72 | End If 73 | End Sub 74 | 75 | Private Sub FansInfoModifyControl_Load(sender As Object, e As EventArgs) Handles MyBase.Load 76 | 77 | End Sub 78 | 79 | Private Sub btnNew_Click(sender As Object, e As EventArgs) Handles btnNew.Click 80 | InitControl(EditMode.Add) 81 | txtId.Text = String.Empty 82 | txtNick.Text = String.Empty 83 | dtpAttentionTime.Value = Date.Now 84 | txtRemark.Text = String.Empty 85 | 86 | txtId.Focus() 87 | End Sub 88 | 89 | Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click 90 | Dim checkRst = EnsureCanStroe() 91 | If Not checkRst.Yes Then Return 92 | 93 | Try 94 | SQLiteHelper.ExecuteNonQuery(checkRst.StroeSql) 95 | lblTips.Text = "已保存" 96 | lblTips.Visible = True 97 | Catch ex As Exception 98 | Logger.WriteLine(ex) 99 | End Try 100 | End Sub 101 | 102 | Private Function EnsureCanStroe() As (Yes As Boolean, StroeSql As String) 103 | Dim funcRst = (False, String.Empty) 104 | 105 | 106 | Dim remarkNick = txtRemark.Text.Trim 107 | If remarkNick.Length = 0 Then 108 | Windows2.DrawTipsTask(Me, "你是耍流氓嘛???还没有输入备注呢!~", 1000, False, False) 109 | Return funcRst 110 | End If 111 | 112 | If OldRemark.Length > 0 AndAlso OldRemark = remarkNick Then 113 | Windows2.DrawTipsTask(Me, "新备注与旧备注一致,无需更改!~", 1000, False, False) 114 | Return funcRst 115 | End If 116 | 117 | Dim userId = txtId.Text.Trim 118 | If Not Regex.IsMatch(userId, "\d+", RegexOptions.Compiled) Then 119 | Windows2.DrawTipsTask(Me, "用户ID格式不对头,应该全为数字" & RandomEmoji.Angry, 1000, False, False) 120 | Return funcRst 121 | End If 122 | 123 | 124 | Dim sql = $"INSERT 125 | OR REPLACE INTO Fans ( 126 | UserId, 127 | OriginalNick, 128 | RemarkNick, 129 | AttentTimestamp 130 | ) 131 | VALUES 132 | ( 133 | {userId}, 134 | '{txtNick.Text}', 135 | '{remarkNick}', 136 | {dtpAttentionTime.Value.ToTimeStampString(TimePrecision.Second)} 137 | );" 138 | 139 | Return (True, sql) 140 | End Function 141 | 142 | Private Async Sub txtId_LeaveAsync(sender As Object, e As EventArgs) Handles txtId.Leave 143 | Dim userId = txtId.Text.Trim 144 | If EditMode.Add = m_Mode AndAlso userId.Length > 0 Then 145 | Dim sql = "select userId from Fans where userId = " & userId 146 | Dim tempUserId = SQLiteHelper.GetFirst(sql) 147 | If Not tempUserId Is Nothing Then 148 | lblTips.Text = "已存在该粉丝信息" 149 | lblTips.Visible = True 150 | txtId.Focus() 151 | Else 152 | lblTips.Visible = False 153 | 154 | ' 获取粉丝的昵称并显示 155 | If txtNick.Text.Length = 0 Then txtNick.Text = Await DanmuEntry.GetFansNickAsync(userId) 156 | End If 157 | End If 158 | End Sub 159 | 160 | 161 | End Class 162 | -------------------------------------------------------------------------------- /source/Control/FunctionTestControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Control/PagerControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Control/RankingListControl.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class RankingListControl 3 | Inherits System.Windows.Forms.UserControl 4 | 5 | 'UserControl 重写释放以清理组件列表。 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | _ 24 | Private Sub InitializeComponent() 25 | Me.SuspendLayout() 26 | ' 27 | 'RankingListControl 28 | ' 29 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 30 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 31 | Me.Name = "RankingListControl" 32 | Me.Size = New System.Drawing.Size(428, 330) 33 | Me.ResumeLayout(False) 34 | 35 | End Sub 36 | 37 | End Class 38 | -------------------------------------------------------------------------------- /source/Control/RankingListControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Control/RankingListControl.vb: -------------------------------------------------------------------------------- 1 | Public Class RankingListControl 2 | 3 | End Class 4 | -------------------------------------------------------------------------------- /source/EnumDefine/ConnectMode.vb: -------------------------------------------------------------------------------- 1 | Public Enum ConnectMode 2 | Tcp 3 | Wss 4 | Ws 5 | End Enum -------------------------------------------------------------------------------- /source/EnumDefine/CookieSource.vb: -------------------------------------------------------------------------------- 1 | Public Enum CookieSource 2 | ''' 3 | ''' 软件内部维护状态 4 | ''' 5 | Internal 6 | ''' 7 | ''' webbrowser源 8 | ''' 9 | IE 10 | ''' 11 | ''' 数据库源 12 | ''' 13 | DB 14 | End Enum -------------------------------------------------------------------------------- /source/EnumDefine/LoginResult.vb: -------------------------------------------------------------------------------- 1 | Public Enum LoginResult 2 | ''' 3 | ''' 只获取到用户名(我先瞅瞅) 4 | ''' 5 | UserOnly 6 | ''' 7 | ''' 登录成功 8 | ''' 9 | Yes 10 | ''' 11 | ''' 登录失败 12 | ''' 13 | No 14 | ''' 15 | ''' 游客 16 | ''' 17 | NotLogin 18 | ''' 19 | ''' 登录取消 20 | ''' 21 | Cancel 22 | End Enum 23 | -------------------------------------------------------------------------------- /source/EnumDefine/UserRole.vb: -------------------------------------------------------------------------------- 1 | Imports System.ComponentModel 2 | ''' 3 | ''' 用户角色 4 | ''' 5 | Public Enum UserRole 6 | ''' 7 | ''' 未知 8 | ''' 9 | 10 | UnKwon 11 | ''' 12 | ''' 观众(登录) 13 | ''' 14 | 15 | Viewer 16 | ''' 17 | ''' 主播 18 | ''' 19 | 20 | Uper 21 | ''' 22 | ''' 游客(未登录) 23 | ''' 24 | 25 | Visitor 26 | End Enum -------------------------------------------------------------------------------- /source/Form/DanmuControl/BlackViewerControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/DanmuControlFunctionTest.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech 2 | Imports 姬娘插件.Events 3 | 4 | Partial Class DanmuControl 5 | #Region "测试区" 6 | Private Sub btnSendTest_Click(sender As Object, e As EventArgs) Handles btnSendTest.Click 7 | 'Dim rand As New Random(Date.Now.Millisecond) 8 | 'Dim inputDanmu = cmbDanmuInput.Text 9 | '' 没有输入弹幕时直接返回 10 | 'If inputDanmu.Length = 0 Then Return 11 | 'SendDanmuBegin(DanmuSource.Input) 12 | 'For i = 1 To 4 13 | ' DanmuEntry.SendDanmu(New DanmuInfo With {.Context = inputDanmu, .Source = DanmuSource.Internal, .Count = rand.Next(1, 11)}) 14 | ' Windows2.RandDelay(68, 2000, TimePrecision.Millisecond) 15 | 'Next 16 | 'Return 17 | 'Windows2.Delay(2000) 18 | 'For i = 1 To 3 19 | ' m_DanmuSender.Add(New DanmuInfo With {.Context = inputDanmu, .Source = DanmuSource.Input, .Count = 1}) 20 | 'Next 21 | 22 | 'MergeTest(cmbDanmuInput.Text) 23 | 'MixMergeTest() 24 | 'Dim isOnBottom = ((m_WebScroll.OffsetRectangle.Height + m_WebScroll.ScrollTop) = m_WebScroll.ScrollRectangle.Height) 25 | 'Debug.Print(Logger.MakeDebugString("在底部 " & isOnBottom.ToStringOfCulture)) 26 | 27 | ShowUserNickClickMenu() 28 | End Sub 29 | 30 | ' 此类仅仅是测试功能的实现性,而不是测试代码覆盖率等 31 | Public Sub SendDanmuByEventsForTest(ByRef danmu As DanmuInfo) 32 | If Not m_DanmuSender.CanSend Then Return 33 | 34 | m_DanmuSender.Add(danmu) 35 | End Sub 36 | 37 | Public Sub MergeTest(ByVal inputDanmu As String) 38 | Debug.Print(Logger.MakeDebugString("测试开始")) 39 | 40 | Dim rand As New Random(Date.Now.Millisecond) 41 | ' 没有输入弹幕时直接返回 42 | If inputDanmu.Length = 0 Then Return 43 | For i = 1 To 4 44 | SendDanmuByEventsForTest(New DanmuInfo With {.Context = inputDanmu, .Source = DanmuSource.Internal, .Count = rand.Next(1, 11)}) 45 | Windows2.RandDelay(68, 2000, TimePrecision.Millisecond) 46 | Next 47 | End Sub 48 | 49 | Public Sub MixMergeTest() 50 | Debug.Print(Logger.MakeDebugString("测试开始")) 51 | 52 | Dim rand As New Random(Date.Now.Millisecond) 53 | Dim fixedDanmu = "test" & Date.Now.Ticks.ToStringOfCulture 54 | Dim inputDanmu = String.Empty 55 | 56 | Task.Run( 57 | Sub() 58 | Dim cts As New Threading.CancellationTokenSource 59 | Dim ct = cts.Token 60 | ' 测试持续30秒到60秒 61 | cts.CancelAfter(rand.Next(CInt(1000 * 60 * 0.5), 1000 * 60 * 1)) 62 | While True 63 | If cts.IsCancellationRequested Then Exit While 64 | ' 使固定弹幕的出现几率多一点 65 | inputDanmu = If(rand.Next(0, 2) = 1, fixedDanmu, 66 | If(rand.Next(0, 2) = 1, fixedDanmu, "test" & Date.Now.Ticks.ToStringOfCulture)) 67 | 68 | SendDanmuByEventsForTest(New DanmuInfo With {.Context = inputDanmu, .Source = DanmuSource.Internal, .Count = rand.Next(1, 11)}) 69 | Windows2.RandDelay(68, 2000, TimePrecision.Millisecond) 70 | End While 71 | End Sub) 72 | End Sub 73 | 74 | #End Region 75 | End Class 76 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/FrmDanmuColor.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech 2 | 3 | Public Class FrmDanmuColor 4 | #Region "字段区" 5 | Private m_LastRadioButton As RadioButton 6 | Private m_DanmuColorDec As Integer 7 | #End Region 8 | 9 | Sub New(ByVal danmuColorDec As Integer) 10 | 11 | ' 此调用是设计器所必需的。 12 | InitializeComponent() 13 | 14 | ' 在 InitializeComponent() 调用之后添加任何初始化。 15 | m_DanmuColorDec = danmuColorDec 16 | 17 | Me.SuspendLayout() 18 | Me.Panel1.SuspendLayout() 19 | 20 | lblCenterLine.Visible = False 21 | 22 | ' 可改为从 (旧版)https://api.live.bilibili.com/api/ajaxGetConfig 处自动获取,自动创建rdbtn,自动设置颜色 23 | ' 新版 https://api.live.bilibili.com/userext/v1/DanmuConf/getConfig?roomid=4236342 24 | rdbtnBlack.ForeColor = Color.FromArgb(0, 0, 0) 25 | rdbtnRed.ForeColor = Color.FromArgb(255, 104, 104) 26 | rdbtnBlue.ForeColor = Color.FromArgb(102, 204, 255) 27 | rdbtnPurple.ForeColor = Color.FromArgb(227, 63, 255) 28 | rdbtnCyan.ForeColor = Color.FromArgb(0, 255, 252) 29 | rdbtnGreen.ForeColor = Color.FromArgb(126, 255, 0) 30 | rdbtnYellow.ForeColor = Color.FromArgb(255, 237, 79) 31 | rdbtnOrange.ForeColor = Color.FromArgb(255, 152, 0) 32 | rdbtnPink.ForeColor = Color.FromArgb(255, 115, 154) 33 | 34 | ' 初始化弹幕颜色RadioButton样式 35 | For Each ctrl As Control In Me.Panel1.Controls 36 | Dim rdbtn = TryCast(ctrl, RadioButton) 37 | If rdbtn Is Nothing Then Continue For 38 | 39 | rdbtn.AutoSize = True 40 | rdbtn.FlatStyle = FlatStyle.Flat 41 | If danmuColorDec = ParseColorRgbValue(rdbtn.ForeColor).Dec Then 42 | rdbtn.Checked = True 43 | m_LastRadioButton = rdbtn 44 | End If 45 | Next 46 | 47 | Me.Panel1.ResumeLayout() 48 | Me.ResumeLayout() 49 | End Sub 50 | 51 | Private Function ParseColorRgbValue(ByVal color As Color) As (Hex As String, Dec As Integer) 52 | Dim colorRgbHexValue = color.R.ToString("x02") & color.G.ToString("x02") & color.B.ToString("x02") 53 | ' 因为白色的选中状态下很难看出来是已经选中,所以改成黑色 54 | ' 因此 当用户选择黑色时,当做是 白色处理 55 | If "000000" = colorRgbHexValue Then 56 | colorRgbHexValue = "ffffff" 57 | End If 58 | 59 | Return (colorRgbHexValue, CInt(colorRgbHexValue.Insert(0, "&h"))) 60 | End Function 61 | 62 | Private Sub lblAchievement_MouseMove(sender As Object, e As MouseEventArgs) Handles lblAchievement.MouseMove 63 | lblAchievement.Cursor = Cursors.Hand 64 | End Sub 65 | 66 | Private Sub lblAchievement_MouseLeave(sender As Object, e As EventArgs) Handles lblAchievement.MouseLeave 67 | lblAchievement.Cursor = Cursors.Default 68 | End Sub 69 | 70 | Private Sub lblAchievement_Click(sender As Object, e As EventArgs) Handles lblAchievement.Click 71 | Process.Start("http://link.bilibili.com/p/center/index#/user-center/achievement/achievement-normal") 72 | End Sub 73 | 74 | Private Sub RadioButton_MouseMove(sender As Object, e As MouseEventArgs) Handles rdbtnCyan.MouseMove, rdbtnPink.MouseMove, rdbtnOrange.MouseMove, rdbtnYellow.MouseMove, rdbtnGreen.MouseMove, rdbtnPurple.MouseMove, rdbtnBlue.MouseMove, rdbtnRed.MouseMove, rdbtnBlack.MouseMove 75 | Dim rdbtn = DirectCast(sender, RadioButton) 76 | If rdbtn IsNot Nothing Then 77 | rdbtn.Font = New Font(rdbtn.Font.Name, 15.0F) 78 | Dim centerPointY = lblCenterLine.Location.Y - rdbtn.Height \ 2 79 | rdbtn.Location = New Point(rdbtn.Location.X, centerPointY) 80 | rdbtn.Cursor = Cursors.Hand 81 | 82 | Dim tips = ToolTip1.GetToolTip(rdbtn) 83 | If tips.Length > 0 Then Return 84 | 85 | tips = rdbtn.Name.Substring(NameOf(rdbtn).Length) 86 | Dim displayPoint = New Point(0, rdbtn.Cursor.Size.Height) 87 | ToolTip1.Show(tips, rdbtn, displayPoint) 88 | End If 89 | End Sub 90 | 91 | Private Sub RadioButton_MouseLeave(sender As Object, e As EventArgs) Handles rdbtnCyan.MouseLeave, rdbtnPink.MouseLeave, rdbtnOrange.MouseLeave, rdbtnYellow.MouseLeave, rdbtnGreen.MouseLeave, rdbtnPurple.MouseLeave, rdbtnBlue.MouseLeave, rdbtnRed.MouseLeave, rdbtnBlack.MouseLeave 92 | Dim rdbtn = DirectCast(sender, RadioButton) 93 | If rdbtn IsNot Nothing Then 94 | rdbtn.Font = New Font(rdbtn.Font.OriginalFontName, 12.0F) 95 | Dim centerPointY = lblCenterLine.Location.Y - rdbtn.Height \ 2 96 | rdbtn.Location = New Point(rdbtn.Location.X, centerPointY) 97 | rdbtn.Cursor = Cursors.Default 98 | 99 | ToolTip1.RemoveAll() 100 | End If 101 | End Sub 102 | 103 | Private Async Sub RadioButton_ClickAsync(sender As Object, e As EventArgs) Handles rdbtnYellow.Click, rdbtnRed.Click, rdbtnPurple.Click, rdbtnPink.Click, rdbtnOrange.Click, rdbtnGreen.Click, rdbtnCyan.Click, rdbtnBlue.Click, rdbtnBlack.Click 104 | Dim rdbtn = DirectCast(sender, RadioButton) 105 | If rdbtn IsNot Nothing Then 106 | Dim colorRgb = ParseColorRgbValue(rdbtn.ForeColor) 107 | 108 | If m_DanmuColorDec = colorRgb.Dec Then 109 | ' 一样的话不需要再更改 110 | 'Windows2.DrawTipsTask(Me, rdbtn.Text & " 设置成功" & RandomEmoji.Happy, 2000, True, False) 111 | Else 112 | Dim changeRst = Await DanmuSender.ChangeDanmuColorAsync(colorRgb.Dec) 113 | Windows2.DrawTipsTask(Me, If(changeRst.Success, changeRst.Message.Replace("~", RandomEmoji.Happy), changeRst.Message & RandomEmoji.Shock), 2000, changeRst.Success, False) 114 | If changeRst.Success Then 115 | m_LastRadioButton = rdbtn 116 | m_DanmuColorDec = colorRgb.Dec 117 | Else 118 | ' 设置为上一个选中的 119 | m_LastRadioButton.Checked = True 120 | End If 121 | End If 122 | End If 123 | End Sub 124 | End Class -------------------------------------------------------------------------------- /source/Form/DanmuControl/FrmReportReason.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/FrmReportReason.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech 2 | 3 | Public Class FrmReportReason 4 | Private m_ReportReason As BilibiliApi.ReportReason 5 | 6 | Public ReadOnly Property ReportReason As BilibiliApi.ReportReason 7 | Get 8 | Return m_ReportReason 9 | End Get 10 | End Property 11 | 12 | ''' 13 | ''' 14 | ''' 15 | ''' 观众昵称 16 | ''' 观众弹幕 17 | Public Sub New(ByVal viewerNick As String, ByVal viewerDanmu As String) 18 | 19 | ' 此调用是设计器所必需的。 20 | InitializeComponent() 21 | 22 | ' 在 InitializeComponent() 调用之后添加任何初始化。 23 | cmbReportReason.DropDownStyle = ComboBoxStyle.DropDownList 24 | m_ReportReason = BilibiliApi.ReportReason.无 25 | lblViewerNick.Text = viewerNick 26 | lblViewerDanmu.Text = viewerDanmu 27 | End Sub 28 | 29 | Private Sub lblOK_Click(sender As Object, e As EventArgs) Handles lblOK.Click, lblCancel.Click 30 | Dim lbl = DirectCast(sender, Label) 31 | If lbl Is Nothing Then Return 32 | 33 | Select Case lbl.Name 34 | Case lblOK.Name 35 | Dim reasonValue = cmbReportReason.Text 36 | If reasonValue.Length = 0 Then Return 37 | 38 | If [Enum].TryParse(reasonValue, m_ReportReason) Then 39 | Me.Close() 40 | End If 41 | Case lblCancel.Name 42 | Me.Close() 43 | End Select 44 | End Sub 45 | 46 | Private Sub cmbReportReason_KeyUp(sender As Object, e As KeyEventArgs) Handles cmbReportReason.KeyUp 47 | If e.KeyCode = Keys.Enter Then 48 | lblOK_Click(lblOK, New EventArgs) 49 | End If 50 | End Sub 51 | 52 | Private Async Sub cmbReportReason_Click(sender As Object, e As EventArgs) Handles cmbReportReason.Click 53 | If cmbReportReason.Items.Count > 0 Then Return 54 | 55 | Try 56 | Dim rst = Await BilibiliApi.GetRoomReportDanmuReasonAsync 57 | If Not rst.Success Then 58 | Common.ShowOperateResultTask(Me, rst.Success, "获取举报弹幕理由失败" & RandomEmoji.Sad) 59 | Return 60 | End If 61 | 62 | Dim root = MSJsSerializer.Deserialize(Of ReportReasonEntity.Root)(rst.Message) 63 | If root Is Nothing Then 64 | Common.ShowOperateResultTask(Me, rst.Success, "获取举报弹幕理由失败" & RandomEmoji.Sad) 65 | Return 66 | End If 67 | 68 | For Each item In root.data 69 | cmbReportReason.Items.Add(item.reason) 70 | Next 71 | Catch ex As Exception 72 | Logger.WriteLine(ex) 73 | End Try 74 | End Sub 75 | 76 | Private Sub lblOK_MouseMove(sender As Object, e As MouseEventArgs) Handles lblOK.MouseMove, lblCancel.MouseMove 77 | Me.Cursor = Cursors.Hand 78 | Dim lbl = DirectCast(sender, Label) 79 | If lbl Is Nothing Then Return 80 | 81 | lbl.ForeColor = SystemColors.Highlight 82 | End Sub 83 | 84 | Private Sub lblOK_MouseLeave(sender As Object, e As EventArgs) Handles lblOK.MouseLeave, lblCancel.MouseLeave 85 | Me.Cursor = DefaultCursor 86 | 87 | Dim lbl = DirectCast(sender, Label) 88 | If lbl Is Nothing Then Return 89 | 90 | lbl.ForeColor = SystemColors.ControlText 91 | End Sub 92 | End Class -------------------------------------------------------------------------------- /source/Form/DanmuControl/FrmRoomViewerManage.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class FrmRoomViewerManage 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form 重写 Dispose,以清理组件列表。 6 | 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmRoomViewerManage)) 26 | Me.tlpManageTab = New System.Windows.Forms.TableLayoutPanel() 27 | Me.tlpControlContainer = New System.Windows.Forms.TableLayoutPanel() 28 | Me.SuspendLayout() 29 | ' 30 | 'tlpManageTab 31 | ' 32 | Me.tlpManageTab.ColumnCount = 1 33 | Me.tlpManageTab.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 27.53623!)) 34 | Me.tlpManageTab.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 72.46377!)) 35 | Me.tlpManageTab.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 97.0!)) 36 | Me.tlpManageTab.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 115.0!)) 37 | Me.tlpManageTab.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) 38 | Me.tlpManageTab.Location = New System.Drawing.Point(12, 12) 39 | Me.tlpManageTab.Name = "tlpManageTab" 40 | Me.tlpManageTab.RowCount = 1 41 | Me.tlpManageTab.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) 42 | Me.tlpManageTab.Size = New System.Drawing.Size(524, 25) 43 | Me.tlpManageTab.TabIndex = 3 44 | ' 45 | 'tlpControlContainer 46 | ' 47 | Me.tlpControlContainer.BackColor = System.Drawing.SystemColors.Control 48 | Me.tlpControlContainer.ColumnCount = 1 49 | Me.tlpControlContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 27.53623!)) 50 | Me.tlpControlContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 72.46377!)) 51 | Me.tlpControlContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 97.0!)) 52 | Me.tlpControlContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 115.0!)) 53 | Me.tlpControlContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) 54 | Me.tlpControlContainer.Location = New System.Drawing.Point(12, 43) 55 | Me.tlpControlContainer.Name = "tlpControlContainer" 56 | Me.tlpControlContainer.RowCount = 1 57 | Me.tlpControlContainer.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) 58 | Me.tlpControlContainer.Size = New System.Drawing.Size(524, 491) 59 | Me.tlpControlContainer.TabIndex = 4 60 | ' 61 | 'FrmRoomViewerManage 62 | ' 63 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 64 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 65 | Me.ClientSize = New System.Drawing.Size(548, 546) 66 | Me.Controls.Add(Me.tlpControlContainer) 67 | Me.Controls.Add(Me.tlpManageTab) 68 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 69 | Me.Name = "FrmRoomViewerManage" 70 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 71 | Me.ResumeLayout(False) 72 | 73 | End Sub 74 | Friend WithEvents tlpManageTab As TableLayoutPanel 75 | Friend WithEvents tlpControlContainer As TableLayoutPanel 76 | End Class 77 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/FrmYanText.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class FrmYanText 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form 重写 Dispose,以清理组件列表。 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | _ 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmYanText)) 26 | Me.flpYanTextContainer = New System.Windows.Forms.FlowLayoutPanel() 27 | Me.SuspendLayout() 28 | ' 29 | 'flpYanTextContainer 30 | ' 31 | Me.flpYanTextContainer.BackColor = System.Drawing.SystemColors.Control 32 | Me.flpYanTextContainer.Location = New System.Drawing.Point(12, 12) 33 | Me.flpYanTextContainer.Name = "flpYanTextContainer" 34 | Me.flpYanTextContainer.Size = New System.Drawing.Size(280, 281) 35 | Me.flpYanTextContainer.TabIndex = 1 36 | ' 37 | 'FrmYanText 38 | ' 39 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 40 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 41 | Me.ClientSize = New System.Drawing.Size(304, 306) 42 | Me.Controls.Add(Me.flpYanTextContainer) 43 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None 44 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 45 | Me.Name = "FrmYanText" 46 | Me.Text = "颜文字面板" 47 | Me.ResumeLayout(False) 48 | 49 | End Sub 50 | Friend WithEvents flpYanTextContainer As FlowLayoutPanel 51 | End Class 52 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/FrmYanText.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech 2 | 3 | Public Class FrmYanText 4 | #Region "属性区" 5 | Private m_SelectYanText As String 6 | ''' 7 | ''' 当前选中的颜文字 8 | ''' 9 | ''' 10 | Public ReadOnly Property SelectYanText() As String 11 | Get 12 | Return m_SelectYanText 13 | End Get 14 | End Property 15 | #End Region 16 | 17 | #Region "常量区" 18 | Private Const YanTextFile = ".\res\YanText.txt" 19 | #End Region 20 | 21 | 22 | Public Sub New() 23 | 24 | ' 此调用是设计器所必需的。 25 | InitializeComponent() 26 | 27 | ' 在 InitializeComponent() 调用之后添加任何初始化。 28 | If IO.File.Exists(YanTextFile) Then 29 | Dim yanText = IO2.Reader.ReadFile(YanTextFile, System.Text.Encoding.UTF8) 30 | If yanText.IsNullOrEmpty Then Return 31 | 32 | 'Me.SuspendLayout() 33 | 34 | flpYanTextContainer.Anchor = AnchorStyles.Top Or AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right 35 | flpYanTextContainer.AutoSize = True 36 | 37 | Me.AutoSize = True 38 | Me.DoubleBuffered = True 39 | 40 | ShowYanText(yanText) 41 | 42 | 'Me.ResumeLayout(False) 43 | 'Me.PerformLayout() 44 | Else 45 | Dim label = New Label With { 46 | .Text = "资源文件不存在:" & IO.Path.GetFullPath(YanTextFile), 47 | .AutoSize = True, 48 | .Margin = New Padding(3, 3, 3, 8), 49 | .ForeColor = Color.Red 50 | } 51 | flpYanTextContainer.Controls.Add(label) 52 | End If 53 | End Sub 54 | 55 | Private Sub ShowYanText(ByVal yanText As String) 56 | Dim yanTextArr = yanText.Split({Environment.NewLine, vbCr, vbLf, vbCrLf}, StringSplitOptions.RemoveEmptyEntries) 57 | For Each yt In yanTextArr 58 | Dim label = New Label With { 59 | .Text = yt, 60 | .AutoSize = True, 61 | .Margin = New Padding(3, 3, 3, 8) 62 | } 63 | 64 | flpYanTextContainer.Controls.Add(label) 65 | AddHandler label.MouseMove, Sub(sender2, e2) 66 | label.ForeColor = Color.White 67 | label.BackColor = Color.Pink 68 | label.Cursor = Cursors.Hand 69 | End Sub 70 | RemoveHandler label.MouseMove, New MouseEventHandler(Sub() 71 | End Sub) 72 | AddHandler label.MouseLeave, Sub(sender2, e2) 73 | label.ForeColor = Color.Black 74 | label.BackColor = Color.Transparent 75 | label.Cursor = Cursors.Default 76 | End Sub 77 | RemoveHandler label.MouseLeave, New EventHandler(Sub() 78 | End Sub) 79 | 80 | AddHandler label.Click, Sub(sender2, e2) 81 | m_SelectYanText = label.Text 82 | Me.Visible = False 83 | Me.TopMost = False 84 | End Sub 85 | RemoveHandler label.Click, New EventHandler(Sub() 86 | End Sub) 87 | Next 88 | End Sub 89 | 90 | Private Sub FrmYanText_Load(sender As Object, e As EventArgs) Handles MyBase.Load 91 | m_SelectYanText = String.Empty 92 | End Sub 93 | End Class -------------------------------------------------------------------------------- /source/Form/DanmuControl/IViewerManageBaseControl.vb: -------------------------------------------------------------------------------- 1 | Public Interface IViewerManageBase 2 | ''' 3 | ''' 操作列,可根据需要定义,比如 删除/撤销等 4 | ''' 5 | ''' 6 | Property OperateColumn As DataGridViewButtonColumn 7 | ''' 8 | ''' 加载数据 9 | ''' 10 | ''' 11 | Function LoadDataAsync() As Task 12 | ''' 13 | ''' 重新加载数据 14 | ''' 15 | Sub ReLoadDataTask() 16 | ''' 17 | ''' 生成操作列 18 | ''' 19 | ''' 20 | ''' 21 | Sub MakeOperateColumn(ByVal cellValue As Object, ByVal displayIndex As Integer) 22 | End Interface 23 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/RoomAdminControl.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class RoomAdminControl 3 | 'Inherits System.Windows.Forms.UserControl 4 | 5 | 'UserControl 重写释放以清理组件列表。 6 | 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | 24 | Private Sub InitializeComponent() 25 | Me.txtUidOrUname = New System.Windows.Forms.TextBox() 26 | Me.btnAppoint = New System.Windows.Forms.Button() 27 | Me.dgvUserList = New System.Windows.Forms.DataGridView() 28 | Me.lblAdminCount = New System.Windows.Forms.Label() 29 | CType(Me.dgvUserList, System.ComponentModel.ISupportInitialize).BeginInit() 30 | Me.SuspendLayout() 31 | ' 32 | 'txtUidOrUname 33 | ' 34 | Me.txtUidOrUname.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ 35 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 36 | Me.txtUidOrUname.Location = New System.Drawing.Point(0, 0) 37 | Me.txtUidOrUname.Margin = New System.Windows.Forms.Padding(0, 0, 3, 3) 38 | Me.txtUidOrUname.Name = "txtUidOrUname" 39 | Me.txtUidOrUname.Size = New System.Drawing.Size(326, 21) 40 | Me.txtUidOrUname.TabIndex = 1 41 | ' 42 | 'btnAppoint 43 | ' 44 | Me.btnAppoint.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 45 | Me.btnAppoint.Location = New System.Drawing.Point(333, 0) 46 | Me.btnAppoint.Margin = New System.Windows.Forms.Padding(3, 0, 0, 0) 47 | Me.btnAppoint.Name = "btnAppoint" 48 | Me.btnAppoint.Size = New System.Drawing.Size(75, 23) 49 | Me.btnAppoint.TabIndex = 0 50 | Me.btnAppoint.Text = "任命" 51 | Me.btnAppoint.UseVisualStyleBackColor = True 52 | ' 53 | 'dgvUserList 54 | ' 55 | Me.dgvUserList.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ 56 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 57 | Me.dgvUserList.BackgroundColor = System.Drawing.SystemColors.Window 58 | Me.dgvUserList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize 59 | Me.dgvUserList.Location = New System.Drawing.Point(0, 39) 60 | Me.dgvUserList.Margin = New System.Windows.Forms.Padding(0, 3, 0, 0) 61 | Me.dgvUserList.Name = "dgvUserList" 62 | Me.dgvUserList.RowTemplate.Height = 23 63 | Me.dgvUserList.Size = New System.Drawing.Size(407, 181) 64 | Me.dgvUserList.TabIndex = 3 65 | ' 66 | 'lblAdminCount 67 | ' 68 | Me.lblAdminCount.AutoSize = True 69 | Me.lblAdminCount.ForeColor = System.Drawing.SystemColors.Highlight 70 | Me.lblAdminCount.Location = New System.Drawing.Point(-2, 24) 71 | Me.lblAdminCount.Name = "lblAdminCount" 72 | Me.lblAdminCount.Size = New System.Drawing.Size(107, 12) 73 | Me.lblAdminCount.TabIndex = 6 74 | Me.lblAdminCount.Text = "当前房管数:0/100" 75 | ' 76 | 'RoomAdminControl 77 | ' 78 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 79 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 80 | Me.Controls.Add(Me.lblAdminCount) 81 | Me.Controls.Add(Me.dgvUserList) 82 | Me.Controls.Add(Me.btnAppoint) 83 | Me.Controls.Add(Me.txtUidOrUname) 84 | Me.Name = "RoomAdminControl" 85 | Me.Size = New System.Drawing.Size(407, 220) 86 | CType(Me.dgvUserList, System.ComponentModel.ISupportInitialize).EndInit() 87 | Me.ResumeLayout(False) 88 | Me.PerformLayout() 89 | 90 | End Sub 91 | 92 | Friend WithEvents txtUidOrUname As TextBox 93 | Friend WithEvents btnAppoint As Button 94 | Friend WithEvents dgvUserList As DataGridView 95 | Friend WithEvents lblAdminCount As Label 96 | End Class 97 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/RoomAdminControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/UserControlTestForm.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class UserControlTestForm 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form 重写 Dispose,以清理组件列表。 6 | 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | 24 | Private Sub InitializeComponent() 25 | Me.SuspendLayout() 26 | ' 27 | 'UserControlTestForm 28 | ' 29 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 30 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 31 | Me.ClientSize = New System.Drawing.Size(800, 450) 32 | Me.Name = "UserControlTestForm" 33 | Me.Text = "UserControlTestForm" 34 | Me.ResumeLayout(False) 35 | 36 | End Sub 37 | End Class 38 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/UserControlTestForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/UserControlTestForm.vb: -------------------------------------------------------------------------------- 1 | Public Class UserControlTestForm 2 | 'Dim ctrl As New RoomSilentControl2(True, True) 3 | Dim ctrl2 As New BlackViewerControl(True, True) 4 | 5 | Private Sub UserControlTestForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load 6 | 'Me.Controls.Add(ctrl) 7 | Me.Controls.Add(ctrl2) 8 | 9 | End Sub 10 | End Class -------------------------------------------------------------------------------- /source/Form/DanmuControl/ViewerManageBaseControl.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class ViewerManageBaseControl 3 | Inherits System.Windows.Forms.UserControl 4 | 5 | 'UserControl 重写释放以清理组件列表。 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | _ 24 | Private Sub InitializeComponent() 25 | components = New System.ComponentModel.Container() 26 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 27 | End Sub 28 | 29 | End Class 30 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/ViewerManageBaseControl.vb: -------------------------------------------------------------------------------- 1 | Imports ShanXingTech 2 | Imports 姬娘 3 | 4 | ''' 5 | ''' 观众管理控件基类。注:所有派生的控件如果设计时不可预览,请先生成成功一次项目,然后关闭已打开的控件设计页面,再重新打开即可。 6 | ''' 7 | Public Class ViewerManageBaseControl 8 | Implements IViewerManageBase 9 | 10 | ' Build之后才能正常在UI中使用 11 | #Region "属性区" 12 | ''' 13 | ''' 操作列,可根据需要定义,比如 删除/撤销等 14 | ''' 15 | ''' 16 | Public Property OperateColumn As DataGridViewButtonColumn Implements IViewerManageBase.OperateColumn 17 | #End Region 18 | 19 | #Region "函数区" 20 | Sub New() 21 | 22 | ' 此调用是设计器所必需的。 23 | InitializeComponent() 24 | 25 | ' 在 InitializeComponent() 调用之后添加任何初始化。 26 | 27 | End Sub 28 | 29 | '''' 30 | '''' 加载数据,基类会在 Me.Load 事件中自动调用,请在派生类中重写此函数 31 | '''' 32 | '''' 33 | Public Overridable Function LoadDataAsync() As Task Implements IViewerManageBase.LoadDataAsync 34 | Return Nothing 35 | End Function 36 | 37 | ''' 38 | ''' 重新加载数据,内部调用 39 | ''' 40 | Public Sub ReLoadDataTask() Implements IViewerManageBase.ReLoadDataTask 41 | #Disable Warning BC42358 ' 在调用完成之前,会继续执行当前方法,原因是此调用不处于等待状态 42 | LoadDataAsync() 43 | #Enable Warning BC42358 ' 在调用完成之前,会继续执行当前方法,原因是此调用不处于等待状态 44 | End Sub 45 | 46 | Private Sub ViewerManageBaseControl_Load(sender As Object, e As EventArgs) Handles Me.Load 47 | #Disable Warning BC42358 ' 在调用完成之前,会继续执行当前方法,原因是此调用不处于等待状态 48 | LoadDataAsync() 49 | #Enable Warning BC42358 ' 在调用完成之前,会继续执行当前方法,原因是此调用不处于等待状态 50 | End Sub 51 | 52 | ''' 53 | ''' 生成操作列 54 | ''' 55 | ''' 单元格值 56 | ''' 显示位置 57 | Public Sub MakeOperateColumn(ByVal cellValue As Object, ByVal displayIndex As Integer) Implements IViewerManageBase.MakeOperateColumn 58 | If OperateColumn Is Nothing Then 59 | OperateColumn = New DataGridViewButtonColumn() 60 | Dim DataGridViewCellStyle1 As DataGridViewCellStyle = New DataGridViewCellStyle() With { 61 | .Alignment = DataGridViewContentAlignment.MiddleCenter, 62 | .NullValue = cellValue 63 | } 64 | OperateColumn.DefaultCellStyle = DataGridViewCellStyle1 65 | OperateColumn.HeaderText = "操作" 66 | OperateColumn.Name = "操作" 67 | End If 68 | 69 | ' 必须每次都设置显示的列索引 70 | OperateColumn.DisplayIndex = displayIndex 71 | End Sub 72 | #End Region 73 | End Class 74 | -------------------------------------------------------------------------------- /source/Form/DanmuControl/ViewerRemarkControl.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class ViewerRemarkControl 3 | 'Inherits System.Windows.Forms.UserControl 4 | 5 | 'UserControl 重写释放以清理组件列表。 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | _ 24 | Private Sub InitializeComponent() 25 | Me.txtViewerIdOrViewerName = New System.Windows.Forms.TextBox() 26 | Me.btnOK = New System.Windows.Forms.Button() 27 | Me.txtRemark = New System.Windows.Forms.TextBox() 28 | Me.dgvUserList = New System.Windows.Forms.DataGridView() 29 | CType(Me.dgvUserList, System.ComponentModel.ISupportInitialize).BeginInit() 30 | Me.SuspendLayout() 31 | ' 32 | 'txtViewerIdOrViewerName 33 | ' 34 | Me.txtViewerIdOrViewerName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ 35 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 36 | Me.txtViewerIdOrViewerName.Location = New System.Drawing.Point(0, 0) 37 | Me.txtViewerIdOrViewerName.Margin = New System.Windows.Forms.Padding(0, 0, 3, 0) 38 | Me.txtViewerIdOrViewerName.Name = "txtViewerIdOrViewerName" 39 | Me.txtViewerIdOrViewerName.Size = New System.Drawing.Size(160, 21) 40 | Me.txtViewerIdOrViewerName.TabIndex = 0 41 | ' 42 | 'btnOK 43 | ' 44 | Me.btnOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 45 | Me.btnOK.Location = New System.Drawing.Point(333, 0) 46 | Me.btnOK.Margin = New System.Windows.Forms.Padding(3, 0, 0, 0) 47 | Me.btnOK.Name = "btnOK" 48 | Me.btnOK.Size = New System.Drawing.Size(75, 23) 49 | Me.btnOK.TabIndex = 2 50 | Me.btnOK.Text = "保存" 51 | Me.btnOK.UseVisualStyleBackColor = True 52 | ' 53 | 'txtRemark 54 | ' 55 | Me.txtRemark.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 56 | Me.txtRemark.Location = New System.Drawing.Point(166, 0) 57 | Me.txtRemark.Margin = New System.Windows.Forms.Padding(3, 0, 3, 0) 58 | Me.txtRemark.Name = "txtRemark" 59 | Me.txtRemark.Size = New System.Drawing.Size(160, 21) 60 | Me.txtRemark.TabIndex = 1 61 | ' 62 | 'dgvUserList 63 | ' 64 | Me.dgvUserList.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ 65 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 66 | Me.dgvUserList.BackgroundColor = System.Drawing.SystemColors.Window 67 | Me.dgvUserList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize 68 | Me.dgvUserList.Location = New System.Drawing.Point(0, 27) 69 | Me.dgvUserList.Margin = New System.Windows.Forms.Padding(0, 3, 0, 0) 70 | Me.dgvUserList.Name = "dgvUserList" 71 | Me.dgvUserList.RowTemplate.Height = 23 72 | Me.dgvUserList.Size = New System.Drawing.Size(407, 184) 73 | Me.dgvUserList.TabIndex = 3 74 | ' 75 | 'ViewerRemarkControl 76 | ' 77 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 78 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 79 | Me.BackColor = System.Drawing.SystemColors.Control 80 | Me.Controls.Add(Me.dgvUserList) 81 | Me.Controls.Add(Me.txtRemark) 82 | Me.Controls.Add(Me.btnOK) 83 | Me.Controls.Add(Me.txtViewerIdOrViewerName) 84 | Me.Name = "ViewerRemarkControl" 85 | Me.Size = New System.Drawing.Size(407, 211) 86 | CType(Me.dgvUserList, System.ComponentModel.ISupportInitialize).EndInit() 87 | Me.ResumeLayout(False) 88 | Me.PerformLayout() 89 | 90 | End Sub 91 | 92 | Friend WithEvents txtViewerIdOrViewerName As TextBox 93 | Friend WithEvents btnOK As Button 94 | Friend WithEvents txtRemark As TextBox 95 | Friend WithEvents dgvUserList As DataGridView 96 | End Class 97 | -------------------------------------------------------------------------------- /source/Form/FrmFansManage.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class FrmFansManage 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form 重写 Dispose,以清理组件列表。 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | _ 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmFansManage)) 26 | Me.lblDgv1TotalRow = New System.Windows.Forms.Label() 27 | Me.lblTotal = New System.Windows.Forms.Label() 28 | Me.dgvInfo1 = New System.Windows.Forms.DataGridView() 29 | Me.Button1 = New System.Windows.Forms.Button() 30 | Me.gbxEditMoudle = New System.Windows.Forms.GroupBox() 31 | CType(Me.dgvInfo1, System.ComponentModel.ISupportInitialize).BeginInit() 32 | Me.SuspendLayout() 33 | ' 34 | 'lblDgv1TotalRow 35 | ' 36 | Me.lblDgv1TotalRow.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) 37 | Me.lblDgv1TotalRow.AutoSize = True 38 | Me.lblDgv1TotalRow.ForeColor = System.Drawing.SystemColors.Highlight 39 | Me.lblDgv1TotalRow.Location = New System.Drawing.Point(68, 305) 40 | Me.lblDgv1TotalRow.Margin = New System.Windows.Forms.Padding(3, 0, 0, 0) 41 | Me.lblDgv1TotalRow.Name = "lblDgv1TotalRow" 42 | Me.lblDgv1TotalRow.Size = New System.Drawing.Size(11, 12) 43 | Me.lblDgv1TotalRow.TabIndex = 33 44 | Me.lblDgv1TotalRow.Text = "0" 45 | ' 46 | 'lblTotal 47 | ' 48 | Me.lblTotal.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) 49 | Me.lblTotal.AutoSize = True 50 | Me.lblTotal.Location = New System.Drawing.Point(7, 305) 51 | Me.lblTotal.Margin = New System.Windows.Forms.Padding(3, 0, 0, 0) 52 | Me.lblTotal.Name = "lblTotal" 53 | Me.lblTotal.Size = New System.Drawing.Size(65, 12) 54 | Me.lblTotal.TabIndex = 32 55 | Me.lblTotal.Text = "共有数据:" 56 | ' 57 | 'dgvInfo1 58 | ' 59 | Me.dgvInfo1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ 60 | Or System.Windows.Forms.AnchorStyles.Left) _ 61 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 62 | Me.dgvInfo1.BackgroundColor = System.Drawing.SystemColors.Window 63 | Me.dgvInfo1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D 64 | Me.dgvInfo1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize 65 | Me.dgvInfo1.Location = New System.Drawing.Point(9, 130) 66 | Me.dgvInfo1.Name = "dgvInfo1" 67 | Me.dgvInfo1.RowTemplate.Height = 23 68 | Me.dgvInfo1.Size = New System.Drawing.Size(635, 172) 69 | Me.dgvInfo1.TabIndex = 31 70 | ' 71 | 'Button1 72 | ' 73 | Me.Button1.Location = New System.Drawing.Point(546, 336) 74 | Me.Button1.Name = "Button1" 75 | Me.Button1.Size = New System.Drawing.Size(75, 23) 76 | Me.Button1.TabIndex = 34 77 | Me.Button1.Text = "Button1" 78 | Me.Button1.UseVisualStyleBackColor = True 79 | ' 80 | 'gbxEditMoudle 81 | ' 82 | Me.gbxEditMoudle.BackColor = System.Drawing.SystemColors.Control 83 | Me.gbxEditMoudle.Location = New System.Drawing.Point(9, 0) 84 | Me.gbxEditMoudle.Margin = New System.Windows.Forms.Padding(0) 85 | Me.gbxEditMoudle.Name = "gbxEditMoudle" 86 | Me.gbxEditMoudle.Size = New System.Drawing.Size(200, 100) 87 | Me.gbxEditMoudle.TabIndex = 35 88 | Me.gbxEditMoudle.TabStop = False 89 | ' 90 | 'FrmFansManage 91 | ' 92 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 93 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 94 | Me.ClientSize = New System.Drawing.Size(652, 450) 95 | Me.Controls.Add(Me.gbxEditMoudle) 96 | Me.Controls.Add(Me.Button1) 97 | Me.Controls.Add(Me.lblDgv1TotalRow) 98 | Me.Controls.Add(Me.lblTotal) 99 | Me.Controls.Add(Me.dgvInfo1) 100 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 101 | Me.Name = "FrmFansManage" 102 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 103 | Me.Text = "粉丝备注管理" 104 | CType(Me.dgvInfo1, System.ComponentModel.ISupportInitialize).EndInit() 105 | Me.ResumeLayout(False) 106 | Me.PerformLayout() 107 | 108 | End Sub 109 | 110 | Friend WithEvents lblDgv1TotalRow As Label 111 | Friend WithEvents lblTotal As Label 112 | Friend WithEvents dgvInfo1 As DataGridView 113 | Friend WithEvents Button1 As Button 114 | Friend WithEvents gbxEditMoudle As GroupBox 115 | End Class 116 | -------------------------------------------------------------------------------- /source/Form/FrmFansManage.vb: -------------------------------------------------------------------------------- 1 |  2 | Imports ShanXingTech 3 | Imports ShanXingTech.IO2.Database 4 | 5 | Public Class FrmFansManage 6 | #Region "字段区" 7 | Private m_FansInfoEditControl As FansInfoEditControl 8 | Private m_Tabel As DataTable 9 | 10 | #End Region 11 | 12 | Sub New() 13 | 14 | ' 此调用是设计器所必需的。 15 | InitializeComponent() 16 | 17 | ' 在 InitializeComponent() 调用之后添加任何初始化。 18 | 19 | If m_FansInfoEditControl Is Nothing Then 20 | m_FansInfoEditControl = New FansInfoEditControl(FansInfoEditControl.EditMode.Modify) 21 | gbxEditMoudle.Controls.Add(m_FansInfoEditControl) 22 | End If 23 | 24 | gbxEditMoudle.Size = New Size(m_FansInfoEditControl.Size.Width + m_FansInfoEditControl.Padding.Left * 2, m_FansInfoEditControl.Size.Height + m_FansInfoEditControl.Padding.Top * 4) 25 | m_FansInfoEditControl.Location = New Point(m_FansInfoEditControl.Margin.Left, m_FansInfoEditControl.Padding.Top * 3) 26 | 27 | dgvInfo1.Size = New Size(gbxEditMoudle.Width, Me.ClientRectangle.Height - gbxEditMoudle.Bottom - lblTotal.Height * 2) 28 | dgvInfo1.Location = New Point(gbxEditMoudle.Location.X, gbxEditMoudle.Location.Y + gbxEditMoudle.Height + gbxEditMoudle.Padding.Bottom * 2) 29 | 30 | lblTotal.Location = New Point(gbxEditMoudle.Location.X, dgvInfo1.Location.Y + dgvInfo1.Height + dgvInfo1.Margin.Bottom) 31 | lblDgv1TotalRow.Location = New Point(lblTotal.Location.X + lblTotal.Size.Width, dgvInfo1.Location.Y + dgvInfo1.Height + dgvInfo1.Margin.Bottom) 32 | 33 | m_Tabel = New DataTable 34 | End Sub 35 | 36 | Private Async Sub FrmFansManage_LoadAsync(sender As Object, e As EventArgs) Handles MyBase.Load 37 | SQLiteHelper.Init("C:\ProgramData\ShanXingTech\姬娘\DanmuHime.db") 38 | 39 | Dim sql = "select UserId as ID, OriginalNick as 昵称, RemarkNick as 备注, AttentTimestamp as 关注时间 from Fans order by AttentTimestamp desc limit 0,10" 40 | m_Tabel = Await SQLiteHelper.GetDataTableAsync(sql, True, "序号") 41 | dgvInfo1.DataSource = m_Tabel 42 | End Sub 43 | 44 | #Region "dgv操作区" 45 | Private Sub dgvInfo1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvInfo1.CellClick 46 | ' 选中一整行 47 | If e.RowIndex <> -1 Then 48 | EnsureLock(FansInfoEditControl.EditMode.Modify) 49 | ShowInfo() 50 | End If 51 | End Sub 52 | 53 | Private Sub ShowInfo() 54 | m_FansInfoEditControl.txtId.Text = dgvInfo1.CurrentRow.Cells("ID").Value.ToString 55 | m_FansInfoEditControl.txtNick.Text = dgvInfo1.CurrentRow.Cells("昵称").Value.ToString 56 | Dim attentTimestamp = If(DBNull.Value.Equals(dgvInfo1.CurrentRow.Cells("关注时间").Value), 57 | 0, CInt(dgvInfo1.CurrentRow.Cells("关注时间").Value)) 58 | m_FansInfoEditControl.dtpAttentionTime.Value = attentTimestamp.ToTimeStampTime 59 | m_FansInfoEditControl.txtRemark.Text = dgvInfo1.CurrentRow.Cells("备注").Value.ToString 60 | End Sub 61 | 62 | Private Sub EnsureLock(ByVal editMode As FansInfoEditControl.EditMode) 63 | m_FansInfoEditControl.InitControl(editMode) 64 | End Sub 65 | 66 | Private Sub dgvInfo1_DataBindingComplete(sender As Object, e As DataGridViewBindingCompleteEventArgs) Handles dgvInfo1.DataBindingComplete 67 | dgvInfo1.AdjustDgv() 68 | End Sub 69 | 70 | 71 | Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 72 | Dim frm As New Form With { 73 | .AutoSize = True, 74 | .StartPosition = FormStartPosition.CenterScreen, 75 | .Text = "粉丝备注管理", 76 | .FormBorderStyle = FormBorderStyle.FixedSingle, 77 | .MaximizeBox = False, 78 | .MinimizeBox = False, 79 | .Icon = Me.Icon 80 | } 81 | Dim a As New FansInfoEditControl(FansInfoEditControl.EditMode.Add) 82 | 83 | frm.Size = New Size(a.Size.Width + a.Padding.Left * 2, a.Size.Height + a.Padding.Top * 4) 84 | frm.Controls.Add(a) 85 | frm.ShowDialog() 86 | End Sub 87 | 88 | 89 | #End Region 90 | 91 | End Class -------------------------------------------------------------------------------- /source/Form/FrmMain.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class FrmMain 3 | Inherits System.Windows.Forms.Form 4 | 5 | ''Form 重写 Dispose,以清理组件列表。 6 | ' _ 7 | 'Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | ' Try 9 | ' If disposing AndAlso components IsNot Nothing Then 10 | ' components.Dispose() 11 | ' End If 12 | ' Finally 13 | ' MyBase.Dispose(disposing) 14 | ' End Try 15 | 'End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | 24 | Private Sub InitializeComponent() 25 | Me.components = New System.ComponentModel.Container() 26 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmMain)) 27 | Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) 28 | Me.TabControl1 = New System.Windows.Forms.TabControl() 29 | Me.tpLiveRoom = New System.Windows.Forms.TabPage() 30 | Me.tpSetting = New System.Windows.Forms.TabPage() 31 | Me.TabControl1.SuspendLayout() 32 | Me.SuspendLayout() 33 | ' 34 | 'TabControl1 35 | ' 36 | Me.TabControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ 37 | Or System.Windows.Forms.AnchorStyles.Left) _ 38 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 39 | Me.TabControl1.Controls.Add(Me.tpLiveRoom) 40 | Me.TabControl1.Controls.Add(Me.tpSetting) 41 | Me.TabControl1.Location = New System.Drawing.Point(-2, -1) 42 | Me.TabControl1.Name = "TabControl1" 43 | Me.TabControl1.SelectedIndex = 0 44 | Me.TabControl1.Size = New System.Drawing.Size(372, 498) 45 | Me.TabControl1.TabIndex = 19 46 | ' 47 | 'tpLiveRoom 48 | ' 49 | Me.tpLiveRoom.BackColor = System.Drawing.SystemColors.Control 50 | Me.tpLiveRoom.ForeColor = System.Drawing.SystemColors.ControlText 51 | Me.tpLiveRoom.Location = New System.Drawing.Point(4, 22) 52 | Me.tpLiveRoom.Margin = New System.Windows.Forms.Padding(0) 53 | Me.tpLiveRoom.Name = "tpLiveRoom" 54 | Me.tpLiveRoom.Padding = New System.Windows.Forms.Padding(3, 2, 3, 3) 55 | Me.tpLiveRoom.Size = New System.Drawing.Size(364, 472) 56 | Me.tpLiveRoom.TabIndex = 0 57 | Me.tpLiveRoom.Text = "直播间" 58 | ' 59 | 'tpSetting 60 | ' 61 | Me.tpSetting.BackColor = System.Drawing.SystemColors.Control 62 | Me.tpSetting.Location = New System.Drawing.Point(4, 22) 63 | Me.tpSetting.Name = "tpSetting" 64 | Me.tpSetting.Padding = New System.Windows.Forms.Padding(3) 65 | Me.tpSetting.Size = New System.Drawing.Size(364, 472) 66 | Me.tpSetting.TabIndex = 3 67 | Me.tpSetting.Text = "配置" 68 | ' 69 | 'FrmMain 70 | ' 71 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 72 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 73 | Me.BackColor = System.Drawing.SystemColors.Control 74 | Me.ClientSize = New System.Drawing.Size(367, 496) 75 | Me.Controls.Add(Me.TabControl1) 76 | Me.DoubleBuffered = True 77 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 78 | Me.Name = "FrmMain" 79 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 80 | Me.Text = "FrmMain" 81 | Me.TabControl1.ResumeLayout(False) 82 | Me.ResumeLayout(False) 83 | 84 | End Sub 85 | Friend WithEvents ToolTip1 As ToolTip 86 | Friend WithEvents TabControl1 As TabControl 87 | Friend WithEvents tpLiveRoom As TabPage 88 | Friend WithEvents tpSetting As TabPage 89 | End Class 90 | -------------------------------------------------------------------------------- /source/Form/FrmPluginManage.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class FrmPluginManage 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Required by the Windows Form Designer 18 | Private components As System.ComponentModel.IContainer 19 | 20 | 'NOTE: The following procedure is required by the Windows Form Designer 21 | 'It can be modified using the Windows Form Designer. 22 | 'Do not modify it using the code editor. 23 | _ 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmPluginManage)) 26 | Me.dgvInfo1 = New System.Windows.Forms.DataGridView() 27 | CType(Me.dgvInfo1, System.ComponentModel.ISupportInitialize).BeginInit() 28 | Me.SuspendLayout() 29 | ' 30 | 'dgvInfo1 31 | ' 32 | Me.dgvInfo1.BackgroundColor = System.Drawing.SystemColors.Window 33 | Me.dgvInfo1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D 34 | Me.dgvInfo1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize 35 | Me.dgvInfo1.Dock = System.Windows.Forms.DockStyle.Fill 36 | Me.dgvInfo1.Location = New System.Drawing.Point(0, 0) 37 | Me.dgvInfo1.Name = "dgvInfo1" 38 | Me.dgvInfo1.RowTemplate.Height = 23 39 | Me.dgvInfo1.Size = New System.Drawing.Size(646, 318) 40 | Me.dgvInfo1.TabIndex = 32 41 | ' 42 | 'FrmPluginManage 43 | ' 44 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 45 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 46 | Me.ClientSize = New System.Drawing.Size(646, 318) 47 | Me.Controls.Add(Me.dgvInfo1) 48 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 49 | Me.Name = "FrmPluginManage" 50 | Me.Text = "插件中心" 51 | CType(Me.dgvInfo1, System.ComponentModel.ISupportInitialize).EndInit() 52 | Me.ResumeLayout(False) 53 | 54 | End Sub 55 | 56 | Friend WithEvents dgvInfo1 As DataGridView 57 | End Class 58 | -------------------------------------------------------------------------------- /source/Form/FrmPluginManage.vb: -------------------------------------------------------------------------------- 1 | Public Class FrmPluginManage 2 | 3 | #Region "字段区" 4 | Private m_Tabel As DataTable 5 | #End Region 6 | 7 | #Region "构造函数" 8 | Public Sub New() 9 | 10 | ' This call is required by the designer. 11 | InitializeComponent() 12 | 13 | ' Add any initialization after the InitializeComponent() call. 14 | Me.StartPosition = FormStartPosition.CenterScreen 15 | End Sub 16 | #End Region 17 | 18 | #Region "函数区" 19 | Private Sub FrmRoomViewerManage_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing 20 | ' 非软件退出时只隐藏,不关闭窗体以便重用 21 | If e.CloseReason = CloseReason.UserClosing Then 22 | Me.Hide() 23 | e.Cancel = True 24 | End If 25 | End Sub 26 | 27 | Private Sub FrmPluginManage_Load(sender As Object, e As EventArgs) Handles MyBase.Load 28 | dgvInfo1.DataSource = m_Tabel 29 | End Sub 30 | #End Region 31 | 32 | End Class -------------------------------------------------------------------------------- /source/Form/FrmSelectArea.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class FrmSelectArea 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form 重写 Dispose,以清理组件列表。 6 | 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmSelectArea)) 26 | Me.lblLiveArea = New System.Windows.Forms.Label() 27 | Me.flpChooseAreaContainer = New System.Windows.Forms.FlowLayoutPanel() 28 | Me.flpChildAreaContainer = New System.Windows.Forms.FlowLayoutPanel() 29 | Me.txtSearchAreaQuickly = New System.Windows.Forms.TextBox() 30 | Me.tlpParentAreaContainer = New System.Windows.Forms.TableLayoutPanel() 31 | Me.SuspendLayout() 32 | ' 33 | 'lblLiveArea 34 | ' 35 | Me.lblLiveArea.AutoSize = True 36 | Me.lblLiveArea.Font = New System.Drawing.Font("新宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 37 | Me.lblLiveArea.ForeColor = System.Drawing.SystemColors.Highlight 38 | Me.lblLiveArea.Location = New System.Drawing.Point(12, 15) 39 | Me.lblLiveArea.Margin = New System.Windows.Forms.Padding(3, 6, 3, 6) 40 | Me.lblLiveArea.Name = "lblLiveArea" 41 | Me.lblLiveArea.Size = New System.Drawing.Size(76, 16) 42 | Me.lblLiveArea.TabIndex = 156 43 | Me.lblLiveArea.Text = "直播分类" 44 | ' 45 | 'flpChooseAreaContainer 46 | ' 47 | Me.flpChooseAreaContainer.AutoScroll = True 48 | Me.flpChooseAreaContainer.BackColor = System.Drawing.SystemColors.Control 49 | Me.flpChooseAreaContainer.Location = New System.Drawing.Point(10, 40) 50 | Me.flpChooseAreaContainer.Name = "flpChooseAreaContainer" 51 | Me.flpChooseAreaContainer.Size = New System.Drawing.Size(413, 23) 52 | Me.flpChooseAreaContainer.TabIndex = 155 53 | ' 54 | 'flpChildAreaContainer 55 | ' 56 | Me.flpChildAreaContainer.AutoScroll = True 57 | Me.flpChildAreaContainer.BackColor = System.Drawing.SystemColors.Control 58 | Me.flpChildAreaContainer.Location = New System.Drawing.Point(10, 137) 59 | Me.flpChildAreaContainer.Name = "flpChildAreaContainer" 60 | Me.flpChildAreaContainer.Size = New System.Drawing.Size(413, 234) 61 | Me.flpChildAreaContainer.TabIndex = 2 62 | ' 63 | 'txtSearchAreaQuickly 64 | ' 65 | Me.txtSearchAreaQuickly.Location = New System.Drawing.Point(10, 69) 66 | Me.txtSearchAreaQuickly.Name = "txtSearchAreaQuickly" 67 | Me.txtSearchAreaQuickly.Size = New System.Drawing.Size(413, 21) 68 | Me.txtSearchAreaQuickly.TabIndex = 1 69 | ' 70 | 'tlpParentAreaContainer 71 | ' 72 | Me.tlpParentAreaContainer.BackColor = System.Drawing.SystemColors.Control 73 | Me.tlpParentAreaContainer.ColumnCount = 1 74 | Me.tlpParentAreaContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 27.53623!)) 75 | Me.tlpParentAreaContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 72.46377!)) 76 | Me.tlpParentAreaContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 97.0!)) 77 | Me.tlpParentAreaContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 115.0!)) 78 | Me.tlpParentAreaContainer.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) 79 | Me.tlpParentAreaContainer.Location = New System.Drawing.Point(10, 104) 80 | Me.tlpParentAreaContainer.Name = "tlpParentAreaContainer" 81 | Me.tlpParentAreaContainer.RowCount = 1 82 | Me.tlpParentAreaContainer.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) 83 | Me.tlpParentAreaContainer.Size = New System.Drawing.Size(413, 27) 84 | Me.tlpParentAreaContainer.TabIndex = 163 85 | ' 86 | 'FrmSelectArea 87 | ' 88 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 89 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 90 | Me.ClientSize = New System.Drawing.Size(433, 383) 91 | Me.Controls.Add(Me.tlpParentAreaContainer) 92 | Me.Controls.Add(Me.txtSearchAreaQuickly) 93 | Me.Controls.Add(Me.flpChildAreaContainer) 94 | Me.Controls.Add(Me.lblLiveArea) 95 | Me.Controls.Add(Me.flpChooseAreaContainer) 96 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None 97 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 98 | Me.MaximizeBox = False 99 | Me.MinimizeBox = False 100 | Me.Name = "FrmSelectArea" 101 | Me.Text = "分区设置" 102 | Me.ResumeLayout(False) 103 | Me.PerformLayout() 104 | 105 | End Sub 106 | 107 | Friend WithEvents lblLiveArea As Label 108 | Friend WithEvents flpChooseAreaContainer As FlowLayoutPanel 109 | Friend WithEvents flpChildAreaContainer As FlowLayoutPanel 110 | Friend WithEvents txtSearchAreaQuickly As TextBox 111 | Friend WithEvents tlpParentAreaContainer As TableLayoutPanel 112 | End Class 113 | -------------------------------------------------------------------------------- /source/Form/FrmThanksHime.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class FrmThanksHime 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form 重写 Dispose,以清理组件列表。 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | _ 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmThanksHime)) 26 | Me.SuspendLayout() 27 | ' 28 | 'FrmThanksHime 29 | ' 30 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 31 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 32 | Me.ClientSize = New System.Drawing.Size(800, 450) 33 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 34 | Me.Name = "FrmThanksHime" 35 | Me.Text = "感谢姬" 36 | Me.ResumeLayout(False) 37 | 38 | End Sub 39 | End Class 40 | -------------------------------------------------------------------------------- /source/Form/FrmThanksHime.vb: -------------------------------------------------------------------------------- 1 | Public Class FrmThanksHime 2 | 3 | End Class -------------------------------------------------------------------------------- /source/Form/Login/FrmLoginFromBrowser.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class FrmLoginFromBrowser 3 | Inherits System.Windows.Forms.Form 4 | 5 | ''Form 重写 Dispose,以清理组件列表。 6 | ' 7 | 'Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | ' Try 9 | ' If disposing AndAlso components IsNot Nothing Then 10 | ' components.Dispose() 11 | ' End If 12 | ' Finally 13 | ' MyBase.Dispose(disposing) 14 | ' End Try 15 | 'End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmLoginFromBrowser)) 26 | Me.SuspendLayout() 27 | ' 28 | 'FrmLoginBrowser 29 | ' 30 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 31 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 32 | Me.ClientSize = New System.Drawing.Size(628, 433) 33 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 34 | Me.Name = "FrmLoginBrowser" 35 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 36 | Me.Text = "登录专用浏览器 V1" 37 | Me.WindowState = System.Windows.Forms.FormWindowState.Maximized 38 | Me.ResumeLayout(False) 39 | 40 | End Sub 41 | End Class 42 | -------------------------------------------------------------------------------- /source/Form/Login/FrmLoginFromCookies.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class FrmLoginFromCookies 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form 重写 Dispose,以清理组件列表。 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | _ 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmLoginFromCookies)) 26 | Me.Label1 = New System.Windows.Forms.Label() 27 | Me.txtCookies = New System.Windows.Forms.TextBox() 28 | Me.btnOK = New System.Windows.Forms.Button() 29 | Me.txtDomain = New System.Windows.Forms.TextBox() 30 | Me.Label2 = New System.Windows.Forms.Label() 31 | Me.SuspendLayout() 32 | ' 33 | 'Label1 34 | ' 35 | Me.Label1.AutoSize = True 36 | Me.Label1.Location = New System.Drawing.Point(10, 45) 37 | Me.Label1.Name = "Label1" 38 | Me.Label1.Size = New System.Drawing.Size(119, 12) 39 | Me.Label1.TabIndex = 0 40 | Me.Label1.Text = "登录成功后的Cookies" 41 | ' 42 | 'txtCookies 43 | ' 44 | Me.txtCookies.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ 45 | Or System.Windows.Forms.AnchorStyles.Left) _ 46 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 47 | Me.txtCookies.Location = New System.Drawing.Point(12, 60) 48 | Me.txtCookies.Multiline = True 49 | Me.txtCookies.Name = "txtCookies" 50 | Me.txtCookies.ScrollBars = System.Windows.Forms.ScrollBars.Vertical 51 | Me.txtCookies.Size = New System.Drawing.Size(562, 218) 52 | Me.txtCookies.TabIndex = 1 53 | ' 54 | 'btnOK 55 | ' 56 | Me.btnOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 57 | Me.btnOK.Location = New System.Drawing.Point(413, 284) 58 | Me.btnOK.Name = "btnOK" 59 | Me.btnOK.Size = New System.Drawing.Size(161, 23) 60 | Me.btnOK.TabIndex = 132 61 | Me.btnOK.Text = "emmmm,就这样吧(๑‾ ꇴ ‾๑)~" 62 | Me.btnOK.UseVisualStyleBackColor = True 63 | ' 64 | 'txtDomain 65 | ' 66 | Me.txtDomain.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ 67 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 68 | Me.txtDomain.Location = New System.Drawing.Point(12, 21) 69 | Me.txtDomain.Name = "txtDomain" 70 | Me.txtDomain.Size = New System.Drawing.Size(562, 21) 71 | Me.txtDomain.TabIndex = 133 72 | Me.txtDomain.Text = "https://live.bilibili.com" 73 | ' 74 | 'Label2 75 | ' 76 | Me.Label2.AutoSize = True 77 | Me.Label2.Location = New System.Drawing.Point(12, 6) 78 | Me.Label2.Name = "Label2" 79 | Me.Label2.Size = New System.Drawing.Size(41, 12) 80 | Me.Label2.TabIndex = 134 81 | Me.Label2.Text = "domain" 82 | ' 83 | 'FrmLoginCookies 84 | ' 85 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 86 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 87 | Me.ClientSize = New System.Drawing.Size(586, 319) 88 | Me.Controls.Add(Me.Label2) 89 | Me.Controls.Add(Me.txtDomain) 90 | Me.Controls.Add(Me.btnOK) 91 | Me.Controls.Add(Me.txtCookies) 92 | Me.Controls.Add(Me.Label1) 93 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle 94 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 95 | Me.MinimizeBox = False 96 | Me.Name = "FrmLoginCookies" 97 | Me.Text = "使用Cookies验证" 98 | Me.ResumeLayout(False) 99 | Me.PerformLayout() 100 | 101 | End Sub 102 | 103 | Friend WithEvents Label1 As Label 104 | Friend WithEvents txtCookies As TextBox 105 | Friend WithEvents btnOK As Button 106 | Friend WithEvents txtDomain As TextBox 107 | Friend WithEvents Label2 As Label 108 | End Class 109 | -------------------------------------------------------------------------------- /source/Form/Login/FrmLoginFromCookies.vb: -------------------------------------------------------------------------------- 1 | Imports System.Net 2 | Imports ShanXingTech 3 | 4 | Public Class FrmLoginFromCookies 5 | 6 | #Region "属性区" 7 | Private Const CS_NOCLOSE = &H200 8 | 9 | Protected Overrides ReadOnly Property CreateParams As CreateParams 10 | Get 11 | ' 关闭按钮不可用 12 | Dim cr As CreateParams = MyBase.CreateParams 13 | cr.ClassStyle = cr.ClassStyle Or CS_NOCLOSE 14 | Return cr 15 | End Get 16 | End Property 17 | 18 | Private m_LoginedCookies As Net.CookieContainer 19 | Public ReadOnly Property LoginedCookies As Net.CookieContainer 20 | Get 21 | Return m_LoginedCookies 22 | End Get 23 | End Property 24 | #End Region 25 | 26 | Sub New() 27 | 28 | ' 此调用是设计器所必需的。 29 | InitializeComponent() 30 | 31 | ' 在 InitializeComponent() 调用之后添加任何初始化。 32 | Me.TopMost = True 33 | Me.StartPosition = FormStartPosition.CenterParent 34 | End Sub 35 | 36 | Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click 37 | Dim domain = txtDomain.Text.Trim 38 | If domain.IsNullOrEmpty Then 39 | Windows2.DrawTipsTask(Me, "你是耍流氓嘛???还没有输入Domain呢" & RandomEmoji.Shock, 1000, False, False) 40 | Return 41 | End If 42 | 43 | Dim cookeis = txtCookies.Text.Trim 44 | If cookeis.IsNullOrEmpty Then 45 | Windows2.DrawTipsTask(Me, "你是耍流氓嘛???还没有输入Cookies呢" & RandomEmoji.Shock, 1000, False, False) 46 | Return 47 | End If 48 | 49 | m_LoginedCookies.GetFromKeyValuePairs(cookeis, domain) 50 | 51 | Me.Close() 52 | End Sub 53 | End Class -------------------------------------------------------------------------------- /source/Form/Login/FrmLoginFromQRCode.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class FrmLoginFromQRCode 3 | Inherits System.Windows.Forms.Form 4 | 5 | ''Form 重写 Dispose,以清理组件列表。 6 | ' _ 7 | 'Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | ' Try 9 | ' If disposing AndAlso components IsNot Nothing Then 10 | ' components.Dispose() 11 | ' End If 12 | ' Finally 13 | ' MyBase.Dispose(disposing) 14 | ' End Try 15 | 'End Sub 16 | 17 | 'Windows 窗体设计器所必需的 18 | Private components As System.ComponentModel.IContainer 19 | 20 | '注意: 以下过程是 Windows 窗体设计器所必需的 21 | '可以使用 Windows 窗体设计器修改它。 22 | '不要使用代码编辑器修改它。 23 | 24 | Private Sub InitializeComponent() 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmLoginFromQRCode)) 26 | Me.Button1 = New System.Windows.Forms.Button() 27 | Me.Button2 = New System.Windows.Forms.Button() 28 | Me.TextBox1 = New System.Windows.Forms.TextBox() 29 | Me.Button3 = New System.Windows.Forms.Button() 30 | Me.SuspendLayout() 31 | ' 32 | 'Button1 33 | ' 34 | Me.Button1.Location = New System.Drawing.Point(12, 340) 35 | Me.Button1.Name = "Button1" 36 | Me.Button1.Size = New System.Drawing.Size(75, 23) 37 | Me.Button1.TabIndex = 0 38 | Me.Button1.Text = "Button1" 39 | Me.Button1.UseVisualStyleBackColor = True 40 | ' 41 | 'Button2 42 | ' 43 | Me.Button2.Location = New System.Drawing.Point(93, 340) 44 | Me.Button2.Name = "Button2" 45 | Me.Button2.Size = New System.Drawing.Size(75, 23) 46 | Me.Button2.TabIndex = 1 47 | Me.Button2.Text = "Button2" 48 | Me.Button2.UseVisualStyleBackColor = True 49 | ' 50 | 'TextBox1 51 | ' 52 | Me.TextBox1.ForeColor = System.Drawing.SystemColors.ControlText 53 | Me.TextBox1.Location = New System.Drawing.Point(12, 313) 54 | Me.TextBox1.Name = "TextBox1" 55 | Me.TextBox1.Size = New System.Drawing.Size(298, 21) 56 | Me.TextBox1.TabIndex = 2 57 | ' 58 | 'Button3 59 | ' 60 | Me.Button3.Location = New System.Drawing.Point(174, 340) 61 | Me.Button3.Name = "Button3" 62 | Me.Button3.Size = New System.Drawing.Size(75, 23) 63 | Me.Button3.TabIndex = 3 64 | Me.Button3.Text = "Button3" 65 | Me.Button3.UseVisualStyleBackColor = True 66 | ' 67 | 'FrmLoginFromQRCode 68 | ' 69 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 70 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 71 | Me.ClientSize = New System.Drawing.Size(323, 371) 72 | Me.Controls.Add(Me.Button3) 73 | Me.Controls.Add(Me.TextBox1) 74 | Me.Controls.Add(Me.Button2) 75 | Me.Controls.Add(Me.Button1) 76 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle 77 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 78 | Me.Name = "FrmLoginFromQRCode" 79 | Me.Text = "扫码登录" 80 | Me.ResumeLayout(False) 81 | Me.PerformLayout() 82 | 83 | End Sub 84 | 85 | Friend WithEvents Button1 As Button 86 | Friend WithEvents Button2 As Button 87 | Friend WithEvents TextBox1 As TextBox 88 | Friend WithEvents Button3 As Button 89 | End Class 90 | -------------------------------------------------------------------------------- /source/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' 此代码由工具生成。 4 | ' 运行时版本:4.0.30319.42000 5 | ' 6 | ' 对此文件的更改可能会导致不正确的行为,并且如果 7 | ' 重新生成代码,这些更改将会丢失。 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | '注意:此文件是自动生成的;请勿直接进行修改。若要更改, 18 | ' 或者如果您在此文件中遇到生成错误,请转至项目设计器 19 | ' (转至“项目属性”或在解决方案资源管理器中双击“我的项目”节点), 20 | ' 然后在“应用程序”选项卡中进行更改。 21 | ' 22 | Partial Friend Class MyApplication 23 | 24 | _ 25 | Public Sub New() 26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) 27 | Me.IsSingleInstance = false 28 | Me.EnableVisualStyles = true 29 | Me.SaveMySettingsOnExit = false 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.姬娘.FrmMain 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /source/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | FrmMain 5 | false 6 | 0 7 | true 8 | 0 9 | false 10 | -------------------------------------------------------------------------------- /source/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' 有关程序集的一般信息由以下 6 | ' 控制。更改这些特性值可修改 7 | ' 与程序集关联的信息。 8 | 9 | '查看程序集特性的值 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | '如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 22 | 23 | 24 | ' 程序集的版本信息由下列四个值组成: 25 | ' 26 | ' 主版本 27 | ' 次版本 28 | ' 生成号 29 | ' 修订号 30 | ' 31 | ' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 32 | ' 方法是按如下所示使用“*”: : 33 | ' 34 | 35 | ' 36 | ' 37 | 38 | ' -------------------------------------------------------------------------------- /source/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' 此代码由工具生成。 4 | ' 运行时版本:4.0.30319.42000 5 | ' 6 | ' 对此文件的更改可能会导致不正确的行为,并且如果 7 | ' 重新生成代码,这些更改将会丢失。 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | Imports System 15 | 16 | Namespace My.Resources 17 | 18 | '此类是由 StronglyTypedResourceBuilder 19 | '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | '(以 /str 作为命令选项),或重新生成 VS 项目。 22 | ''' 23 | ''' 一个强类型的资源类,用于查找本地化的字符串等。 24 | ''' 25 | _ 29 | Friend Module Resources 30 | 31 | Private resourceMan As Global.System.Resources.ResourceManager 32 | 33 | Private resourceCulture As Global.System.Globalization.CultureInfo 34 | 35 | ''' 36 | ''' 返回此类使用的缓存的 ResourceManager 实例。 37 | ''' 38 | _ 39 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 40 | Get 41 | If Object.ReferenceEquals(resourceMan, Nothing) Then 42 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("姬娘.Resources", GetType(Resources).Assembly) 43 | resourceMan = temp 44 | End If 45 | Return resourceMan 46 | End Get 47 | End Property 48 | 49 | ''' 50 | ''' 重写当前线程的 CurrentUICulture 属性,对 51 | ''' 使用此强类型资源类的所有资源查找执行重写。 52 | ''' 53 | _ 54 | Friend Property Culture() As Global.System.Globalization.CultureInfo 55 | Get 56 | Return resourceCulture 57 | End Get 58 | Set 59 | resourceCulture = value 60 | End Set 61 | End Property 62 | 63 | ''' 64 | ''' 查找类似 参数 '{0}' 超出有效范围 '{1}' 的本地化字符串。 65 | ''' 66 | Friend ReadOnly Property ArgumentOutOfRange() As String 67 | Get 68 | Return ResourceManager.GetString("ArgumentOutOfRange", resourceCulture) 69 | End Get 70 | End Property 71 | 72 | ''' 73 | ''' 查找类似 来源: 的本地化字符串。 74 | ''' 75 | Friend ReadOnly Property CallSubName() As String 76 | Get 77 | Return ResourceManager.GetString("CallSubName", resourceCulture) 78 | End Get 79 | End Property 80 | 81 | ''' 82 | ''' 查找类似 Dll文件 '{0}' 不存在 的本地化字符串。 83 | ''' 84 | Friend ReadOnly Property DllNotFound() As String 85 | Get 86 | Return ResourceManager.GetString("DllNotFound", resourceCulture) 87 | End Get 88 | End Property 89 | 90 | ''' 91 | ''' 查找类似 行号: 的本地化字符串。 92 | ''' 93 | Friend ReadOnly Property FileLineNumber() As String 94 | Get 95 | Return ResourceManager.GetString("FileLineNumber", resourceCulture) 96 | End Get 97 | End Property 98 | 99 | ''' 100 | ''' 查找类似 文件 '{0}' 不存在 的本地化字符串。 101 | ''' 102 | Friend ReadOnly Property FileNotFound() As String 103 | Get 104 | Return ResourceManager.GetString("FileNotFound", resourceCulture) 105 | End Get 106 | End Property 107 | 108 | ''' 109 | ''' 查找类似 温馨提示 的本地化字符串。 110 | ''' 111 | Friend ReadOnly Property MsgCaption() As String 112 | Get 113 | Return ResourceManager.GetString("MsgCaption", resourceCulture) 114 | End Get 115 | End Property 116 | 117 | ''' 118 | ''' 查找类似 参数 '{0}' 不能为 Nothing 的本地化字符串。 119 | ''' 120 | Friend ReadOnly Property NullReference() As String 121 | Get 122 | Return ResourceManager.GetString("NullReference", resourceCulture) 123 | End Get 124 | End Property 125 | 126 | ''' 127 | ''' 查找类似 问题描述: 的本地化字符串。 128 | ''' 129 | Friend ReadOnly Property ProblemDescription() As String 130 | Get 131 | Return ResourceManager.GetString("ProblemDescription", resourceCulture) 132 | End Get 133 | End Property 134 | 135 | ''' 136 | ''' 查找类似 具体信息: 的本地化字符串。 137 | ''' 138 | Friend ReadOnly Property ProblemDetail() As String 139 | Get 140 | Return ResourceManager.GetString("ProblemDetail", resourceCulture) 141 | End Get 142 | End Property 143 | End Module 144 | End Namespace 145 | -------------------------------------------------------------------------------- /source/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' 此代码由工具生成。 4 | ' 运行时版本:4.0.30319.42000 5 | ' 6 | ' 对此文件的更改可能会导致不正确的行为,并且如果 7 | ' 重新生成代码,这些更改将会丢失。 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) 24 | 25 | #Region "My.Settings 自动保存功能" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | 57 | _ 60 | Public Property APPName() As String 61 | Get 62 | Return CType(Me("APPName"),String) 63 | End Get 64 | Set 65 | Me("APPName") = value 66 | End Set 67 | End Property 68 | End Class 69 | End Namespace 70 | 71 | Namespace My 72 | 73 | _ 76 | Friend Module MySettingsProperty 77 | 78 | _ 79 | Friend ReadOnly Property Settings() As Global.姬娘.My.MySettings 80 | Get 81 | Return Global.姬娘.My.MySettings.Default 82 | End Get 83 | End Property 84 | End Module 85 | End Namespace 86 | -------------------------------------------------------------------------------- /source/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 姬娘 7 | 8 | 9 | -------------------------------------------------------------------------------- /source/My Project/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 48 | 55 | 56 | 70 | -------------------------------------------------------------------------------- /source/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source/res/CreateDb.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE 2 | IF NOT EXISTS DanmuFormat ( 3 | Id INTEGER NOT NULL, 4 | Type TEXT, 5 | 'Default' TEXT, 6 | Custom TEXT, 7 | Example TEXT, 8 | Memo TEXT, 9 | PRIMARY KEY (Id ASC) 10 | ); 11 | 12 | CREATE TABLE 13 | IF NOT EXISTS UserInfo ( 14 | Id INTEGER NOT NULL, 15 | Nick TEXT NOT NULL, 16 | Cookies TEXT NOT NULL, 17 | SignDate TEXT, 18 | SignRewards TEXT, 19 | StoreCookies INTEGER, 20 | LastViewedRoomRealId INTEGER, 21 | RoomShortId INTEGER, 22 | RoomRealId INTEGER, 23 | PRIMARY KEY (Id ASC) 24 | ); 25 | 26 | CREATE TABLE 27 | IF NOT EXISTS ViewedRoomInfo ( 28 | RealId INTEGER NOT NULL, 29 | ShortId INTEGER, 30 | UpName TEXT, 31 | LastAttentionCount INTEGER, 32 | LastViewedTimestamp INTEGER, 33 | DanmuTop100 TEXT, 34 | PRIMARY KEY (RealId ASC) 35 | ); 36 | 37 | CREATE TABLE 38 | IF NOT EXISTS Config ( 39 | UserId INTEGER NOT NULL, 40 | ViewedRoomId INTEGER, 41 | Personal TEXT 42 | ); 43 | 44 | CREATE UNIQUE INDEX 45 | IF NOT EXISTS IK_UserId_ViewedRoomId ON Config (UserId ASC, ViewedRoomId ASC); 46 | 47 | CREATE TABLE 48 | IF NOT EXISTS RoomUsedTitle ( 49 | Id INTEGER NOT NULL, 50 | RoomId INTEGER NOT NULL, 51 | Title TEXT, 52 | LastUseTimestamp INTEGER, 53 | PRIMARY KEY (Id ASC) 54 | ); 55 | 56 | CREATE TABLE 57 | IF NOT EXISTS Fans ( 58 | UserId INTEGER NOT NULL, 59 | OriginalNick TEXT NOT NULL, 60 | RemarkNick TEXT, 61 | AttentTimestamp INTEGER, 62 | PRIMARY KEY (UserId ASC) 63 | ); 64 | 65 | CREATE TABLE 66 | IF NOT EXISTS DataStructureVersion (Version INTEGER NOT NULL); 67 | 68 | CREATE TABLE 69 | IF NOT EXISTS ViewerRemark ( 70 | UserId INTEGER NOT NULL PRIMARY KEY, 71 | UserNick TEXT, 72 | Remark TEXT, 73 | CreatedTime TimeStamp NOT NULL DEFAULT ( 74 | datetime('now', 'localtime') 75 | ) 76 | ); 77 | 78 | CREATE TABLE 79 | IF NOT EXISTS Medal ( 80 | UpUserId INTEGER NOT NULL PRIMARY KEY, 81 | UpUserNick TEXT, 82 | Detail TEXT 83 | ); 84 | 85 | -------------------------------------------------------------------------------- /source/res/DanmuDisplayTemplete.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 20 | 21 | 22 | 23 | 126 | 127 | 132 | 133 | 134 | 135 |
136 |
137 | (*❦ω❦) 138 |
139 | 140 |
141 | 142 | 146 | 147 | 152 |
153 | 154 | 155 | -------------------------------------------------------------------------------- /source/res/YanText.txt: -------------------------------------------------------------------------------- 1 | (⌒▽⌒) 2 | ( ̄▽ ̄) 3 | (=・ω・=) 4 | (`・ω・´) 5 | (〜 ̄△ ̄)〜 6 | (・∀・) 7 | (°∀°)ノ 8 | ( ̄3 ̄) 9 | ╮( ̄▽ ̄)╭ 10 | _(:3」∠)_ 11 | ( ´_ゝ`) 12 | ←_← 13 | →_→ 14 | (<_<) 15 | (>_>) 16 | (;¬_¬) 17 | ("▔□▔)/ 18 | (゚Д゚≡゚д゚)!? 19 | Σ(゚д゚;) 20 | Σ(  ̄□ ̄||) 21 | (´;ω;`) 22 | (/TДT)/ 23 | (^・ω・^ ) 24 | (。・ω・。) 25 | (● ̄(エ) ̄●) 26 | ε=ε=(ノ≧∇≦)ノ 27 | (´・_・`) 28 | (-_-#) 29 | ( ̄へ ̄) 30 | ( ̄ε(# ̄) Σ 31 | ヽ(`Д´)ノ 32 | (#-_-)┯━┯ 33 | (╯°口°)╯(┴—┴ 34 | ←◡← 35 | ( ♥д♥) 36 | Σ<―(〃°ω°〃)♡→ 37 | ⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄ 38 | (╬゚д゚)▄︻┻┳═一 39 | ・*・:≡( ε:) 40 | o(* ̄︶ ̄*)o 41 | (汗) 42 | (苦笑) 43 | (笑哭) 44 | (囧) 45 | (✪▽✪) --------------------------------------------------------------------------------