private void addTrustedNodeButton_Clicked(object sender, EventArgs args) { AddTrustedNodeDialog w = new AddTrustedNodeDialog(Dialog); int result = w.Run(); if (result == (int)ResponseType.Ok) { TrustedNodeInfo tni = w.TrustedNodeInfo; if (tni != null) { foreach (object[] row in trustedNodesListStore) { var thisInfo = (TrustedNodeInfo)row[0]; if (thisInfo.NodeID == tni.NodeID) { Gui.ShowErrorDialog("This node already exists!", base.Dialog); return; } } trustedNodesListStore.AppendValues(tni); } } }