Esempio n. 1
0
 private void cbTraceMode_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (traceMode.pause != mode)
     {
         mode = 0 == cbTraceMode.SelectedIndex ? traceMode.traceAll : traceMode.traceSelected;
     }
 }
Esempio n. 2
0
 public void stop()
 {
     // pause
     mode = traceMode.pause;
     // clean
     clear();
     // force store
     store(true);
 }
Esempio n. 3
0
        private void btnTraceAll_Click(object sender, EventArgs e)
        {
            // start
            if (traceMode.pause == mode)
            {
                mode = 0 == cbTraceMode.SelectedIndex ? traceMode.traceAll : traceMode.traceSelected;
            }
            else
            {
                mode = traceMode.pause;
            }

            updateButtons();
        }
Esempio n. 4
0
        // the region contains a class constructor
        #region Constructor

        // constructor
        public UcCanTrace(CanMessageSendTool can)
        {
            InitializeComponent();

            // parent
            CanTool = can;

            // grid
            createGrid();
            // menu
            createMenu();
            grid.ContextMenuStrip = menu;

            // send tool
            sendWrkr = new canTraceUtils.sendWorker(CanTool, this);

            mode = traceMode.pause;


            //ts = new canTraceUtils.timestamp();
            ts = new canTraceUtils.timestamp_offset();

            conv    = new canTraceUtils.mConverter();
            conv.TS = ts;

            tbPlayFrom.KeyPress += Tools.textBoxIntOnlyEvent;
            tbPlayTo.KeyPress   += Tools.textBoxIntOnlyEvent;

            updateMsgCounter();


            cbTraceMode.Items.Add("All");
            cbTraceMode.Items.Add("Selected");
            cbTraceMode.SelectedIndex = 0;

            // icons
            btnTrace.Image    = Properties.Resources.icon_record;
            btnSendStep.Image = Properties.Resources.icon_step;
            btnPlay.Image     = Properties.Resources.icon_play;
            btnClear.Image    = Properties.Resources.icon_clear;

            btnSendStep.Enabled  = false;
            btnPlay.Enabled      = false;
            btnSendRange.Enabled = false;
            btnClear.Enabled     = false;

            tbPlayFrom.Enabled  = btnPlay.Enabled;
            tbPlayTo.Enabled    = btnPlay.Enabled;
            lblSendFrom.Enabled = btnPlay.Enabled;
            lblSendTo.Enabled   = btnPlay.Enabled;

            lblSendFrom.Font = new Font("Consolas", 9, FontStyle.Italic);
            lblSendTo.Font   = lblSendFrom.Font;

            cbTraceMode.Font = new Font("Consolas", 8f);

            lblTotalMsgs.Font = new Font("Calibri", 9.0f);

            foreach (DataGridViewColumn col in grid.Columns)
            {
                col.HeaderCell.Style.Font = new Font("Calibri", 9.0f, FontStyle.Bold);
            }

            grid.DefaultCellStyle.Font = new Font("Consolas", 8.5f);//, FontStyle.Italic);

            // System.Windows.Forms.ToolTip ToolTip1 = new System.Windows.Forms.ToolTip();
            //  ToolTip1.SetToolTip(this.btnTrace, "Start/Stop Recording");
        }