private void send_sms_thread()
        {
            try
            {
                var phones = IOUtil.read_file(ConfigKeys.KEY_PHONES_FILE);
                if (phones.Count == 0)
                    return;

                smsPort = IOUtil.get_config_by_key(ConfigKeys.KEY_SMSPORT);
                smsBaud = IOUtil.get_config_by_key(ConfigKeys.KEY_SMSBAUD);
                if (smsPort == "" || smsBaud == "")
                {
                    SMmsForm smsForm = new SMmsForm();
                    if (smsForm.ShowDialog() != DialogResult.OK)
                        return;

                    smsPort = IOUtil.get_config_by_key(ConfigKeys.KEY_SMSPORT);
                    smsBaud = IOUtil.get_config_by_key(ConfigKeys.KEY_SMSBAUD);
                }

                if (smsPort == "" || smsBaud == "")
                    return;

                var dao = new DAO(LogIn.connectionString);
                var dts = dao.get_last_index_clear_time(2);
                DateTime st = DateTime.Parse("2013-01-01 00:00:00");
                DateTime et = dts[0].Value;
                if (dts.Count == 2)
                    st = dts[1].Value;

                string sms_msg = dao.get_sms_msg(st, et);
                send_SMS(phones,sms_msg);
            }
            catch
            {

            }
        }