Exemplo n.º 1
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            LandConfig landConfig = LandConfig.GetInstance();

            this.txbManyTextID.Text       = landConfig.landConfigInfo.MoneyTextID;
            this.txbManyPlusButtonID.Text = landConfig.landConfigInfo.MoneyPlusButtonID;
            this.txbSubmitButtonID.Text   = landConfig.landConfigInfo.MoneySubmitButtonID;
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获取配置信息(单例模式)
 /// </summary>
 /// <returns></returns>
 public static LandConfig GetInstance()
 {
     if (instance == null)
     {
         instance = new LandConfig();
     }
     return(instance);
 }
Exemplo n.º 3
0
        private void btnConfig_Click(object sender, EventArgs e)
        {
            LandConfig landConfig = LandConfig.GetInstance();

            landConfig.landConfigInfo.MoneyTextID         = this.txbManyTextID.Text;
            landConfig.landConfigInfo.MoneyPlusButtonID   = this.txbManyPlusButtonID.Text;
            landConfig.landConfigInfo.MoneySubmitButtonID = this.txbSubmitButtonID.Text;
            landConfig.saveConfig();
            MessageBox.Show("配置保存成功");
        }