Ejemplo n.º 1
0
 /// <summary>
 /// Updates the content of the specified Watch item.
 /// </summary>
 /// <param name="item">The Watch item to update.</param>
 protected abstract void UpdateWatchItem(MessyLab.WatchPad.WatchItem item);
Ejemplo n.º 2
0
 public void Read(ushort address, int count, MessyLab.PicoComputer.Data data)
 {
     _abort = false;
     // We use main form for invoking because the handle for the pad might not be created yet.
     var mainForm = Project.Platform.Gui.MainForm;
     for (int i = 0; i < count; i++)
     {
         if (mainForm.InvokeRequired)
         {
             mainForm.Invoke(new Action<string>(Input), string.Format("An integer value for location #{0}: ", address));
             lock (this)
             {
                 if (_abort) break;
                 Done.Reset();
             }
             Done.WaitOne();
             data[address++] = (ushort)short.Parse(ReadValue);
         }
         if (_abort) break;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the specified value to both the item and the debugger.
 /// </summary>
 /// <param name="item">The Watch item to edit.</param>
 /// <param name="value">The value to set.</param>
 protected abstract void EditWatchValue(MessyLab.WatchPad.WatchItem item, long value);
Ejemplo n.º 4
0
        public void Write(ushort address, int count, MessyLab.PicoComputer.Data data)
        {
            // We use main form for invoking because the handle for the pad might not be created yet.
            var mainForm = Project.Platform.Gui.MainForm;
            if (mainForm.InvokeRequired)
            {
                mainForm.Invoke(new Action<ushort, int, MessyLab.PicoComputer.Data>(Write), address, count, data);
                return;
            }
            ShowOnMainForm();
            var sb = new StringBuilder();
            foreach (string l in outTextBox.Lines)
            {
                if (string.IsNullOrEmpty(l)) continue;
                sb.AppendLine(l);
            }
            for (int i = 0; i < count; i++)
            {
                short value = (short)data[address];
                sb.AppendLine(string.Format("The contents of memory location #{0} = {1}", address, value));
                address++;
            }
            outTextBox.Lines = sb.ToString().Split(new string[] { Environment.NewLine }, StringSplitOptions.None);

            ScrollDown();

            Application.DoEvents();
        }