Пример #1
0
 private void unmountNetworkDrivesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!PublishManager.UnmapAllDrives())
     {
         MessageBox.Show("No Drives to unmap.");
     }
 }
Пример #2
0
 private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (PublishManager.IsDrivesMapped())
     {
         if (MessageBox.Show(this, "You still have network drives mapped by the Publisher. Would you like them disconnected?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             PublishManager.UnmapAllDrives();
         }
     }
 }