Ejemplo n.º 1
0
        public AboutBoxForm()
        {
            InitializeComponent();
            this.Text = String.Format("About {0}", AssemblyTitle.Replace(" Library", ""));
            this.labelProductName.Text = AssemblyProduct;
            this.labelVersion.Text     = String.Format("Version {0}", AssemblyVersion);
            linkLabel.Text             = "Get the last version and free support at http://wwww.sealreport.org";
            //check for license text
            string text = Repository.Instance.LicenseText;

            if (string.IsNullOrEmpty(text))
            {
                text = @"A genuine seal named 'Chocolat' from Dun Laoghaire, Dublin.

Visit our Web site, take a dive and join the Seal community...


Copyright(c) Seal Report, Eric Pfirsch ([email protected]).

Seal Report is licensed under the Apache License, Version 2.0.
http://www.apache.org/licenses/LICENSE-2.0.
";
            }
            this.textBoxDescription.Text = text;
            ShowIcon = true;
            Icon     = Repository.ProductIcon;
        }
Ejemplo n.º 2
0
 public AboutBoxForm()
 {
     InitializeComponent();
     this.Text = String.Format("About {0}", AssemblyTitle.Replace(" Library", ""));
     this.labelProductName.Text = AssemblyProduct;
     this.labelVersion.Text     = String.Format("Version {0}", AssemblyVersion);
     linkLabel.Text             = "Get the last version and free support at http://wwww.sealreport.org";
     ShowIcon = true;
     Icon     = Repository.ProductIcon;
 }
Ejemplo n.º 3
0
        public void WriteSuccessHeaders(int statusCode, string contentType, byte[] data)
        {
            string newline = Environment.NewLine;

            outputStream.Write(Encoding.UTF8.GetBytes("HTTP/1.1 " + statusCode.ToString() + " " + StatusCodes.Lookup(statusCode) + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Content-Type: " + contentType + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Server: " + AssemblyTitle.Replace(' ', '-') + '/' + AssemblyVersion + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Date: " + DateTime.UtcNow.ToString(DateTimeFormat) + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Connection: close" + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Content-Length: " + data.Length.ToString() + newline));
            outputStream.Write(Encoding.UTF8.GetBytes(newline));
            outputStream.Write(data);
        }
Ejemplo n.º 4
0
        public void WriteFailureHeaders(int errorCode)
        {
            string newline = Environment.NewLine;

            outputStream.Write(Encoding.UTF8.GetBytes("HTTP/1.1 " + errorCode.ToString() + " " + StatusCodes.Lookup(errorCode) + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Content-Type: text/html" + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Server: " + AssemblyTitle.Replace(' ', '-') + '/' + AssemblyVersion + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Date: " + DateTime.UtcNow.ToString(DateTimeFormat) + newline));
            outputStream.Write(Encoding.UTF8.GetBytes("Connection: close" + newline));

            string data = GetErrorDocument(errorCode);

            outputStream.Write(Encoding.UTF8.GetBytes("Content-Length: " + data.Length.ToString() + newline));
            outputStream.Write(Encoding.UTF8.GetBytes(newline));
            outputStream.Write(Encoding.UTF8.GetBytes(data));
        }