├── .gitattributes ├── .gitignore ├── Loopback.sln ├── Loopback ├── App.config ├── Form1.Designer.vb ├── Form1.resx ├── Form1.vb ├── Loopback.vbproj ├── My Project │ ├── Application.Designer.vb │ ├── Application.myapp │ ├── AssemblyInfo.vb │ ├── Resources.Designer.vb │ ├── Resources.resx │ ├── Settings.Designer.vb │ └── Settings.settings └── packages.config └── README.md /.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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /Loopback.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27428.2037 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Loopback", "Loopback\Loopback.vbproj", "{45F23531-174D-4745-B8C5-5C6C725379DF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {45F23531-174D-4745-B8C5-5C6C725379DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {45F23531-174D-4745-B8C5-5C6C725379DF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {45F23531-174D-4745-B8C5-5C6C725379DF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {45F23531-174D-4745-B8C5-5C6C725379DF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {39C91D48-3510-402D-9565-0D8150EF0B62} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Loopback/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Loopback/Form1.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class Form1 3 | Inherits MaterialSkin.Controls.MaterialForm 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.ListBox1 = New System.Windows.Forms.ListBox() 26 | Me.Enable = New MaterialSkin.Controls.MaterialRaisedButton() 27 | Me.MaterialDivider1 = New MaterialSkin.Controls.MaterialDivider() 28 | Me.Disable = New MaterialSkin.Controls.MaterialFlatButton() 29 | Me.SuspendLayout() 30 | ' 31 | 'ListBox1 32 | ' 33 | Me.ListBox1.BorderStyle = System.Windows.Forms.BorderStyle.None 34 | Me.ListBox1.FormattingEnabled = True 35 | Me.ListBox1.ItemHeight = 12 36 | Me.ListBox1.Location = New System.Drawing.Point(12, 77) 37 | Me.ListBox1.Name = "ListBox1" 38 | Me.ListBox1.Size = New System.Drawing.Size(444, 240) 39 | Me.ListBox1.TabIndex = 3 40 | ' 41 | 'Enable 42 | ' 43 | Me.Enable.Depth = 0 44 | Me.Enable.Location = New System.Drawing.Point(12, 336) 45 | Me.Enable.MouseState = MaterialSkin.MouseState.HOVER 46 | Me.Enable.Name = "Enable" 47 | Me.Enable.Primary = True 48 | Me.Enable.Size = New System.Drawing.Size(179, 30) 49 | Me.Enable.TabIndex = 4 50 | Me.Enable.Text = "Enable" 51 | Me.Enable.UseVisualStyleBackColor = True 52 | ' 53 | 'MaterialDivider1 54 | ' 55 | Me.MaterialDivider1.BackColor = System.Drawing.Color.FromArgb(CType(CType(31, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer)) 56 | Me.MaterialDivider1.Depth = 0 57 | Me.MaterialDivider1.Location = New System.Drawing.Point(0, 329) 58 | Me.MaterialDivider1.MouseState = MaterialSkin.MouseState.HOVER 59 | Me.MaterialDivider1.Name = "MaterialDivider1" 60 | Me.MaterialDivider1.Size = New System.Drawing.Size(492, 1) 61 | Me.MaterialDivider1.TabIndex = 7 62 | Me.MaterialDivider1.Text = "MaterialDivider1" 63 | ' 64 | 'Disable 65 | ' 66 | Me.Disable.AutoSize = True 67 | Me.Disable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink 68 | Me.Disable.BackColor = System.Drawing.Color.White 69 | Me.Disable.Depth = 0 70 | Me.Disable.ForeColor = System.Drawing.Color.White 71 | Me.Disable.Location = New System.Drawing.Point(390, 334) 72 | Me.Disable.Margin = New System.Windows.Forms.Padding(4, 6, 4, 6) 73 | Me.Disable.MouseState = MaterialSkin.MouseState.HOVER 74 | Me.Disable.Name = "Disable" 75 | Me.Disable.Primary = True 76 | Me.Disable.Size = New System.Drawing.Size(66, 36) 77 | Me.Disable.TabIndex = 8 78 | Me.Disable.Text = "Disable" 79 | Me.Disable.UseVisualStyleBackColor = False 80 | ' 81 | 'Form1 82 | ' 83 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) 84 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 85 | Me.ClientSize = New System.Drawing.Size(468, 376) 86 | Me.Controls.Add(Me.Disable) 87 | Me.Controls.Add(Me.MaterialDivider1) 88 | Me.Controls.Add(Me.Enable) 89 | Me.Controls.Add(Me.ListBox1) 90 | Me.Name = "Form1" 91 | Me.Text = "Status:Ready" 92 | Me.ResumeLayout(False) 93 | Me.PerformLayout() 94 | 95 | End Sub 96 | Friend WithEvents ListBox1 As ListBox 97 | Friend WithEvents Enable As MaterialSkin.Controls.MaterialRaisedButton 98 | Friend WithEvents MaterialDivider1 As MaterialSkin.Controls.MaterialDivider 99 | Friend WithEvents Disable As MaterialSkin.Controls.MaterialFlatButton 100 | End Class 101 | -------------------------------------------------------------------------------- /Loopback/Form1.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 | -------------------------------------------------------------------------------- /Loopback/Form1.vb: -------------------------------------------------------------------------------- 1 | Imports MaterialSkin 2 | Imports System.IO 3 | Imports System.Environment 4 | Public Class Form1 5 | '========================MaterialSkin部分 6 | Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 7 | Dim SkinManager As MaterialSkinManager = MaterialSkinManager.Instance 8 | SkinManager.AddFormToManage(Me) 9 | SkinManager.Theme = MaterialSkinManager.Themes.LIGHT 10 | SkinManager.ColorScheme = New ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE) 11 | End Sub 12 | 13 | '===============获得输出所用类 14 | Public Class ConsoleOutput 15 | Private Sub New() 16 | End Sub 17 | 18 | Private Shared gWorkingDirectory As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal) 19 | 20 | Public Shared Property WorkingDirectory() As String 21 | Get 22 | Return gWorkingDirectory 23 | End Get 24 | Set(ByVal Value As String) 25 | gWorkingDirectory = Value 26 | End Set 27 | End Property 28 | 29 | Public Shared Function ExcuteCmd(ByVal command As String) As String 30 | Dim mResult As String 31 | Dim tmpProcess As New Process 32 | With tmpProcess 33 | With .StartInfo 34 | .CreateNoWindow = True 35 | .FileName = .EnvironmentVariables.Item("ComSpec") 36 | .RedirectStandardOutput = True 37 | .UseShellExecute = False 38 | .Arguments = String.Format("/C {0}", command) 39 | .WorkingDirectory = gWorkingDirectory 40 | End With 41 | Try 42 | .Start() 43 | .WaitForExit(5000) 44 | mResult = .StandardOutput.ReadToEnd 45 | Catch e As System.ComponentModel.Win32Exception 46 | mResult = e.ToString 47 | End Try 48 | End With 49 | Return mResult 50 | End Function 51 | End Class 52 | 53 | 54 | Private Sub Enable_Click_1(sender As Object, e As EventArgs) Handles Enable.Click 55 | Me.Text = "Status:Applying" 56 | Me.Refresh() 57 | Dim UserPath As String = GetFolderPath(SpecialFolder.UserProfile) 58 | Dim UWPPath As New DirectoryInfo(UserPath & "\AppData\Local\Packages") 59 | ListBox1.Items.Clear() 60 | For Each UWPmane In UWPPath.GetDirectories 61 | ListBox1.Items.Add(ConsoleOutput.ExcuteCmd("CheckNetIsolation LoopbackExempt -a -n=" + UWPmane.Name) + UWPmane.Name) 62 | Next 63 | Me.Text = "Status:Done" 64 | Me.Refresh() 65 | End Sub 66 | 67 | Private Sub Disbale_Click(sender As Object, e As EventArgs) Handles Disable.Click 68 | ListBox1.Items.Clear() 69 | ListBox1.Items.Add(ConsoleOutput.ExcuteCmd("CheckNetIsolation LoopbackExempt -c")) 70 | End Sub 71 | 72 | 73 | End Class -------------------------------------------------------------------------------- /Loopback/Loopback.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {45F23531-174D-4745-B8C5-5C6C725379DF} 8 | WinExe 9 | Loopback.My.MyApplication 10 | Loopback 11 | Loopback 12 | 512 13 | WindowsForms 14 | v4.6.1 15 | true 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | true 22 | true 23 | bin\Debug\ 24 | Loopback.xml 25 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | false 31 | true 32 | true 33 | bin\Release\ 34 | Loopback.xml 35 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 36 | 37 | 38 | On 39 | 40 | 41 | Binary 42 | 43 | 44 | Off 45 | 46 | 47 | On 48 | 49 | 50 | 51 | ..\packages\MaterialSkin.0.2.1\lib\MaterialSkin.dll 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | Form 80 | 81 | 82 | Form1.vb 83 | Form 84 | 85 | 86 | 87 | True 88 | Application.myapp 89 | 90 | 91 | True 92 | True 93 | Resources.resx 94 | 95 | 96 | True 97 | Settings.settings 98 | True 99 | 100 | 101 | 102 | 103 | Form1.vb 104 | 105 | 106 | VbMyResourcesResXFileCodeGenerator 107 | Resources.Designer.vb 108 | My.Resources 109 | Designer 110 | 111 | 112 | 113 | 114 | MyApplicationCodeGenerator 115 | Application.Designer.vb 116 | 117 | 118 | SettingsSingleFileGenerator 119 | My 120 | Settings.Designer.vb 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /Loopback/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes, 18 | ' or if you encounter build errors in this file, go to the Project Designer 19 | ' (go to Project Properties or double-click the My Project node in 20 | ' Solution Explorer), and make changes on the Application tab. 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 = true 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.Loopback.Form1 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /Loopback/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | Form1 5 | false 6 | 0 7 | true 8 | 0 9 | 0 10 | true 11 | 12 | -------------------------------------------------------------------------------- /Loopback/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 | '如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 21 | 22 | 23 | ' 程序集的版本信息由下列四个值组成: 24 | ' 25 | ' 主版本 26 | ' 次版本 27 | ' 生成号 28 | ' 修订号 29 | ' 30 | ' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 31 | ' 方法是按如下所示使用“*”: : 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Loopback/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My.Resources 16 | 17 | 'This class was auto-generated by the StronglyTypedResourceBuilder 18 | 'class via a tool like ResGen or Visual Studio. 19 | 'To add or remove a member, edit your .ResX file then rerun ResGen 20 | 'with the /str option, or rebuild your VS project. 21 | ''' 22 | ''' A strongly-typed resource class, for looking up localized strings, etc. 23 | ''' 24 | _ 28 | Friend Module Resources 29 | 30 | Private resourceMan As Global.System.Resources.ResourceManager 31 | 32 | Private resourceCulture As Global.System.Globalization.CultureInfo 33 | 34 | ''' 35 | ''' Returns the cached ResourceManager instance used by this class. 36 | ''' 37 | _ 38 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 39 | Get 40 | If Object.ReferenceEquals(resourceMan, Nothing) Then 41 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Loopback.Resources", GetType(Resources).Assembly) 42 | resourceMan = temp 43 | End If 44 | Return resourceMan 45 | End Get 46 | End Property 47 | 48 | ''' 49 | ''' Overrides the current thread's CurrentUICulture property for all 50 | ''' resource lookups using this strongly typed resource class. 51 | ''' 52 | _ 53 | Friend Property Culture() As Global.System.Globalization.CultureInfo 54 | Get 55 | Return resourceCulture 56 | End Get 57 | Set(ByVal value As Global.System.Globalization.CultureInfo) 58 | resourceCulture = value 59 | End Set 60 | End Property 61 | End Module 62 | End Namespace 63 | -------------------------------------------------------------------------------- /Loopback/My Project/Resources.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 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Loopback/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 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 Auto-Save Functionality" 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(ByVal sender As Global.System.Object, ByVal 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 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | _ 67 | Friend ReadOnly Property Settings() As Global.Loopback.My.MySettings 68 | Get 69 | Return Global.Loopback.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /Loopback/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Loopback/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UWPLoopback 2 | Enable loopback for UWP 3 | 4 | ![](https://wx3.sinaimg.cn/large/69590277gy1fr0p8oaf5lj20d00agt8k.jpg) 5 | 6 | UWPLoopback是一个更~~粗糙~~,简洁的为UWP应用批量启用loopback的工具 7 | --------------------------------------------------------------------------------