private void ReadCardAgain() { /* * 1st step, is this a memory card ? * --------------------------------- */ if (memoryCard == null) { return; } /* * 2nd step, read the card * ----------------------- */ if (!memoryCard.Read()) { this.BeginInvoke(new OnErrorInvoker(OnError), "Failed to read the card"); return; } /* * 3rd step, display the card's content * ------------------------------------ */ this.BeginInvoke(new OnCardReadInvoker(OnCardRead)); }
private void ReadCardFirst() { /* * 1st step, is this a memory card ? * --------------------------------- */ memoryCard = MemoryCard.Create(cardChannel); if (memoryCard == null) { this.BeginInvoke(new OnErrorInvoker(OnError), "This is not a memory card"); return; } /* Display the type and serial number */ this.BeginInvoke(new OnCardFoundInvoker(OnCardFound)); /* * 2nd step, read the card * ----------------------- */ if (!memoryCard.Read()) { this.BeginInvoke(new OnErrorInvoker(OnError), "Failed to read the card"); return; } /* * 3rd step, display the card's content * ------------------------------------ */ this.BeginInvoke(new OnCardReadInvoker(OnCardRead)); }