Esempio n. 1
0
    /////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    /// Draws MdiClient background and application version info.
    /// </summary>
    ///
    private void DrawMdiClientWindow()
    {
        MdiClient.BorderBackColor      = Color.Black;
        MdiClient.BorderBackColorInact = Color.Black;
        MdiClient.BorderForeColor      = Color.DarkCyan;
        MdiClient.BorderForeColorInact = Color.DarkCyan;
        MdiClient.BackColor            = Color.Black;
        MdiClient.ForeColor            = Color.DarkCyan;

        MdiClient.FillRectangle(0, 0, MdiClient.Width, MdiClient.Height, ' ');

        /////////////////////////////////////////////////////////////////////////////////

        // Display application version info.
        //
        string info = GetVerboseVersionInfo();
        TaggedTextCollection lines = TaggedText.SplitTextInLines(info);

        int left = MdiClient.Width - 2 - lines.MaxTextLength;
        int top  = MdiClient.Height - 1 - lines.Count;

        for (int i = 0; i < lines.Count; ++i)
        {
            MdiClient.At(left, top + i).Write(lines[i].Text);
        }

        // Display information about tracing, if any.
        //
        Debug.IfTracingExecute(() =>
        {
            MdiClient.ForeColor = Color.DarkMagenta;

            MdiClient.At(2, MdiClient.Height - 3);

            MdiClient.Write("Tracing to: ");
            MdiClient.Write(System.IO.Path.GetFileName(Debug.TraceFile.Name));

            MdiClient.At(2, MdiClient.Height - 2);

            MdiClient.Write("Trace flags: ");
            MdiClient.Write(Debug.TraceFlags.Verbose());
        });
    }