Example #1
0
 public void Login(string uid, string password)
 {
     if (!_xmpp.IsAuthenticated || !_message.StartsWith("Online"))
     {
         _xmpp.Connect(uid, password, _host, _port);
         _message      = "...connecting...";
         _uid          = uid;
         _password     = password;
         _auto_connect = true;
     }
 }
Example #2
0
        /// <summary>Prepares a BasicNode.</summary>
        /// <param name="node_config">A node config object.</param>
        public BasicNode(NodeConfig node_config)
        {
            _node_config      = node_config;
            _running          = true;
            _shutdown         = Shutdown.GetShutdown();
            _shutdown.OnExit += OnExit;

            _type_to_pem = new Dictionary <string, PathELManager>();
            _rand        = new Random();

            if (_node_config.XmppServices.Enabled)
            {
                XmppService = new XmppService(_node_config.XmppServices.Username,
                                              _node_config.XmppServices.Password,// _node_config.XmppServices.Server,
                                              _node_config.XmppServices.Port);
                XmppService.Connect();
            }
        }
Example #3
0
        public MainWindowViewModel()
        {
            if (Environment.GetCommandLineArgs().Length < 2)
            {
                throw new Exception("Must specify an auction id!");
            }

            AuctionIds = Environment.GetCommandLineArgs()[1].Split(new char[] { ',' });

            string jid = ConfigurationManager.AppSettings[CONFIG_JID];

            _xmpp = new XmppService(jid,
                                    ConfigurationManager.AppSettings[CONFIG_PASSWORD],
                                    ConfigurationManager.AppSettings[CONFIG_HOST]);

            _xmpp.Connect();

            foreach (string itemId in AuctionIds)
            {
                JoinAuction(itemId);
            }
        }
Example #4
0
 public void StartSellingItem()
 {
     _xmpp.Connect();
 }