private void CASetting_Load(object sender, EventArgs e)
        {
            //从我的文档读取配置
            string             strPath   = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);
            ClsThisAddinConfig clsConfig = new ClsThisAddinConfig(strPath);

            //从父节点CurrentAccount中读取配置名为AccountingFirmName的值,作为事务所名称,默认为致同
            AccountingFirmName.Text = clsConfig.ReadConfig <string>("CurrentAccount", "AccountingFirmName", "致同会计师事务所(特殊普通合伙)");
            //从父节点CurrentAccount中读取配置名为Auditee的值,作为被审计单位名称,默认为空
            Auditee.Text = clsConfig.ReadConfig <string>("CurrentAccount", "Auditee", "请修改");
            //从父节点CurrentAccount中读取配置名为ReplyAddress的值,作为回函地址,默认为致同
            ReplyAddress.Text = clsConfig.ReadConfig <string>("CurrentAccount", "ReplyAddress", "北京建外大街22号赛特大厦十五层");
            //从父节点CurrentAccount中读取配置名为PostalCode的值,作为回函邮编,默认为致同
            PostalCode.Text = clsConfig.ReadConfig <string>("CurrentAccount", "PostalCode", "100004");
            //从父节点CurrentAccount中读取配置名为AuditDeadline的值,作为审计截止日,默认为2019年12月31日
            AuditDeadline.Text = clsConfig.ReadConfig <string>("CurrentAccount", "AuditDeadline", "2019年12月31日");
            //从父节点CurrentAccount中读取配置名为Contact的值,作为联系人名称,默认为空
            Contact.Text = clsConfig.ReadConfig <string>("CurrentAccount", "Contact", "请修改");
            //从父节点CurrentAccount中读取配置名为Telephone的值,作为联系电话,默认为空
            Telephone.Text = clsConfig.ReadConfig <string>("CurrentAccount", "Telephone", "请修改");
            //从父节点CurrentAccount中读取配置名为Department的值,作为部门,默认为空
            Department.Text = clsConfig.ReadConfig <string>("CurrentAccount", "Department", "请修改");
            //从父节点CurrentAccount中读取配置名为Leading的值,作为部门负责人,默认为空
            Leading.Text = clsConfig.ReadConfig <string>("CurrentAccount", "Leading", "请修改");
        }
示例#2
0
        private void RoundSetting_Load(object sender, EventArgs e)
        {
            //从我的文档读取配置
            string             strPath   = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);
            ClsThisAddinConfig clsConfig = new ClsThisAddinConfig(strPath);

            //从父节点Round中读取配置名为Num的值,默认为2
            numericUpDown1.Value = clsConfig.ReadConfig <int>("Round", "Num", 2);
        }
示例#3
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            //获取当前版本信息
            string Nverinfo;
            string Overinfo;

            try
            {
                Nverinfo = ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
            }
            catch
            {
                Nverinfo = "版本号获取异常";
            }

            //获取保存的版本信息

            //从我的文档读取配置
            string             strPath   = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);
            ClsThisAddinConfig clsConfig = new ClsThisAddinConfig(strPath);

            //从父节点VerInfo中读取配置名为VerNum的值,该值为字符串。默认为"0.0.0.0"
            Overinfo = clsConfig.ReadConfig <string>("VerInfo", "VerNum", "0.0.0.0");

            //判断版本是否相等
            if (Nverinfo == Overinfo)
            {
                return;
            }

            //写入父节点VerInfo中配置名VerNum的配置项
            clsConfig.WriteConfig("VerInfo", "VerNum", Nverinfo);
            string WebPath = @"https://www.yuque.com/hewish/hertz_excel/nup9wy";

            try
            {
                string msg = "HertZ插件已更新,当前版本为" + Nverinfo + Environment.NewLine;
                MessageBox.Show(msg + "后续更新提示改为直接打开“更新说明”网页");
                System.Diagnostics.Process.Start(WebPath);
            }
            catch
            {
                MessageBox.Show("打开更新说明网址失败!" + Environment.NewLine + WebPath);
            }
        }
