Пример #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
     {
         var dest = new Destination(folderBrowserDialog1.SelectedPath);
         //var dest = new Destination(folderBrowserDialog1.SelectedPath,
         //long.Parse(Interaction.InputBox("Free space")), long.Parse(Interaction.InputBox("Total space")));
         listBox2.Items.Add(string.Format("{0} ({1})", folderBrowserDialog1.SelectedPath,
                                          HelperFunctions.UserFriendlySize(dest.SafeFreeSpace)));
         Destinations.Add(dest);
         Logger.AppendLine("User added {0} to destinations", folderBrowserDialog1.SelectedPath);
     }
 }
Пример #2
0
 protected bool Equals(Destination other)
 {
     return string.Equals(Path, other.Path);
 }