Exemple #1
0
        private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (this.testFeed != null)
            {
                this.testFeed.Dispose();
                this.testFeed = null;
            }

            if (this.openFeed != null)
            {
                this.openFeed.Dispose();
                this.openFeed = null;
            }
        }
Exemple #2
0
        public MainWindow(System.Net.IPAddress listenerIpAddress, int listenerPort, bool useInternalTestFeed)
        {
            InitializeComponent();

            // GUI update timer
            this.myTimer.Tick    += myTimer_Tick;
            this.myTimer.Interval = TimeSpan.FromMilliseconds(20);
            this.myTimer.Start();

            this.openFeed = new MessageFeed.MessageFeed(listenerIpAddress, listenerPort, OnMessageReceived);

            this.marketViewDataGrid.ItemsSource = displayedProducts;

            // this should be controlled by a popup GUI
            if (useInternalTestFeed)
            {
                this.testFeed = new MessageFeed.InternalTestFeed(listenerIpAddress, listenerPort);
                this.testFeed.StartRandomGeneration();
            }
        }