示例#1
0
        /// <summary>
        /// 打开设置窗口。
        /// </summary>
        public override void OpenSettingForm()
        {
            // 打开设置窗口的相关代码。
            FormSettings frm = new FormSettings();

            frm.ShowDialog();
        }
示例#2
0
        /// <summary>
        /// 应用启动,完成插件线程、全局变量等自身运行所必须的初始化工作。
        /// </summary>
        public override void Startup()
        {
            //完成插件线程、全局变量等自身运行所必须的初始化工作。

            FormSettings frm = new FormSettings();
            //frm.ShowDialog();
            string check = LinqXML.read(confirm, "群号");

            if (check == "")
            {
                MessageBox.Show("未设置群号,请设置"); frm.ShowDialog();
            }
            else
            {
                GroupSet = long.Parse(check);
            }
            ipaddress = LinqXML.read(confirm, "IP");
            if (ipaddress == "")
            {
                MessageBox.Show("未设置IP,请设置"); frm.ShowDialog();
            }
            else
            {
                ipaddress = LinqXML.read(confirm, "IP");
            }
            check = LinqXML.read(confirm, "Port");
            if (check == "")
            {
                MessageBox.Show("未设置端口,请设置"); frm.ShowDialog();
            }
            else
            {
                Port = int.Parse(LinqXML.read(confirm, "Port"));
            }
            CQ.SendGroupMessage(GroupSet, "机器人已启动-作者yan_color");
            socket.start_socket();
        }