private void bSend_Click(object sender, RoutedEventArgs e) { if (tbTarget.Text == String.Empty) { MessabeBoxShow("Please enter the requested data", "OK", "Cancel", NotificationType.DataEmpty); return; } int target = Int32.Parse(tbTarget.Text); if (target != CurrentTarget.Target) { SendErrorData(this, null); MessabeBoxShow("Please enter the right number", "OK", "Cancel", NotificationType.DataError); return; } SendResultOK(this, null); CurrentTarget = GetTarget(this, null); tbTarget.Text = String.Empty; }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { CurrentTarget = GetTarget(this, null); if (currentTarget == null) { MessageBox.Show("No experiment is currently being executed"); return; } }
public void Activate(Dictionary<string, Object> context) { if (GetTarget != null) CurrentTarget = GetTarget(this, null); if (CurrentTarget != null && CurrentTarget.Condition.Method != SwitchingMethod.TapNFlip) return; if (context == null) return; if (!context.ContainsKey("result")) return; tbTarget.Text = context["result"] as String; }