Пример #1
0
        static public void start()
        {
            // Initialize the crypto manager
            CryptoManager.initLib();

            // Prepare the wallet
            string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);

            walletStorage = new WalletStorage(Path.Combine(path, Config.walletFile));

            // Initialize the wallet state
            walletState = new WalletState();

            // Prepare the local storage
            localStorage = new SPIXI.Storage.LocalStorage();

            // Read the account file
            localStorage.readAccountFile();

            // Start the network queue
            NetworkQueue.start();

            // Prepare the stream processor
            StreamProcessor.initialize();

            // Start the keepalive thread
            PresenceList.startKeepAlive();

            // Setup a timer to handle routine updates
            mainLoopTimer          = new System.Timers.Timer(2500);
            mainLoopTimer.Elapsed += new ElapsedEventHandler(onUpdate);
            mainLoopTimer.Start();
        }
Пример #2
0
        static public void start()
        {
            // Generate presence list
            PresenceList.init(IxianHandler.publicIP, 0, 'C');

            // Prepare the local storage
            localStorage = new SPIXI.Storage.LocalStorage(Config.spixiUserFolder);

            // Read the account file
            localStorage.readAccountFile();

            // Start the network queue
            NetworkQueue.start();

            // Prepare the stream processor
            StreamProcessor.initialize();

            // Start the keepalive thread
            PresenceList.startKeepAlive();

            // Start the transfer manager
            TransferManager.start();

            startCounter++;

            // Setup a timer to handle routine updates
            mainLoopTimer          = new System.Timers.Timer(2500);
            mainLoopTimer.Elapsed += new ElapsedEventHandler(onUpdate);
            mainLoopTimer.Start();
        }