コード例 #1
0
ファイル: FormData.cs プロジェクト: letheascetic/CANLogger
        private void Display(DISPLAY_FRAME pDisplayFrame, bool mIgnoreCompare = false)
        {
            if (!mIgnoreCompare && this.p_DisplayFrame.Equals(pDisplayFrame))
            {
                Logger.Info(string.Format("FormData[{0}] display frame paras no change, no need to update.", channel.ChannelName));
                return;
            }

            if (mIgnoreCompare || this.p_DisplayFrame.ShowLocalTime != pDisplayFrame.ShowLocalTime)
            {
                this.dgvData.Columns[1].Visible = pDisplayFrame.ShowLocalTime;
            }
            if (mIgnoreCompare || this.p_DisplayFrame.ShowFrameInterval != pDisplayFrame.ShowFrameInterval)
            {
                this.dgvData.Columns[2].Visible = pDisplayFrame.ShowFrameInterval;
            }
            if (mIgnoreCompare ||
                this.p_DisplayFrame.ShowErrorFrame != pDisplayFrame.ShowErrorFrame ||
                this.p_DisplayFrame.ShowSendFrame != pDisplayFrame.ShowSendFrame)
            {
                foreach (CAN_DATA pCANData in this.p_CANDataQueue)
                {
                    if (pCANData.CANFrame.Direction == CAN_FRAME_DIRECTION.SEND)
                    {
                        if (pCANData.CANFrame.Status != CAN_FRAME_STATUS.SUCCESS)
                        {
                            pCANData.Visible = pDisplayFrame.ShowErrorFrame && pDisplayFrame.ShowSendFrame;
                        }
                        else
                        {
                            pCANData.Visible = pDisplayFrame.ShowSendFrame;
                        }
                    }
                    else
                    {
                        if (pCANData.CANFrame.Status != CAN_FRAME_STATUS.SUCCESS)
                        {
                            pCANData.Visible = pDisplayFrame.ShowErrorFrame;
                        }
                    }
                }
            }
            this.p_DisplayFrame = pDisplayFrame;
        }
コード例 #2
0
ファイル: FormData.cs プロジェクト: letheascetic/CANLogger
        private void Init()
        {
            this.p_DeviceGroup.ChannelUpdated += new ChannelEventHandler(this.UpdateChannel);

            this.Text = channel.ChannelName;
            this.p_UCSendModeNormal = new UCNormalSendMode(this.channel);
            this.p_UCSendModeList   = new UCListSendMode(this.channel);
            this.pnlSend.Controls.Add(this.p_UCSendModeNormal);
            this.pnlSend.Controls.Add(this.p_UCSendModeList);

            DISPLAY_FRAME pDisplayFrame = new DISPLAY_FRAME();

            pDisplayFrame.DisplayMode       = DISPLAY_MODE.ROLLING;
            pDisplayFrame.ShowSendFrame     = true;
            pDisplayFrame.ShowErrorFrame    = true;
            pDisplayFrame.ShowFrameInterval = true;
            pDisplayFrame.ShowLocalTime     = false;
            Display(pDisplayFrame, true);

            this.UpdateChannel(this.channel, null);

            ChangeSendMode();
        }
コード例 #3
0
 public DisplayConfigDialog(DISPLAY_FRAME pDisplayFrame)
 {
     InitializeComponent();
     this.p_DisplayFrame = pDisplayFrame;
 }