public void initCheckPlugin(int instance, addTextCP callback, string configDir)
        {
            this.addTextCB = callback;
            this.Instance = instance;
            this.confDir = configDir;

            try {
                 // Create Settings Table
                DataTable mySettings = new DataTable("SettingsPluginCheckNet");
                mySettings.ReadXml(confDir + Path.DirectorySeparatorChar + "config_plugin_checknet.xml");

                optStrServerAddress = mySettings.Rows[instance]["ServerAddress"].ToString();
                optPort = Convert.ToInt32(mySettings.Rows[instance]["Port"].ToString(), 10);
                optStrMode = mySettings.Rows[instance]["Mode"].ToString();
                optTimeout = Convert.ToInt32(mySettings.Rows[instance]["Timeout"].ToString(), 10);
                optStrCheck = mySettings.Rows[instance]["CheckStr"].ToString();
                optStrSendBeforeCheck = mySettings.Rows[instance]["SendBeforeCheckStr"].ToString();
            }
            catch {
                // loading failed -> go to defaults
                optStrCheck = "";
                optStrMode  = "TCP";
                optStrSendBeforeCheck  = "";
                optStrServerAddress = "127.0.0.1";
                optTimeout = 1000;
                optPort = 80;
            }
        }
        public void initCheckPlugin(int instance, addTextCP callback, string configDir)
        {
            addTextCB = callback;
            this.inst = instance;
            confDir = configDir;

            try
            {
                 // Create Settings Table
                DataTable mySettings = new DataTable("SettingsPluginCheckSerial");
                mySettings.ReadXml(confDir + Path.DirectorySeparatorChar + "config_plugin_checkserial.xml");

                optSerialPort = mySettings.Rows[instance]["ComPort"].ToString();
                optBaudrate = Convert.ToInt32(mySettings.Rows[instance]["Baudrate"].ToString(), 10);
                optDataBitIndex = Convert.ToInt32(mySettings.Rows[instance]["DataBits"].ToString(), 10);
                optHandshakeIndex = Convert.ToInt32(mySettings.Rows[instance]["Handshake"].ToString(), 10);
                optParityIndex = Convert.ToInt32(mySettings.Rows[instance]["Parity"].ToString(), 10);
                optReadTimeout = Convert.ToInt32(mySettings.Rows[instance]["ReadTimeout"].ToString(), 10);
                optStopBitsIndex = Convert.ToInt32(mySettings.Rows[instance]["StopBits"].ToString(), 10);
                optStrCheck = mySettings.Rows[instance]["CheckStr"].ToString();
                optStrSendBeforeCheck = mySettings.Rows[instance]["SendBeforeCheckStr"].ToString();
            }
            catch
            {
                optSerialPort = "COM1";
                optBaudrate = 57600;
                optDataBitIndex = 3;
                optParityIndex = 0;
                optStopBitsIndex = 0;
                optHandshakeIndex = 0;
                optReadTimeout = 500;
            }
        }
 public void initCheckPlugin(int instance, addTextCP callback, string configDir)
 {
     m_instance = instance;
 }