public Form1() { InitializeComponent(); _transferType = TransferType.All; if (String.IsNullOrEmpty(_token)) _token = ChemSpiderClient.Search.SetToken(_token, this); _search = new ChemSpiderClient.Search(_token, this, _transferType, true); _search.StructureTransfered += (search_StructureTransfered); }
public Form1() { InitializeComponent(); _transferType = TransferType.All; if (String.IsNullOrEmpty(_token)) _token = ChemSpiderClient.Search.SetToken(_token, this); if (!String.IsNullOrEmpty(_token)) { _search = new ChemSpiderClient.Search(_token, this, _transferType, true); _search.StructureTransfered += (search_StructureTransfered); } else { MessageBox.Show(this, "ChemSpider token not set", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } }