private void effectsDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string id = effectsDataGridView.Rows[e.RowIndex].Cells[0].Value as String; if (id == null) { return; } ElementViewer ev = new ElementViewer(Utilities.getElement(id), null); ev.Show(); }
private void forbiddenDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string id = forbiddenDataGridView.Rows[e.RowIndex].Cells[0].Value.ToString(); if (Utilities.elementExists(id)) { ElementViewer ev = new ElementViewer(Utilities.getElement(id), null); ev.Show(); } else if (Utilities.aspectExists(id)) { AspectViewer av = new AspectViewer(Utilities.getAspect(id), null); av.Show(); } }
private void ForbiddenDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (!(forbiddenDataGridView.SelectedCells[0].Value is string id)) { return; } if (Utilities.ElementExists(id)) { ElementViewer ev = new ElementViewer(Utilities.GetElement(id), null, null); ev.Show(); } else if (Utilities.AspectExists(id)) { AspectViewer av = new AspectViewer(Utilities.GetAspect(id), null, null); av.Show(); } }
private void ExpulsionsDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string id = expulsionDataGridView.Rows[e.RowIndex].Cells[0].Value.ToString(); switch (Utilities.GetIdType(id)) { case "aspect": AspectViewer av = new AspectViewer(Utilities.GetAspect(id), null, null); av.Show(); break; case "element": ElementViewer ev = new ElementViewer(Utilities.GetElement(id), null, null); ev.Show(); break; } }
private void requiredDataGridView_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e) { string id = requiredDataGridView.SelectedCells[0].Value as String; if (id == null) { return; } if (Utilities.elementExists(id)) { ElementViewer ev = new ElementViewer(Utilities.getElement(id), null); ev.Show(); } else if (Utilities.aspectExists(id)) { AspectViewer av = new AspectViewer(Utilities.getAspect(id), null); av.Show(); } }
private void specListView_DoubleClick(object sender, EventArgs e) { if (specListView.SelectedItems == null) { return; } string id = specListView.SelectedItems[0].Text.ToString(); if (id.Contains("deck:") && Utilities.deckExists(id.Substring(id.IndexOf(":")))) { DeckViewer dv = new DeckViewer(Utilities.getDeck(id.Substring(id.IndexOf(":"))), null); dv.Show(); } else if (Utilities.elementExists(id)) { ElementViewer ev = new ElementViewer(Utilities.getElement(id), null); ev.Show(); } }