/// <summary> /// Launches the <c>StepDone</c> event. /// </summary> protected void StepDoneInvoker(StepDoneArgs arg) { if(StepDone != null) { StepDone(this,arg); } }
/// <summary> /// Launches the <c>StepDone</c> event. /// </summary> protected void StepDoneInvoker(StepDoneArgs arg) { if (StepDone != null) { StepDone(this, arg); } }
/// <summary> /// This method relauches the children database's <c>StepDone</c> event. /// </summary> /// <param name="sender"> /// A <see cref="System.Object"/> /// </param> /// <param name="arg"> /// A <see cref="ProcessingStepDoneArgs"/> /// </param> protected void OnStepDone(object sender, StepDoneArgs arg) { if (StepDone != null) { StepDone(this, arg); } }
/// <summary> /// Manejador del evento RecognizingCharacteristicChecked de la base de datos de caracteres. /// </summary> /// <param name="sender">El objeto que envio el evento.</param> /// <param name="args">Los argumentos del evento.</param> private void OnProcessingStepDone(object sender, StepDoneArgs args) { MessageLogSentInvoker(args.Message); SuspendByStep(); }
/// <summary> /// Creates a <see cref="TristateCheckVector"/> instance for a given /// <c>FloatBitmap</c> object. /// </summary> /// <param name="image"> /// A <see cref="FloatBitmap"/> for which the vector is created. /// </param> /// <returns> /// The <see cref="TristateCheckVector"/> for the image. /// </returns> private TristateCheckVector CreateVector(FloatBitmap image) { // We create the receptors list. if(receptors == null) { receptors = Receptor.GenerateList(40); } TristateCheckVector vector = new TristateCheckVector(); TristateValue checkValue; foreach (Receptor receptor in receptors) { checkValue = receptor.CheckBressard(image)? TristateValue.True:TristateValue.False; vector.Values.Add(checkValue); StepDoneArgs args = new StepDoneArgs(String.Format("Comprobando receptor {0}: {1}", String.Format("({0}, {1}) -> ({2}, {3})", receptor.X0,receptor.Y0, receptor.X1, receptor.Y1), checkValue)); StepDoneInvoker(args); Thread.Sleep(20); } foreach (BinaryCharacteristic characteristic in characteristics) { checkValue = characteristic.Apply(image)? TristateValue.True : TristateValue.False; vector.Values.Add(checkValue); StepDoneArgs args = new StepDoneArgs(String.Format("Comprobando característica {0}: {1}", characteristic.GetType().ToString(), checkValue)); StepDoneInvoker(args); Thread.Sleep(20); } return vector; }
/// <summary> /// This method relauches the children database's <c>StepDone</c> event. /// </summary> /// <param name="sender"> /// A <see cref="System.Object"/> /// </param> /// <param name="arg"> /// A <see cref="ProcessingStepDoneArgs"/> /// </param> protected void OnStepDone(object sender, StepDoneArgs arg) { if(StepDone != null) { StepDone(this,arg); } }
/// <summary> /// Metodo que maneja el evento provocado al completarse un paso /// del proceso durante el aprendizaje. /// </summary> /// <param name="sender"> /// A <see cref="System.Object"/> /// </param> /// <param name="arg"> /// A <see cref="ProcessingStepDoneArgs"/> /// </param> private void OnLearningStepDone(object sender, StepDoneArgs args) { Application.Invoke(sender, args, delegate(object resender, EventArgs a) { if(stepByStep) { nextButtonsHB.Sensitive = true; btnNext.IsFocus = true; } StepDoneArgs arg = (StepDoneArgs) a; btnNext.Sensitive = true; LogLine(arg.Message); }); if(stepByStep) { learningThread.Suspend(); } }