Skip to content

Commit

Permalink
v1.2 bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
GMYXDS committed Nov 1, 2022
1 parent 31dfd29 commit b7a264f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,5 @@ ASALocalRun/
healthchecksdb
/MstscManager/bin
/MstscManager/obj
/MstscManager/Properties
/output
4 changes: 2 additions & 2 deletions MstscManager/Controls/Add_todesk.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion MstscManager/Controls/Set_exe_directory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public Set_exe_directory() {
init();
}
private void init() {
SqliteDataReader reader = DbSqlHelper.ExecuteReader("select * from Commom_setting");
SqliteDataReader reader = DbSqlHelper.ExecuteReader2("select * from Commom_setting");
while (reader.Read()) {
string key = reader["key"].ToString();
if(key == "putty_exe_path") uiTextBox1.Text = reader["val"].ToString();
Expand Down
12 changes: 7 additions & 5 deletions MstscManager/FMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ private void 添加分类ToolStripMenuItem_Click(object sender, EventArgs e) {

//创建一个节点对象,并初始化
TreeNode tmp = new TreeNode(group_name, 0, 1);
//在TreeView组件中加入子节点
uiTreeView1.SelectedNode.Nodes.Add(tmp);
uiTreeView1.SelectedNode = tmp;
////在TreeView组件中加入子节点
//uiTreeView1.SelectedNode.Nodes.Add(tmp);
//uiTreeView1.SelectedNode = tmp;
//uiTreeView1.ExpandAll();

DbSqlHelper.ExecuteNonQuery("insert into Group_setting (group_name,group_head_id) values (?,?)", group_name, head_group_id);
Expand Down Expand Up @@ -1168,7 +1168,8 @@ private void connect_serer(bool is_temp = false, string cs_d = "") {
//密钥连接
if (csobj["is_ssh_rsa"].ToString().Trim() == "1") {
//MobaXterm.exe -newtab "ssh -i $ppk_path $Username@$host -p $port"
connect_string += $" -newtab \"ssh -i {csobj["ssh_rsa_path"].ToString()} {csobj["user_name"].ToString()}@{csobj["ip"].ToString()} -p {csobj["port"].ToString()}\"";
//Console.WriteLine(csobj["ssh_rsa_path"].ToString().Replace("\\", "/"));
connect_string += $" -newtab \"ssh -i {csobj["ssh_rsa_path"].ToString().Replace("\\","/")} {csobj["user_name"].ToString()}@{csobj["ip"].ToString()} -p {csobj["port"].ToString()}\"";
} else {
//MobaXterm.exe -newtab "sshpass -p $password ssh $Username@$host -p $port"
connect_string += $" -newtab \"sshpass -p {csobj["user_pass"].ToString()} ssh {csobj["user_name"].ToString()}@{csobj["ip"].ToString()} -p {csobj["port"].ToString()}\"";
Expand All @@ -1189,11 +1190,12 @@ private void connect_serer(bool is_temp = false, string cs_d = "") {
//根据二次类型生成对应的字符串
//.\ToDesk.exe -control -id 432160856 -passwd ipa2q65t
string connect_string = $" -control -id {csobj["ip"].ToString().Replace(" ","")} -passwd {csobj["user_pass"].ToString()}";
//Console.WriteLine(connect_string);
common_tools.RunApp(exe_path, connect_string);
}
}
private string check_exe_path(string store_name) {
SqliteDataReader reader = DbSqlHelper.ExecuteReader("select * from Commom_setting where key = ?", store_name);
SqliteDataReader reader = DbSqlHelper.ExecuteReader2("select * from Commom_setting where key = ?", store_name);
bool flag = reader.Read();
if (!flag) {
ShowInfoTip("exe路径未设置,请到[设置]->[三方EXE位置]设置相关路径");
Expand Down
9 changes: 8 additions & 1 deletion MstscManager/Forms/Add_server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ public Add_server(string connect_setting, string target_id) {
SelectPage(1008);
uiHeaderButton8.Selected = true;
SendParamToPage(1008, csobj);
} else if (connect_type.IndexOf("Mobaxterm") != -1) {
SelectPage(1009);
uiHeaderButton9.Selected = true;
SendParamToPage(1009, csobj);
} else if (connect_type.IndexOf("Todesk") != -1) {
SelectPage(10010);
uiHeaderButton10.Selected = true;
SendParamToPage(10010, csobj);
}
}
public void init() {
Expand Down Expand Up @@ -211,7 +219,6 @@ private void uiHeaderButton8_Click(object sender, EventArgs e) {
set_port(22);
}
//mobaxterm

private void uiHeaderButton9_Click(object sender, EventArgs e) {
SelectPage(1009);
set_port(22);
Expand Down
2 changes: 1 addition & 1 deletion MstscManager/MstscManager.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ MSTSC远程管理器

2)点击右侧release,找到对应的zip文件,下载后,使用里面的【MSTSC远程管理器.exe】主程序文件

备注:`MSTSC远程管理器winx86.zip`,`MSTSC远程管理器winx64.zip`,`MSTSC远程管理器winnx86_withdotnet.zip`
备注:`MSTSC_win_x86.zip`,`MSTSC_win_x64.zip`,`MSTSC_winn_x86_withdotnet6.zip`

,`MSTSC远程管理器winx64_withdotnet.zip`,四个版本中前两个不带.NET环境,需要自行安装.NET6 Runtime环境,小白无脑选择后面2个就行。
,`MSTSC_win_x64_with_dotnet6.zip`,四个版本中前两个不带.NET环境,需要自行安装.NET6 Runtime环境,小白无脑选择后面2个就行。

## 使用说明

Expand Down

0 comments on commit b7a264f

Please sign in to comment.