Пример #1
0
 protected void LoadStyle(DATA_SYNC eSync)
 {
     if (eSync == DATA_SYNC.DATA_CLIENT)
     {
         foreach (DataGridViewColumn col in dataGridClient.Columns)
         {
             String strConfig = CIniManager.G_IniReadValue(STYLE_SECTION, "CLIENT_COL" + Convert.ToString(col.Index), CONFIG_FILE);
             if (strConfig.CompareTo("") == 0)
             {
                 col.Width = 100;
             }
             else
             {
                 col.Width = Convert.ToInt32(strConfig);
             }
         }
     }
     else if (eSync == DATA_SYNC.DATA_SERVER)
     {
         foreach (DataGridViewColumn col in dataGridServer.Columns)
         {
             String strConfig = CIniManager.G_IniReadValue(STYLE_SECTION, "SERVER_COL" + Convert.ToString(col.Index), CONFIG_FILE);
             if (strConfig.CompareTo("") == 0)
             {
                 col.Width = 100;
             }
             else
             {
                 col.Width = Convert.ToInt32(strConfig);
             }
         }
     }
 }
Пример #2
0
        void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            //throw new Exception("The method or operation is not implemented.");
            foreach (DataGridViewColumn col in dataGridClient.Columns)
            {
                CIniManager.G_IniWriteValue(STYLE_SECTION, "CLIENT_COL" + Convert.ToString(col.Index), Convert.ToString(col.Width), CONFIG_FILE);
            }

            foreach (DataGridViewColumn col in dataGridServer.Columns)
            {
                CIniManager.G_IniWriteValue(STYLE_SECTION, "SERVER_COL" + Convert.ToString(col.Index), Convert.ToString(col.Width), CONFIG_FILE);
            }
        }
Пример #3
0
        private void btnSaveConfig_Click(object sender, EventArgs e)
        {
            CIniManager.G_IniWriteValue(CLIENT_SECTION, CLIENT_DEFINE_DATA, this.textClientDefPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(CLIENT_SECTION, CLIENT_ALARM_DATA, this.textClientAlarmPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(CLIENT_SECTION, CLIENT_KOR_DATA, this.textClientKorPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(CLIENT_SECTION, CLIENT_JPN_DATA, this.textClientJpnPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(CLIENT_SECTION, CLIENT_USER_DATA, this.textClientUserPath.Text, CONFIG_FILE);

            CIniManager.G_IniWriteValue(SERVER_SECTION, SERVER_DEFINE_DATA, this.textServerDefPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(SERVER_SECTION, SERVER_ALARM_DATA, this.textServerAlarmPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(SERVER_SECTION, SERVER_KOR_DATA, this.textServerKorPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(SERVER_SECTION, SERVER_JPN_DATA, this.textServerJpnPath.Text, CONFIG_FILE);
            CIniManager.G_IniWriteValue(SERVER_SECTION, SERVER_USER_DATA, this.textServerUserPath.Text, CONFIG_FILE);
        }
Пример #4
0
        protected void InitConfigTab(String strConfig)
        {
            String strConfClientDef   = CIniManager.G_IniReadValue(CLIENT_SECTION, CLIENT_DEFINE_DATA, strConfig);
            String strConfClientAlarm = CIniManager.G_IniReadValue(CLIENT_SECTION, CLIENT_ALARM_DATA, strConfig);
            String strConfClientKor   = CIniManager.G_IniReadValue(CLIENT_SECTION, CLIENT_KOR_DATA, strConfig);
            String strConfClientJpn   = CIniManager.G_IniReadValue(CLIENT_SECTION, CLIENT_JPN_DATA, strConfig);
            String strConfClientUser  = CIniManager.G_IniReadValue(CLIENT_SECTION, CLIENT_USER_DATA, strConfig);
            String strConfServerDef   = CIniManager.G_IniReadValue(SERVER_SECTION, SERVER_DEFINE_DATA, strConfig);
            String strConfServerAlarm = CIniManager.G_IniReadValue(SERVER_SECTION, SERVER_ALARM_DATA, strConfig);
            String strConfServerKor   = CIniManager.G_IniReadValue(SERVER_SECTION, SERVER_KOR_DATA, strConfig);
            String strConfServerJpn   = CIniManager.G_IniReadValue(SERVER_SECTION, SERVER_JPN_DATA, strConfig);
            String strConfServerUser  = CIniManager.G_IniReadValue(SERVER_SECTION, SERVER_USER_DATA, strConfig);


            this.textClientDefPath.Clear();
            this.textClientDefPath.AppendText(strConfClientDef);

            this.textClientAlarmPath.Clear();
            this.textClientAlarmPath.AppendText(strConfClientAlarm);

            this.textClientKorPath.Clear();
            this.textClientKorPath.AppendText(strConfClientKor);

            this.textClientJpnPath.Clear();
            this.textClientJpnPath.AppendText(strConfClientJpn);

            this.textClientUserPath.Clear();
            this.textClientUserPath.AppendText(strConfClientUser);

            this.textServerDefPath.Clear();
            this.textServerDefPath.AppendText(strConfServerDef);

            this.textServerAlarmPath.Clear();
            this.textServerAlarmPath.AppendText(strConfServerAlarm);

            this.textServerKorPath.Clear();
            this.textServerKorPath.AppendText(strConfServerKor);

            this.textServerJpnPath.Clear();
            this.textServerJpnPath.AppendText(strConfServerJpn);

            this.textServerUserPath.Clear();
            this.textServerUserPath.AppendText(strConfServerUser);
        }