/// <summary> /// Singleton method that returns instance of OppCommHandler /// </summary> /// <returns></returns> public static OppCommHandler getInstance() { if (oppCommHandler == null) { oppCommHandler = new OppCommHandler(); InitializeOppCommHandler(); } return oppCommHandler; }
public MainForm() { InitializeComponent(); strategyComboBox.SelectedItem = (object)"Select Strategy"; messageDelegate = SendMessage; updateMsgListBox = addMessageToListBox; credibilityDelegate = UpdateCredibility; OppCommRequestCallBack = NeighborJoined; restartProbingDelegate = RestartProbing; ToggleControls(true); CommonUtilities.Logger.flushAll(); //This only initiates the device advertisement oppCommHandler = OppCommHandler.getInstance(); deviceIDLabel.Text = DeviceID.GetInstance().ToIDString(); //Read existing credibility history. ReadCredibilityHistory(); }
public DeviceDiscoveryAppCReWMaN() { InitializeComponent(); oppCommHandler = OppCommHandler.getInstance(); }