private void TimerTick(object sender, EventArgs e) { if(!this.editor.InEditMode) { if(this.WasChanged()) { this.display.Text = Properties.Resources.WireDisplayValue(CircuitFunction.ToText(this.state, true)); } } else { this.Cancel(); } }
public string this[int index] { get { if (this.output != null) { return(this.output[index].ToString("X", CultureInfo.InvariantCulture)); } if (FunctionProbe.ToInt(this.result[index], bitWidth[index], out int unpacked)) { return(unpacked.ToString("X", CultureInfo.InvariantCulture)); } long res = this.result[index]; return(CircuitFunction.ToText(Enumerable.Range(0, this.bitWidth[index]).Select(i => (State)((res >> i * 2) & 0x3)), false)); } }
private void RefreshHistory() { List <string> list = new List <string>(); int width = this.functionProbe.BitWidth; this.reads = this.functionProbe.Read(); Array.Reverse(this.reads); foreach (long pack in this.reads) { if (pack == -1L) { list.Add(Properties.Resources.ProbeHistoryMark); } else { list.Add(CircuitFunction.ToText(this.Unpack(pack, width), false)); } } this.History = list; }
public string ToText() { return(CircuitFunction.ToText(this.state, false)); }