Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            hWndListManager objWndListManager = new hWndListManager();

            objWndListManager.Initialize(hWndNameListBox, hWndListBox);

            // Timer Start
            System.Timers.Timer objTimer = new System.Timers.Timer();
            objTimer.Interval = 100;
            objTimer.Elapsed += new ElapsedEventHandler(OneHdred_ms);
            objTimer.Start();
        }
Exemplo n.º 2
0
        public void OneHdred_ms(object sender, ElapsedEventArgs e)
        {
            hWndListManager objWndListManager = new hWndListManager();

            if (hWndNameListBox.InvokeRequired == true || hWndListBox.InvokeRequired == true)
            {
                RefreshListBoxDelegate ListBoxDelegator = new RefreshListBoxDelegate(objWndListManager.RefreshListBox);
                this.Invoke(ListBoxDelegator, hWndNameListBox, hWndListBox);
            }
            else
            {
                objWndListManager.RefreshListBox(hWndNameListBox, hWndListBox);
            }
        }