Пример #1
0
        private void tsmpMenu_Click(object sender, EventArgs e)
        {
            try
            {
                ToolStripMenuItem tsmp = sender as ToolStripMenuItem;
                if (mesServer == null)
                {
                    return;
                }
                IPEndPoint EndPoint = mesServer.Listeners[0].EndPoint;

                Frm_Msg frm = new Frm_Msg();
                frm.Text        = $"{ mesServer.Listeners[0].EndPoint} <<-- {tsmp.Text}";
                frm.txtMsg.Text = tsmp.Tag.ToString();
                frm.EndPoint    = EndPoint;
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageUtilSkin.ShowTips(ex.Message);
            }
        }
Пример #2
0
        private void lnkClient_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            META_DevLinkInfo info = BLLFactory <META_DevLink> .Instance.FindSingle($"DevCode='OP010'");

            //测试
            META_ParameterInfo info2 = BLLFactory <META_Parameter> .Instance.FindSingle($"Key='WorkOrder'");

            info2.Value = "TEST002";
            BLLFactory <META_Parameter> .Instance.Update(info2, info2.ID);


            info2 = BLLFactory <META_Parameter> .Instance.FindSingle($"Key='OK_RE'");

            try
            {
                if (mesServer == null)
                {
                    MessageUtilSkin.ShowTips("请启动数据服务器.");
                    return;
                }
                TabControl1.SelectedIndex = 1;
                IPEndPoint EndPoint = mesServer.Listeners[0].EndPoint;

                Frm_Msg frm = new Frm_Msg();
                frm.Text        = $"{ EndPoint.Address}";
                frm.txtMsg.Text = string.Empty;
                frm.EndPoint    = EndPoint;
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageUtilSkin.ShowTips(ex.Message);
            }
        }