void ymove_ControlUpdated(object sender, ZomBControlUpdatedEventArgs e) { if (this.InvokeRequired) { this.Invoke(new ControlUpdatedDelegate(ymove_ControlUpdated), sender, e); } else //Scale virtual to real this.Location = new Point(this.Location.X, (int)((1 - (float.Parse(e.Value) - YVMin) / (YVMax - YVMin)) * (YMax - YMin) - YMin)); }
void label_ControlUpdated(object sender, ZomBControlUpdatedEventArgs e) { if (this.InvokeRequired) { this.Invoke(new ControlUpdatedDelegate(label_ControlUpdated), sender, e); } else this.Text = e.Value; }
void xmove_ControlUpdated(object sender, ZomBControlUpdatedEventArgs e) { if (this.InvokeRequired) { this.Invoke(new ControlUpdatedDelegate(xmove_ControlUpdated), sender, e); } else //Scale virtual to real this.Location = new Point((int)(((float.Parse(e.Value) - XVMin) / (XVMax - XVMin)) * (XMax - XMin) + XMin), this.Location.Y); }
void rcl_ControlUpdated(object sender, ZomBControlUpdatedEventArgs e) { ((sender as ZomBRemoteControl).Tag as IZomBControl).UpdateControl(e.Value); }