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
            });
        }
예제 #2
0
        // TODO: IsOn(TraceIndex)

        public static void Print(string text)
        {
            var data = Encoding.GetEncoding(1252).GetBytes(text + '\0');

            Send(TronCommand.Print, data);

            OnPrint?.Invoke(text);
        }
예제 #3
0
 public void Print(string[] text)
 {
     Thread.Sleep(1500);
     if (OnPrint != null)
     {
         OnPrint.Invoke(this, text.Length);
     }
 }
예제 #4
0
        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();
            }
        }
예제 #5
0
        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();
                }
            }
        }
예제 #7
0
 void Print(string PrintValue)
 {
     OnPrint?.Invoke(this, new PrintEventArgs {
         Message = PrintValue
     });
 }
예제 #8
0
 public void Print(string s)
 {
     Console.WriteLine(s);
     OnPrint?.Invoke(this, EventArgs.Empty);
 }
예제 #9
0
 public static void PrintErr(string text)
 {
     OnPrint?.Invoke(DateTime.Now, DbgPrintType.Err, text);
 }
예제 #10
0
 public static void PrintWarn(string text)
 {
     OnPrint?.Invoke(DateTime.Now, DbgPrintType.Warn, text);
 }
예제 #11
0
 public static void PrintInfo(string text)
 {
     OnPrint?.Invoke(DateTime.Now, DbgPrintType.Info, text);
 }
예제 #12
0
 public static void PrintClearAll()
 {
     OnPrint?.Invoke(DateTime.Now, DbgPrintType.ClearAll, "");
 }