コード例 #1
0
 private void OKButton_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(VolumeLabel.Text))
     {
         Drive.Format(Int32.Parse(Capacity.Text), Int32.Parse(AllocationUnitSize.Text), VolumeLabel.Text);
         DialogResult = true;
     }
 }
コード例 #2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (String.IsNullOrEmpty(VolumeLabel.Text))
     {
         e.Cancel = true;
         MessageBox.Show(this, $"Enter volume name.",
                         "Confirmation", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
     else
     {
         Drive.Format(Int32.Parse(Capacity.Text), Int32.Parse(AllocationUnitSize.Text), VolumeLabel.Text);
         DialogResult = true;
     }
 }
コード例 #3
0
 public MainWindow()
 {
     Drive.Format(256, 4, "Artemiy");
     InitializeComponent();
     DrawGrid();
 }