private void btnEdit_Click(object sender, EventArgs e) { if (lvTheme.SelectedItems.Count > 0)//edit theme { frmEdit f = new frmEdit((Path.GetDirectoryName(lvTheme.SelectedItems[0].Tag.ToString()) + "\\").Replace("\\\\", "\\")); f.Show(); } else //make new theme { frmEdit f = new frmEdit(); f.Show(); } }