private void mnuImportMine_Click(object sender, EventArgs e) { ImportVariable impVar = tvImport.SelectedNode.Tag as ImportVariable; if (impVar != null) { if (impVar.CanUseMine) { impVar.ToggleImportAction(eImportAction.Mine, impVar.CanUseTheirs ? eImportAction.Theirs : eImportAction.Default); } tvImport.SelectedNode.ImageIndex = impVar.ImageIndex; tvImport.SelectedNode.SelectedImageIndex = impVar.ImageIndex; tvImport.Refresh(); btnOk.Enabled = CanImport; } }
private void mnuImportTheirs_Click(object sender, EventArgs e) { ImportVariable impVar = tvImport.SelectedNode.Tag as ImportVariable; if (impVar != null) { if (impVar.ImportAction == eImportAction.Skip) { ExecuteUnskip(tvImport.SelectedNode); } if (impVar.CanUseTheirs) { impVar.ToggleImportAction(eImportAction.Theirs, impVar.CanUseMine ? eImportAction.Mine : eImportAction.Default); } tvImport.SelectedNode.ImageIndex = impVar.ImageIndex; tvImport.SelectedNode.SelectedImageIndex = impVar.ImageIndex; tvImport.Refresh(); btnOk.Enabled = CanImport; } }