Exemplo n.º 1
0
 public void PrintajIzvjestaj(System.Windows.Controls.RichTextBox t)
 {
     t.AppendText("Podnosioc: " + Podnosioc.ToString() + Environment.NewLine);
     t.AppendText("Datum ponošenja zahtjeva za izvještajem: " + DatumPodnosenja.ToString() + Environment.NewLine);
     t.AppendText("********************************************************************************" + Environment.NewLine);
     foreach (String s in Podaci)
     {
         t.AppendText(s + Environment.NewLine);
     }
 }
Exemplo n.º 2
0
        internal void RetornoDados <T>(T objeto, RichTextBox richTextBox) where T : class
        {
            richTextBox.Document.Blocks.Clear();

            foreach (var atributos in Funcoes.LerPropriedades(objeto))
            {
                richTextBox.AppendText(atributos.Key + " = " + atributos.Value + "\r");
            }
        }
Exemplo n.º 3
0
 private void DoPrint(string log)
 {
     App.Current.Dispatcher.BeginInvoke(new Action(() =>
     {
         //Paragraph paragraph = new Paragraph();
         //Run run = new Run()
         //{
         //    Text = log,
         //    Foreground = !result ? new SolidColorBrush(Color.FromRgb(200, 100, 0)) : new SolidColorBrush(Color.FromRgb(0, 100, 200))
         //};
         //paragraph.Inlines.Add(run);
         _PrintData.AppendText(log);
         // this._PrintData.Document.Blocks.Add(paragraph);
         // this._PrintData.ScrollToEnd();
     }));
 }
Exemplo n.º 4
0
        public static void DisplayLog(System.Windows.Controls.RichTextBox _rtb, csLogging.LogState _ls, csLog _log, bool bClearRTB)
        {
            if (bClearRTB)
            {
                _rtb.Document.Blocks.Clear();
            }

            string sLogData = $"{_log.Tech} began this entry at {_log.LogCreationTime.ToString("MM/dd/yyyy hh:mm:ss tt")}.\n";

            sLogData += "*** Filtered Actions Associated With This Log File*** \n";

            for (int i = 0; i < _log.lActions.Count; i++)
            {
                if (_ls.Equals(_log.lActions[i].EventType) || _ls.Equals(csLogging.LogState.NONE))
                {
                    sLogData += $"Event Type: {_log.lActions[i].EventType.ToString()}\n";

                    if (_log.lActions[i].LogNote != null)
                    {
                        sLogData += $"Log Action: {_log.lActions[i].LogNote}\n";
                    }
                    if (_log.lActions[i].ControlType != null)
                    {
                        sLogData += $"Control Type: {_log.lActions[i].ControlType}\n";
                    }
                    if (_log.lActions[i].ControlName != null)
                    {
                        sLogData += $"Control Name: {_log.lActions[i].ControlName}\n";
                    }
                    if (_log.lActions[i].ControlContent != null)
                    {
                        sLogData += $"Control Content: {_log.lActions[i].ControlContent}\n";
                    }

                    sLogData += "Event Timing: " + _log.lActions[i].EventTiming.ToString("MM/dd/yyyy hh:mm:ss tt") + "\n";

                    sLogData += "----------------------------\n";
                }
            }

            sLogData += "This log was completed on " + _log.LogSubmitTime.ToString("MM/dd/yyyy hh:mm:ss tt") + "\n";
            sLogData += "*** End of Log ***";

            _rtb.AppendText(sLogData);
        }
Exemplo n.º 5
0
 public static void AppendLine(this System.Windows.Controls.RichTextBox myOutput)
 {
     myOutput.AppendText("\n");
 }
Exemplo n.º 6
0
 internal void RetornoStr(RichTextBox richTextBox, string retornoXmlString)
 {
     richTextBox.Document.Blocks.Clear();
     richTextBox.AppendText(retornoXmlString);
 }
Exemplo n.º 7
0
 internal void EnvioStr(RichTextBox richTextBox, string envioStr)
 {
     richTextBox.Document.Blocks.Clear();
     richTextBox.AppendText(envioStr);
 }
Exemplo n.º 8
0
        /// <summary>
        /// Used for debugging append text to client box
        /// </summary>
        /// <param name="text">Text to append</param>
        /// <param name="box">Rich text box on client form</param>
        public static void AppendToTextBox(string text, RichTextBox box)
        {
            var invoker = new MethodInvoker(() => box.AppendText(text));

            invoker.Invoke();
        }