示例#1
0
        /// <summary>
        /// 往秤体发送消息
        /// </summary>
        private void SendNoticeButton_Click(object sender, RoutedEventArgs e)
        {
            if (!checkRemoteP.CheckIsAllowUse(CheckRemotePower.ButtonMemuEnum.fstz))
            {
                ShowMessage("无发送通知权限");
                return;
            }
            AttentionTypes at = AttentionTypes.CarMeasure;

            if (weightTabControl.SelectedIndex == 1)
            {
                at = AttentionTypes.TrainMeasure;
            }
            else if (weightTabControl.SelectedIndex == 2)
            {
                at = AttentionTypes.MoltenIron;
            }
            bool isOpen = formHClass.SetForeWindow("智能化远程集中计量管理系统(发送通知)");

            if (!isOpen)
            {
                if (weightClientSendNoticeView == null || weightClientSendNoticeView.Visibility == Visibility.Collapsed)
                {
                    weightClientSendNoticeView         = new WeightClientSendNoticeView(at);
                    weightClientSendNoticeView.Closed += (s1, e1) => { weightClientSendNoticeView = null; };
                    weightClientSendNoticeView.ShowDialog();
                }
                else
                {
                    weightClientSendNoticeView.Activate();
                }
            }
        }
示例#2
0
        /// <summary>
        /// 称点关注按钮事件
        /// </summary>
        private void AttentionsButton_Click(object sender, RoutedEventArgs e)
        {
            //if (!checkRemoteP.CheckIsAllowUse(CheckRemotePower.ButtonMemuEnum.gzzd))
            //{
            //    ShowMessage("无关注秤点权限");
            //    return;
            //}
            AttentionTypes at = AttentionTypes.CarMeasure;

            if (weightTabControl.SelectedIndex == 1)
            {
                at = AttentionTypes.TrainMeasure;
            }
            else if (weightTabControl.SelectedIndex == 2)
            {
                at = AttentionTypes.MoltenIron;
            }
            bool isOpen = formHClass.SetForeWindow("智能化远程集中计量管理系统(关注秤点)");

            if (!isOpen)
            {
                if (weightClientAttentionUpholdView == null)
                {
                    weightClientAttentionUpholdView         = new WeightClientAttentionUpholdView(at);
                    weightClientAttentionUpholdView.Closed += (s1, e1) => { weightClientAttentionUpholdView = null; };
                    weightClientAttentionUpholdView.ShowDialog();
                }
                else
                {
                    weightClientAttentionUpholdView.Activate();
                    weightClientAttentionUpholdView.ShowDialog();
                }

                if (weightClientAttentionUpholdView != null && weightClientAttentionUpholdView.FormState == 1)
                {
                    if (at == AttentionTypes.CarMeasure)
                    {
                        OperateCarMeasure(weightClientAttentionUpholdView);
                    }
                    else if (at == AttentionTypes.MoltenIron)
                    {
                    }
                }
            }
        }
示例#3
0
 public WeightClientAttentionUpholdView(AttentionTypes attentionTypes)
 {
     this.attentionTypes = attentionTypes;
     InitializeComponent();
 }
示例#4
0
 public WeightClientSendNoticeView(AttentionTypes attentionTypes)
 {
     this.attentionTypes = attentionTypes;
     InitializeComponent();
 }