Пример #1
0
        /// <summary>
        /// Singleton method that returns instance of OppCommHandler
        /// </summary>
        /// <returns></returns>
        public static OppCommHandler getInstance()
        {
            if (oppCommHandler == null)
            {
                oppCommHandler = new OppCommHandler();
                InitializeOppCommHandler();
            }

            return oppCommHandler;
        }
Пример #2
0
        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();
 }