------ #### SuperDesign V3.0.2412.2001 - *.[新增]新增程序更新日志设置和自动发布功能。 - *.[修复]修复Post数据格式不正确时双击文本框会导致软件闪退的BUG。
63 lines
1.7 KiB
C#
63 lines
1.7 KiB
C#
using 开发辅助工具.Tools.SmartEditor;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace RySmartEditor
|
|
{
|
|
public class Init
|
|
{
|
|
public static void Show(string[] args)
|
|
{
|
|
if (args.Length >= 2)
|
|
{
|
|
if (args[0] == "edit")
|
|
{
|
|
string ProjectPath = args[1];
|
|
OpenEditor(ProjectPath);
|
|
}
|
|
}
|
|
else if(args.Length == 1)
|
|
{
|
|
if (args[0] == "edit" || System.IO.File.Exists(args[0]))
|
|
{
|
|
OpenEditor(args[0]);
|
|
}
|
|
else
|
|
{
|
|
OpenEditor("edit");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
OpenEditor("edit");
|
|
//Application.Run(new FrmMainEditor());
|
|
}
|
|
}
|
|
static void OpenEditor(string path)
|
|
{
|
|
object mainHandle = QuickMsg.RyMemoryShare.ReadFromMemory(1024, typeof(Int64), "SmartEditor");
|
|
if (mainHandle != null && (long)mainHandle != 0)
|
|
{
|
|
var handle = new IntPtr((long)mainHandle);
|
|
if (path == "edit")
|
|
{
|
|
ryControls.Win32.SendMessage(handle, 17189, 100, 100);//让界面显示
|
|
}
|
|
else
|
|
{
|
|
ryConfig.MsgManager.SendMsg(handle, 1666, path);
|
|
}
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
Application.Run(new FrmMainEditor(path == "edit" ? "" : path));
|
|
}
|
|
}
|
|
}
|
|
}
|