RaUI/Source/UpdateTest/Form1.cs
zilinsoft b4e236fd55 ### 2025-01-06 星期一更新
------
#### OnLineUpgradeConfig    V1.0.2501.0601
- *.[修复]修复用户管理列表无法默认勾选已选择用户的BUG。
#### RaUI    V4.0.2501.0601
- *.[新增]RyFiles类新增SetFileDate、SetFileCreationTime、SetFileLastWriteTime方法。
- *.[新增]RyFiles.CopyBigFile方法现在会同步来源文件的创建和修改时间。
- *.[新增]ryQuickSQL类新增GetPostData函数,将数据快速转成Post数据。
- *.[改进]执行MySQL下的ExecuteNonQuery时,如果遇到连接关闭错误,允许重连并重新执行。
- *.[改进]IDbInterface在执行新的SQL语句前,自动清空最后错误。
- *.[修复]修复LayeredForm窗体以正常窗体打开的时候,文本框无法编辑的BUG。
- *.[修复]修复ApkOp获取apk权限时可能带乱码的BUG。
- *.[修复]修复WeifenLuo.WinFormsUI.Docking的ResourceManager.GetString路径不对导致报错的BUG。
2025-01-06 11:14:35 +08:00

41 lines
1.4 KiB
C#

using ryCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace UpdateTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void BtnTest_Click(object sender, EventArgs e)
{
RyFiles.DeleteFile(Application.StartupPath + "\\Update");
RyFiles.CreateDirectory(Application.StartupPath + "\\Update");
RyFiles.CopyBigFile(Application.StartupPath + "\\ryProcessManager.zip", Application.StartupPath + "\\Update\\tmp.tmp");
Storage storage = new Storage();
storage.AddNode2("id", "MainProcName");
storage.SetAttrValue("Value", "ryProcessManager.exe");
storage.AddNode2("id", "MainProcPram");
storage.SetAttrValue("Value", "q");
storage.AddNode2("id", "KillProcList2");
storage.SetAttrValue("Value", "ryProcessManager.exe".ToBase64());
storage.AddNode2("id", "DelFileList");
storage.SetAttrValue("Value", "UserDb\\1".ToBase64());
storage.SaveToFile(Application.StartupPath + "\\tmp.updx");
RyFiles.RunFile(Application.StartupPath + "\\rycUpdate.exe", "update");
this.Close();
}
}
}