├── .gitignore ├── Donate.md ├── LICENSE ├── MstscManager.sln ├── MstscManager ├── Controls │ ├── About.Designer.cs │ ├── About.cs │ ├── About.resx │ ├── Add_mobaxterm.Designer.cs │ ├── Add_mobaxterm.cs │ ├── Add_mobaxterm.resx │ ├── Add_puty.Designer.cs │ ├── Add_puty.cs │ ├── Add_puty.resx │ ├── Add_radmin.Designer.cs │ ├── Add_radmin.cs │ ├── Add_radmin.resx │ ├── Add_securecrt.Designer.cs │ ├── Add_securecrt.cs │ ├── Add_securecrt.resx │ ├── Add_todesk.Designer.cs │ ├── Add_todesk.cs │ ├── Add_todesk.resx │ ├── Add_vnc.Designer.cs │ ├── Add_vnc.cs │ ├── Add_vnc.resx │ ├── Add_winscp.Designer.cs │ ├── Add_winscp.cs │ ├── Add_winscp.resx │ ├── Add_xftp.Designer.cs │ ├── Add_xftp.cs │ ├── Add_xftp.resx │ ├── Add_xshell.Designer.cs │ ├── Add_xshell.cs │ ├── Add_xshell.resx │ ├── Change_pass.Designer.cs │ ├── Change_pass.cs │ ├── Change_pass.resx │ ├── Common_setting.Designer.cs │ ├── Common_setting.cs │ ├── Common_setting.resx │ ├── OthoerFun.Designer.cs │ ├── OthoerFun.cs │ ├── OthoerFun.resx │ ├── Set_exe_directory.Designer.cs │ ├── Set_exe_directory.cs │ ├── Set_exe_directory.resx │ ├── add_mstsc.Designer.cs │ ├── add_mstsc.cs │ └── add_mstsc.resx ├── FMain.Designer.cs ├── FMain.cs ├── FMain.resx ├── Forms │ ├── Add_server.Designer.cs │ ├── Add_server.cs │ ├── Add_server.resx │ ├── Setting.Designer.cs │ ├── Setting.cs │ ├── Setting.resx │ ├── user.Designer.cs │ ├── user.cs │ └── user.resx ├── MstscManager.csproj ├── Program.cs ├── Resources.Designer.cs ├── Resources.resx ├── Resources │ ├── SecureCRT.ico │ ├── Todesk_logo.png │ ├── Winscp (Copy).png │ ├── icons8-documents-folder-96.png │ ├── icons8-folder-96.png │ ├── linux (Copy).png │ ├── radmin_logo (Copy).png │ ├── remote-desktop-128.ico │ ├── remote-desktop-512.png │ ├── securecrt-icon (Copy).jpg │ ├── setting.png │ ├── setting64.ico │ ├── ssh (Copy).png │ ├── terminal (Copy).png │ ├── vnc (Copy).png │ ├── vnc (Copy)2.png │ ├── windows-client (Copy).png │ ├── xftp (Copy).png │ ├── xshell (Copy).png │ └── xterm_logo.png ├── Utils │ ├── DPAPI.cs │ ├── DbInihelper_use.cs │ ├── DbSqlHelper.cs │ ├── RDPcrypt.cs │ ├── Share.cs │ ├── common_tools.cs │ └── radmin_helper.cs ├── app.manifest └── remote-desktop-512.ico ├── README.md ├── Updates.md └── images ├── image-20221011210424699.png ├── image-20221011210627832.png ├── image-20221011210646631.png ├── image-20221014090815678.png ├── image-20221014091108282.png ├── image-20221014092752043.png ├── remote-desktop-512.png ├── 临时.gif ├── 删除.gif ├── 增删改.gif ├── 导入.gif ├── 开启密码.gif ├── 搜索.gif ├── 收款码.png ├── 用户管理.gif └── 自定义.gif /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Oo]bj/ 27 | [Ll]og/ 28 | 29 | # Visual Studio 2015/2017 cache/options directory 30 | .vs/ 31 | # Uncomment if you have tasks that create the project's static files in wwwroot 32 | #wwwroot/ 33 | 34 | # Visual Studio 2017 auto generated files 35 | Generated\ Files/ 36 | 37 | # MSTest test Results 38 | [Tt]est[Rr]esult*/ 39 | [Bb]uild[Ll]og.* 40 | 41 | # NUNIT 42 | *.VisualState.xml 43 | TestResult.xml 44 | 45 | # Build Results of an ATL Project 46 | [Dd]ebugPS/ 47 | [Rr]eleasePS/ 48 | dlldata.c 49 | 50 | # Benchmark Results 51 | BenchmarkDotNet.Artifacts/ 52 | 53 | # .NET Core 54 | project.lock.json 55 | project.fragment.lock.json 56 | artifacts/ 57 | 58 | # StyleCop 59 | StyleCopReport.xml 60 | 61 | # Files built by Visual Studio 62 | *_i.c 63 | *_p.c 64 | *_h.h 65 | *.ilk 66 | *.meta 67 | *.obj 68 | *.iobj 69 | *.pch 70 | *.pdb 71 | *.ipdb 72 | *.pgc 73 | *.pgd 74 | *.rsp 75 | *.sbr 76 | *.tlb 77 | *.tli 78 | *.tlh 79 | *.tmp 80 | *.tmp_proj 81 | *_wpftmp.csproj 82 | *.log 83 | *.vspscc 84 | *.vssscc 85 | .builds 86 | *.pidb 87 | *.svclog 88 | *.scc 89 | 90 | # Chutzpah Test files 91 | _Chutzpah* 92 | 93 | # Visual C++ cache files 94 | ipch/ 95 | *.aps 96 | *.ncb 97 | *.opendb 98 | *.opensdf 99 | *.sdf 100 | *.cachefile 101 | *.VC.db 102 | *.VC.VC.opendb 103 | 104 | # Visual Studio profiler 105 | *.psess 106 | *.vsp 107 | *.vspx 108 | *.sap 109 | 110 | # Visual Studio Trace Files 111 | *.e2e 112 | 113 | # TFS 2012 Local Workspace 114 | $tf/ 115 | 116 | # Guidance Automation Toolkit 117 | *.gpState 118 | 119 | # ReSharper is a .NET coding add-in 120 | _ReSharper*/ 121 | *.[Rr]e[Ss]harper 122 | *.DotSettings.user 123 | 124 | # JustCode is a .NET coding add-in 125 | .JustCode 126 | 127 | # TeamCity is a build add-in 128 | _TeamCity* 129 | 130 | # DotCover is a Code Coverage Tool 131 | *.dotCover 132 | 133 | # AxoCover is a Code Coverage Tool 134 | .axoCover/* 135 | !.axoCover/settings.json 136 | 137 | # Visual Studio code coverage results 138 | *.coverage 139 | *.coveragexml 140 | 141 | # NCrunch 142 | _NCrunch_* 143 | .*crunch*.local.xml 144 | nCrunchTemp_* 145 | 146 | # MightyMoose 147 | *.mm.* 148 | AutoTest.Net/ 149 | 150 | # Web workbench (sass) 151 | .sass-cache/ 152 | 153 | # Installshield output folder 154 | [Ee]xpress/ 155 | 156 | # DocProject is a documentation generator add-in 157 | DocProject/buildhelp/ 158 | DocProject/Help/*.HxT 159 | DocProject/Help/*.HxC 160 | DocProject/Help/*.hhc 161 | DocProject/Help/*.hhk 162 | DocProject/Help/*.hhp 163 | DocProject/Help/Html2 164 | DocProject/Help/html 165 | 166 | # Click-Once directory 167 | publish/ 168 | 169 | # Publish Web Output 170 | *.[Pp]ublish.xml 171 | *.azurePubxml 172 | # Note: Comment the next line if you want to checkin your web deploy settings, 173 | # but database connection strings (with potential passwords) will be unencrypted 174 | *.pubxml 175 | *.publishproj 176 | 177 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 178 | # checkin your Azure Web App publish settings, but sensitive information contained 179 | # in these scripts will be unencrypted 180 | PublishScripts/ 181 | 182 | # NuGet Packages 183 | *.nupkg 184 | # The packages folder can be ignored because of Package Restore 185 | **/[Pp]ackages/* 186 | # except build/, which is used as an MSBuild target. 187 | !**/[Pp]ackages/build/ 188 | # Uncomment if necessary however generally it will be regenerated when needed 189 | #!**/[Pp]ackages/repositories.config 190 | # NuGet v3's project.json files produces more ignorable files 191 | *.nuget.props 192 | *.nuget.targets 193 | 194 | # Microsoft Azure Build Output 195 | csx/ 196 | *.build.csdef 197 | 198 | # Microsoft Azure Emulator 199 | ecf/ 200 | rcf/ 201 | 202 | # Windows Store app package directories and files 203 | AppPackages/ 204 | BundleArtifacts/ 205 | Package.StoreAssociation.xml 206 | _pkginfo.txt 207 | *.appx 208 | 209 | # Visual Studio cache files 210 | # files ending in .cache can be ignored 211 | *.[Cc]ache 212 | # but keep track of directories ending in .cache 213 | !?*.[Cc]ache/ 214 | 215 | # Others 216 | ClientBin/ 217 | [Bb]in/net462/ 218 | [Bb]in/net5.0-windows/ 219 | [Bb]in/netcoreapp3.1/ 220 | ~$* 221 | *~ 222 | *.dbmdl 223 | *.dbproj.schemaview 224 | *.jfm 225 | *.pfx 226 | *.publishsettings 227 | orleans.codegen.cs 228 | 229 | # Including strong name files can present a security risk 230 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 231 | #*.snk 232 | 233 | # Since there are multiple workflows, uncomment next line to ignore bower_components 234 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 235 | #bower_components/ 236 | 237 | # RIA/Silverlight projects 238 | Generated_Code/ 239 | 240 | # Backup & report files from converting an old project file 241 | # to a newer Visual Studio version. Backup files are not needed, 242 | # because we have git ;-) 243 | _UpgradeReport_Files/ 244 | Backup*/ 245 | UpgradeLog*.XML 246 | UpgradeLog*.htm 247 | ServiceFabricBackup/ 248 | *.rptproj.bak 249 | 250 | # SQL Server files 251 | *.mdf 252 | *.ldf 253 | *.ndf 254 | 255 | # Business Intelligence projects 256 | *.rdl.data 257 | *.bim.layout 258 | *.bim_*.settings 259 | *.rptproj.rsuser 260 | *- Backup*.rdl 261 | 262 | # Microsoft Fakes 263 | FakesAssemblies/ 264 | 265 | # GhostDoc plugin setting file 266 | *.GhostDoc.xml 267 | 268 | # Node.js Tools for Visual Studio 269 | .ntvs_analysis.dat 270 | node_modules/ 271 | 272 | # Visual Studio 6 build log 273 | *.plg 274 | 275 | # Visual Studio 6 workspace options file 276 | *.opt 277 | 278 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 279 | *.vbw 280 | 281 | # Visual Studio LightSwitch build output 282 | **/*.HTMLClient/GeneratedArtifacts 283 | **/*.DesktopClient/GeneratedArtifacts 284 | **/*.DesktopClient/ModelManifest.xml 285 | **/*.Server/GeneratedArtifacts 286 | **/*.Server/ModelManifest.xml 287 | _Pvt_Extensions 288 | 289 | # Paket dependency manager 290 | .paket/paket.exe 291 | paket-files/ 292 | 293 | # FAKE - F# Make 294 | .fake/ 295 | 296 | # JetBrains Rider 297 | .idea/ 298 | *.sln.iml 299 | 300 | # CodeRush personal settings 301 | .cr/personal 302 | 303 | # Python Tools for Visual Studio (PTVS) 304 | __pycache__/ 305 | *.pyc 306 | 307 | # Cake - Uncomment if you are using it 308 | # tools/** 309 | # !tools/packages.config 310 | 311 | # Tabs Studio 312 | *.tss 313 | 314 | # Telerik's JustMock configuration file 315 | *.jmconfig 316 | 317 | # BizTalk build output 318 | *.btp.cs 319 | *.btm.cs 320 | *.odx.cs 321 | *.xsd.cs 322 | 323 | # OpenCover UI analysis results 324 | OpenCover/ 325 | 326 | # Azure Stream Analytics local run output 327 | ASALocalRun/ 328 | 329 | # MSBuild Binary and Structured Log 330 | *.binlog 331 | 332 | # NVidia Nsight GPU debugger configuration file 333 | *.nvuser 334 | 335 | # MFractors (Xamarin productivity tool) working folder 336 | .mfractor/ 337 | 338 | # Local History for Visual Studio 339 | .localhistory/ 340 | 341 | # BeatPulse healthcheck temp database 342 | healthchecksdb 343 | /MstscManager/bin 344 | /MstscManager/obj 345 | /MstscManager/Properties 346 | /output 347 | -------------------------------------------------------------------------------- /Donate.md: -------------------------------------------------------------------------------- 1 | # ContextMenuManager 捐赠名单 -------------------------------------------------------------------------------- /MstscManager.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.32916.344 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MstscManager", "MstscManager\MstscManager.csproj", "{53BEE502-80B0-4018-8879-243F46C44F89}" 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 | {53BEE502-80B0-4018-8879-243F46C44F89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {53BEE502-80B0-4018-8879-243F46C44F89}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {53BEE502-80B0-4018-8879-243F46C44F89}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {53BEE502-80B0-4018-8879-243F46C44F89}.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 = {E8F546DF-4093-4D6F-B18D-9156A16B076B} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /MstscManager/Controls/About.cs: -------------------------------------------------------------------------------- 1 | using Sunny.UI; 2 | using MstscManager.Utils; 3 | 4 | namespace MstscManager.Controls { 5 | public partial class About : UIPage { 6 | string now_version = Share.now_version; 7 | string update_url = ""; 8 | public About() { 9 | InitializeComponent(); 10 | uiLine1.Text = "当前版本 v" + now_version; 11 | try { 12 | check_update(); 13 | } catch (Exception) { } 14 | } 15 | 16 | public async void check_update() { 17 | //to do 请求服务器 18 | string result = ""; 19 | try { 20 | using var client = new HttpClient(); 21 | client.Timeout = TimeSpan.FromSeconds(5); 22 | var url = "https://mss.gmyxds.fun/soft/mstscmanager/update.html"; 23 | result = await client.GetStringAsync(url); 24 | } catch (Exception) {} 25 | if (result == "") return; 26 | //Console.WriteLine(result); 27 | string [] arr = result.Split("-"); 28 | string new_version = arr[0]; 29 | if (Convert.ToDouble(new_version) > Convert.ToDouble(now_version)) { 30 | uiButton1.ShowTips = true; 31 | update_url = arr[1]; 32 | } 33 | } 34 | 35 | private void uiButton1_Click(object sender, EventArgs e) { 36 | if (update_url == "") { 37 | ShowSuccessTip("暂无更新!"); 38 | return; 39 | } else { 40 | ShowSuccessTip("正在打开更新下载页面!"); 41 | common_tools.RunApp3("cmd.exe", "/C start " + update_url); 42 | } 43 | } 44 | 45 | private void uiLinkLabel1_Click(object sender, EventArgs e) { 46 | common_tools.RunApp3("cmd.exe", "/C start https://github.com/GMYXDS/MstscManager"); 47 | } 48 | 49 | private void uiLinkLabel2_Click(object sender, EventArgs e) { 50 | common_tools.RunApp3("cmd.exe", "/C start https://support.qq.com/product/451575"); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /MstscManager/Controls/About.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_mobaxterm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class Add_mobaxterm { 3 | /// 4 | /// 必需的设计器变量。 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// 清理所有正在使用的资源。 10 | /// 11 | /// 如果应释放托管资源,为 true;否则为 false。 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region 组件设计器生成的代码 20 | 21 | /// 22 | /// 设计器支持所需的方法 - 不要修改 23 | /// 使用代码编辑器修改此方法的内容。 24 | /// 25 | private void InitializeComponent() { 26 | this.uiRadioButton2 = new Sunny.UI.UIRadioButton(); 27 | this.uiRadioButton1 = new Sunny.UI.UIRadioButton(); 28 | this.uiGroupBox2 = new Sunny.UI.UIGroupBox(); 29 | this.uiButton1 = new Sunny.UI.UIButton(); 30 | this.uiTextBox1 = new Sunny.UI.UITextBox(); 31 | this.uiCheckBox1 = new Sunny.UI.UICheckBox(); 32 | this.uiLinkLabel2 = new Sunny.UI.UILinkLabel(); 33 | this.uiLabel8 = new Sunny.UI.UILabel(); 34 | this.uiGroupBox2.SuspendLayout(); 35 | this.SuspendLayout(); 36 | // 37 | // uiRadioButton2 38 | // 39 | this.uiRadioButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 40 | this.uiRadioButton2.Location = new System.Drawing.Point(14, 70); 41 | this.uiRadioButton2.MinimumSize = new System.Drawing.Size(1, 1); 42 | this.uiRadioButton2.Name = "uiRadioButton2"; 43 | this.uiRadioButton2.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 44 | this.uiRadioButton2.Size = new System.Drawing.Size(120, 29); 45 | this.uiRadioButton2.TabIndex = 1; 46 | this.uiRadioButton2.Text = "Telnet模式"; 47 | this.uiRadioButton2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 48 | this.uiRadioButton2.Click += new System.EventHandler(this.uiRadioButton2_Click); 49 | // 50 | // uiRadioButton1 51 | // 52 | this.uiRadioButton1.Checked = true; 53 | this.uiRadioButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 54 | this.uiRadioButton1.Location = new System.Drawing.Point(14, 35); 55 | this.uiRadioButton1.MinimumSize = new System.Drawing.Size(1, 1); 56 | this.uiRadioButton1.Name = "uiRadioButton1"; 57 | this.uiRadioButton1.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 58 | this.uiRadioButton1.Size = new System.Drawing.Size(91, 29); 59 | this.uiRadioButton1.TabIndex = 0; 60 | this.uiRadioButton1.Text = "SSH模式"; 61 | this.uiRadioButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 62 | this.uiRadioButton1.Click += new System.EventHandler(this.uiRadioButton1_Click); 63 | // 64 | // uiGroupBox2 65 | // 66 | this.uiGroupBox2.Controls.Add(this.uiButton1); 67 | this.uiGroupBox2.Controls.Add(this.uiTextBox1); 68 | this.uiGroupBox2.Controls.Add(this.uiCheckBox1); 69 | this.uiGroupBox2.Controls.Add(this.uiLinkLabel2); 70 | this.uiGroupBox2.Controls.Add(this.uiLabel8); 71 | this.uiGroupBox2.Controls.Add(this.uiRadioButton2); 72 | this.uiGroupBox2.Controls.Add(this.uiRadioButton1); 73 | this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 74 | this.uiGroupBox2.Location = new System.Drawing.Point(9, 6); 75 | this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 76 | this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1); 77 | this.uiGroupBox2.Name = "uiGroupBox2"; 78 | this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0); 79 | this.uiGroupBox2.Size = new System.Drawing.Size(510, 300); 80 | this.uiGroupBox2.TabIndex = 12; 81 | this.uiGroupBox2.Text = "额外信息"; 82 | this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; 83 | this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 84 | // 85 | // uiButton1 86 | // 87 | this.uiButton1.Enabled = false; 88 | this.uiButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 89 | this.uiButton1.Location = new System.Drawing.Point(380, 105); 90 | this.uiButton1.MinimumSize = new System.Drawing.Size(1, 1); 91 | this.uiButton1.Name = "uiButton1"; 92 | this.uiButton1.Size = new System.Drawing.Size(60, 29); 93 | this.uiButton1.TabIndex = 31; 94 | this.uiButton1.Text = "选择"; 95 | this.uiButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 96 | this.uiButton1.Click += new System.EventHandler(this.uiButton1_Click); 97 | // 98 | // uiTextBox1 99 | // 100 | this.uiTextBox1.Enabled = false; 101 | this.uiTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 102 | this.uiTextBox1.Location = new System.Drawing.Point(155, 105); 103 | this.uiTextBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 104 | this.uiTextBox1.MinimumSize = new System.Drawing.Size(1, 16); 105 | this.uiTextBox1.Name = "uiTextBox1"; 106 | this.uiTextBox1.ShowText = false; 107 | this.uiTextBox1.Size = new System.Drawing.Size(207, 29); 108 | this.uiTextBox1.TabIndex = 30; 109 | this.uiTextBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; 110 | this.uiTextBox1.Watermark = "选择私钥"; 111 | this.uiTextBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 112 | // 113 | // uiCheckBox1 114 | // 115 | this.uiCheckBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 116 | this.uiCheckBox1.Location = new System.Drawing.Point(14, 105); 117 | this.uiCheckBox1.MinimumSize = new System.Drawing.Size(1, 1); 118 | this.uiCheckBox1.Name = "uiCheckBox1"; 119 | this.uiCheckBox1.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 120 | this.uiCheckBox1.Size = new System.Drawing.Size(134, 29); 121 | this.uiCheckBox1.TabIndex = 29; 122 | this.uiCheckBox1.Text = "使用私钥连接"; 123 | this.uiCheckBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 124 | this.uiCheckBox1.CheckedChanged += new System.EventHandler(this.uiCheckBox1_CheckedChanged); 125 | // 126 | // uiLinkLabel2 127 | // 128 | this.uiLinkLabel2.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40))))); 129 | this.uiLinkLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 130 | this.uiLinkLabel2.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline; 131 | this.uiLinkLabel2.Location = new System.Drawing.Point(56, 255); 132 | this.uiLinkLabel2.Name = "uiLinkLabel2"; 133 | this.uiLinkLabel2.Size = new System.Drawing.Size(404, 20); 134 | this.uiLinkLabel2.TabIndex = 24; 135 | this.uiLinkLabel2.TabStop = true; 136 | this.uiLinkLabel2.Text = "https://blog.csdn.net/icbm/article/details/89391093"; 137 | this.uiLinkLabel2.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); 138 | this.uiLinkLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 139 | this.uiLinkLabel2.Click += new System.EventHandler(this.uiLinkLabel2_Click); 140 | // 141 | // uiLabel8 142 | // 143 | this.uiLabel8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 144 | this.uiLabel8.ForeColor = System.Drawing.Color.Gray; 145 | this.uiLabel8.Location = new System.Drawing.Point(14, 228); 146 | this.uiLabel8.Name = "uiLabel8"; 147 | this.uiLabel8.Size = new System.Drawing.Size(407, 48); 148 | this.uiLabel8.Style = Sunny.UI.UIStyle.Custom; 149 | this.uiLabel8.StyleCustomMode = true; 150 | this.uiLabel8.TabIndex = 23; 151 | this.uiLabel8.Text = "备注:密钥连接需要将私钥转换为ppk格式,\r\n参考:"; 152 | this.uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 153 | this.uiLabel8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 154 | // 155 | // Add_mobaxterm 156 | // 157 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 158 | this.ClientSize = new System.Drawing.Size(520, 306); 159 | this.Controls.Add(this.uiGroupBox2); 160 | this.MaximumSize = new System.Drawing.Size(520, 306); 161 | this.Name = "Add_mobaxterm"; 162 | this.ReceiveParams += new Sunny.UI.OnReceiveParams(this.Add_mobaxterm_ReceiveParams); 163 | this.uiGroupBox2.ResumeLayout(false); 164 | this.ResumeLayout(false); 165 | 166 | } 167 | 168 | #endregion 169 | 170 | private Sunny.UI.UIRadioButton uiRadioButton2; 171 | private Sunny.UI.UIRadioButton uiRadioButton1; 172 | private Sunny.UI.UIGroupBox uiGroupBox2; 173 | private Sunny.UI.UILabel uiLabel8; 174 | private Sunny.UI.UILinkLabel uiLinkLabel2; 175 | private Sunny.UI.UIButton uiButton1; 176 | private Sunny.UI.UITextBox uiTextBox1; 177 | private Sunny.UI.UICheckBox uiCheckBox1; 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_mobaxterm.cs: -------------------------------------------------------------------------------- 1 | using MstscManager.Forms; 2 | using MstscManager.Utils; 3 | using Newtonsoft.Json.Linq; 4 | using Sunny.UI; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.ComponentModel; 8 | using System.Data; 9 | using System.Drawing; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | using System.Windows.Forms; 14 | 15 | namespace MstscManager.Controls { 16 | public partial class Add_mobaxterm : UIPage { 17 | public Add_mobaxterm() { 18 | InitializeComponent(); 19 | } 20 | 21 | private void uiRadioButton1_Click(object sender, EventArgs e) { 22 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 23 | top_form.set_port(22); 24 | } 25 | 26 | private void uiRadioButton2_Click(object sender, EventArgs e) { 27 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 28 | top_form.set_port(0); 29 | } 30 | public Dictionary get_config() { 31 | Dictionary config = new Dictionary(); 32 | if (uiRadioButton1.Checked) config.Add("sec_connect_mode", "ssh"); 33 | if (uiRadioButton2.Checked) config.Add("sec_connect_mode", "telnet"); 34 | if (uiCheckBox1.Checked) config.Add("is_ssh_rsa", "1"); else config.Add("is_ssh_rsa", "0"); 35 | config.Add("ssh_rsa_path", uiTextBox1.Text); 36 | return config; 37 | } 38 | public void set_config(JObject csobj) { 39 | uiRadioButton1.Checked = false; 40 | uiRadioButton1.Checked = csobj["sec_connect_mode"].ToString() == "ssh" ? true : false; 41 | uiRadioButton2.Checked = csobj["sec_connect_mode"].ToString() == "telnet" ? true : false; 42 | uiRadioButton2.Checked = csobj["is_ssh_rsa"].ToString() == "1" ? true : false; 43 | if (csobj["is_ssh_rsa"].ToString() == "1") { 44 | uiTextBox1.Enabled = true; 45 | uiButton1.Enabled = true; 46 | uiCheckBox1.Checked = true; 47 | uiRadioButton1.Checked = true; 48 | uiRadioButton2.Checked = false; 49 | } 50 | uiTextBox1.Text = csobj["ssh_rsa_path"].ToString(); 51 | } 52 | private void Add_mobaxterm_ReceiveParams(object sender, UIPageParamsArgs e) { 53 | JObject csobj = e.Value as JObject; 54 | set_config(csobj); 55 | } 56 | private void uiLinkLabel2_Click(object sender, EventArgs e) { 57 | common_tools.RunApp3("cmd.exe", "/C start " + uiLinkLabel2.Text.ToString()); 58 | } 59 | private void uiCheckBox1_CheckedChanged(object sender, EventArgs e) { 60 | if ((sender as UICheckBox).Checked) { 61 | uiRadioButton1.Checked = true; 62 | uiRadioButton2.Checked = false; 63 | uiTextBox1.Enabled = true; 64 | uiButton1.Enabled = true; 65 | } else { 66 | uiTextBox1.Text = ""; 67 | uiTextBox1.Enabled = false; 68 | uiButton1.Enabled = false; 69 | } 70 | } 71 | private string show_dialog() { 72 | OpenFileDialog ofd = new OpenFileDialog(); 73 | ofd.Title = "请选择对应的rsa.ppk文件"; 74 | //ofd.Multiselect = true; 75 | ofd.InitialDirectory = System.Environment.CurrentDirectory; 76 | ofd.Filter = "所有文件|*.*"; 77 | ofd.ShowDialog(); 78 | return ofd.FileName; 79 | } 80 | private void uiButton1_Click(object sender, EventArgs e) { 81 | string path = show_dialog(); 82 | if (path == "") return; 83 | path = path.Replace(System.Environment.CurrentDirectory + "\\", ""); 84 | //Console.WriteLine(path); 85 | uiTextBox1.Text = path; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_mobaxterm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_puty.cs: -------------------------------------------------------------------------------- 1 | using MstscManager.Forms; 2 | using MstscManager.Utils; 3 | using Newtonsoft.Json.Linq; 4 | using Sunny.UI; 5 | using System.Windows.Forms; 6 | 7 | namespace MstscManager.Controls { 8 | public partial class Add_puty : UIPage { 9 | public Add_puty() { 10 | InitializeComponent(); 11 | } 12 | 13 | private void uiRadioButton2_Click(object sender, EventArgs e) { 14 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 15 | top_form.set_port(0); 16 | } 17 | 18 | private void uiRadioButton1_Click(object sender, EventArgs e) { 19 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 20 | top_form.set_port(22); 21 | } 22 | public Dictionary get_config() { 23 | Dictionary config = new Dictionary(); 24 | if (uiRadioButton1.Checked) config.Add("sec_connect_mode", "ssh"); 25 | if (uiRadioButton2.Checked) config.Add("sec_connect_mode", "telnet"); 26 | if(uiCheckBox1.Checked)config.Add("is_ssh_rsa", "1");else config.Add("is_ssh_rsa", "0"); 27 | config.Add("ssh_rsa_path", uiTextBox1.Text); 28 | return config; 29 | } 30 | public void set_config(JObject csobj) { 31 | uiRadioButton1.Checked = false; 32 | uiRadioButton1.Checked = csobj["sec_connect_mode"].ToString() == "ssh" ? true : false; 33 | uiRadioButton2.Checked = csobj["sec_connect_mode"].ToString() == "telnet" ? true : false; 34 | uiRadioButton2.Checked = csobj["is_ssh_rsa"].ToString() == "1" ? true : false; 35 | if (csobj["is_ssh_rsa"].ToString() == "1") { 36 | uiTextBox1.Enabled = true; 37 | uiButton1.Enabled = true; 38 | uiCheckBox1.Checked = true; 39 | uiRadioButton1.Checked = true; 40 | uiRadioButton2.Checked = false; 41 | } 42 | uiTextBox1.Text = csobj["ssh_rsa_path"].ToString(); 43 | } 44 | private void Add_puty_ReceiveParams(object sender, UIPageParamsArgs e) { 45 | JObject csobj = e.Value as JObject; 46 | set_config(csobj); 47 | } 48 | 49 | private void uiLinkLabel2_Click(object sender, EventArgs e) { 50 | common_tools.RunApp3("cmd.exe", "/C start "+uiLinkLabel2.Text.ToString()); 51 | } 52 | 53 | private void uiCheckBox1_CheckedChanged(object sender, EventArgs e) { 54 | if ((sender as UICheckBox).Checked) { 55 | uiRadioButton1.Checked = true; 56 | uiRadioButton2.Checked = false; 57 | uiTextBox1.Enabled = true; 58 | uiButton1.Enabled = true; 59 | } else { 60 | uiTextBox1.Text = ""; 61 | uiTextBox1.Enabled = false; 62 | uiButton1.Enabled = false; 63 | } 64 | } 65 | private string show_dialog() { 66 | OpenFileDialog ofd = new OpenFileDialog(); 67 | ofd.Title = "请选择对应的rsa.ppk文件"; 68 | //ofd.Multiselect = true; 69 | ofd.InitialDirectory = System.Environment.CurrentDirectory; 70 | ofd.Filter = "所有文件|*.*"; 71 | ofd.ShowDialog(); 72 | return ofd.FileName; 73 | } 74 | private void uiButton1_Click(object sender, EventArgs e) { 75 | string path = show_dialog(); 76 | if (path == "") return; 77 | path = path.Replace(System.Environment.CurrentDirectory + "\\", ""); 78 | //Console.WriteLine(path); 79 | uiTextBox1.Text = path; 80 | } 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_puty.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_radmin.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using Sunny.UI; 3 | 4 | namespace MstscManager.Controls { 5 | public partial class Add_radmin : UIPage { 6 | public Add_radmin() { 7 | InitializeComponent(); 8 | } 9 | public Dictionary get_config() { 10 | Dictionary config = new Dictionary(); 11 | string sec_connect_mode = (string)(uiComboBox1.SelectedItem == null ? uiComboBox1.Text : uiComboBox1.SelectedItem); 12 | if (sec_connect_mode == "完全控制") config.Add("sec_connect_mode", "完全控制"); 13 | else if (sec_connect_mode == "仅限查看") config.Add("sec_connect_mode", "仅限查看"); 14 | else if (sec_connect_mode == "Telnet") config.Add("sec_connect_mode", "telnet"); 15 | else if (sec_connect_mode == "文件传送") config.Add("sec_connect_mode", "文件传送"); 16 | else if (sec_connect_mode == "关机") config.Add("sec_connect_mode", "关机"); 17 | else if (sec_connect_mode == "聊天") config.Add("sec_connect_mode", "聊天"); 18 | else if (sec_connect_mode == "语音聊天") config.Add("sec_connect_mode", "语音聊天"); 19 | else if (sec_connect_mode == "传送讯息") config.Add("sec_connect_mode", "传送讯息"); 20 | else config.Add("sec_connect_mode", "完全控制"); 21 | 22 | if (uiCheckBox1.Checked) config.Add("encrypt", "1"); else config.Add("encrypt", "0"); 23 | if (uiCheckBox2.Checked) config.Add("fullscreen", "1"); else config.Add("fullscreen", "0"); 24 | if (uiCheckBox3.Checked) config.Add("nofullkbcontrol", "1"); else config.Add("nofullkbcontrol", "0"); 25 | 26 | string color_mode = (string)(uiComboBox2.SelectedItem == null ? uiComboBox2.Text : uiComboBox2.SelectedItem); 27 | config.Add("color_mode", color_mode); 28 | 29 | string updates = uiTextBox1.Text == "" ? "30" : uiTextBox1.Text; 30 | config.Add("updates", updates); 31 | 32 | return config; 33 | } 34 | public void set_config(JObject csobj) { 35 | uiComboBox1.Text = csobj["sec_connect_mode"].ToString(); 36 | uiCheckBox1.Checked = csobj["encrypt"].ToString() == "1" ? true : false; 37 | uiCheckBox2.Checked = csobj["fullscreen"].ToString() == "1" ? true : false; 38 | uiCheckBox3.Checked = csobj["nofullkbcontrol"].ToString() == "1" ? true : false; 39 | uiComboBox2.Text = csobj["color_mode"].ToString(); 40 | uiTextBox1.Text = csobj["updates"].ToString(); 41 | } 42 | 43 | private void Add_radmin_ReceiveParams(object sender, UIPageParamsArgs e) { 44 | JObject csobj = e.Value as JObject; 45 | set_config(csobj); 46 | } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_radmin.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_securecrt.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class Add_securecrt { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Component Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | this.uiGroupBox2 = new Sunny.UI.UIGroupBox(); 27 | this.uiRadioButton3 = new Sunny.UI.UIRadioButton(); 28 | this.uiRadioButton2 = new Sunny.UI.UIRadioButton(); 29 | this.uiRadioButton1 = new Sunny.UI.UIRadioButton(); 30 | this.uiGroupBox2.SuspendLayout(); 31 | this.SuspendLayout(); 32 | // 33 | // uiGroupBox2 34 | // 35 | this.uiGroupBox2.Controls.Add(this.uiRadioButton3); 36 | this.uiGroupBox2.Controls.Add(this.uiRadioButton2); 37 | this.uiGroupBox2.Controls.Add(this.uiRadioButton1); 38 | this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 39 | this.uiGroupBox2.Location = new System.Drawing.Point(9, 6); 40 | this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 41 | this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1); 42 | this.uiGroupBox2.Name = "uiGroupBox2"; 43 | this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0); 44 | this.uiGroupBox2.Size = new System.Drawing.Size(510, 300); 45 | this.uiGroupBox2.TabIndex = 13; 46 | this.uiGroupBox2.Text = "额外信息"; 47 | this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; 48 | this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 49 | // 50 | // uiRadioButton3 51 | // 52 | this.uiRadioButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 53 | this.uiRadioButton3.Location = new System.Drawing.Point(14, 105); 54 | this.uiRadioButton3.MinimumSize = new System.Drawing.Size(1, 1); 55 | this.uiRadioButton3.Name = "uiRadioButton3"; 56 | this.uiRadioButton3.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 57 | this.uiRadioButton3.Size = new System.Drawing.Size(120, 29); 58 | this.uiRadioButton3.TabIndex = 2; 59 | this.uiRadioButton3.Text = "Telnet模式"; 60 | this.uiRadioButton3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 61 | this.uiRadioButton3.Click += new System.EventHandler(this.uiRadioButton3_Click); 62 | // 63 | // uiRadioButton2 64 | // 65 | this.uiRadioButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 66 | this.uiRadioButton2.Location = new System.Drawing.Point(14, 70); 67 | this.uiRadioButton2.MinimumSize = new System.Drawing.Size(1, 1); 68 | this.uiRadioButton2.Name = "uiRadioButton2"; 69 | this.uiRadioButton2.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 70 | this.uiRadioButton2.Size = new System.Drawing.Size(120, 29); 71 | this.uiRadioButton2.TabIndex = 1; 72 | this.uiRadioButton2.Text = "SSH2模式"; 73 | this.uiRadioButton2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 74 | this.uiRadioButton2.Click += new System.EventHandler(this.uiRadioButton2_Click); 75 | // 76 | // uiRadioButton1 77 | // 78 | this.uiRadioButton1.Checked = true; 79 | this.uiRadioButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 80 | this.uiRadioButton1.Location = new System.Drawing.Point(14, 35); 81 | this.uiRadioButton1.MinimumSize = new System.Drawing.Size(1, 1); 82 | this.uiRadioButton1.Name = "uiRadioButton1"; 83 | this.uiRadioButton1.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 84 | this.uiRadioButton1.Size = new System.Drawing.Size(120, 29); 85 | this.uiRadioButton1.TabIndex = 0; 86 | this.uiRadioButton1.Text = "SSH1模式"; 87 | this.uiRadioButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 88 | this.uiRadioButton1.Click += new System.EventHandler(this.uiRadioButton1_Click); 89 | // 90 | // Add_securecrt 91 | // 92 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 93 | this.ClientSize = new System.Drawing.Size(520, 306); 94 | this.Controls.Add(this.uiGroupBox2); 95 | this.MaximumSize = new System.Drawing.Size(520, 306); 96 | this.Name = "Add_securecrt"; 97 | this.ReceiveParams += new Sunny.UI.OnReceiveParams(this.Add_securecrt_ReceiveParams); 98 | this.uiGroupBox2.ResumeLayout(false); 99 | this.ResumeLayout(false); 100 | 101 | } 102 | 103 | #endregion 104 | 105 | private Sunny.UI.UIGroupBox uiGroupBox2; 106 | private Sunny.UI.UIRadioButton uiRadioButton3; 107 | private Sunny.UI.UIRadioButton uiRadioButton2; 108 | private Sunny.UI.UIRadioButton uiRadioButton1; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_securecrt.cs: -------------------------------------------------------------------------------- 1 | using MstscManager.Forms; 2 | using Newtonsoft.Json.Linq; 3 | using Sunny.UI; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.ComponentModel; 7 | using System.Data; 8 | using System.Drawing; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using System.Windows.Forms; 13 | 14 | namespace MstscManager.Controls { 15 | public partial class Add_securecrt : UIPage { 16 | public Add_securecrt() { 17 | InitializeComponent(); 18 | } 19 | 20 | private void uiRadioButton1_Click(object sender, EventArgs e) { 21 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 22 | top_form.set_port(22); 23 | } 24 | 25 | private void uiRadioButton2_Click(object sender, EventArgs e) { 26 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 27 | top_form.set_port(22); 28 | } 29 | 30 | private void uiRadioButton3_Click(object sender, EventArgs e) { 31 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 32 | top_form.set_port(0); 33 | } 34 | public Dictionary get_config() { 35 | Dictionary config = new Dictionary(); 36 | if (uiRadioButton1.Checked) config.Add("sec_connect_mode", "ssh1"); 37 | if (uiRadioButton2.Checked) config.Add("sec_connect_mode", "ssh2"); 38 | if (uiRadioButton3.Checked) config.Add("sec_connect_mode", "telnet"); 39 | return config; 40 | } 41 | public void set_config(JObject csobj) { 42 | uiRadioButton1.Checked = false; 43 | uiRadioButton1.Checked = csobj["sec_connect_mode"].ToString() == "ssh1" ? true : false; 44 | uiRadioButton2.Checked = csobj["sec_connect_mode"].ToString() == "ssh2" ? true : false; 45 | uiRadioButton3.Checked = csobj["sec_connect_mode"].ToString() == "telnet" ? true : false; 46 | } 47 | 48 | private void Add_securecrt_ReceiveParams(object sender, UIPageParamsArgs e) { 49 | JObject csobj = e.Value as JObject; 50 | set_config(csobj); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_securecrt.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_todesk.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class Add_todesk { 3 | /// 4 | /// 必需的设计器变量。 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// 清理所有正在使用的资源。 10 | /// 11 | /// 如果应释放托管资源,为 true;否则为 false。 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region 组件设计器生成的代码 20 | 21 | /// 22 | /// 设计器支持所需的方法 - 不要修改 23 | /// 使用代码编辑器修改此方法的内容。 24 | /// 25 | private void InitializeComponent() { 26 | this.uiGroupBox2 = new Sunny.UI.UIGroupBox(); 27 | this.uiLabel1 = new Sunny.UI.UILabel(); 28 | this.uiLabel8 = new Sunny.UI.UILabel(); 29 | this.uiGroupBox2.SuspendLayout(); 30 | this.SuspendLayout(); 31 | // 32 | // uiGroupBox2 33 | // 34 | this.uiGroupBox2.Controls.Add(this.uiLabel1); 35 | this.uiGroupBox2.Controls.Add(this.uiLabel8); 36 | this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 37 | this.uiGroupBox2.Location = new System.Drawing.Point(9, 6); 38 | this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 39 | this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1); 40 | this.uiGroupBox2.Name = "uiGroupBox2"; 41 | this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0); 42 | this.uiGroupBox2.Size = new System.Drawing.Size(510, 300); 43 | this.uiGroupBox2.TabIndex = 13; 44 | this.uiGroupBox2.Text = "额外信息"; 45 | this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; 46 | this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 47 | // 48 | // uiLabel1 49 | // 50 | this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 51 | this.uiLabel1.ForeColor = System.Drawing.Color.Gray; 52 | this.uiLabel1.Location = new System.Drawing.Point(29, 181); 53 | this.uiLabel1.Name = "uiLabel1"; 54 | this.uiLabel1.Size = new System.Drawing.Size(388, 27); 55 | this.uiLabel1.Style = Sunny.UI.UIStyle.Custom; 56 | this.uiLabel1.StyleCustomMode = true; 57 | this.uiLabel1.TabIndex = 23; 58 | this.uiLabel1.Text = "注意:设备代码填在ip栏,不要有空格。临时密码填密码栏\r\n"; 59 | this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 60 | this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 61 | // 62 | // uiLabel8 63 | // 64 | this.uiLabel8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 65 | this.uiLabel8.ForeColor = System.Drawing.Color.Gray; 66 | this.uiLabel8.Location = new System.Drawing.Point(29, 208); 67 | this.uiLabel8.Name = "uiLabel8"; 68 | this.uiLabel8.Size = new System.Drawing.Size(470, 83); 69 | this.uiLabel8.Style = Sunny.UI.UIStyle.Custom; 70 | this.uiLabel8.StyleCustomMode = true; 71 | this.uiLabel8.TabIndex = 22; 72 | this.uiLabel8.Text = "备注:1.暂时仅支持ToDesk for Windows 4.0.0或更高版本\r\n 2.仅支持设备列表里已解锁设备发起控制\r\n " + 73 | " 3.添加远控前需要先在todesk里面进行首次连接\r\n 4.连接时todesk要处于打开状态\r\n\r\n"; 74 | this.uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 75 | this.uiLabel8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 76 | // 77 | // Add_todesk 78 | // 79 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 80 | this.ClientSize = new System.Drawing.Size(520, 306); 81 | this.Controls.Add(this.uiGroupBox2); 82 | this.MaximumSize = new System.Drawing.Size(520, 306); 83 | this.Name = "Add_todesk"; 84 | this.uiGroupBox2.ResumeLayout(false); 85 | this.ResumeLayout(false); 86 | 87 | } 88 | 89 | #endregion 90 | 91 | private Sunny.UI.UIGroupBox uiGroupBox2; 92 | private Sunny.UI.UILabel uiLabel8; 93 | private Sunny.UI.UILabel uiLabel1; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_todesk.cs: -------------------------------------------------------------------------------- 1 | using Sunny.UI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Data; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace MstscManager.Controls { 13 | public partial class Add_todesk : UIPage { 14 | public Add_todesk() { 15 | InitializeComponent(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_todesk.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_vnc.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using Sunny.UI; 3 | 4 | namespace MstscManager.Controls { 5 | public partial class Add_vnc : UIPage { 6 | public Add_vnc() { 7 | InitializeComponent(); 8 | } 9 | public Dictionary get_config() { 10 | Dictionary config = new Dictionary(); 11 | if (uiRadioButton1.Checked) config.Add("sec_connect_mode", "tightvnc"); 12 | if (uiRadioButton2.Checked) config.Add("sec_connect_mode", "realvnc"); 13 | if (uiRadioButton3.Checked) config.Add("sec_connect_mode", "ultravnc"); 14 | 15 | if (uiCheckBox1.Checked) config.Add("fullscreen", "1"); else config.Add("fullscreen", "0"); 16 | if (uiCheckBox2.Checked) config.Add("autoreconnect", "1"); else config.Add("autoreconnect", "0"); 17 | if (uiCheckBox3.Checked) config.Add("viewonly", "1"); else config.Add("viewonly", "0"); 18 | 19 | return config; 20 | } 21 | public void set_config(JObject csobj) { 22 | string sec_connect_mode = csobj["sec_connect_mode"].ToString(); 23 | uiRadioButton3.Checked = false; 24 | if (sec_connect_mode == "tightvnc") { 25 | uiRadioButton1.Checked = true; 26 | } else if (sec_connect_mode == "realvnc") { 27 | uiRadioButton2.Checked = true; 28 | } else if (sec_connect_mode == "ultravnc") { 29 | uiRadioButton3.Checked = true; 30 | } 31 | 32 | uiCheckBox1.Checked = csobj["fullscreen"].ToString() == "1" ? true : false; 33 | uiCheckBox2.Checked = csobj["autoreconnect"].ToString() == "1" ? true : false; 34 | uiCheckBox3.Checked = csobj["viewonly"].ToString() == "1" ? true : false; 35 | } 36 | 37 | private void Add_vnc_ReceiveParams(object sender, UIPageParamsArgs e) { 38 | JObject csobj = e.Value as JObject; 39 | set_config(csobj); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_vnc.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_winscp.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class Add_winscp { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Component Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | this.uiGroupBox2 = new Sunny.UI.UIGroupBox(); 27 | this.uiTextBox1 = new Sunny.UI.UITextBox(); 28 | this.uiLabel1 = new Sunny.UI.UILabel(); 29 | this.uiRadioButton5 = new Sunny.UI.UIRadioButton(); 30 | this.uiRadioButton4 = new Sunny.UI.UIRadioButton(); 31 | this.uiRadioButton3 = new Sunny.UI.UIRadioButton(); 32 | this.uiRadioButton2 = new Sunny.UI.UIRadioButton(); 33 | this.uiRadioButton1 = new Sunny.UI.UIRadioButton(); 34 | this.uiGroupBox2.SuspendLayout(); 35 | this.SuspendLayout(); 36 | // 37 | // uiGroupBox2 38 | // 39 | this.uiGroupBox2.Controls.Add(this.uiTextBox1); 40 | this.uiGroupBox2.Controls.Add(this.uiLabel1); 41 | this.uiGroupBox2.Controls.Add(this.uiRadioButton5); 42 | this.uiGroupBox2.Controls.Add(this.uiRadioButton4); 43 | this.uiGroupBox2.Controls.Add(this.uiRadioButton3); 44 | this.uiGroupBox2.Controls.Add(this.uiRadioButton2); 45 | this.uiGroupBox2.Controls.Add(this.uiRadioButton1); 46 | this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 47 | this.uiGroupBox2.Location = new System.Drawing.Point(9, 6); 48 | this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 49 | this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1); 50 | this.uiGroupBox2.Name = "uiGroupBox2"; 51 | this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0); 52 | this.uiGroupBox2.Size = new System.Drawing.Size(510, 300); 53 | this.uiGroupBox2.TabIndex = 13; 54 | this.uiGroupBox2.Text = "额外信息"; 55 | this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; 56 | this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 57 | // 58 | // uiTextBox1 59 | // 60 | this.uiTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 61 | this.uiTextBox1.Location = new System.Drawing.Point(94, 216); 62 | this.uiTextBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 63 | this.uiTextBox1.MinimumSize = new System.Drawing.Size(1, 16); 64 | this.uiTextBox1.Name = "uiTextBox1"; 65 | this.uiTextBox1.ShowText = false; 66 | this.uiTextBox1.Size = new System.Drawing.Size(317, 28); 67 | this.uiTextBox1.TabIndex = 6; 68 | this.uiTextBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; 69 | this.uiTextBox1.Watermark = "eg.http://127.0.0.1:8080/webdav/"; 70 | this.uiTextBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 71 | // 72 | // uiLabel1 73 | // 74 | this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 75 | this.uiLabel1.Location = new System.Drawing.Point(14, 217); 76 | this.uiLabel1.Name = "uiLabel1"; 77 | this.uiLabel1.Size = new System.Drawing.Size(80, 23); 78 | this.uiLabel1.TabIndex = 5; 79 | this.uiLabel1.Text = "Dav地址:"; 80 | this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 81 | this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 82 | // 83 | // uiRadioButton5 84 | // 85 | this.uiRadioButton5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 86 | this.uiRadioButton5.Location = new System.Drawing.Point(14, 175); 87 | this.uiRadioButton5.MinimumSize = new System.Drawing.Size(1, 1); 88 | this.uiRadioButton5.Name = "uiRadioButton5"; 89 | this.uiRadioButton5.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 90 | this.uiRadioButton5.Size = new System.Drawing.Size(145, 29); 91 | this.uiRadioButton5.TabIndex = 4; 92 | this.uiRadioButton5.Text = "WebDav-https"; 93 | this.uiRadioButton5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 94 | this.uiRadioButton5.Click += new System.EventHandler(this.uiRadioButton5_Click); 95 | // 96 | // uiRadioButton4 97 | // 98 | this.uiRadioButton4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 99 | this.uiRadioButton4.Location = new System.Drawing.Point(14, 140); 100 | this.uiRadioButton4.MinimumSize = new System.Drawing.Size(1, 1); 101 | this.uiRadioButton4.Name = "uiRadioButton4"; 102 | this.uiRadioButton4.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 103 | this.uiRadioButton4.Size = new System.Drawing.Size(145, 29); 104 | this.uiRadioButton4.TabIndex = 3; 105 | this.uiRadioButton4.Text = "WebDav-http"; 106 | this.uiRadioButton4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 107 | this.uiRadioButton4.Click += new System.EventHandler(this.uiRadioButton4_Click); 108 | // 109 | // uiRadioButton3 110 | // 111 | this.uiRadioButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 112 | this.uiRadioButton3.Location = new System.Drawing.Point(14, 105); 113 | this.uiRadioButton3.MinimumSize = new System.Drawing.Size(1, 1); 114 | this.uiRadioButton3.Name = "uiRadioButton3"; 115 | this.uiRadioButton3.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 116 | this.uiRadioButton3.Size = new System.Drawing.Size(120, 29); 117 | this.uiRadioButton3.TabIndex = 2; 118 | this.uiRadioButton3.Text = "Ftp模式"; 119 | this.uiRadioButton3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 120 | this.uiRadioButton3.Click += new System.EventHandler(this.uiRadioButton3_Click); 121 | // 122 | // uiRadioButton2 123 | // 124 | this.uiRadioButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 125 | this.uiRadioButton2.Location = new System.Drawing.Point(14, 70); 126 | this.uiRadioButton2.MinimumSize = new System.Drawing.Size(1, 1); 127 | this.uiRadioButton2.Name = "uiRadioButton2"; 128 | this.uiRadioButton2.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 129 | this.uiRadioButton2.Size = new System.Drawing.Size(120, 29); 130 | this.uiRadioButton2.TabIndex = 1; 131 | this.uiRadioButton2.Text = "Scp模式"; 132 | this.uiRadioButton2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 133 | this.uiRadioButton2.Click += new System.EventHandler(this.uiRadioButton2_Click); 134 | // 135 | // uiRadioButton1 136 | // 137 | this.uiRadioButton1.Checked = true; 138 | this.uiRadioButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 139 | this.uiRadioButton1.Location = new System.Drawing.Point(14, 35); 140 | this.uiRadioButton1.MinimumSize = new System.Drawing.Size(1, 1); 141 | this.uiRadioButton1.Name = "uiRadioButton1"; 142 | this.uiRadioButton1.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 143 | this.uiRadioButton1.Size = new System.Drawing.Size(120, 29); 144 | this.uiRadioButton1.TabIndex = 0; 145 | this.uiRadioButton1.Text = "Sftp模式"; 146 | this.uiRadioButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 147 | this.uiRadioButton1.Click += new System.EventHandler(this.uiRadioButton1_Click); 148 | // 149 | // Add_winscp 150 | // 151 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 152 | this.ClientSize = new System.Drawing.Size(520, 306); 153 | this.Controls.Add(this.uiGroupBox2); 154 | this.MaximumSize = new System.Drawing.Size(520, 306); 155 | this.Name = "Add_winscp"; 156 | this.ReceiveParams += new Sunny.UI.OnReceiveParams(this.Add_winscp_ReceiveParams); 157 | this.uiGroupBox2.ResumeLayout(false); 158 | this.ResumeLayout(false); 159 | 160 | } 161 | 162 | #endregion 163 | 164 | private Sunny.UI.UIGroupBox uiGroupBox2; 165 | private Sunny.UI.UIRadioButton uiRadioButton3; 166 | private Sunny.UI.UIRadioButton uiRadioButton2; 167 | private Sunny.UI.UIRadioButton uiRadioButton1; 168 | private Sunny.UI.UIRadioButton uiRadioButton4; 169 | private Sunny.UI.UIRadioButton uiRadioButton5; 170 | private Sunny.UI.UILabel uiLabel1; 171 | private Sunny.UI.UITextBox uiTextBox1; 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_winscp.cs: -------------------------------------------------------------------------------- 1 | using MstscManager.Forms; 2 | using Newtonsoft.Json.Linq; 3 | using Sunny.UI; 4 | 5 | namespace MstscManager.Controls { 6 | public partial class Add_winscp : UIPage { 7 | public Add_winscp() { 8 | InitializeComponent(); 9 | } 10 | 11 | private void uiRadioButton1_Click(object sender, EventArgs e) { 12 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 13 | top_form.set_port(22); 14 | } 15 | 16 | private void uiRadioButton2_Click(object sender, EventArgs e) { 17 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 18 | top_form.set_port(22); 19 | } 20 | 21 | private void uiRadioButton3_Click(object sender, EventArgs e) { 22 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 23 | top_form.set_port(21); 24 | } 25 | 26 | private void uiRadioButton4_Click(object sender, EventArgs e) { 27 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 28 | top_form.set_port(0); 29 | } 30 | 31 | private void uiRadioButton5_Click(object sender, EventArgs e) { 32 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 33 | top_form.set_port(0); 34 | } 35 | 36 | public Dictionary get_config() { 37 | Dictionary config = new Dictionary(); 38 | if (uiRadioButton1.Checked) config.Add("sec_connect_mode", "sftp"); 39 | if (uiRadioButton2.Checked) config.Add("sec_connect_mode", "scp"); 40 | if (uiRadioButton3.Checked) config.Add("sec_connect_mode", "ftp"); 41 | if (uiRadioButton4.Checked) config.Add("sec_connect_mode", "http"); 42 | if (uiRadioButton5.Checked) config.Add("sec_connect_mode", "https"); 43 | 44 | config.Add("dav_address", uiTextBox1.Text); 45 | 46 | return config; 47 | } 48 | public void set_config(JObject csobj) { 49 | uiRadioButton1.Checked = false; 50 | uiRadioButton1.Checked = csobj["sec_connect_mode"].ToString() == "sftp" ? true : false; 51 | uiRadioButton2.Checked = csobj["sec_connect_mode"].ToString() == "scp" ? true : false; 52 | uiRadioButton3.Checked = csobj["sec_connect_mode"].ToString() == "ftp" ? true : false; 53 | uiRadioButton4.Checked = csobj["sec_connect_mode"].ToString() == "http" ? true : false; 54 | uiRadioButton5.Checked = csobj["sec_connect_mode"].ToString() == "https" ? true : false; 55 | uiTextBox1.Text = csobj["dav_address"].ToString(); 56 | } 57 | 58 | private void Add_winscp_ReceiveParams(object sender, UIPageParamsArgs e) { 59 | JObject csobj = e.Value as JObject; 60 | set_config(csobj); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_winscp.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_xftp.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class Add_xftp { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Component Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | this.uiGroupBox2 = new Sunny.UI.UIGroupBox(); 27 | this.uiRadioButton2 = new Sunny.UI.UIRadioButton(); 28 | this.uiRadioButton1 = new Sunny.UI.UIRadioButton(); 29 | this.uiGroupBox2.SuspendLayout(); 30 | this.SuspendLayout(); 31 | // 32 | // uiGroupBox2 33 | // 34 | this.uiGroupBox2.Controls.Add(this.uiRadioButton2); 35 | this.uiGroupBox2.Controls.Add(this.uiRadioButton1); 36 | this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 37 | this.uiGroupBox2.Location = new System.Drawing.Point(9, 6); 38 | this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 39 | this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1); 40 | this.uiGroupBox2.Name = "uiGroupBox2"; 41 | this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0); 42 | this.uiGroupBox2.Size = new System.Drawing.Size(510, 300); 43 | this.uiGroupBox2.TabIndex = 13; 44 | this.uiGroupBox2.Text = "额外信息"; 45 | this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; 46 | this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 47 | // 48 | // uiRadioButton2 49 | // 50 | this.uiRadioButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 51 | this.uiRadioButton2.Location = new System.Drawing.Point(14, 70); 52 | this.uiRadioButton2.MinimumSize = new System.Drawing.Size(1, 1); 53 | this.uiRadioButton2.Name = "uiRadioButton2"; 54 | this.uiRadioButton2.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 55 | this.uiRadioButton2.Size = new System.Drawing.Size(120, 29); 56 | this.uiRadioButton2.TabIndex = 1; 57 | this.uiRadioButton2.Text = "Ftp模式"; 58 | this.uiRadioButton2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 59 | this.uiRadioButton2.Click += new System.EventHandler(this.uiRadioButton2_Click); 60 | // 61 | // uiRadioButton1 62 | // 63 | this.uiRadioButton1.Checked = true; 64 | this.uiRadioButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 65 | this.uiRadioButton1.Location = new System.Drawing.Point(14, 35); 66 | this.uiRadioButton1.MinimumSize = new System.Drawing.Size(1, 1); 67 | this.uiRadioButton1.Name = "uiRadioButton1"; 68 | this.uiRadioButton1.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 69 | this.uiRadioButton1.Size = new System.Drawing.Size(120, 29); 70 | this.uiRadioButton1.TabIndex = 0; 71 | this.uiRadioButton1.Text = "Sftp模式"; 72 | this.uiRadioButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 73 | this.uiRadioButton1.Click += new System.EventHandler(this.uiRadioButton1_Click); 74 | // 75 | // Add_xftp 76 | // 77 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 78 | this.ClientSize = new System.Drawing.Size(520, 306); 79 | this.Controls.Add(this.uiGroupBox2); 80 | this.MaximumSize = new System.Drawing.Size(520, 306); 81 | this.Name = "Add_xftp"; 82 | this.ReceiveParams += new Sunny.UI.OnReceiveParams(this.Add_xftp_ReceiveParams); 83 | this.uiGroupBox2.ResumeLayout(false); 84 | this.ResumeLayout(false); 85 | 86 | } 87 | 88 | #endregion 89 | 90 | private Sunny.UI.UIGroupBox uiGroupBox2; 91 | private Sunny.UI.UIRadioButton uiRadioButton2; 92 | private Sunny.UI.UIRadioButton uiRadioButton1; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_xftp.cs: -------------------------------------------------------------------------------- 1 | using MstscManager.Forms; 2 | using Newtonsoft.Json.Linq; 3 | using Sunny.UI; 4 | 5 | namespace MstscManager.Controls { 6 | public partial class Add_xftp : UIPage { 7 | public Add_xftp() { 8 | InitializeComponent(); 9 | } 10 | 11 | private void uiRadioButton1_Click(object sender, EventArgs e) { 12 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 13 | top_form.set_port(22); 14 | } 15 | 16 | private void uiRadioButton2_Click(object sender, EventArgs e) { 17 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 18 | top_form.set_port(21); 19 | } 20 | public Dictionary get_config() { 21 | Dictionary config = new Dictionary(); 22 | if (uiRadioButton1.Checked) config.Add("sec_connect_mode", "sftp"); 23 | if (uiRadioButton2.Checked) config.Add("sec_connect_mode", "ftp"); 24 | return config; 25 | } 26 | public void set_config(JObject csobj) { 27 | uiRadioButton1.Checked = false; 28 | uiRadioButton1.Checked = csobj["sec_connect_mode"].ToString() == "sftp" ? true : false; 29 | uiRadioButton2.Checked = csobj["sec_connect_mode"].ToString() == "ftp" ? true : false; 30 | } 31 | 32 | private void Add_xftp_ReceiveParams(object sender, UIPageParamsArgs e) { 33 | JObject csobj = e.Value as JObject; 34 | set_config(csobj); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_xftp.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_xshell.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class Add_xshell { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Component Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | this.uiGroupBox2 = new Sunny.UI.UIGroupBox(); 27 | this.uiRadioButton3 = new Sunny.UI.UIRadioButton(); 28 | this.uiRadioButton2 = new Sunny.UI.UIRadioButton(); 29 | this.uiRadioButton1 = new Sunny.UI.UIRadioButton(); 30 | this.uiGroupBox2.SuspendLayout(); 31 | this.SuspendLayout(); 32 | // 33 | // uiGroupBox2 34 | // 35 | this.uiGroupBox2.Controls.Add(this.uiRadioButton3); 36 | this.uiGroupBox2.Controls.Add(this.uiRadioButton2); 37 | this.uiGroupBox2.Controls.Add(this.uiRadioButton1); 38 | this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 39 | this.uiGroupBox2.Location = new System.Drawing.Point(9, 6); 40 | this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 41 | this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1); 42 | this.uiGroupBox2.Name = "uiGroupBox2"; 43 | this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0); 44 | this.uiGroupBox2.Size = new System.Drawing.Size(510, 300); 45 | this.uiGroupBox2.TabIndex = 12; 46 | this.uiGroupBox2.Text = "额外信息"; 47 | this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; 48 | this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 49 | // 50 | // uiRadioButton3 51 | // 52 | this.uiRadioButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 53 | this.uiRadioButton3.Location = new System.Drawing.Point(14, 105); 54 | this.uiRadioButton3.MinimumSize = new System.Drawing.Size(1, 1); 55 | this.uiRadioButton3.Name = "uiRadioButton3"; 56 | this.uiRadioButton3.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 57 | this.uiRadioButton3.Size = new System.Drawing.Size(120, 29); 58 | this.uiRadioButton3.TabIndex = 2; 59 | this.uiRadioButton3.Text = "Sftp模式"; 60 | this.uiRadioButton3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 61 | this.uiRadioButton3.Click += new System.EventHandler(this.uiRadioButton3_Click); 62 | // 63 | // uiRadioButton2 64 | // 65 | this.uiRadioButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 66 | this.uiRadioButton2.Location = new System.Drawing.Point(14, 70); 67 | this.uiRadioButton2.MinimumSize = new System.Drawing.Size(1, 1); 68 | this.uiRadioButton2.Name = "uiRadioButton2"; 69 | this.uiRadioButton2.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 70 | this.uiRadioButton2.Size = new System.Drawing.Size(120, 29); 71 | this.uiRadioButton2.TabIndex = 1; 72 | this.uiRadioButton2.Text = "Telnet模式"; 73 | this.uiRadioButton2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 74 | this.uiRadioButton2.Click += new System.EventHandler(this.uiRadioButton2_Click); 75 | // 76 | // uiRadioButton1 77 | // 78 | this.uiRadioButton1.Checked = true; 79 | this.uiRadioButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 80 | this.uiRadioButton1.Location = new System.Drawing.Point(14, 35); 81 | this.uiRadioButton1.MinimumSize = new System.Drawing.Size(1, 1); 82 | this.uiRadioButton1.Name = "uiRadioButton1"; 83 | this.uiRadioButton1.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); 84 | this.uiRadioButton1.Size = new System.Drawing.Size(120, 29); 85 | this.uiRadioButton1.TabIndex = 0; 86 | this.uiRadioButton1.Text = "SSH模式"; 87 | this.uiRadioButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 88 | this.uiRadioButton1.Click += new System.EventHandler(this.uiRadioButton1_Click); 89 | // 90 | // Add_xshell 91 | // 92 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 93 | this.ClientSize = new System.Drawing.Size(520, 306); 94 | this.Controls.Add(this.uiGroupBox2); 95 | this.MaximumSize = new System.Drawing.Size(520, 306); 96 | this.Name = "Add_xshell"; 97 | this.ReceiveParams += new Sunny.UI.OnReceiveParams(this.Add_xshell_ReceiveParams); 98 | this.uiGroupBox2.ResumeLayout(false); 99 | this.ResumeLayout(false); 100 | 101 | } 102 | 103 | #endregion 104 | 105 | private Sunny.UI.UIGroupBox uiGroupBox2; 106 | private Sunny.UI.UIRadioButton uiRadioButton2; 107 | private Sunny.UI.UIRadioButton uiRadioButton1; 108 | private Sunny.UI.UIRadioButton uiRadioButton3; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_xshell.cs: -------------------------------------------------------------------------------- 1 | using MstscManager.Forms; 2 | using Newtonsoft.Json.Linq; 3 | using Sunny.UI; 4 | 5 | namespace MstscManager.Controls { 6 | public partial class Add_xshell : UIPage { 7 | public Add_xshell() { 8 | InitializeComponent(); 9 | } 10 | 11 | private void uiRadioButton1_Click(object sender, EventArgs e) { 12 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 13 | top_form.set_port(22); 14 | } 15 | 16 | private void uiRadioButton2_Click(object sender, EventArgs e) { 17 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 18 | top_form.set_port(0); 19 | } 20 | 21 | private void uiRadioButton3_Click(object sender, EventArgs e) { 22 | Add_server top_form = this.Parent.Parent.Parent.Parent as Add_server; 23 | top_form.set_port(22); 24 | } 25 | public Dictionary get_config() { 26 | Dictionary config = new Dictionary(); 27 | if (uiRadioButton1.Checked) config.Add("sec_connect_mode", "ssh"); 28 | if (uiRadioButton2.Checked) config.Add("sec_connect_mode", "telnet"); 29 | if (uiRadioButton3.Checked) config.Add("sec_connect_mode", "sftp"); 30 | return config; 31 | } 32 | public void set_config(JObject csobj) { 33 | uiRadioButton1.Checked = false; 34 | uiRadioButton1.Checked = csobj["sec_connect_mode"].ToString() == "ssh" ? true : false; 35 | uiRadioButton2.Checked = csobj["sec_connect_mode"].ToString() == "telnet" ? true : false; 36 | uiRadioButton3.Checked = csobj["sec_connect_mode"].ToString() == "sftp" ? true : false; 37 | } 38 | 39 | private void Add_xshell_ReceiveParams(object sender, UIPageParamsArgs e) { 40 | JObject csobj = e.Value as JObject; 41 | set_config(csobj); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /MstscManager/Controls/Add_xshell.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Change_pass.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class Change_pass { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Component Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | this.uiButton1 = new Sunny.UI.UIButton(); 27 | this.uiTextBox3 = new Sunny.UI.UITextBox(); 28 | this.uiTextBox2 = new Sunny.UI.UITextBox(); 29 | this.uiLabel3 = new Sunny.UI.UILabel(); 30 | this.uiLabel2 = new Sunny.UI.UILabel(); 31 | this.uiTextBox1 = new Sunny.UI.UITextBox(); 32 | this.uiLabel1 = new Sunny.UI.UILabel(); 33 | this.SuspendLayout(); 34 | // 35 | // uiButton1 36 | // 37 | this.uiButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 38 | this.uiButton1.Location = new System.Drawing.Point(149, 227); 39 | this.uiButton1.MinimumSize = new System.Drawing.Size(1, 1); 40 | this.uiButton1.Name = "uiButton1"; 41 | this.uiButton1.Size = new System.Drawing.Size(185, 35); 42 | this.uiButton1.TabIndex = 13; 43 | this.uiButton1.Text = "确认"; 44 | this.uiButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 45 | this.uiButton1.Click += new System.EventHandler(this.uiButton1_Click); 46 | // 47 | // uiTextBox3 48 | // 49 | this.uiTextBox3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 50 | this.uiTextBox3.Location = new System.Drawing.Point(149, 174); 51 | this.uiTextBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 52 | this.uiTextBox3.MinimumSize = new System.Drawing.Size(1, 16); 53 | this.uiTextBox3.Name = "uiTextBox3"; 54 | this.uiTextBox3.ShowText = false; 55 | this.uiTextBox3.Size = new System.Drawing.Size(185, 29); 56 | this.uiTextBox3.TabIndex = 12; 57 | this.uiTextBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; 58 | this.uiTextBox3.Watermark = ""; 59 | this.uiTextBox3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 60 | // 61 | // uiTextBox2 62 | // 63 | this.uiTextBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 64 | this.uiTextBox2.Location = new System.Drawing.Point(149, 129); 65 | this.uiTextBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 66 | this.uiTextBox2.MinimumSize = new System.Drawing.Size(1, 16); 67 | this.uiTextBox2.Name = "uiTextBox2"; 68 | this.uiTextBox2.ShowText = false; 69 | this.uiTextBox2.Size = new System.Drawing.Size(185, 29); 70 | this.uiTextBox2.TabIndex = 10; 71 | this.uiTextBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; 72 | this.uiTextBox2.Watermark = ""; 73 | this.uiTextBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 74 | // 75 | // uiLabel3 76 | // 77 | this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 78 | this.uiLabel3.Location = new System.Drawing.Point(48, 174); 79 | this.uiLabel3.Name = "uiLabel3"; 80 | this.uiLabel3.Size = new System.Drawing.Size(106, 29); 81 | this.uiLabel3.TabIndex = 11; 82 | this.uiLabel3.Text = "重复新密码:"; 83 | this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 84 | this.uiLabel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 85 | // 86 | // uiLabel2 87 | // 88 | this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 89 | this.uiLabel2.Location = new System.Drawing.Point(79, 129); 90 | this.uiLabel2.Name = "uiLabel2"; 91 | this.uiLabel2.Size = new System.Drawing.Size(106, 29); 92 | this.uiLabel2.TabIndex = 9; 93 | this.uiLabel2.Text = "新密码:"; 94 | this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 95 | this.uiLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 96 | // 97 | // uiTextBox1 98 | // 99 | this.uiTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 100 | this.uiTextBox1.Location = new System.Drawing.Point(149, 86); 101 | this.uiTextBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); 102 | this.uiTextBox1.MinimumSize = new System.Drawing.Size(1, 16); 103 | this.uiTextBox1.Name = "uiTextBox1"; 104 | this.uiTextBox1.ShowText = false; 105 | this.uiTextBox1.Size = new System.Drawing.Size(185, 29); 106 | this.uiTextBox1.TabIndex = 8; 107 | this.uiTextBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; 108 | this.uiTextBox1.Watermark = ""; 109 | this.uiTextBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 110 | // 111 | // uiLabel1 112 | // 113 | this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 114 | this.uiLabel1.Location = new System.Drawing.Point(79, 86); 115 | this.uiLabel1.Name = "uiLabel1"; 116 | this.uiLabel1.Size = new System.Drawing.Size(106, 29); 117 | this.uiLabel1.TabIndex = 7; 118 | this.uiLabel1.Text = "旧密码:"; 119 | this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 120 | this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 121 | // 122 | // Change_pass 123 | // 124 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 125 | this.ClientSize = new System.Drawing.Size(424, 410); 126 | this.Controls.Add(this.uiButton1); 127 | this.Controls.Add(this.uiTextBox3); 128 | this.Controls.Add(this.uiTextBox2); 129 | this.Controls.Add(this.uiLabel3); 130 | this.Controls.Add(this.uiLabel2); 131 | this.Controls.Add(this.uiTextBox1); 132 | this.Controls.Add(this.uiLabel1); 133 | this.MaximumSize = new System.Drawing.Size(424, 410); 134 | this.Name = "Change_pass"; 135 | this.ResumeLayout(false); 136 | 137 | } 138 | 139 | #endregion 140 | 141 | private Sunny.UI.UIButton uiButton1; 142 | private Sunny.UI.UITextBox uiTextBox3; 143 | private Sunny.UI.UITextBox uiTextBox2; 144 | private Sunny.UI.UILabel uiLabel3; 145 | private Sunny.UI.UILabel uiLabel2; 146 | private Sunny.UI.UITextBox uiTextBox1; 147 | private Sunny.UI.UILabel uiLabel1; 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /MstscManager/Controls/Change_pass.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32; 2 | using Sunny.UI; 3 | using MstscManager.Utils; 4 | using System.Windows.Forms; 5 | 6 | namespace MstscManager.Controls { 7 | public partial class Change_pass : UIPage { 8 | public Change_pass() { 9 | InitializeComponent(); 10 | } 11 | 12 | private void uiButton1_Click(object sender, EventArgs e) { 13 | 14 | string? password = DbInihelper.GetIniData(Share.iniconfig_action, "mstsc_pass", Share.iniconfig_path); 15 | if (password == "" || password == null) { ShowErrorTip("密码为空不能修改");return; } 16 | string old_pass = uiTextBox1.Text; 17 | string new_pass = uiTextBox2.Text; 18 | string new_pass2 = uiTextBox3.Text; 19 | if(new_pass2 != new_pass) { ShowErrorTip("两次输入的新密码不一致!");return; } 20 | string new_pass_e = common_tools.md5(new_pass); 21 | if (password == new_pass_e) { ShowErrorTip("新旧密码不能相同!"); return; } 22 | if (password != common_tools.md5(old_pass)) { ShowErrorTip("旧密码错误!"); return; } 23 | //key.SetValue("mstsc_pass", new_pass_e); 24 | DbInihelper.SetIniData(Share.iniconfig_action, "mstsc_pass", new_pass_e, Share.iniconfig_path); 25 | DbSqlHelper.UpdatePassword(new_pass_e.Substring(0,16)); 26 | ShowSuccessTip("密码修改成功!"); 27 | Thread.Sleep(1000); 28 | ShowSuccessTip("为了软件了稳定,请重新启动!"); 29 | Thread.Sleep(1000); 30 | System.Environment.Exit(0); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /MstscManager/Controls/Change_pass.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Common_setting.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32; 2 | using MstscManager.Utils; 3 | using Sunny.UI; 4 | using System.IO; 5 | 6 | namespace MstscManager.Controls { 7 | public partial class Common_setting : UIPage { 8 | public Common_setting() { 9 | InitializeComponent(); 10 | } 11 | 12 | private void uiCheckBox1_CheckedChanged(object sender, EventArgs e) { 13 | if ((sender as UICheckBox).Checked) { 14 | //to do 设置启动true; 15 | DbInihelper.SetIniData(Share.iniconfig_action, "is_open_with_mm", "1", Share.iniconfig_path); 16 | Share.fm.set_mm_status("1"); 17 | } else { 18 | //to do 设置启动false; 19 | DbInihelper.SetIniData(Share.iniconfig_action, "is_open_with_mm", "0", Share.iniconfig_path); 20 | Share.fm.set_mm_status("0"); 21 | } 22 | } 23 | 24 | private void Common_setting_Load(object sender, EventArgs e) { 25 | if (Share.fm.is_open_with_mm == "1") uiCheckBox1.Checked = true; 26 | if (Share.fm.is_hide_behind == "1") uiCheckBox2.Checked = true; 27 | uiTextBox1.Text = Share.fm.db_path; 28 | } 29 | //更换db位置 30 | private void uiButton1_Click(object sender, EventArgs e) { 31 | string dir = ""; 32 | if (DirEx.SelectDirEx("选择数据库保存的位置", ref dir)) { 33 | string new_db_path = Path.Combine(dir, "MstscManager.db"); 34 | string old_path = Share.fm.db_path; 35 | new_db_path = new_db_path.Replace(System.Environment.CurrentDirectory + "\\", ""); 36 | //File.Move(old_path, new_db_path); 37 | File.Copy(old_path, new_db_path); 38 | DbInihelper.SetIniData(Share.iniconfig_action, "db_path", new_db_path, Share.iniconfig_path); 39 | DbInihelper.SetIniData(Share.iniconfig_action, "old_db_path", old_path, Share.iniconfig_path); 40 | Share.fm.set_db_path(new_db_path); 41 | //UIMessageDialog.ShowMessageDialog("请手动关闭【MSTSC管理器】后,手动将【MstscManager.db】文件移动到你选择的文件夹!", "提示",false,Style,false); 42 | ShowSuccessTip("为了软件了稳定,请重新启动!"); 43 | Thread.Sleep(1000); 44 | System.Environment.Exit(0); 45 | } 46 | } 47 | 48 | private void uiCheckBox2_CheckedChanged(object sender, EventArgs e) { 49 | if ((sender as UICheckBox).Checked) { 50 | DbInihelper.SetIniData(Share.iniconfig_action, "is_hide_behind", "1", Share.iniconfig_path); 51 | Share.fm.set_hide_behind("1"); 52 | } else { 53 | DbInihelper.SetIniData(Share.iniconfig_action, "is_hide_behind", "0", Share.iniconfig_path); 54 | Share.fm.set_hide_behind("0"); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /MstscManager/Controls/Common_setting.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | 61 | 17, 17 62 | 63 | -------------------------------------------------------------------------------- /MstscManager/Controls/OthoerFun.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Controls { 2 | partial class OthoerFun { 3 | /// 4 | /// 必需的设计器变量。 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// 清理所有正在使用的资源。 10 | /// 11 | /// 如果应释放托管资源,为 true;否则为 false。 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region 组件设计器生成的代码 20 | 21 | /// 22 | /// 设计器支持所需的方法 - 不要修改 23 | /// 使用代码编辑器修改此方法的内容。 24 | /// 25 | private void InitializeComponent() { 26 | this.uiButton5 = new Sunny.UI.UIButton(); 27 | this.uiButton1 = new Sunny.UI.UIButton(); 28 | this.uiButton2 = new Sunny.UI.UIButton(); 29 | this.SuspendLayout(); 30 | // 31 | // uiButton5 32 | // 33 | this.uiButton5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 34 | this.uiButton5.Location = new System.Drawing.Point(3, 3); 35 | this.uiButton5.MinimumSize = new System.Drawing.Size(1, 1); 36 | this.uiButton5.Name = "uiButton5"; 37 | this.uiButton5.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; 38 | this.uiButton5.RightToLeft = System.Windows.Forms.RightToLeft.No; 39 | this.uiButton5.Size = new System.Drawing.Size(83, 35); 40 | this.uiButton5.TabIndex = 2; 41 | this.uiButton5.Text = "导入本机mstsc"; 42 | this.uiButton5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 43 | this.uiButton5.Click += new System.EventHandler(this.uiButton5_Click); 44 | // 45 | // uiButton1 46 | // 47 | this.uiButton1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 48 | this.uiButton1.Location = new System.Drawing.Point(3, 44); 49 | this.uiButton1.MinimumSize = new System.Drawing.Size(1, 1); 50 | this.uiButton1.Name = "uiButton1"; 51 | this.uiButton1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; 52 | this.uiButton1.RightToLeft = System.Windows.Forms.RightToLeft.No; 53 | this.uiButton1.Size = new System.Drawing.Size(83, 35); 54 | this.uiButton1.TabIndex = 3; 55 | this.uiButton1.Text = "账户管理"; 56 | this.uiButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 57 | this.uiButton1.Click += new System.EventHandler(this.uiButton1_Click); 58 | // 59 | // uiButton2 60 | // 61 | this.uiButton2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); 62 | this.uiButton2.Location = new System.Drawing.Point(2, 85); 63 | this.uiButton2.MinimumSize = new System.Drawing.Size(1, 1); 64 | this.uiButton2.Name = "uiButton2"; 65 | this.uiButton2.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; 66 | this.uiButton2.RightToLeft = System.Windows.Forms.RightToLeft.No; 67 | this.uiButton2.Size = new System.Drawing.Size(83, 35); 68 | this.uiButton2.TabIndex = 4; 69 | this.uiButton2.Text = "批量检测"; 70 | this.uiButton2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0); 71 | this.uiButton2.Click += new System.EventHandler(this.uiButton2_Click); 72 | // 73 | // OthoerFun 74 | // 75 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 76 | this.Controls.Add(this.uiButton2); 77 | this.Controls.Add(this.uiButton1); 78 | this.Controls.Add(this.uiButton5); 79 | this.MaximumSize = new System.Drawing.Size(89, 130); 80 | this.Name = "OthoerFun"; 81 | this.Size = new System.Drawing.Size(89, 130); 82 | this.ResumeLayout(false); 83 | 84 | } 85 | 86 | #endregion 87 | private Sunny.UI.UIButton uiButton5; 88 | private Sunny.UI.UIButton uiButton1; 89 | private Sunny.UI.UIButton uiButton2; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /MstscManager/Controls/OthoerFun.cs: -------------------------------------------------------------------------------- 1 | using MstscManager.Forms; 2 | using MstscManager.Utils; 3 | using Sunny.UI; 4 | namespace MstscManager.Controls { 5 | public partial class OthoerFun : UIUserControl{ 6 | public OthoerFun() { 7 | InitializeComponent(); 8 | } 9 | 10 | //用户管理 11 | private void uiButton1_Click(object sender, EventArgs e) { 12 | //to do 密码验证 13 | Share.fm.auto_close_oth_func(); 14 | var user = new user(); 15 | user.Show(); 16 | } 17 | 18 | //一键导入本机mstsc 19 | private void uiButton5_Click(object sender, EventArgs e) { 20 | Share.fm.auto_close_oth_func(); 21 | Share.fm.simple_import(); 22 | } 23 | 24 | private void uiButton2_Click(object sender, EventArgs e) { 25 | Share.fm.auto_close_oth_func(); 26 | Share.fm.ping_now_items(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /MstscManager/Controls/OthoerFun.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Controls/Set_exe_directory.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.Sqlite; 2 | using MstscManager.Utils; 3 | using Sunny.UI; 4 | 5 | namespace MstscManager.Controls { 6 | public partial class Set_exe_directory : UIPage { 7 | public Set_exe_directory() { 8 | InitializeComponent(); 9 | init(); 10 | } 11 | private void init() { 12 | SqliteDataReader reader = DbSqlHelper.ExecuteReader2("select * from Commom_setting"); 13 | while (reader.Read()) { 14 | string key = reader["key"].ToString(); 15 | if(key == "putty_exe_path") uiTextBox1.Text = reader["val"].ToString(); 16 | else if(key == "xshell_exe_path") uiTextBox2.Text = reader["val"].ToString(); 17 | else if(key == "xftp_exe_path") uiTextBox3.Text = reader["val"].ToString(); 18 | else if(key == "radmin_exe_path") uiTextBox4.Text = reader["val"].ToString(); 19 | else if(key == "vnc_exe_path") uiTextBox5.Text = reader["val"].ToString(); 20 | else if(key == "winscp_exe_path") uiTextBox6.Text = reader["val"].ToString(); 21 | else if(key == "securecrt_exe_path") uiTextBox7.Text = reader["val"].ToString(); 22 | else if(key == "mobaxterm_exe_path") uiTextBox8.Text = reader["val"].ToString(); 23 | else if(key == "todesk_exe_path") uiTextBox9.Text = reader["val"].ToString(); 24 | } 25 | reader.Close(); 26 | } 27 | private string show_dialog() { 28 | OpenFileDialog ofd = new OpenFileDialog(); 29 | ofd.Title = "请选择对应的exe文件"; 30 | //ofd.Multiselect = true; 31 | ofd.InitialDirectory = System.Environment.CurrentDirectory; 32 | ofd.Filter = "可执行文件|*.exe|所有文件|*.*"; 33 | ofd.ShowDialog(); 34 | return ofd.FileName; 35 | } 36 | private void set_or_update_path(string key,UITextBox button) { 37 | string path = show_dialog(); 38 | if (path == "") return; 39 | path = path.Replace(System.Environment.CurrentDirectory+"\\", ""); 40 | //Console.WriteLine(path); 41 | if (button.Text != "") {//update 42 | DbSqlHelper.ExecuteNonQuery2("update Commom_setting set val = ? where key = ?", path, key); 43 | } else {//insert 44 | DbSqlHelper.ExecuteNonQuery2("INSERT INTO Commom_setting (key,val) VALUES (?,?);", key, path); 45 | } 46 | button.Text = path; 47 | } 48 | private void uiButton1_Click(object sender, EventArgs e) { 49 | set_or_update_path("putty_exe_path", uiTextBox1); 50 | } 51 | 52 | private void uiButton2_Click(object sender, EventArgs e) { 53 | set_or_update_path("xshell_exe_path", uiTextBox2); 54 | } 55 | 56 | private void uiButton3_Click(object sender, EventArgs e) { 57 | set_or_update_path("xftp_exe_path", uiTextBox3); 58 | } 59 | 60 | private void uiButton4_Click(object sender, EventArgs e) { 61 | set_or_update_path("radmin_exe_path", uiTextBox4); 62 | } 63 | 64 | private void uiButton5_Click(object sender, EventArgs e) { 65 | set_or_update_path("vnc_exe_path", uiTextBox5); 66 | } 67 | 68 | private void uiButton6_Click(object sender, EventArgs e) { 69 | set_or_update_path("winscp_exe_path", uiTextBox6); 70 | } 71 | 72 | private void uiButton7_Click(object sender, EventArgs e) { 73 | set_or_update_path("securecrt_exe_path", uiTextBox7); 74 | } 75 | 76 | private void uiButton8_Click(object sender, EventArgs e) { 77 | set_or_update_path("mobaxterm_exe_path", uiTextBox8); 78 | } 79 | 80 | private void uiButton9_Click(object sender, EventArgs e) { 81 | set_or_update_path("todesk_exe_path", uiTextBox9); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /MstscManager/Controls/Set_exe_directory.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | 61 | 17, 17 62 | 63 | -------------------------------------------------------------------------------- /MstscManager/Controls/add_mstsc.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using Sunny.UI; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace MstscManager.Controls { 6 | public partial class add_mstsc : UIPage { 7 | public add_mstsc() { 8 | InitializeComponent(); 9 | } 10 | public Dictionary get_config() { 11 | Dictionary config = new Dictionary(); 12 | string screen_mode = (string)(uiComboBox1.SelectedItem == null ? uiComboBox1.Text : uiComboBox1.SelectedItem); 13 | config.Add("screen_mode_name", screen_mode); 14 | if (screen_mode.Trim() == "全屏") { 15 | config.Add("screen_mode", "2"); 16 | config.Add("screen_width", "1024"); 17 | config.Add("screen_height", "768"); 18 | } else { 19 | config.Add("screen_mode", "1"); 20 | string[] arr = screen_mode.Split(new char[] {' ',}, StringSplitOptions.RemoveEmptyEntries); 21 | config.Add("screen_width", arr[0]); 22 | config.Add("screen_height", arr[2]); 23 | } 24 | 25 | if (uiCheckBox3.Checked) config.Add("use_multimon", "1"); else config.Add("use_multimon", "0"); 26 | 27 | string session_bpp = (string)(uiComboBox3.SelectedItem == null ? uiComboBox3.Text : uiComboBox3.SelectedItem); 28 | Regex regex = new Regex(@"(\d+)"); 29 | Match match = regex.Match(session_bpp); 30 | config.Add("session_bpp", match.Groups[1].Value.ToString()); 31 | 32 | if (uiCheckBox4.Checked) config.Add("displayconnectionbar", "1"); else config.Add("displayconnectionbar", "0"); 33 | 34 | string audiomode = (string)(uiComboBox4.SelectedItem == null ? uiComboBox4.Text : uiComboBox4.SelectedItem); 35 | config.Add("audiomode_name", audiomode); 36 | if (audiomode== "在远程计算机上播放") config.Add("audiomode", "1"); 37 | else if(audiomode== "不要播放") config.Add("audiomode", "2"); 38 | else if(audiomode == "在此计算机上播放") config.Add("audiomode", "0"); 39 | else config.Add("audiomode", "0"); 40 | 41 | string audiocapturemode = (string)(uiComboBox5.SelectedItem == null ? uiComboBox5.Text : uiComboBox5.SelectedItem); 42 | config.Add("audiocapturemode_name", audiocapturemode); 43 | if (audiocapturemode == "从此计算机进行录制") config.Add("audiocapturemode", "1"); 44 | else if (audiocapturemode == "不录制") config.Add("audiocapturemode", "0"); 45 | else config.Add("audiocapturemode", "0"); 46 | 47 | string keyboardhook = (string)(uiComboBox6.SelectedItem == null ? uiComboBox6.Text : uiComboBox6.SelectedItem); 48 | config.Add("keyboardhook_name", keyboardhook); 49 | if (keyboardhook == "在这台计算机上") config.Add("keyboardhook", "0"); 50 | else if (keyboardhook == "在远程计算机上") config.Add("keyboardhook", "1"); 51 | else if (keyboardhook == "仅在全屏显示时") config.Add("keyboardhook", "2"); 52 | else config.Add("keyboardhook", "2"); 53 | 54 | if (uiCheckBox5.Checked) config.Add("autoreconnection", "1"); else config.Add("autoreconnection", "0"); 55 | if (uiCheckBox8.Checked) config.Add("disable_wallpaper", "0"); else config.Add("disable_wallpaper", "1"); 56 | if (uiCheckBox7.Checked) config.Add("compression", "1"); else config.Add("compression", "0"); 57 | if (uiCheckBox1.Checked) config.Add("p_prompt", "1"); else config.Add("p_prompt", "0"); 58 | 59 | if (uiCheckBox6.Checked) config.Add("redirectclipboard", "1"); else config.Add("redirectclipboard", "0"); 60 | if (uiCheckBox9.Checked) config.Add("redirectprinters", "1"); else config.Add("redirectprinters", "0"); 61 | if (uiCheckBox2.Checked) config.Add("redirectsmartcards", "1"); else config.Add("redirectsmartcards", "0"); 62 | if (uiCheckBox10.Checked) config.Add("redirectcomports", "1"); else config.Add("redirectcomports", "0"); 63 | if (uiCheckBox11.Checked) config.Add("redirectposdevices", "1"); else config.Add("redirectposdevices", "0"); 64 | if (uiCheckBox12.Checked) config.Add("camerastoredirect", "*"); else config.Add("camerastoredirect", " "); 65 | if (uiCheckBox13.Checked) config.Add("drivestoredirect", "*"); else config.Add("drivestoredirect", " "); 66 | 67 | if(uiRadioButton2.Checked) config.Add("p_admin_mode", "1"); else config.Add("p_admin_mode", "0"); 68 | 69 | return config; 70 | } 71 | public void set_config(JObject csobj) { 72 | uiComboBox1.Text = csobj["screen_mode_name"].ToString(); 73 | uiCheckBox3.Checked = csobj["use_multimon"].ToString()=="1"?true:false; 74 | 75 | string session_bpp = csobj["session_bpp"].ToString(); 76 | if(session_bpp == "15") { uiComboBox3.Text = "增强色(15位)"; } 77 | else if(session_bpp == "16") { uiComboBox3.Text = "增强色(16位)"; } 78 | else if(session_bpp == "24") { uiComboBox3.Text = "真彩色(24位)"; } 79 | else if (session_bpp == "32") { uiComboBox3.Text = "最高质量(32位)"; } 80 | 81 | uiCheckBox4.Checked = csobj["displayconnectionbar"].ToString() == "1" ? true : false; 82 | uiComboBox4.Text = csobj["audiomode_name"].ToString(); 83 | uiComboBox5.Text = csobj["audiocapturemode_name"].ToString(); 84 | uiComboBox6.Text = csobj["keyboardhook_name"].ToString(); 85 | 86 | uiCheckBox5.Checked = csobj["autoreconnection"].ToString() == "1" ? true : false; 87 | uiCheckBox8.Checked = csobj["disable_wallpaper"].ToString() == "0" ? true : false; 88 | uiCheckBox7.Checked = csobj["compression"].ToString() == "1" ? true : false; 89 | uiCheckBox1.Checked = csobj["p_prompt"].ToString() == "1" ? true : false; 90 | 91 | uiCheckBox6.Checked = csobj["redirectclipboard"].ToString() == "1" ? true : false; 92 | uiCheckBox9.Checked = csobj["redirectprinters"].ToString() == "1" ? true : false; 93 | uiCheckBox2.Checked = csobj["redirectsmartcards"].ToString() == "1" ? true : false; 94 | uiCheckBox10.Checked = csobj["redirectcomports"].ToString() == "1" ? true : false; 95 | uiCheckBox11.Checked = csobj["redirectposdevices"].ToString() == "1" ? true : false; 96 | uiCheckBox12.Checked = csobj["camerastoredirect"].ToString() == "*" ? true : false; 97 | uiCheckBox13.Checked = csobj["drivestoredirect"].ToString() == "*" ? true : false; 98 | 99 | uiRadioButton2.Checked = csobj["p_admin_mode"].ToString() == "1" ? true : false; 100 | uiRadioButton1.Checked = csobj["p_admin_mode"].ToString() == "0" ? true : false; 101 | 102 | } 103 | 104 | private void add_mstsc_ReceiveParams(object sender, UIPageParamsArgs e) { 105 | JObject csobj = e.Value as JObject; 106 | set_config(csobj); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /MstscManager/Controls/add_mstsc.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | -------------------------------------------------------------------------------- /MstscManager/Forms/Setting.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MstscManager.Forms { 2 | partial class Setting { 3 | /// 4 | /// Required designer variable. 5 | /// 6 | private System.ComponentModel.IContainer components = null; 7 | 8 | /// 9 | /// Clean up any resources being used. 10 | /// 11 | /// true if managed resources should be disposed; otherwise, false. 12 | protected override void Dispose(bool disposing) { 13 | if (disposing && (components != null)) { 14 | components.Dispose(); 15 | } 16 | base.Dispose(disposing); 17 | } 18 | 19 | #region Windows Form Designer generated code 20 | 21 | /// 22 | /// Required method for Designer support - do not modify 23 | /// the contents of this method with the code editor. 24 | /// 25 | private void InitializeComponent() { 26 | this.components = new System.ComponentModel.Container(); 27 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Setting)); 28 | this.uiStyleManager1 = new Sunny.UI.UIStyleManager(this.components); 29 | this.SuspendLayout(); 30 | // 31 | // Aside 32 | // 33 | this.Aside.LineColor = System.Drawing.Color.White; 34 | this.Aside.Location = new System.Drawing.Point(1, 35); 35 | this.Aside.Size = new System.Drawing.Size(138, 410); 36 | // 37 | // uiStyleManager1 38 | // 39 | this.uiStyleManager1.DPIScale = true; 40 | // 41 | // Setting 42 | // 43 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; 44 | this.ClientSize = new System.Drawing.Size(564, 446); 45 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 46 | this.MaximizeBox = false; 47 | this.MinimizeBox = false; 48 | this.Name = "Setting"; 49 | this.Padding = new System.Windows.Forms.Padding(1, 35, 1, 1); 50 | this.ShowTitleIcon = true; 51 | this.Text = "设置"; 52 | this.ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 1378, 708); 53 | this.ResumeLayout(false); 54 | 55 | } 56 | 57 | #endregion 58 | 59 | private Sunny.UI.UIStyleManager uiStyleManager1; 60 | } 61 | } -------------------------------------------------------------------------------- /MstscManager/Forms/Setting.cs: -------------------------------------------------------------------------------- 1 | using Sunny.UI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Data; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | using MstscManager.Controls; 12 | 13 | namespace MstscManager.Forms { 14 | public partial class Setting : UIAsideMainFrame { 15 | public Setting() { 16 | InitializeComponent(); 17 | int pageIndex = 1000; 18 | 19 | pageIndex++; 20 | AddPage(new Common_setting(), pageIndex); 21 | Aside.CreateNode("常规", pageIndex); 22 | SelectPage(pageIndex); 23 | 24 | pageIndex++; 25 | AddPage(new Change_pass(), pageIndex); 26 | Aside.CreateNode("更改超级密码", pageIndex); 27 | 28 | pageIndex++; 29 | AddPage(new Set_exe_directory(), pageIndex); 30 | Aside.CreateNode("三方EXE位置", pageIndex); 31 | 32 | pageIndex++; 33 | AddPage(new About(), pageIndex); 34 | Aside.CreateNode("关于", pageIndex); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /MstscManager/Forms/Setting.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | text/microsoft-resx 50 | 51 | 52 | 2.0 53 | 54 | 55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 56 | 57 | 58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 59 | 60 | 61 | 17, 17 62 | 63 | 64 | 65 | 66 | AAABAAEAICAAAAEAIAAoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAMQOAADEDgAAAAAAAAAA 67 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////M//////// 68 | /////////////////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 69 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP// 70 | ////////////////////////////////////////////RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 71 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 72 | AAAAAAAA//////////////////////////////////////////////+IAAAAAAAAAAAAAAAAAAAAAAAA 73 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 74 | AAAAAAAAAAAAAAAAAAD//////////////////////////////////////////////8wAAAAAAAAAAAAA 75 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD+/v40AAAAAAAA 76 | AAAAAAAAAAAAAAAAAAAAAAAA/v7+W////////////////////////////////////////////////wAA 77 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7+J/// 78 | /////////f39+v///0AAAAAA/v7+B/39/er///////////////////////////////////////////// 79 | //////////////39/YYAAAAAAAAAAP39/Z////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 80 | AAD///////////////////////////////////////////////////////////////////////////// 81 | //////////////////////////////////////////////////////////////7+/lwAAAAAAAAAAAAA 82 | AAAAAAAA/v7+dv////////////////////////////////////////////////////////////////// 83 | /////////////////////////////////////////////////////////////////////////////wAA 84 | AAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////////////////// 85 | //////////////////////////////////////////////////////////////////////////////// 86 | /////////f39lQAAAAAAAAAA/f39xP////////////////////////////////////////////////// 87 | //////////////////////////////////////////////////////////////////////////////// 88 | ////////////////////////AAAAAAAAAAD///////////////////////////////////////////// 89 | /////////////////////////f39if7+/hoAAAAA/v7+OP39/Z////////////////////////////// 90 | ///////////////////////////////////9/f3HAAAAAP////////////////////////////////// 91 | ////////////////////////////qgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/hX///////////// 92 | //////////////////////////////////////////////39/aQAAAAAAAAAAP39/c////////////// 93 | //////////////////////////////39/fkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+ 94 | /j3///////////////////////////////////////////////////+AAAAAAAAAAAAAAAAAAAAAAP7+ 95 | /nn/////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 96 | AAAAAAAAAAAAAP39/bj//////////////////////////////////////v7+MQAAAAAAAAAAAAAAAAAA 97 | AAAAAAAAAAAAAP////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 98 | AAAAAAAAAAAAAAAAAAAAAAAA/v7+R/////////////////////////////////7+/jsAAAAAAAAAAAAA 99 | AAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////f391AAAAAAAAAAAAAAAAAAA 100 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////AAAAAAAA 101 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAAA 102 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///w////////////////////////////// 103 | //8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////// 104 | //8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7+ZP////////////////// 105 | /////////////////4AAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/hX///////////////////////////// 106 | //////////////7+/lwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////// 107 | //////////////////////////////39/cMAAAAAAAAAAAAAAAD9/f2S//////////////////////// 108 | /////////////////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/f39p/// 109 | //////////////////////////////////////////////////8AAAAAAAAAAP////////////////// 110 | //////////////////////////////////////////////39/Y8AAAAAAAAAAAAAAAAAAAAAAAAAAP// 111 | //////////////////////////////////////////////////////////////////8AAAAA//////// 112 | /////////////////////////////////////////////////////////////////////////f392v// 113 | /////////////////////////////////////////////////////////////////////////v7+dwAA 114 | AAD///8z//////////////////////////////////////////////////////////////////////// 115 | //////////////////////////////////////////////////////////////////////////////// 116 | //8AAAAAAAAAAAAAAAD9/f3T//////////////////////////////////////////////////////// 117 | //////////////////////////////////////////////////////////////////////////////// 118 | /////////v7+NAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////// 119 | //////////////////////////////////////////////////////////////////////////////// 120 | //////////////39/dcAAAAAAAAAAAAAAAAAAAAAAAAAAP///4j/////////////////////////gP39 121 | /c3/////////////////////////////////////////////////////////////////////////QP39 122 | /b//////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/////9/f2y////CgAA 123 | AAAAAAAAAAAAAP///xH//////////////////////////////////////////////////////f39kgAA 124 | AAAAAAAAAAAAAAAAAAD+/v5q//////7+/n8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 125 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////// 126 | //8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 127 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////// 128 | /////////f39tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 129 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////// 130 | ///////////////////+/v5tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 131 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////// 132 | //////////////////////////////7+/iQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 133 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP// 134 | /0D////////////////////////////////9/f2/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 135 | AAAAAAAAAAAAAAAAAAAAAAAA 136 | 137 | 138 | -------------------------------------------------------------------------------- /MstscManager/Forms/user.cs: -------------------------------------------------------------------------------- 1 | using Sunny.UI; 2 | using MstscManager.Utils; 3 | using Microsoft.Data.Sqlite; 4 | 5 | namespace MstscManager.Forms { 6 | public partial class user : UIForm { 7 | public user() { 8 | InitializeComponent(); 9 | } 10 | 11 | //添加 12 | private void uiButton1_Click(object sender, EventArgs e) { 13 | string user_name = uiTextBox1.Text; 14 | string user_pass = uiTextBox2.Text; 15 | string mark_text = uiTextBox3.Text; 16 | if (user_name == "") { ShowWarningTip("<用户名>是必须的!"); return; } 17 | if (user_pass == "") { ShowWarningTip("<密码>是必须的!"); return; } 18 | DbSqlHelper.ExecuteNonQuery2("insert into User_setting (user_name,user_pass,mark_text) values (?,?,?)", user_name, user_pass, mark_text); 19 | //ShowInfoNotifier("数据添加成功!"); 20 | ShowSuccessTip("数据添加成功"); 21 | //刷新界面? 22 | //uiDataGridView1.Rows.Add(user_name, user_pass, mark_text); 23 | update_table(); 24 | } 25 | 26 | //删除 27 | private void uiButton2_Click(object sender, EventArgs e) { 28 | if (ShowAskDialog("确定要删除当前选中的账号吗?删除之后,如果有关联的服务器将失效!", false)) { 29 | string id = uiDataGridView1.SelectedRows[0].Cells[3].Value.ToString(); 30 | //Console.WriteLine(id); 31 | DbSqlHelper.ExecuteNonQuery2("delete from User_setting where id = ?", id); 32 | uiDataGridView1.Rows.Remove(uiDataGridView1.SelectedRows[0]); 33 | ShowSuccessTip("数据删除成功"); 34 | } 35 | } 36 | 37 | private void user_Load(object sender, EventArgs e) { 38 | string value = ""; 39 | if (this.InputPasswordDialog(ref value, true, "请输入管理员密码", true)) { 40 | //ShowInfoDialog(value); 41 | if (common_tools.md5(value.ToString()) == Share.fm.password) { 42 | real_init(); 43 | } else { 44 | ShowErrorTip("密码错误!"); 45 | this.Close(); 46 | } 47 | } else { 48 | this.Close(); 49 | } 50 | } 51 | private void real_init() { 52 | 53 | //数据初始化 54 | UIDataGridView view = uiDataGridView1; 55 | //base.Init(); 56 | 57 | view.AutoGenerateColumns = false; 58 | view.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; 59 | view.AllowUserToResizeRows = false; 60 | view.AllowUserToResizeColumns = true; 61 | view.AllowUserToAddRows = false; 62 | view.AllowUserToDeleteRows = false; 63 | view.CellBorderStyle = DataGridViewCellBorderStyle.None; 64 | view.MultiSelect = false; 65 | view.RowHeadersVisible = false; 66 | view.SelectionMode = DataGridViewSelectionMode.FullRowSelect; 67 | 68 | update_table(); 69 | } 70 | private void update_table() { 71 | UIDataGridView view = uiDataGridView1; 72 | view.Rows.Clear(); 73 | SqliteDataReader reader = DbSqlHelper.ExecuteReader2("select * from User_setting"); 74 | while (reader.Read()) { 75 | view.Rows.Add(reader["user_name"], reader["user_pass"], reader["mark_text"], reader["id"]); 76 | } 77 | reader.Close(); 78 | } 79 | 80 | private void uiButton3_Click(object sender, EventArgs e) { 81 | Console.WriteLine(uiDataGridView1.SelectedRows.Count); 82 | string id = uiDataGridView1.SelectedRows[0].Cells[3].Value.ToString(); 83 | string user_name = uiTextBox1.Text; 84 | string user_pass = uiTextBox2.Text; 85 | string mark_text = uiTextBox3.Text; 86 | if (user_name == "") { ShowWarningTip("<用户名>是必须的!"); return; } 87 | if (user_pass == "") { ShowWarningTip("<密码>是必须的!"); return; } 88 | DbSqlHelper.ExecuteNonQuery2("update User_setting set user_name = ?,user_pass = ?,mark_text = ? where id = ? ", user_name, user_pass, mark_text,id); 89 | ShowSuccessTip("数据更新成功"); 90 | update_table(); 91 | } 92 | 93 | private void uiDataGridView1_MouseClick(object sender, MouseEventArgs e) { 94 | //Console.WriteLine(uiDataGridView1.SelectedRows[0].Cells[3].Value.ToString()); 95 | uiTextBox1.Text = uiDataGridView1.SelectedRows[0].Cells[0].Value.ToString(); 96 | uiTextBox2.Text = uiDataGridView1.SelectedRows[0].Cells[1].Value.ToString(); 97 | uiTextBox3.Text = uiDataGridView1.SelectedRows[0].Cells[2].Value.ToString(); 98 | } 99 | 100 | private void uiButton4_Click(object sender, EventArgs e) { 101 | uiTextBox1.Text = ""; 102 | uiTextBox2.Text = ""; 103 | uiTextBox3.Text = ""; 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /MstscManager/MstscManager.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net6.0-windows 6 | enable 7 | true 8 | enable 9 | remote-desktop-512.ico 10 | MSTSC远程管理器 11 | 12 | 13 | 14 | embedded 15 | 16 | 17 | 18 | embedded 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | True 31 | True 32 | Resources.resx 33 | 34 | 35 | 36 | 37 | 38 | PublicResXFileCodeGenerator 39 | Resources.Designer.cs 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /MstscManager/Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Program.cs -------------------------------------------------------------------------------- /MstscManager/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MstscManager { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | public static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MstscManager.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性,对 51 | /// 使用此强类型资源类的所有资源查找执行重写。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 65 | /// 66 | public static System.Drawing.Bitmap icons8_documents_folder_96 { 67 | get { 68 | object obj = ResourceManager.GetObject("icons8_documents_folder_96", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 75 | /// 76 | public static System.Drawing.Bitmap icons8_folder_96 { 77 | get { 78 | object obj = ResourceManager.GetObject("icons8_folder_96", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 85 | /// 86 | public static System.Drawing.Bitmap linux__Copy_ { 87 | get { 88 | object obj = ResourceManager.GetObject("linux__Copy_", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 95 | /// 96 | public static System.Drawing.Bitmap radmin_logo__Copy_ { 97 | get { 98 | object obj = ResourceManager.GetObject("radmin_logo__Copy_", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 105 | /// 106 | public static System.Drawing.Icon remote_desktop_128 { 107 | get { 108 | object obj = ResourceManager.GetObject("remote_desktop_128", resourceCulture); 109 | return ((System.Drawing.Icon)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 115 | /// 116 | public static System.Drawing.Bitmap remote_desktop_512 { 117 | get { 118 | object obj = ResourceManager.GetObject("remote_desktop_512", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 125 | /// 126 | public static System.Drawing.Icon SecureCRT { 127 | get { 128 | object obj = ResourceManager.GetObject("SecureCRT", resourceCulture); 129 | return ((System.Drawing.Icon)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 135 | /// 136 | public static System.Drawing.Bitmap securecrt_icon__Copy_ { 137 | get { 138 | object obj = ResourceManager.GetObject("securecrt_icon__Copy_", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 145 | /// 146 | public static System.Drawing.Bitmap setting { 147 | get { 148 | object obj = ResourceManager.GetObject("setting", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | 153 | /// 154 | /// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 155 | /// 156 | public static System.Drawing.Icon setting64 { 157 | get { 158 | object obj = ResourceManager.GetObject("setting64", resourceCulture); 159 | return ((System.Drawing.Icon)(obj)); 160 | } 161 | } 162 | 163 | /// 164 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 165 | /// 166 | public static System.Drawing.Bitmap ssh__Copy_ { 167 | get { 168 | object obj = ResourceManager.GetObject("ssh__Copy_", resourceCulture); 169 | return ((System.Drawing.Bitmap)(obj)); 170 | } 171 | } 172 | 173 | /// 174 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 175 | /// 176 | public static System.Drawing.Bitmap terminal__Copy_ { 177 | get { 178 | object obj = ResourceManager.GetObject("terminal__Copy_", resourceCulture); 179 | return ((System.Drawing.Bitmap)(obj)); 180 | } 181 | } 182 | 183 | /// 184 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 185 | /// 186 | public static System.Drawing.Bitmap Todesk_logo { 187 | get { 188 | object obj = ResourceManager.GetObject("Todesk_logo", resourceCulture); 189 | return ((System.Drawing.Bitmap)(obj)); 190 | } 191 | } 192 | 193 | /// 194 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 195 | /// 196 | public static System.Drawing.Bitmap vnc__Copy_ { 197 | get { 198 | object obj = ResourceManager.GetObject("vnc__Copy_", resourceCulture); 199 | return ((System.Drawing.Bitmap)(obj)); 200 | } 201 | } 202 | 203 | /// 204 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 205 | /// 206 | public static System.Drawing.Bitmap vnc__Copy_2 { 207 | get { 208 | object obj = ResourceManager.GetObject("vnc__Copy_2", resourceCulture); 209 | return ((System.Drawing.Bitmap)(obj)); 210 | } 211 | } 212 | 213 | /// 214 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 215 | /// 216 | public static System.Drawing.Bitmap windows_client__Copy_ { 217 | get { 218 | object obj = ResourceManager.GetObject("windows_client__Copy_", resourceCulture); 219 | return ((System.Drawing.Bitmap)(obj)); 220 | } 221 | } 222 | 223 | /// 224 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 225 | /// 226 | public static System.Drawing.Bitmap Winscp__Copy_ { 227 | get { 228 | object obj = ResourceManager.GetObject("Winscp__Copy_", resourceCulture); 229 | return ((System.Drawing.Bitmap)(obj)); 230 | } 231 | } 232 | 233 | /// 234 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 235 | /// 236 | public static System.Drawing.Bitmap xftp__Copy_ { 237 | get { 238 | object obj = ResourceManager.GetObject("xftp__Copy_", resourceCulture); 239 | return ((System.Drawing.Bitmap)(obj)); 240 | } 241 | } 242 | 243 | /// 244 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 245 | /// 246 | public static System.Drawing.Bitmap xshell__Copy_ { 247 | get { 248 | object obj = ResourceManager.GetObject("xshell__Copy_", resourceCulture); 249 | return ((System.Drawing.Bitmap)(obj)); 250 | } 251 | } 252 | 253 | /// 254 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 255 | /// 256 | public static System.Drawing.Bitmap xterm_logo { 257 | get { 258 | object obj = ResourceManager.GetObject("xterm_logo", resourceCulture); 259 | return ((System.Drawing.Bitmap)(obj)); 260 | } 261 | } 262 | } 263 | } 264 | -------------------------------------------------------------------------------- /MstscManager/Resources/SecureCRT.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/SecureCRT.ico -------------------------------------------------------------------------------- /MstscManager/Resources/Todesk_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/Todesk_logo.png -------------------------------------------------------------------------------- /MstscManager/Resources/Winscp (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/Winscp (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/icons8-documents-folder-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/icons8-documents-folder-96.png -------------------------------------------------------------------------------- /MstscManager/Resources/icons8-folder-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/icons8-folder-96.png -------------------------------------------------------------------------------- /MstscManager/Resources/linux (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/linux (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/radmin_logo (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/radmin_logo (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/remote-desktop-128.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/remote-desktop-128.ico -------------------------------------------------------------------------------- /MstscManager/Resources/remote-desktop-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/remote-desktop-512.png -------------------------------------------------------------------------------- /MstscManager/Resources/securecrt-icon (Copy).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/securecrt-icon (Copy).jpg -------------------------------------------------------------------------------- /MstscManager/Resources/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/setting.png -------------------------------------------------------------------------------- /MstscManager/Resources/setting64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/setting64.ico -------------------------------------------------------------------------------- /MstscManager/Resources/ssh (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/ssh (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/terminal (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/terminal (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/vnc (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/vnc (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/vnc (Copy)2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/vnc (Copy)2.png -------------------------------------------------------------------------------- /MstscManager/Resources/windows-client (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/windows-client (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/xftp (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/xftp (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/xshell (Copy).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/xshell (Copy).png -------------------------------------------------------------------------------- /MstscManager/Resources/xterm_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/Resources/xterm_logo.png -------------------------------------------------------------------------------- /MstscManager/Utils/DbInihelper_use.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Runtime.InteropServices; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using static System.Collections.Specialized.BitVector32; 10 | using static System.Environment; 11 | 12 | namespace MstscManager.Utils { 13 | public static class DbInihelper { 14 | 15 | private const int StringBufferSize = 65536; 16 | [DllImport("kernel32")] 17 | private static extern long WritePrivateProfileString(string section, string key, string val, string filepath); 18 | 19 | [DllImport("kernel32", EntryPoint = "GetPrivateProfileString")] 20 | private static extern long GetPrivateProfileString(string section, string key, string def, Byte[] retVal, int size, string filePath); 21 | [DllImport("kernel32", EntryPoint = "GetPrivateProfileString")] 22 | private static extern uint GetPrivateProfileStringA(string section, string key, string def, Byte[] retVal, int size, string filePath); 23 | 24 | [DllImport("kernel32", EntryPoint = "GetPrivateProfileSectionNames")] 25 | private static extern int GetPrivateProfileSectionNames(byte[] retval, int size, string filePath); 26 | 27 | [DllImport("kernel32")] 28 | private static extern int GetPrivateProfileSection(string section, byte[] retval, int size, string filePath); 29 | [DllImport("kernel32")] 30 | private static extern long WritePrivateProfileSection(string section, StringBuilder? retval, string filePath); 31 | 32 | public static bool SetIniData(string section, string key, string val, string iniFilePath) { 33 | if (!File.Exists(iniFilePath)) CreateFile(iniFilePath); 34 | long opSt = WritePrivateProfileString(section, key, val, iniFilePath); 35 | if (opSt == 0) { return false; } else { return true; } 36 | } 37 | 38 | public static string? GetIniData(string section, string key, string iniFilePath) { 39 | if (!File.Exists(iniFilePath)) { CreateFile(iniFilePath); return null; } 40 | List result = new List(); 41 | Byte[] buffer = new Byte[65536]; 42 | long k = GetPrivateProfileString(section, key, string.Empty, buffer, buffer.Length, iniFilePath); 43 | if (k == 0) return null; 44 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 45 | return Encoding.GetEncoding("GB2312").GetString(buffer,0,Convert.ToInt32(k)); 46 | } 47 | 48 | public static bool DelIniDat(string section, string key, string iniFilePath) { 49 | if (!File.Exists(iniFilePath)) { CreateFile(iniFilePath); return false; } 50 | long opSt = WritePrivateProfileString(section, key, null, iniFilePath); 51 | if (opSt == 0) { return false; } else { return true; } 52 | } 53 | 54 | public static List? GetIniAllSectionsNames(string iniFilePath) { 55 | if (!File.Exists(iniFilePath)) { CreateFile(iniFilePath); return null; } 56 | List result = new List(); 57 | Byte[] buffer = new Byte[65536]; 58 | long len = GetPrivateProfileSectionNames(buffer, buffer.Length, iniFilePath); 59 | if(len == 0) return null; 60 | 61 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 62 | int j = 0; 63 | for (int i = 0; i < len; i++) 64 | if (buffer[i] == 0) { 65 | result.Add(Encoding.GetEncoding("GB2312").GetString(buffer, j, i - j)); 66 | j = i + 1; 67 | } 68 | return result; 69 | } 70 | 71 | public static List GetIniAllSectionsNames2(string iniFilename) { 72 | List result = new List(); 73 | Byte[] buf = new Byte[65536]; 74 | uint len = GetPrivateProfileStringA(null, null, null, buf, buf.Length, iniFilename); 75 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 76 | int j = 0; 77 | for (int i = 0; i < len; i++) 78 | if (buf[i] == 0) { 79 | result.Add(Encoding.GetEncoding("GB2312").GetString(buf, j, i - j)); 80 | j = i + 1; 81 | } 82 | return result; 83 | } 84 | 85 | public static Dictionary? GetIniSection(string section, string iniFilePath) { 86 | if (!File.Exists(iniFilePath)) { CreateFile(iniFilePath); return null; } 87 | Dictionary dict = new Dictionary(); 88 | List result = new List(); 89 | Byte[] buffer = new Byte[65536]; 90 | long k = GetPrivateProfileSection(section, buffer, buffer.Length, iniFilePath); 91 | if (k == 0) return null; 92 | 93 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 94 | int j = 0; 95 | for (int i = 0; i < k; i++) 96 | if (buffer[i] == 0) { 97 | result.Add(Encoding.GetEncoding("GB2312").GetString(buffer, j, i - j)); 98 | j = i + 1; 99 | } 100 | foreach (var keypair in result) { 101 | string[] keyvalue = keypair.ToString().Split("=", StringSplitOptions.RemoveEmptyEntries); 102 | dict[keyvalue[0]] = keyvalue[1]; 103 | } 104 | return dict; 105 | } 106 | 107 | public static List GetIniSectionKeys(string SectionName, string iniFilename) { 108 | List result = new List(); 109 | Byte[] buf = new Byte[65536]; 110 | uint len = GetPrivateProfileStringA(SectionName, null, null, buf, buf.Length, iniFilename); 111 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 112 | int j = 0; 113 | for (int i = 0; i < len; i++) 114 | if (buf[i] == 0) { 115 | result.Add(Encoding.GetEncoding("GB2312").GetString(buf, j, i - j)); 116 | j = i + 1; 117 | } 118 | return result; 119 | } 120 | 121 | public static bool SetIniSection(string section,Dictionary listKeyValue, string iniFilePath) { 122 | if (!File.Exists(iniFilePath)) CreateFile(iniFilePath); 123 | string lpString = ""; 124 | foreach (var temp in listKeyValue.Keys) { 125 | lpString += (temp + "=" + listKeyValue[temp]); 126 | lpString += "\0"; 127 | } 128 | lpString += "\0"; 129 | long opSt = WritePrivateProfileSection(section, new StringBuilder(lpString), iniFilePath); 130 | if (opSt == 0) { return false; } else { return true; } 131 | } 132 | 133 | public static bool DelIniSection(string section, string iniFilePath) { 134 | if (!File.Exists(iniFilePath)) { CreateFile(iniFilePath); return false; } 135 | long opSt = WritePrivateProfileSection(section, null, iniFilePath); 136 | if (opSt == 0) { return false; } else { return true; } 137 | } 138 | 139 | public static void CreateFile(string path) { 140 | if (!string.IsNullOrEmpty(path)) { 141 | try { 142 | string? dr = Path.GetDirectoryName(path); 143 | if (!Directory.Exists(dr)) { _ = Directory.CreateDirectory(dr); } 144 | if (!File.Exists(path)) { 145 | FileStream fs = File.Create(path); 146 | fs.Close(); 147 | } 148 | } catch (Exception e) { 149 | Console.WriteLine("CreateFile()" + e.ToString()); 150 | } 151 | } 152 | } 153 | 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /MstscManager/Utils/DbSqlHelper.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.Sqlite; 2 | using System.Data; 3 | using System.Data.Common; 4 | using System.Text; 5 | using System.Transactions; 6 | using System.Windows.Input; 7 | 8 | namespace MstscManager.Utils { 9 | internal class DbSqlHelper { 10 | public static string ConnectionString { get; set; } 11 | public static SqliteConnection common_conn = null; 12 | public static SqliteTransaction common_transaction = null; 13 | private static void PrepareCommand(SqliteCommand cmd, SqliteConnection conn, string cmdText, params object[] p) { 14 | if (conn.State != ConnectionState.Open) conn.Open(); 15 | if(common_transaction!=null) cmd.Transaction = common_transaction; 16 | cmd.Parameters.Clear(); 17 | cmd.Connection = conn; 18 | cmd.CommandText = cmdText; 19 | cmd.CommandType = CommandType.Text; 20 | cmd.CommandTimeout = 30; 21 | if (p != null) { 22 | int index = 0; 23 | while (index < p.Length) { 24 | cmd.CommandText = cmd.CommandText.ReplaceOne("?","$t"+index.ToString()); 25 | index++; 26 | } 27 | index = 0; 28 | foreach (object parm in p) { 29 | cmd.Parameters.AddWithValue("$t" + index.ToString(), parm); 30 | index++; 31 | } 32 | } 33 | cmd.Prepare(); 34 | } 35 | private static void PrepareCommand2(SqliteCommand cmd, SqliteConnection conn, string cmdText, params object[] p) { 36 | if (conn.State != ConnectionState.Open) conn.Open(); 37 | cmd.Parameters.Clear(); 38 | cmd.Connection = conn; 39 | cmd.CommandText = cmdText; 40 | cmd.CommandType = CommandType.Text; 41 | cmd.CommandTimeout = 30; 42 | if (p != null) { 43 | int index = 0; 44 | while (index < p.Length) { 45 | cmd.CommandText = cmd.CommandText.ReplaceOne("?", "$t" + index.ToString()); 46 | index++; 47 | } 48 | index = 0; 49 | foreach (object parm in p) { 50 | cmd.Parameters.AddWithValue("$t" + index.ToString(), parm); 51 | index++; 52 | } 53 | } 54 | cmd.Prepare(); 55 | } 56 | public static int ExecuteNonQuery(string cmdText, params object[] p) { 57 | if (common_conn == null) common_conn = new SqliteConnection(ConnectionString); 58 | //using (SqliteConnection conn = new SqliteConnection(ConnectionString)) { 59 | using (SqliteCommand command = new SqliteCommand()) { 60 | PrepareCommand(command, common_conn, cmdText, p); 61 | return command.ExecuteNonQuery(); 62 | } 63 | //} 64 | } 65 | public static int ExecuteNonQuery2(string cmdText, params object[] p) { 66 | //if (common_conn == null) common_conn = new SqliteConnection(ConnectionString); 67 | using (SqliteConnection conn = new SqliteConnection(ConnectionString)) { 68 | using (SqliteCommand command = new SqliteCommand()) { 69 | PrepareCommand2(command, conn, cmdText, p); 70 | return command.ExecuteNonQuery(); 71 | } 72 | } 73 | } 74 | public static SqliteDataReader ExecuteReader(string cmdText, params object[] p) { 75 | if(common_conn==null) common_conn = new SqliteConnection(ConnectionString); 76 | SqliteCommand command = new SqliteCommand(); 77 | PrepareCommand(command, common_conn, cmdText, p); 78 | return command.ExecuteReader(CommandBehavior.CloseConnection); 79 | 80 | } 81 | public static SqliteDataReader ExecuteReader2(string cmdText, params object[] p) { 82 | //if (common_conn == null) common_conn = new SqliteConnection(ConnectionString); 83 | SqliteConnection conn = new SqliteConnection(ConnectionString); 84 | SqliteCommand command = new SqliteCommand(); 85 | PrepareCommand2(command, conn, cmdText, p); 86 | return command.ExecuteReader(CommandBehavior.CloseConnection); 87 | 88 | } 89 | //public static string ExecuteScalar(string cmdText, params object[] p) { 90 | // using (SqliteConnection conn = new SqliteConnection(ConnectionString)) { 91 | // using (SqliteCommand command = new SqliteCommand()) { 92 | // PrepareCommand(command, conn, cmdText, p); 93 | // return (string)command.ExecuteScalar(); 94 | // } 95 | // } 96 | //} 97 | public static int UpdatePassword( string newPassword) { 98 | using (var connection = new SqliteConnection(ConnectionString)) { 99 | connection.Open(); 100 | using (var command = connection.CreateCommand()) { 101 | command.CommandText = "SELECT quote($newPassword);"; 102 | command.Parameters.AddWithValue("$newPassword", newPassword); 103 | var quotedNewPassword = command.ExecuteScalar() as string; 104 | command.CommandText = "PRAGMA rekey = " + quotedNewPassword; 105 | command.Parameters.Clear(); 106 | int x = command.ExecuteNonQuery(); 107 | return x; 108 | } 109 | } 110 | } 111 | } 112 | public static class StringReplace { 113 | public static string ReplaceOne(this string str, string oldStr, string newStr) { 114 | StringBuilder sb = new StringBuilder(str); 115 | int index = str.IndexOf(oldStr); 116 | if (index > -1) 117 | return str.Substring(0, index) + newStr + str.Substring(index + oldStr.Length); 118 | return str; 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /MstscManager/Utils/RDPcrypt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System; 7 | using System.Security.Cryptography; 8 | 9 | namespace MstscManager.Utils { 10 | internal class RDPcrypt { 11 | static byte[] s_aditionalEntropy = null; 12 | public static void test() { 13 | //加密 14 | //string password = ""; 15 | //string encrpyts = encrpyt(password); 16 | //Console.WriteLine(encrpyts); 17 | //解密 18 | //string encrpyts = ""; 19 | //string back = dencrpyt(strToToHexByte(encrpyts)); 20 | //Console.WriteLine(back); 21 | } 22 | public static byte[] strToToHexByte(string hexString) { 23 | try { 24 | hexString = hexString.Replace(" ", ""); 25 | if ((hexString.Length % 2) != 0) 26 | hexString += " "; 27 | byte[] returnBytes = new byte[hexString.Length / 2]; 28 | for (int i = 0; i < returnBytes.Length; i++) 29 | returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16); 30 | return returnBytes; 31 | } catch { 32 | return null; 33 | } 34 | } 35 | public static string encrpyt(string password) { 36 | byte[] secret = Encoding.Unicode.GetBytes(password); 37 | byte[] encryptedSecret = Protect(secret); 38 | string res = string.Empty; 39 | foreach (byte b in encryptedSecret) { 40 | res += b.ToString("X2"); 41 | } 42 | return res; 43 | } 44 | public static string dencrpyt(byte[] encryptedSecret) { 45 | byte[] originalData = Unprotect(encryptedSecret); 46 | string str = Encoding.Default.GetString(originalData); 47 | return str; 48 | } 49 | //加密方法 50 | public static byte[] Protect(byte[] data) { 51 | try { 52 | return ProtectedData.Protect(data, s_aditionalEntropy, DataProtectionScope.LocalMachine); 53 | } catch (CryptographicException e) { 54 | return null; 55 | } 56 | } 57 | //解密方法 58 | public static byte[] Unprotect(byte[] data) { 59 | try { 60 | return ProtectedData.Unprotect(data, s_aditionalEntropy, DataProtectionScope.LocalMachine); 61 | } catch (CryptographicException e) { 62 | return null; 63 | } 64 | } 65 | public static void PrintValues(Byte[] myArr) { 66 | foreach (Byte i in myArr) { 67 | Console.Write("\t{0}", i); 68 | } 69 | Console.WriteLine(); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /MstscManager/Utils/Share.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MstscManager.Utils { 8 | public static class Share { 9 | public static FMain fm; 10 | public static string iniconfig_path = @"data\MstscManager.ini"; 11 | public static string iniconfig_action = "Settings"; 12 | public static string now_group_name = "全部分类"; 13 | public static string now_version = "1.5"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MstscManager/Utils/common_tools.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Net.NetworkInformation; 3 | using System.Security.Cryptography; 4 | using System.Text; 5 | using static System.Windows.Forms.VisualStyles.VisualStyleElement; 6 | 7 | namespace MstscManager.Utils { 8 | public static class common_tools { 9 | public static Point Compute_absolute_point(Control obj) { 10 | int x = obj.Location.X; 11 | int y = obj.Location.Y; 12 | while (!(obj.Parent is FMain)) { 13 | x += obj.Parent.Location.X; 14 | y += obj.Parent.Location.Y; 15 | obj = obj.Parent; 16 | } 17 | return new Point(x, y); 18 | } 19 | public static void RunApp(string path_str, string arg) { 20 | Thread thread = new Thread(() => { 21 | Process pro = new Process(); 22 | pro.StartInfo.UseShellExecute = false; 23 | pro.StartInfo.CreateNoWindow = false; 24 | pro.StartInfo.FileName = @path_str; 25 | pro.StartInfo.Arguments = @arg; 26 | //pro.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; 27 | pro.StartInfo.WorkingDirectory = Path.GetDirectoryName(@path_str); 28 | pro.Start(); 29 | }); 30 | thread.Start(); 31 | Thread.Sleep(200); 32 | } 33 | public static void RunApp2(string Path, string arg) { 34 | Thread thread = new Thread(() => { 35 | Process pro = new Process(); 36 | pro.StartInfo.UseShellExecute = true; 37 | pro.StartInfo.CreateNoWindow = false; 38 | pro.StartInfo.FileName = Path; 39 | pro.StartInfo.Arguments = arg; 40 | //pro.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; 41 | //pro.StartInfo.WorkingDirectory = Path; 42 | pro.Start(); 43 | }); 44 | thread.Start(); 45 | Thread.Sleep(200); 46 | } 47 | public static void RunApp3(string Path, string arg) { 48 | Thread thread = new Thread(() => { 49 | Process pro = new Process(); 50 | pro.StartInfo.UseShellExecute = false; 51 | pro.StartInfo.CreateNoWindow = false; 52 | pro.StartInfo.FileName = @Path; 53 | pro.StartInfo.Arguments = arg; 54 | //pro.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; 55 | //pro.StartInfo.WorkingDirectory = Path; 56 | pro.Start(); 57 | }); 58 | thread.Start(); 59 | Thread.Sleep(200); 60 | } 61 | public static string pinghost(string host) { 62 | try { 63 | Ping p1 = new Ping(); 64 | PingReply reply = p1.Send(host); //发送主机名或Ip地址 65 | string status = "失败"; 66 | if (reply.Status == IPStatus.Success) { 67 | //status = reply.Options.Ttl.ToString(); 68 | status = reply.RoundtripTime.ToString()+"ms"; 69 | } else if (reply.Status == IPStatus.TimedOut) { 70 | status = "超时"; 71 | } 72 | return status; 73 | } catch (Exception) { 74 | return "超时"; 75 | } 76 | } 77 | public static string md5(string str) { 78 | MD5 md5 = MD5.Create(); 79 | byte[] buffer = Encoding.Default.GetBytes(str+"gmyxds"); 80 | byte[] MD5Buffer = md5.ComputeHash(buffer); 81 | string strNew = ""; 82 | for (int i = 0; i < MD5Buffer.Length; i++) { 83 | strNew += MD5Buffer[i].ToString("x2"); 84 | } 85 | return strNew; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /MstscManager/Utils/radmin_helper.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Runtime.InteropServices; 3 | using System.Text; 4 | 5 | namespace MstscManager.Utils { 6 | public static class radmin_helper { 7 | #region Windows API 调用 8 | public static int WM_CHAR = 0x102; 9 | public static int WM_CLICK = 0x00F5; 10 | public static int WM_GETTEXT = 0x000D; 11 | public static int WM_SETTEXT = 0x000C; 12 | 13 | [DllImport("User32.dll", EntryPoint = "FindWindow")] 14 | private static extern IntPtr FindWindow(string lpClassName, string lpWindowName); 15 | 16 | [DllImport("user32.dll", EntryPoint = "FindWindowEx", SetLastError = true)] 17 | private static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); 18 | 19 | [DllImport("User32.dll", EntryPoint = "SendMessage")] 20 | private static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, string lParam); 21 | 22 | [DllImport("user32.dll")] 23 | public static extern int AnyPopup(); 24 | 25 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] 26 | public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount); 27 | 28 | [DllImport("user32.dll")] 29 | public static extern int EnumThreadWindows(IntPtr dwThreadId, CallBack lpfn, int lParam); 30 | 31 | [DllImport("user32.dll")] 32 | public static extern int EnumChildWindows(IntPtr hWndParent, CallBack lpfn, int lParam); 33 | 34 | [DllImport("user32.dll", CharSet = CharSet.Ansi)] 35 | public static extern IntPtr PostMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); 36 | 37 | [DllImport("user32.dll", CharSet = CharSet.Ansi)] 38 | public static extern IntPtr SendMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam); 39 | 40 | [DllImport("user32.dll", CharSet = CharSet.Unicode)] 41 | public static extern IntPtr SendMessageA(IntPtr hwnd, int wMsg, int wParam, int lParam); 42 | 43 | [DllImport("user32.dll", CharSet = CharSet.Auto)] 44 | static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount); 45 | 46 | [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] 47 | public static extern int GetWindowTextLength(IntPtr hWnd); 48 | 49 | [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] 50 | public static extern IntPtr GetParent(IntPtr hWnd); 51 | public delegate bool CallBack(IntPtr hwnd, int lParam); 52 | 53 | public static void SendChar(IntPtr hand, char ch, int SleepTime) { 54 | PostMessage(hand, WM_CHAR, ch, 0); 55 | System.Threading.Thread.Sleep(SleepTime); 56 | } 57 | #endregion 58 | public static void auto_password(string ip,string user,string pass) { 59 | #region 钩子过程 60 | IntPtr mainWnd = FindWindow(null, "Radmin 安全性: "+ip); 61 | Thread.Sleep(1000); 62 | mainWnd = FindWindow(null, "Radmin 安全性: " + ip); 63 | for (int i = 0; i < 30; i++) //最大查找3秒 64 | { 65 | if (mainWnd != IntPtr.Zero) { 66 | Trace.WriteLine(System.DateTime.UtcNow.ToString() + "找到!"); 67 | break; 68 | } 69 | Thread.Sleep(100); 70 | } 71 | if (mainWnd == IntPtr.Zero) {//3秒内找不到就退出。 72 | Console.WriteLine("没找到窗口"); 73 | mainWnd = FindWindow(null, "Windows 安全性:" + ip); 74 | for (int i = 0; i < 30; i++) //最大查找3秒 75 | { 76 | if (mainWnd != IntPtr.Zero) { 77 | Trace.WriteLine(System.DateTime.UtcNow.ToString() + "找到!"); 78 | break; 79 | } 80 | Thread.Sleep(100); 81 | } 82 | if (mainWnd == IntPtr.Zero) {//3秒内找不到就退出。 83 | return; 84 | } 85 | } 86 | 87 | List listWnd = new List(); 88 | IntPtr hwnd_edit = IntPtr.Zero; 89 | int edit_id = 0; //第几个编辑框 90 | do { 91 | hwnd_edit = FindWindowEx(mainWnd, hwnd_edit, "Edit", null); 92 | char[] UserChar = user.ToCharArray(); 93 | char[] passChar = pass.ToCharArray(); 94 | if (edit_id <= 0) { 95 | foreach (char ch in UserChar) { 96 | SendChar(hwnd_edit, ch, 5); 97 | } 98 | } else { 99 | foreach (char ch in passChar) { 100 | SendChar(hwnd_edit, ch, 5); 101 | } 102 | } 103 | edit_id++; //输完后,编辑框序号变1 104 | } while (!hwnd_edit.Equals(IntPtr.Zero)); 105 | IntPtr hwnd_button = FindWindowEx(mainWnd, new IntPtr(0), null, "确定"); 106 | if (hwnd_button != IntPtr.Zero) { 107 | Trace.WriteLine(System.DateTime.UtcNow.ToString() + "找到按钮!"); 108 | SendMessage(hwnd_button, WM_CLICK, mainWnd, "0"); 109 | } 110 | #endregion 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /MstscManager/app.manifest: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | true 11 | true 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /MstscManager/remote-desktop-512.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/MstscManager/remote-desktop-512.ico -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | MSTSCManager Logo 3 |

