コード例 #1
0
ファイル: dogapidemo.cs プロジェクト: xrfmail/GitHub
        /// <summary>
        /// Writes some descriptive text into the
        /// referenced TextBox.
        /// </summary>
        protected void Verbose(string text)
        {
            if (null == text)
            {
                return;
            }

            FormDogDemo.WriteToTextbox(textHistory, "     " + text + "\r\n");
        }
コード例 #2
0
ファイル: dogapidemo.cs プロジェクト: xrfmail/GitHub
        /// <summary>
        /// Writes the Demo header into the referenced TextBox.
        /// </summary>
        protected virtual void Header()
        {
            if (textHistory != null && 0xFFFF < textHistory.TextLength)
            {
                textHistory.Clear();
            }

            FormDogDemo.WriteToTextbox(textHistory,
                                       "____________________________________________________________\r\n" +
                                       string.Format("API Demo started ({0})\r\n\r\n", DateTime.Now.ToString()));
        }
コード例 #3
0
ファイル: dogc2v.cs プロジェクト: qwdingyu/C-
        /// <summary>
        /// Prints the header into the
        /// referenced TextBox
        /// </summary>
        protected override void Header()
        {
            if (textHistory != null && 0xFFFF < textHistory.TextLength)
            {
                textHistory.Clear();
            }

            FormDogDemo.WriteToTextbox(textHistory,
                                       "____________________________________________________________\r\n" +
                                       string.Format("Generation of Status Information started ({0})\r\n\r\n",
                                                     DateTime.Now.ToString()));
        }
コード例 #4
0
ファイル: dogapidemo.cs プロジェクト: xrfmail/GitHub
        /// <summary>
        /// Dumps an operation status into the
        /// referenced TextBox.
        /// </summary>
        protected void ReportStatus(DogStatus status)
        {
            FormDogDemo.WriteToTextbox(textHistory,
                                       string.Format("     Result: {0} (DogStatus::{1})\r\n",
                                                     stringCollection[(int)status],
                                                     status.ToString()));

            if (textHistory != null)
            {
                if (DogStatus.StatusOk == status)
                {
                    textHistory.Refresh();
                }
                else
                {
                    textHistory.Parent.Refresh();
                }
            }
        }
コード例 #5
0
ファイル: dogapidemo.cs プロジェクト: xrfmail/GitHub
        /// <summary>
        /// Dumps a bunch of bytes into the referenced TextBox.
        /// </summary>
        protected void DumpBytes(byte[] bytes)
        {
            Verbose("Dumping data (max. 64 Bytes):");

            for (int index = 0; index < bytes.Length; index++)
            {
                if (0 == (index % 8))
                {
                    FormDogDemo.WriteToTextbox(textHistory,
                                               (0 == index) ? "          " : "\r\n          ");
                }

                FormDogDemo.WriteToTextbox(textHistory, "0x" + bytes[index].ToString("X2") + " ");

                // for performance reason we only dump 64 bytes
                if (63 <= index)
                {
                    FormDogDemo.WriteToTextbox(textHistory, "\r\n          ...");
                    break;
                }
            }

            Verbose("");
        }
コード例 #6
0
ファイル: dogc2v.cs プロジェクト: qwdingyu/C-
 /// <summary>
 /// Prints the footer message into the
 /// referenced TextBox
 /// </summary>
 protected override void Footer()
 {
     FormDogDemo.WriteToTextbox(textHistory, "Generation of Status Information completed\r\n");
 }
コード例 #7
0
 /// <summary>
 /// Prints the footer message into the
 /// referenced TextBox
 /// </summary>
 protected override void Footer()
 {
     FormDogDemo.WriteToTextbox(textHistory, "SuperDog Update completed\r\n");
 }
コード例 #8
0
ファイル: dogapidemo.cs プロジェクト: xrfmail/GitHub
 /// <summary>
 /// Prints the footer into the referenced TextBox.
 /// </summary>
 protected virtual void Footer()
 {
     FormDogDemo.WriteToTextbox(textHistory, "API Demo completed\r\n");
 }