System.Windows.Forms.FileDialog.FormFileInfo.FormFileInfo C# (CSharp) Method

FormFileInfo() public method

public FormFileInfo ( string path ) : System
path string
return System
            public FormFileInfo(string path)
            {
#if UNITY_STANDALONE
                Size = new Drawing.Size(320, 120);
                Location = new Point(Screen.PrimaryScreen.WorkingArea.Width / 2 - Width / 2, Screen.PrimaryScreen.WorkingArea.Height / 2 - Height / 2);
                Resizable = false;
                Text = "Properties: ";

                if (System.IO.File.Exists(path) == false) return;

                var info = new System.IO.FileInfo(path);
                var bytes = info.Length;
                string sbytes = bytes.ToString() + " bytes";
                if (bytes >= 1000000000)
                    sbytes = (bytes / 1000000000) + " gb";
                if (bytes >= 1000000)
                    sbytes = (bytes / 1000000) + " mb";
                else if (bytes >= 1000)
                    sbytes = (bytes / 1000) + " kb";

                Label labelSize = new Label();
                labelSize.Location = new Point(16, 32);
                labelSize.Text = "Size: " + sbytes;
                Controls.Add(labelSize);

                Label labelCreationDate = new Label();
                labelCreationDate.Location = new Point(16, 64);
                labelCreationDate.Text = "Date creation: " + info.CreationTime.ToString("dd.MM.yyyy");
                Controls.Add(labelCreationDate);

                Label labelModDate = new Label();
                labelModDate.Location = new Point(16, 86);
                labelModDate.Text = "Date modified: " + info.LastWriteTime.ToString();
                Controls.Add(labelModDate);

                string fileName = System.IO.Path.GetFileName(path);
                Text += fileName;
#endif
            }
        }
FileDialog.FormFileInfo