//*************************************************************************** // Class Constructors // private frmProjectInfo() { InitializeComponent(); this._noteCol = new ProjectNoteCollection(); this._delNotes = new ProjectNoteCollection(); this._newNotes = new List <string>(); }
internal frmProjectInfo(ProjectNoteCollection notes, string fileName, int qryCount, string createBy, DateTime createOn, DateTime modifiedOn) : this() { if (string.IsNullOrEmpty(createBy)) { using (System.Security.Principal.WindowsIdentity wi = System.Security.Principal.WindowsIdentity.GetCurrent()) createBy = wi.Name; } this.txtCreatedBy.Text = createBy; this.txtCreatedOn.Text = (createOn != null && createOn != DateTime.MinValue) ? createOn.ToString("MM/dd/yyyy HH:mm:ss") : string.Empty; this.txtModifiedOn.Text = (modifiedOn != null && modifiedOn != DateTime.MinValue) ? modifiedOn.ToString("MM/dd/yyyy HH:mm:ss") : string.Empty; if (System.IO.File.Exists(fileName)) { System.IO.FileInfo fi = new System.IO.FileInfo(fileName); this.lblFileSize.Text = ((fi.Length > 1024) ? ((double)((double)fi.Length / 1024.0)).ToString("#,##0.00") + " Kb" : fi.Length.ToString("#,##0") + " bytes"); } this.lblQryCnt.Text = qryCount.ToString(); this._noteCol = notes; this.PopulateNoteList(); }