MstscManager

4 |

5 | 6 | ## 项目介绍 7 | 8 | MSTSC远程管理器 9 | 10 | 一个支持MSTSC,Putty,Xshell,Xftp,Radmin,VNC,Winscp,SecureCRT,MobaXterm,Todesk的远程管理器 11 | 12 | ## 已支持的功能 13 | 14 | - [x] 支持常用的连接软件,如RDP,Putty,Xshell,Xftp,Radmin,VNC,Winscp,SecureCRT 15 | - [x] 支持服务器的增、删、改、查等管理操作 16 | - [x] 服务器分类、搜索、排序、更改分类功能 17 | - [x] 支持用户账号密码管理 18 | - [x] 支持ping状态显示 19 | - [x] 支持服务器到期提醒 20 | - [x] 支持超级管理员密码,开启软件输入密码 21 | - [x] 可以导入-导出服务器配置 22 | - [x] 支持大部分MSTSC的配置功能 23 | - [x] 可以一键导入本地的MSTSC链接 24 | - [x] 支持临时连接,添加服务器 25 | - [x] 拖拽分类服务器 26 | - [x] 支持自定义命令 27 | - [x] 三方EXE和数据库可以自由指定位置 28 | 29 | ### v1.2更新 30 | 31 | - [x] 添加加配置导出自定义命令 32 | - [x] 添加对MobaXterm,todesk的支持 33 | - [x] 添加对putty-ssh,MobaXterm 密钥连接的支持 34 | - [x] 添加对多级(二级)菜单分类的支持 35 | - [x] 添加了对dpi缩放适配 36 | - [x] 添加了当前分类详细情况的统计 37 | - [x] 添加了托盘功能 38 | - [x] 添加了批量检测 39 | - [x] 优化导入导出txt卡顿问题,将txt导入导出改成了csv导入导出 40 | - [x] 优化整体软件交互速度 41 | 42 | ### 更新说明 43 | 44 | [Updates.md](Updates.md) 45 | 46 | ## 如何下载 47 | 48 | 1)你可以下载源码,自行编译后使用。 49 | 50 | 2)点击右侧release,找到对应的zip文件,下载后,使用里面的【MSTSC远程管理器.exe】主程序文件 51 | 52 | 备注:`MSTSC_win_x86.zip`,`MSTSC_win_x64.zip`,`MSTSC_winn_x86_withdotnet6.zip` 53 | 54 | ,`MSTSC_win_x64_with_dotnet6.zip`,四个版本中前两个不带.NET环境,需要自行安装.NET6 Runtime环境,小白无脑选择后面2个就行。 55 | 56 | ## 使用说明 57 | 58 | - 增删改查 59 | 60 | ![增删改](images/增删改.gif) 61 | 62 | - 删除 按住ctrl 可以多选主机删除 63 | 64 | ![删除](images/删除.gif) 65 | 66 | - 分类-搜索 67 | 68 | ![搜索](images/搜索.gif) 69 | 70 | - 账户管理 71 | 72 | ![用户管理](images/用户管理.gif) 73 | 74 | - 选择账户 75 | 76 | ![image-20221014090815678](images/image-20221014090815678.png) 77 | 78 | - ping 到期状态 79 | 80 | ![image-20221014091108282](images/image-20221014091108282.png) 81 | 82 | - 设置开启密码 83 | 84 | ![开启密码](images/开启密码.gif) 85 | 86 | - 导入导出服务器列表 87 | 88 | ![导入](images/导入.gif) 89 | 90 | - 临时添加和连接服务器 91 | 92 | ![临时](images/临时.gif) 93 | 94 | - 自定义命令 95 | 96 | ![自定义](images/自定义.gif) 97 | 98 | - 设置三方exe路径 99 | 100 | ![image-20221014092752043](images/image-20221014092752043.png) 101 | 102 | - 其他功能自行体验 103 | 104 | ## 注意 105 | 106 | - putty 目前只支持密码登录,密钥登录需要使用自定义配置 107 | 108 | - 如果xftp ftp模式连接不上,需要自定义用session连接.。如下 109 | 110 | ![image-20221011210424699](images/image-20221011210424699.png) 111 | 112 | 手动建立ftp 连接,然后点打开会话位置,复制会话的路径,使用自定义配置如下 113 | 114 | ![image-20221011210627832](images/image-20221011210627832.png) 115 | 116 | ![image-20221011210646631](images/image-20221011210646631.png) 117 | 118 | ``` 119 | "xfp路径/新建会话.xfp" 120 | ``` 121 | 122 | - vnc的话,Realvnc 没有支持密码的命令行选项,需要自定义用配置文件连接 123 | 124 | - Tightvnc 不支持全屏和查看模式的命令行 需要自定义配置文件连接 125 | 126 | - SecureCrt 命令行指定密钥没用,不知道为什么 127 | 128 | - 所有的目录尽量不要放在有空格的目录里面 129 | 130 | - Xshell,Xftp命令行不支持私钥连接 131 | 132 | - 向日葵暂不支持命令行连接 133 | 134 | ## 如何编译 135 | 136 | 软件采用C# .Net 6 的Winform 编写的,使用了SunnyUI作为UI框架,开发环境使用的是VS2022. 137 | 138 | 一般来说直接导入解决方案应该可以正常运行和编译 139 | 140 | nuget包使用了,自行导入使用 141 | 142 | ``` 143 | Microsoft.Data.Sqlite.Core 144 | Newtonsoft.Json 145 | SQLitePCLRaw.bundle_e_sqlcipher 146 | SunnyUI 147 | ``` 148 | 149 | ## 联系作者 150 | 151 | - 程序由我个人独立开发,能力有限,难免出现一些Bug,欢迎大家积极反馈Bug和提出优化建议。 152 | - 对软件有建议或意见:[产品建议](https://support.qq.com/product/451575) 153 | - 154 | 155 | ## 最后 156 | 157 | 如果对这个项目感兴趣欢迎star,有疑问欢迎issue,pr 158 | -------------------------------------------------------------------------------- /Updates.md: -------------------------------------------------------------------------------- 1 | ## v1.2 2 | 3 | - [x] 修复进入关于页面报错的问题 4 | - [x] 修复路径名有空格问题 5 | - [x] 修复右下角临时连接服务器密码错误问题 6 | - [x] 修复窗口最小尺寸问题 7 | - [x] 所有配置当前目录化 8 | - [x] 添加加配置导出自定义命令 9 | - [x] 添加对MobaXterm,todesk的支持 10 | - [x] 添加对putty-ssh,MobaXterm 密钥连接的支持 11 | - [x] 添加对多级(二级)菜单分类的支持 12 | - [x] 添加了对dpi缩放适配 13 | - [x] 添加了当前分类详细情况的统计 14 | - [x] 添加了托盘功能 15 | - [x] 添加了批量检测 16 | - [x] 优化导入导出txt卡顿问题,将txt导入导出改成了csv导入导出 17 | - [x] 优化整体软件交互速度 18 | 19 | ## v1.3 20 | 21 | - 修复加速sql的一些bug 22 | 23 | ## V1.4 24 | 25 | - [x] 其他功能label dpi适配 26 | - [x] UltraVNC 右下角连接失败,密码为*的问题 27 | - [x] 没有选中服务器时候连接失败错误 28 | - [x] 修复导入本机mstsc报错 29 | - [x] 修复编辑主机时候查看密码报错的问题(关键修复) 30 | - [x] 修复mstsc连接始终是全屏的问题 31 | - [x] 修复mstsc组合键的设置问题 32 | - [x] 修复radmin自动填充失效的问题(概率问题) 33 | - [x] 细节优化 34 | - [x] 添加主句时候默认填充当前选中分类 35 | - [x] 添加主机隐藏查看密码和选择用户功能 36 | - [x] 其他功能失去焦点时候自动关闭功能 37 | 38 | ## v1.5 39 | 40 | - 修复了radmin 无法自动填充密码的问题 增加了兼容性 41 | -------------------------------------------------------------------------------- /images/image-20221011210424699.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/image-20221011210424699.png -------------------------------------------------------------------------------- /images/image-20221011210627832.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/image-20221011210627832.png -------------------------------------------------------------------------------- /images/image-20221011210646631.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/image-20221011210646631.png -------------------------------------------------------------------------------- /images/image-20221014090815678.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/image-20221014090815678.png -------------------------------------------------------------------------------- /images/image-20221014091108282.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/image-20221014091108282.png -------------------------------------------------------------------------------- /images/image-20221014092752043.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/image-20221014092752043.png -------------------------------------------------------------------------------- /images/remote-desktop-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/remote-desktop-512.png -------------------------------------------------------------------------------- /images/临时.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/临时.gif -------------------------------------------------------------------------------- /images/删除.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/删除.gif -------------------------------------------------------------------------------- /images/增删改.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/增删改.gif -------------------------------------------------------------------------------- /images/导入.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/导入.gif -------------------------------------------------------------------------------- /images/开启密码.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/开启密码.gif -------------------------------------------------------------------------------- /images/搜索.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/搜索.gif -------------------------------------------------------------------------------- /images/收款码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/收款码.png -------------------------------------------------------------------------------- /images/用户管理.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/用户管理.gif -------------------------------------------------------------------------------- /images/自定义.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMYXDS/MstscManager/fc7714307327e572c3d3fa4d857659246c31f62f/images/自定义.gif --------------------------------------------------------------------------------