예제 #1
0
        private void diskSpaceCheckTimer_Tick(object sender, EventArgs e)
        {
            string drive = System.IO.Path.GetPathRoot(Properties.Settings.Default.OutputPath);

            int space = FileSystemStorage.GetFreeDiskSpaceMB(drive);

            int diskQuota = int.Parse(Properties.Settings.Default.DiskQuota);

            if (space <= diskQuota)
            {
                string msg = string.Format("\"{0}\" 盘空间仅剩余 {1} MB, 请尽快转存!", drive, space);
                alertControl1.Show(this, "警告", msg);
            }
        }