Profile Picture

UI can't display properly after running for a while(Aligning Chart Areas Chart)

Posted By Violet Han 15 Years Ago

UI can't display properly after running for a while(Aligning Chart...

Author
Message
Violet Han
questionmark Posted 15 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 1, Visits: 1

HI Neveron Team,

I made a little change to Aligning Chart Areas(All Examples -> Layout -> Aligning Chart Areas) to make it refresh its data constantly.

The changed code is as below:

private void NewDataBtn_Click(object sender, System.EventArgs e)
  {
            if (timer != null)
                timer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
            timer = new System.Threading.Timer(new System.Threading.TimerCallback(RefreshData), null, 0, 100);
           
   
  }
        private void RefreshData(object sender)
        {
            GenerateOHLCData(m_Stock, prevCloseValue, dataPointCount);
   GenerateVolumeData(m_Volume, prevVolumeValue, dataPointCount);

   m_Line.Values = m_Function.Calculate();
            nChartControl1.Refresh();
        }

After running for a while, I found the UI counn't display properly(as UI1.JPG).

can you tell me why this happens and how to prevent it?

Thank you very much.



Attachments
UI1.JPG (43 views, 71.00 KB)



Similar Topics


Reading This Topic