GetBridge() public static method

This function will return always the same bridge.
public static GetBridge ( MainForm gui = null ) : Bridge
gui MainForm gui only needs to be set on the first call!
return Bridge
Esempio n. 1
0
        public SearchProcessor()
        {
            _b = Bridge.GetBridge();

            _pendingSearchReq = new Dictionary <uint, string>();
            _searches         = new Dictionary <uint, GuiSearch>();
        }
Esempio n. 2
0
        public ChatProcessor()
        {
            _b = Bridge.GetBridge();

            _chatLobbies  = new Dictionary <string, GuiChatLobby>();
            _isRegistered = false;
            _reDrawChat   = false;
        }
Esempio n. 3
0
        public PeerProcessor()
        {
            _b = Bridge.GetBridge();

            _owner        = new ResponseSystemAccount();
            _peerList     = new List <Person>();
            _selectedPeer = new Person();
            //_pendingPeerRequests = new Dictionary<uint, RequestPeers.SetOption>();
        }
Esempio n. 4
0
        public MainForm()
        {
            InitializeComponent();
            cb_con.CheckState = CheckState.Unchecked;

            _b = Bridge.GetBridge(this); // first initialisation of Bridge -> need gui
            _b.RPC.EventOccurred += EventFromThread;
            _b.RPC.ReceivedMsg   += ProcessMsgFromThread;

            _loadSaveHandler = new LoadSaveHandler();
            _log             = new Log();
            _log.NewSession();
            _tickCounter = 0;

            AddSpeedOptions(); // add options _before_ loading settings!
            LoadSettings();
        }
Esempio n. 5
0
        public FileProcessor()
        {
            _b = Bridge.GetBridge();

            _fileTransfers    = new Dictionary <string, GuiFileTransfer>();
            _fileTransfersNEW = new Dictionary <string, FileTransfer>();
            _pendingRequests  = new Dictionary <uint, Direction>();

            //_b.GUI.dgv_filesDownloads.Columns.Add("name", "file name");
            //_b.GUI.dgv_filesDownloads.Columns.Add("speed", "speed [KiB/s]");
            //_b.GUI.dgv_filesDownloads.Columns.Add("done", "% done");
            //_b.GUI.dgv_filesDownloads.Columns.Add("size", "file size");
            _b.GUI.dgv_filesDownloads.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            _b.GUI.dgv_filesDownloads.MultiSelect   = false;

            //_b.GUI.dgv_filesUploads.Columns.Add("name", "file name");
            //_b.GUI.dgv_filesUploads.Columns.Add("speed", "speed [KiB/s]");
            //_b.GUI.dgv_filesUploads.Columns.Add("size", "file size");
            _b.GUI.dgv_filesUploads.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            _b.GUI.dgv_filesUploads.MultiSelect   = false;
        }
Esempio n. 6
0
 public StreamProcessor()
 {
     _b = Bridge.GetBridge();
 }
Esempio n. 7
0
 public Processor()
 {
     _b = Bridge.GetBridge();
 }
Esempio n. 8
0
 public AutoResponse()
 {
     _items = new Dictionary <string, AutoResponseItem>();
     _b     = Bridge.GetBridge();
 }