SuperDesign/Source/开发辅助工具/Manager/Init.cs
zilinsoft 5a5faaf5dc ## 📅2025-07-16 星期三更新
### RySmartEditor    V1.0.2507.1601
- *.[新增]新增文件内容索引搜索。
- *.[新增]新增打开文件自动定位到指定行的功能。
### SuperDesign    V3.0.2507.1601
#### 网页抓取工具
- *.[修复]修复历史记录无法记录的BUG。
#### 编码解码
- *.[新增]新增svg图片代码转Geometry代码的功能。
#### 项目功能->项目管理
- *.[新增]互斥运行标准改为以毕方文件夹为准,而不是以项目文件为准。
- *.[新增]支持同个毕方项目可以不用重启来快捷切换不同子项目。
- *.[新增]支持发布时和打包时自动编译功能。
- *.[修复]修复项目输出路径为相对路径时,更新引用dll可能不成功的BUG。
2025-07-16 09:08:09 +08:00

69 lines
2.5 KiB
C#

using Newtonsoft.Json.Linq;
using QuickMsg;
using ryCommon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using .Controls;
namespace
{
public class Init
{
static System.Threading.Mutex run;
public static void Show(string[] args)
{
if (args.Length >= 2)
{
if (args[0] == "ver")
{
string ProjectDir = args[1];
Manager.RyProject.UpdateVer(ProjectDir.Trim('"') + "\\Properties\\AssemblyInfo.cs");
}
else if (args[0] == "get")
{
string ProjectPath = args[1];
var bf_path = SuperDesign.Manager.APIManager.GetBFFolderPath(ProjectPath);
run = new System.Threading.Mutex(true, "S_"+rySafe.MD5Sha1.GetMD5(bf_path), out bool runone);
if (!runone) //已经运行了
{
object mainHandle = RyMemoryShare.ReadFromMemory(1024, typeof(Int64), "S_" + rySafe.MD5Sha1.GetMD5( bf_path) + ".z");
if (mainHandle != null)
{
JObject jo= new JObject();
jo["type"] = "project_update";
jo["path"] = ProjectPath;
MyDb.RyWin32.SendMsg(IntPtr.Zero,(IntPtr)(long)mainHandle, MyDb.RyWin32.Sys_chanel_id, jo.ToString());
}
else
{
Application.Run(new Form1(ProjectPath, "get"));
}
}
else
{
Application.Run(new Form1(ProjectPath, "get"));
}
}
else if (args[0] == "open")
{
string ProjectPath = args[1];
Application.Run(new Form1(ProjectPath, "open"));
}
}
else if(args.Length == 1)
{
Application.Run(new Form1("", ""));
}
else
{
Application.Run(new Form1("", ""));
//Application.Run(new FrmMainEditor());
}
}
}
}