refactor: 再次重新规划分类与命名空间
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using PCL.Core.Extension;
|
using PCL.Core.Utils.Exts;
|
||||||
|
|
||||||
namespace PCL.Test;
|
namespace PCL.Test;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using PCL.Core.Update.Diff;
|
using PCL.Core.Utils.Diff;
|
||||||
|
|
||||||
namespace PCL.Test;
|
namespace PCL.Test;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System;
|
using System;
|
||||||
using PCL.Core.Update;
|
using PCL.Core.Utils;
|
||||||
|
|
||||||
namespace PCL.Test
|
namespace PCL.Test
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using PCL.Core.VersionControl;
|
using PCL.Core.Utils.VersionControl;
|
||||||
|
|
||||||
namespace PCL.Test;
|
namespace PCL.Test;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
using static PCL.Core.Native.ToastNotification;
|
using static PCL.Core.UI.ToastNotification;
|
||||||
|
|
||||||
namespace PCL.Test;
|
namespace PCL.Test;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using PCL.Core.Network;
|
using PCL.Core.Net;
|
||||||
using PCL.Core.Utils;
|
using PCL.Core.Utils;
|
||||||
|
|
||||||
namespace PCL.Test;
|
namespace PCL.Test;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
Imports System.Windows.Threading
|
Imports System.Windows.Threading
|
||||||
Imports System.IO.Compression
|
Imports PCL.Core.App
|
||||||
Imports PCL.Core.LifecycleManagement
|
|
||||||
|
|
||||||
Public Class Application
|
Public Class Application
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
Imports System.Net
|
Imports System.Net
|
||||||
Imports System.Net.Sockets
|
Imports System.Net.Sockets
|
||||||
Imports System.Security.Policy
|
|
||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
Imports PCL.Core.Link
|
Imports PCL.Core.Link
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
Imports System.Net
|
|
||||||
Imports System.Net.Sockets
|
|
||||||
Imports System.Security.Policy
|
|
||||||
Imports System.Threading.Tasks
|
|
||||||
Imports PCL.Core.Link
|
|
||||||
|
|
||||||
Class MinecraftServerQuery
|
Class MinecraftServerQuery
|
||||||
Inherits Grid
|
Inherits Grid
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
Imports System.Runtime.InteropServices
|
Imports System.Runtime.InteropServices
|
||||||
Imports System.Windows.Interop
|
Imports System.Windows.Interop
|
||||||
Imports PCL.Core.LifecycleManagement
|
Imports PCL.Core.App
|
||||||
|
|
||||||
Public Class FormMain
|
Public Class FormMain
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports System.Runtime.CompilerServices
|
Imports System.Runtime.CompilerServices
|
||||||
Imports System.Runtime.InteropServices
|
|
||||||
Imports System.Security.Cryptography
|
Imports System.Security.Cryptography
|
||||||
Imports System.Security.Principal
|
Imports System.Security.Principal
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
Imports System.Xaml
|
Imports System.Xaml
|
||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports Newtonsoft.Json.Serialization
|
Imports PCL.Core.App
|
||||||
Imports PCL.Core.Logging
|
Imports PCL.Core.Logging
|
||||||
Imports PCL.Core.Native
|
|
||||||
|
|
||||||
Public Module ModBase
|
Public Module ModBase
|
||||||
|
|
||||||
@@ -43,11 +41,11 @@ Public Module ModBase
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' 程序可执行文件所在目录,以“\”结尾。
|
''' 程序可执行文件所在目录,以“\”结尾。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Path As String = If(NativeInterop.ExecutableDirectory.EndsWith("\"), NativeInterop.ExecutableDirectory, NativeInterop.ExecutableDirectory & "\")
|
Public Path As String = If(Basics.ExecutableDirectory.EndsWith("\"), Basics.ExecutableDirectory, Basics.ExecutableDirectory & "\")
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 程序可执行文件完整路径。
|
''' 程序可执行文件完整路径。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public PathWithName As String = NativeInterop.ExecutablePath
|
Public PathWithName As String = Basics.ExecutablePath
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' 程序内嵌图片文件夹路径,以“/”结尾。
|
''' 程序内嵌图片文件夹路径,以“/”结尾。
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports PCL.Core.Native
|
Imports PCL.Core.App
|
||||||
|
Imports PCL.Core.IO
|
||||||
|
|
||||||
Public Module ModNativeInterop
|
Public Module ModNativeInterop
|
||||||
|
|
||||||
@@ -124,7 +125,7 @@ Public Module ModNativeInterop
|
|||||||
If OpenLogPipes.Contains(id) Then Return RPCResponse.Err("日志 ID 正在使用")
|
If OpenLogPipes.Contains(id) Then Return RPCResponse.Err("日志 ID 正在使用")
|
||||||
Dim pipeName = LogPipePrefix & RandomInteger(10000, 99999)
|
Dim pipeName = LogPipePrefix & RandomInteger(10000, 99999)
|
||||||
OpenLogPipes.Add(id)
|
OpenLogPipes.Add(id)
|
||||||
NativeInterop.StartPipeServer($"Log({id})", pipeName,
|
PipeComm.StartPipeServer($"Log({id})", pipeName,
|
||||||
Function(r, w, c) LogPipeCallback(r, w, request),
|
Function(r, w, c) LogPipeCallback(r, w, request),
|
||||||
Sub() OpenLogPipes.Remove(id),
|
Sub() OpenLogPipes.Remove(id),
|
||||||
True, {clientProcess.Id})
|
True, {clientProcess.Id})
|
||||||
|
|||||||
@@ -3,10 +3,9 @@ Imports System.Net.Http
|
|||||||
Imports System.Runtime.InteropServices
|
Imports System.Runtime.InteropServices
|
||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports LiteDB
|
|
||||||
Imports CacheCow.Client
|
Imports CacheCow.Client
|
||||||
Imports CacheCow.Common
|
Imports CacheCow.Common
|
||||||
Imports PCL.Core.Network
|
Imports PCL.Core.Net
|
||||||
Imports PCL.Core.Utils.Hash
|
Imports PCL.Core.Utils.Hash
|
||||||
|
|
||||||
Public Module ModNet
|
Public Module ModNet
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
Imports System.Diagnostics.Eventing.Reader
|
|
||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports System.Threading.Tasks
|
|
||||||
Imports Microsoft.Identity.Client
|
|
||||||
Imports Microsoft.Identity.Client.Broker
|
|
||||||
Imports PCL.Core.Minecraft
|
Imports PCL.Core.Minecraft
|
||||||
|
|
||||||
Public Module ModLaunch
|
Public Module ModLaunch
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ Imports System.Net.Sockets
|
|||||||
Imports Makaretu.Nat
|
Imports Makaretu.Nat
|
||||||
Imports STUN
|
Imports STUN
|
||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
Imports PCL.Core.Extension
|
|
||||||
Imports PCL.Core.IO
|
Imports PCL.Core.IO
|
||||||
Imports PCL.Core.Link
|
Imports PCL.Core.Link
|
||||||
Imports PCL.Core.Native
|
Imports PCL.Core.Net
|
||||||
Imports PCL.Core.Network
|
Imports PCL.Core.Utils.Exts
|
||||||
|
Imports PCL.Core.Utils.OS
|
||||||
|
|
||||||
Public Module ModLink
|
Public Module ModLink
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ Public Module ModLink
|
|||||||
End Function
|
End Function
|
||||||
Public Function GetLauncherBrand(pid As Integer) As String
|
Public Function GetLauncherBrand(pid As Integer) As String
|
||||||
Try
|
Try
|
||||||
Dim cmd = NativeInterop.GetCommandLine(pid)
|
Dim cmd = ProcessInterop.GetCommandLine(pid)
|
||||||
If cmd.Contains("-Dminecraft.launcher.brand=") Then
|
If cmd.Contains("-Dminecraft.launcher.brand=") Then
|
||||||
Return cmd.AfterFirst("-Dminecraft.launcher.brand=").BeforeFirst("-").TrimEnd("'", " ")
|
Return cmd.AfterFirst("-Dminecraft.launcher.brand=").BeforeFirst("-").TrimEnd("'", " ")
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports Windows.Media
|
Imports Windows.Media
|
||||||
Imports Windows.Storage
|
|
||||||
Imports Windows.Storage.Streams
|
Imports Windows.Storage.Streams
|
||||||
Public Module ModMusic
|
Public Module ModMusic
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,9 @@ Imports System.Net.Http
|
|||||||
Imports System.Security.Cryptography
|
Imports System.Security.Cryptography
|
||||||
Imports System.Management
|
Imports System.Management
|
||||||
Imports PCL.Core.IO
|
Imports PCL.Core.IO
|
||||||
Imports PCL.Core.Secret
|
|
||||||
Imports PCL.Core.UI
|
Imports PCL.Core.UI
|
||||||
Imports PCL.Core.Update
|
|
||||||
Imports PCL.Core.Utils
|
Imports PCL.Core.Utils
|
||||||
Imports PCL.Core.VersionControl
|
Imports PCL.Core.Utils.Secret
|
||||||
|
|
||||||
Friend Module ModSecret
|
Friend Module ModSecret
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
Imports System.Net.NetworkInformation
|
Imports System.Net.NetworkInformation
|
||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports PCL.Core.Network
|
Imports PCL.Core.Net
|
||||||
Imports PCL.Core.Utils
|
|
||||||
|
|
||||||
Public Module ModWebServer
|
Public Module ModWebServer
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports PCL.Core.Update
|
Imports PCL.Core.Utils
|
||||||
Imports PCL.Core.VersionControl
|
|
||||||
|
|
||||||
Public Interface IUpdateSource
|
Public Interface IUpdateSource
|
||||||
''' <summary>
|
''' <summary>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports PCL.Core.Update
|
Imports PCL.Core.Utils
|
||||||
Imports PCL.Core.Update.Diff
|
Imports PCL.Core.Utils.Diff
|
||||||
Imports PCL.Core.VersionControl
|
|
||||||
|
|
||||||
Public Class UpdatesMinioModel '社区自己的更新系统格式
|
Public Class UpdatesMinioModel '社区自己的更新系统格式
|
||||||
Implements IUpdateSource
|
Implements IUpdateSource
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
Imports System.Text.Json
|
|
||||||
Imports PCL.Core.Update
|
Imports PCL.Core.Utils
|
||||||
Imports PCL.Core.VersionControl
|
|
||||||
|
|
||||||
Public Class UpdatesMirrorChyanModel 'Mirror 酱的更新格式
|
Public Class UpdatesMirrorChyanModel 'Mirror 酱的更新格式
|
||||||
Implements IUpdateSource
|
Implements IUpdateSource
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports PCL.Core.Update
|
Imports PCL.Core.Utils
|
||||||
Imports PCL.Core.VersionControl
|
|
||||||
|
|
||||||
Public Class UpdatesRandomModel '社区自己的更新系统格式
|
Public Class UpdatesRandomModel '社区自己的更新系统格式
|
||||||
Implements IUpdateSource
|
Implements IUpdateSource
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports PCL.Core.Update
|
Imports PCL.Core.Utils
|
||||||
Imports PCL.Core.VersionControl
|
|
||||||
|
|
||||||
Public Class UpdatesWrapperModel
|
Public Class UpdatesWrapperModel
|
||||||
Implements IUpdateSource
|
Implements IUpdateSource
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System
|
|
||||||
|
|
||||||
Namespace My.Resources
|
Namespace My.Resources
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Imports System.Security.Cryptography
|
|
||||||
|
|
||||||
Public Class PageDownloadCompDetail
|
Public Class PageDownloadCompDetail
|
||||||
Private CompItem As MyCompItem = Nothing
|
Private CompItem As MyCompItem = Nothing
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Imports System.Security.Principal
|
|
||||||
|
|
||||||
Public Class PageInstanceSaves
|
Public Class PageInstanceSaves
|
||||||
Implements IRefreshable
|
Implements IRefreshable
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Imports PCL.Core.IO
|
Imports PCL.Core.IO
|
||||||
Imports PCL.Core.VersionControl
|
Imports PCL.Core.Utils.VersionControl
|
||||||
|
|
||||||
Class PageInstanceSavesBackup
|
Class PageInstanceSavesBackup
|
||||||
Implements IRefreshable
|
Implements IRefreshable
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Imports System.Threading.Tasks
|
|
||||||
|
|
||||||
Public Class PageInstanceSavesLeft
|
Public Class PageInstanceSavesLeft
|
||||||
Implements IRefreshable
|
Implements IRefreshable
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports System.Security.Principal
|
|
||||||
Imports Imazen.WebP.Extern
|
|
||||||
|
|
||||||
Public Class PageInstanceScreenshot
|
Public Class PageInstanceScreenshot
|
||||||
Implements IRefreshable
|
Implements IRefreshable
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
Imports PCL.Core.Extension
|
|
||||||
Imports PCL.Core.Link
|
Imports PCL.Core.Link
|
||||||
Imports PCL.Core.Native
|
Imports PCL.Core.UI
|
||||||
|
Imports PCL.Core.Utils.Exts
|
||||||
|
|
||||||
Public Class PageLinkLobby
|
Public Class PageLinkLobby
|
||||||
'记录的启动情况
|
'记录的启动情况
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
Imports System.Net
|
Imports System.Net
|
||||||
Imports System.Runtime.ConstrainedExecution
|
Imports System.Runtime.ConstrainedExecution
|
||||||
Imports System.Runtime.InteropServices
|
Imports System.Runtime.InteropServices
|
||||||
|
Imports PCL.Core.App
|
||||||
|
|
||||||
Imports PCL.Core.IO
|
Imports PCL.Core.IO
|
||||||
Imports PCL.Core.Link
|
|
||||||
Imports PCL.Core.Native
|
|
||||||
|
|
||||||
Public Class PageOtherTest
|
Public Class PageOtherTest
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
@@ -502,7 +501,7 @@ Public Class PageOtherTest
|
|||||||
If choice = 1 Then Exit Sub
|
If choice = 1 Then Exit Sub
|
||||||
Dim shortcutPath = If(choice = 2, desktop, start)
|
Dim shortcutPath = If(choice = 2, desktop, start)
|
||||||
Dim locationName = If(choice = 2, desktopName, startName)
|
Dim locationName = If(choice = 2, desktopName, startName)
|
||||||
Files.CreateShortcut(shortcutPath, NativeInterop.ExecutablePath)
|
Files.CreateShortcut(shortcutPath, Basics.ExecutablePath)
|
||||||
Hint("已在" & locationName & "创建快捷方式", HintType.Finish)
|
Hint("已在" & locationName & "创建快捷方式", HintType.Finish)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
Imports System.Net.Http
|
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
Imports System.Windows.Forms
|
|
||||||
Imports System.Windows.Forms.LinkLabel
|
|
||||||
Imports System.Xml
|
|
||||||
Imports NAudio.Gui
|
|
||||||
|
|
||||||
Public Class PageOtherVote
|
Public Class PageOtherVote
|
||||||
Public Class Vote
|
Public Class Vote
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Imports PCL.Core.Network
|
Imports PCL.Core.Net
|
||||||
|
|
||||||
Public Class ModSetup
|
Public Class ModSetup
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Imports System.Threading.Tasks
|
|
||||||
|
|
||||||
Public Class PageSpeedLeft
|
Public Class PageSpeedLeft
|
||||||
Private Const WatcherInterval As Integer = 300
|
Private Const WatcherInterval As Integer = 300
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Imports PCL.Core.LifecycleManagement
|
|
||||||
Imports PCL.Core.UI
|
Imports PCL.Core.App
|
||||||
|
|
||||||
Module Program
|
Module Program
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user