Esempio n. 1
0
        private void ChangeItemActionDialog_Load(object sender, EventArgs e)
        {
#if NO
            // state
            this.changeStateActionControl1.ActionString = this.MainForm.AppInfo.GetString(
                "change_" + this.DbType + "_param",
                "state",
                "<不改变>");

            this.changeStateActionControl1.AddString = this.MainForm.AppInfo.GetString(
                "change_" + this.DbType + "_param",
                "state_add",
                "");
            this.changeStateActionControl1.RemoveString = this.MainForm.AppInfo.GetString(
                "change_" + this.DbType + "_param",
                "state_remove",
                "");
#endif
            // 设置第一栏的标题
            this.listView_actions.Columns[0].Text = this.ElementCaption + "名";

            // 恢复 listview 中的内容

            // string strCfgFileName = Path.Combine( this.MainForm.UserDir, this.DbType + "_change_actions.xml");
            string strCfgFileName = Path.Combine(this.MainForm.DataDir, "default\\" + this.DbType + "_change_actions.xml");
            string strError       = "";
            int    nRet           = LoadCfgDom(strCfgFileName,
                                               out strError);
            if (nRet == -1)
            {
                MessageBox.Show(this, strError);
            }

            listView_actions_SelectedIndexChanged(this, new EventArgs());
#if NO
            if (this.CfgDom != null)
            {
                this.comboBox_fieldName.Items.Add("<不使用>");
                OneActionDialog.FillFieldNameList("zh",
                                                  this.CfgDom,
                                                  this.GetUsedFieldNames("state"),
                                                  this.comboBox_fieldName);
                if (string.IsNullOrEmpty(this.comboBox_fieldName.Text) == true &&
                    this.comboBox_fieldName.Items.Count > 0)
                {
                    this.comboBox_fieldName.Text = (string)this.comboBox_fieldName.Items[0];
                }
            }
#endif
        }