void TriggerForward() { if (Forward != null) { Forward.Invoke(this, new EventArgs()); } }
private void Button_KeyDown_Forward(object sender, KeyEventArgs e) { if (e.Key == Key.Right) { Forward?.Invoke(this, new RoutedEventArgs()); } }
private void ForwardButton_Click(object sender, RoutedEventArgs e) => Forward?.Invoke(this, new RoutedEventArgs());
private void BackwardButtonClick(object sender, RoutedEventArgs e) { Forward?.Invoke(this, EventArgs.Empty); }
private void OnForwardButton_Click(object sender, RoutedEventArgs e) => Forward?.Invoke(this, EventArgs.Empty);
/// <summary> /// 来源转为目标。 /// </summary> /// <param name="source">给定的 <typeparamref name="TSource"/>。</param> /// <returns>返回 <typeparamref name="TTarget"/>。</returns> public virtual TTarget ConvertTo(TSource source) => Forward.Invoke(source);
/// <summary> /// 将来源序列化为目标。 /// </summary> /// <param name="source">给定的 <typeparamref name="TSource"/>。</param> /// <returns>返回 <typeparamref name="TTarget"/>。</returns> public virtual TTarget Serialize(TSource source) => Forward.Invoke(source);