Example #1
0
        private void rbNo_CheckedChanged(object sender, EventArgs e)
        {
            if (this.rbNo.Checked)
            {
                RefreshFrequence     rf = new RefreshFrequence();
                System.IO.FileStream fs = new System.IO.FileStream((Application.StartupPath + "/profile/patientQuery.xml"), System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite);
                rf.RefreshTime = "no";
                System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(typeof(RefreshFrequence));
                x.Serialize(fs, rf);
                fs.Close();

                this.timer1.Enabled = false;
            }
        }
Example #2
0
        private void ucQueryReg_Load(object sender, EventArgs e)
        {
            // [2007/03/13] 读配置文件,如果存在(患者就诊信息查询)
            if (System.IO.File.Exists(Application.StartupPath + "/profile/patientQuery.xml"))
            {
                System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(RefreshFrequence));
                System.IO.FileStream fs = new System.IO.FileStream(Application.StartupPath + "/profile/patientQuery.xml", System.IO.FileMode.Open);

                RefreshFrequence refres = (RefreshFrequence)xs.Deserialize(fs);
                switch (refres.RefreshTime.Trim())
                {
                case "no":
                    this.SetRadioFalse();
                    fs.Close();
                    this.rbNo.Checked = true;
                    break;

                case "10":
                    this.SetRadioFalse();
                    fs.Close();
                    this.rb10.Checked = true;
                    break;

                case "30":
                    this.SetRadioFalse();
                    fs.Close();
                    this.rb30.Checked = true;
                    break;

                case "60":
                    this.SetRadioFalse();
                    fs.Close();
                    this.rb60.Checked = true;
                    break;

                default:
                    this.SetRadioFalse();
                    fs.Close();
                    this.rbNo.Checked = true;
                    break;
                }
            }
            else
            {
                this.SetRadioFalse();
                this.rbNo.Checked = true;
            }
            // [2007/03/13] 结束
        }