Ejemplo n.º 1
0
        private async void btnDeleteAll_Click(object sender, EventArgs e)
        {
            label1.Text = "Processing...";
            StringBuilder s = new StringBuilder();
            FileHandler.FileHandler f = new FileHandler.FileHandler(System.Configuration.ConfigurationManager.AppSettings["FilesDir"]);
            TimeSpan inicio = new TimeSpan(DateTime.Now.Ticks);
            await f.DeleteAllAsync();
            TimeSpan fim = new TimeSpan(DateTime.Now.Ticks);
            s.Append("=================================\r\n");
            s.Append("ALL DELETED...\r\n");
            s.Append("=================================\r\n");
            s.Append("Inicio: " + inicio.ToString() + "\r\n");
            s.Append("=================================\r\n");
            s.Append("Fim: " + fim.ToString() + "\r\n");
            s.Append("=================================\r\n");
            s.Append("Tempo Total: " + (fim - inicio).ToString() + "\r\n");
            s.Append("=================================\r\n");
            txtResult.Text = s.ToString();


            label1.Text = "Completed...";
        }
Ejemplo n.º 2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            FileHandler.FileHandler f = new FileHandler.FileHandler(System.Configuration.ConfigurationManager.AppSettings["FilesDir"]);
            f.DeleteAllAsync();


            txtResult.Clear();
        }