Exemplo n.º 1
0
 public void RemoveSharePath(SharePath sp)
 {
     if (shares.Contains(sp))
     {
         shares.Remove(sp);
         StatusManager.Instance.RaiseFlag(StatusFlag.SharesChanged);
     }
 }
Exemplo n.º 2
0
        void SharesListDoubleClick(object sender, EventArgs e)
        {
            ListViewItem lvi = null;

            try {
                lvi = (sender as ListView).SelectedItems[0];
            } catch (Exception) {
                return;
            }
            SharePath sp = (lvi.Tag) as SharePath;

            if (sp != null)
            {
                if (MessageBox.Show("Unshare path " + sp.FsPath + "?", "Unshare", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    ShareManager.Instance.RemoveSharePath(sp);
                    RefreshSharesList();
                }
            }
        }