示例#4
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            //获取当前版本信息
            string Nverinfo;
            string Overinfo;

            try
            {
                Nverinfo = ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
            }
            catch
            {
                Nverinfo = "版本号获取异常";
            }

            //获取保存的版本信息

            //从我的文档读取配置
            string             strPath   = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);
            ClsThisAddinConfig clsConfig = new ClsThisAddinConfig(strPath);

            //从父节点VerInfo中读取配置名为VerNum的值,该值为字符串。默认为"0.0.0.0"
            Overinfo = clsConfig.ReadConfig <string>("VerInfo", "VerNum", "0.0.0.0");

            //判断版本是否相等
            if (Nverinfo == Overinfo)
            {
                return;
            }

            //写入父节点VerInfo中配置名VerNum的配置项
            clsConfig.WriteConfig("VerInfo", "VerNum", Nverinfo);

            string msg = "HertZ已更新,当前版本为" + Nverinfo + Environment.NewLine;

            MessageBox.Show(msg + "更新内容:修复了几个bug;" + Environment.NewLine + "修改了使用说明文档链接");
        }
示例#5
0
        private void BAJSettingForm_Load(object sender, EventArgs e)
        {
            //从我的文档读取配置
            string             strPath   = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);
            ClsThisAddinConfig clsConfig = new ClsThisAddinConfig(strPath);

            //从父节点BalanceAndJournal中读取配置名SubjectCodeButton1为的值,该值为布尔值。默认为true
            SubjectCodeButton1.Checked = clsConfig.ReadConfig <bool>("BalanceAndJournal", "SubjectCodeButton1", true);

            //从父节点BalanceAndJournal中读取配置名SubjectCodeButton2为的值,该值为布尔值。默认为false
            SubjectCodeButton2.Checked = clsConfig.ReadConfig <bool>("BalanceAndJournal", "SubjectCodeButton2", false);
            //从父节点BalanceAndJournal中读取配置名SubjectCodeSign为的值,该值为字符串。默认为"."
            SubjectCodeSign.Text = clsConfig.ReadConfig <string>("BalanceAndJournal", "SubjectCodeSign", ".");

            //从父节点BalanceAndJournal中读取配置名SubjectCodeButton3为的值,该值为布尔值。默认为false
            SubjectCodeButton3.Checked = clsConfig.ReadConfig <bool>("BalanceAndJournal", "SubjectCodeButton3", false);
            //从父节点BalanceAndJournal中读取配置名SubjectCodeLength1为的值,该值为字符串。默认为"4"
            SubjectCodeLength1.Text = clsConfig.ReadConfig <string>("BalanceAndJournal", "SubjectCodeLength1", "4");
            //从父节点BalanceAndJournal中读取配置名SubjectCodeLength2为的值,该值为字符串。默认为"2"
            SubjectCodeLength2.Text = clsConfig.ReadConfig <string>("BalanceAndJournal", "SubjectCodeLength2", "2");
            //从父节点BalanceAndJournal中读取配置名SubjectCodeLength3为的值,该值为字符串。默认为"2"
            SubjectCodeLength3.Text = clsConfig.ReadConfig <string>("BalanceAndJournal", "SubjectCodeLength3", "2");
            //从父节点BalanceAndJournal中读取配置名SubjectCodeLength4为的值,该值为字符串。默认为"2"
            SubjectCodeLength4.Text = clsConfig.ReadConfig <string>("BalanceAndJournal", "SubjectCodeLength4", "2");
            //从父节点BalanceAndJournal中读取配置名SubjectCodeLength5为的值,该值为字符串。默认为"2"
            SubjectCodeLength5.Text = clsConfig.ReadConfig <string>("BalanceAndJournal", "SubjectCodeLength5", "2");
            //从父节点BalanceAndJournal中读取配置名SubjectCodeLength6为的值,该值为字符串。默认为"2"
            SubjectCodeLength6.Text = clsConfig.ReadConfig <string>("BalanceAndJournal", "SubjectCodeLength6", "2");

            //从父节点BalanceAndJournal中读取配置名为OrderCheckBox的值,该值为布尔值。默认为true
            OrderCheckBox.Checked = clsConfig.ReadConfig <bool>("BalanceAndJournal", "OrderCheckBox", false);
        }