C# 保存程序数据 setting文件

源码

        //加载数据
        private void Form1_Load(object sender, EventArgs e)
        {
            PATHqq.Text = SettingsPath.Default.qq;
            PATHwechat.Text = SettingsPath.Default.wechat;
            PATHdingding.Text = SettingsPath.Default.dingding;
            PATHvm.Text = SettingsPath.Default.vm;
            PATHocr.Text = SettingsPath.Default.ocr;
            PATHmubu.Text = SettingsPath.Default.mubu;
        }
        //保存数据
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            SettingsPath.Default.qq = PATHqq.Text;
            SettingsPath.Default.wechat = PATHwechat.Text;
            SettingsPath.Default.dingding = PATHdingding.Text;
            SettingsPath.Default.vm = PATHvm.Text;
            SettingsPath.Default.ocr = PATHocr.Text;
            SettingsPath.Default.mubu = PATHmubu.Text;
            SettingsPath.Default.Save();

上一篇:vscode 编辑python 如何格式化


下一篇:django中文问题