示例#1
0
 private void AtualComboBox()
 {
     if (comboBoxLocals.Items.Count == 0)
     {
         comboBoxLocals.Items.AddRange(LocalDatas.TempDirectory().ToArray());
     }
 }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (string s in LocalDatas.TempDirectory())
                {
                    Directory.Delete(s, true);
                }
            }
            catch (UnauthorizedAccessException)
            {
                labelStatus.ForeColor = Color.Green;
                labelStatus.Text      = "LIMPO";
            }
            catch (System.IO.IOException exc)
            {
                labelStatus.ForeColor = Color.Blue;
                labelStatus.Text      = "LIMPO";
            }
            catch (Exception exc)
            {
                labelStatus.ForeColor = Color.Red;
                labelStatus.Text      = "FALHA";
            }

            FormMain_Load(sender, e);
        }
示例#3
0
 private void comboBoxLocals_SelectedIndexChanged(object sender, EventArgs e)
 {
     labelQtdTempFiles.Text = LocalDatas.QtdTempFiles(comboBoxLocals.SelectedItem.ToString()).ToString();
 }
示例#4
0
 private void AtualTempFiles()
 {
     labelQtdTempFiles.Text = LocalDatas.QtdTempFiles().ToString();
 }