Inheritance: global::ProtoBuf.IExtensible
コード例 #1
0
ファイル: PeerProcessor.cs プロジェクト: hunbernd/RSSSHClient
 internal void FriendsSelectedIndexChanged(int index)
 {
     ClearPeerForm();
     Person p = _peerList[index];
     _selectedPeer = p;
     foreach (rsctrl.core.Location l in p.locations)
     {
         string state = "";
         switch (l.state)
         {
             case ((uint)rsctrl.core.Location.StateFlags.CONNECTED):
                 state = "connected";
                 break;
             case ((uint)rsctrl.core.Location.StateFlags.ONLINE):
                 state = "online";
                 break;
             case ((uint)(rsctrl.core.Location.StateFlags.CONNECTED | rsctrl.core.Location.StateFlags.ONLINE)):
                 state = "connected online";
                 break;
             case ((uint)rsctrl.core.Location.StateFlags.UNREACHABLE):
                 state = "unreachable";
                 break;
             default:
                 state = "offline";
                 break;
         }
         _b.GUI.lb_locations.Items.Add(l.location + " - " + state);
     }
     if (p.locations.Count > 0)
         _b.GUI.lb_locations.SelectedIndex = 0;
     _b.GUI.tb_peerName.Text = p.name;
     _b.GUI.tb_peerID.Text = p.gpg_id;
 }
コード例 #2
0
ファイル: PeerProcessor.cs プロジェクト: nolith/RSSSHClient
        public PeerProcessor()
        {
            _b = Bridge.GetBridge();

            _owner = new ResponseSystemAccount();
            _peerList = new List<Person>();
            _selectedPeer = new Person();
            //_pendingPeerRequests = new Dictionary<uint, RequestPeers.SetOption>();
        }
コード例 #3
0
ファイル: PeerProcessor.cs プロジェクト: hunbernd/RSSSHClient
        public PeerProcessor()
        {
            _b = Bridge.GetBridge();

            _owner = new ResponseSystemAccount();
            _peerList = new List<Person>();
            _selectedPeer = new Person();
            //_pendingPeerRequests = new Dictionary<uint, RequestPeers.SetOption>();
            _lookup = new LookupService("GeoLiteCity.dat");
            _lookup2 = new LookupService("GeoIPASNum.dat");
        }
コード例 #4
0
ファイル: PeerProcessor.cs プロジェクト: hunbernd/RSSSHClient
 internal void SavePeer(int locationIndex)
 {
     Person p = _selectedPeer;
     rsctrl.core.Location l = p.locations[locationIndex];
     l.extaddr.addr = _b.GUI.tb_peerIPExt.Text;
     l.extaddr.port = Convert.ToUInt16(_b.GUI.nud_peerPortExt.Value);
     l.localaddr.addr = _b.GUI.tb_peerIPInt.Text;
     l.localaddr.port = Convert.ToUInt16(_b.GUI.nud_peerPortInt.Value);
     //dyndns
     p.locations[locationIndex] = l;
     _selectedPeer = p;
     uint reqID = _b.RPC.PeersModifyPeer(p, RequestModifyPeer.ModCmd.ADDRESS);
     // save request ???
 }
コード例 #5
0
ファイル: PeerProcessor.cs プロジェクト: hunbernd/RSSSHClient
        internal void Reset()
        {
            //_owner = null; needed?
            _peerList.Clear();
            _b.GUI.lb_friends.Items.Clear();
            _b.GUI.lb_locations.Items.Clear();
            _selectedPeer = null;

            //_pendingPeerRequests.Clear();
        }