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