private void cmdPrint_Click(object sender, RoutedEventArgs e) { Button button = (sender as Button); var trans = (null != button) ? button.DataContext as TSBCouponSummary : null; if (null == trans) { return; } var search = Search.Users.ById.Create(trans.UserId, "ADMINS", "ACCOUNT", "CTC_MGR", "CTC", "TC", "MT_ADMIN", "MT_TECH", "FINANCE", "SV", "RAD_MGR", "RAD_SUP"); var user = ops.Users.GetById(search).Value(); if (null == user) { return; } // Raise Event. OnPrint.Invoke(this, new PrintCouponReceivedReportEventArgs() { Transaction = trans, User = user }); }
// TODO: IsOn(TraceIndex) public static void Print(string text) { var data = Encoding.GetEncoding(1252).GetBytes(text + '\0'); Send(TronCommand.Print, data); OnPrint?.Invoke(text); }
public void Print(string[] text) { Thread.Sleep(1500); if (OnPrint != null) { OnPrint.Invoke(this, text.Length); } }
private void Combine(int position, int combinationCount) { if (_tempStack.Count == combinationCount) { OnPrint?.Invoke(_tempStack); return; } for (int i = position; i < _taskList.Count; i++) { _tempStack.Push(_taskList[i]); Combine(i + 1, combinationCount); _tempStack.Pop(); } }
private void Combine(int combinationCount) { if (_tempStack.Count == combinationCount) { OnPrint?.Invoke(_tempStack); return; } foreach (var item in _taskList) { _tempStack.Push(item); Combine(combinationCount); _tempStack.Pop(); } }
/// <summary> /// Prints message to all outputs. /// </summary> public void Print() { if (!_configurations.Any()) { throw new ApplicationException("No printing outputs configured"); } OnPrint?.Invoke(this, new HelloWorldEventArgs(Message)); foreach (var configuration in _configurations) { switch (configuration.OutputType) { case OutputType.Console: configuration.Printer.Print(Message); break; default: throw new ArgumentOutOfRangeException(); } } }
void Print(string PrintValue) { OnPrint?.Invoke(this, new PrintEventArgs { Message = PrintValue }); }
public void Print(string s) { Console.WriteLine(s); OnPrint?.Invoke(this, EventArgs.Empty); }
public static void PrintErr(string text) { OnPrint?.Invoke(DateTime.Now, DbgPrintType.Err, text); }
public static void PrintWarn(string text) { OnPrint?.Invoke(DateTime.Now, DbgPrintType.Warn, text); }
public static void PrintInfo(string text) { OnPrint?.Invoke(DateTime.Now, DbgPrintType.Info, text); }
public static void PrintClearAll() { OnPrint?.Invoke(DateTime.Now, DbgPrintType.ClearAll, ""); }