Click here to Skip to main content
15,889,200 members
Home / Discussions / C#
   

C#

 
AnswerRe: Emergency...everything gone Pin
V.21-Sep-10 20:11
professionalV.21-Sep-10 20:11 
GeneralRe: Emergency...everything gone Pin
stephen.darling21-Sep-10 20:15
stephen.darling21-Sep-10 20:15 
GeneralRe: Emergency...everything gone Pin
Dave Kreskowiak22-Sep-10 2:01
mveDave Kreskowiak22-Sep-10 2:01 
AnswerRe: Emergency...everything gone Pin
DaveyM6921-Sep-10 21:35
professionalDaveyM6921-Sep-10 21:35 
AnswerRe: Emergency...everything gone Pin
#realJSOP22-Sep-10 2:36
mve#realJSOP22-Sep-10 2:36 
AnswerRe: Emergency...everything gone Pin
molesworth22-Sep-10 2:42
molesworth22-Sep-10 2:42 
AnswerRe: Emergency...everything gone Pin
Alan Balkany22-Sep-10 6:17
Alan Balkany22-Sep-10 6:17 
QuestionMultiple OnDraw() scenarios Pin
stephen.darling21-Sep-10 16:08
stephen.darling21-Sep-10 16:08 
Sorry to post again so soon.

My following overriden ondraw function draws a graph

protected override void OnPaint(PaintEventArgs e)
        {
            

            if (machineStatusON)
            {




                for (int i = 0; i < ECGArray.Length; i++)
                {


                    if (x > this.Width) x = 0;
                    x += 1;
                    px = x;
                    p = 60 - (ECGArray[i] / 3 + 50);
                    //e.Graphics.DrawLine(yelgpen, px, pp, x, p);
                    e.Graphics.DrawLine(yelgpen, px, pp + 30, x, p + 30);

                    e.Graphics.DrawLine(blackpen, x + 1, 0, x + 1, this.Height - 1);


                    pp = p;
                    pq = q;
                    pr = r;

                }
            }
        }


As you can see, it uses ECGArray, but, I have a number of different arrays representing different graphs.

How can I setup my OnDraw() to display a different graph, based on what info is passed into my ecg object at runtime?

Thank you
Steve
AnswerRe: Multiple OnDraw() scenarios Pin
Not Active21-Sep-10 16:40
mentorNot Active21-Sep-10 16:40 
AnswerRe: Multiple OnDraw() scenarios Pin
Saksida Bojan21-Sep-10 22:55
Saksida Bojan21-Sep-10 22:55 
Questionshould I place sounds in seperate objects? Pin
stephen.darling21-Sep-10 14:54
stephen.darling21-Sep-10 14:54 
AnswerRe: should I place sounds in seperate objects? Pin
Luc Pattyn21-Sep-10 15:34
sitebuilderLuc Pattyn21-Sep-10 15:34 
GeneralRe: should I place sounds in seperate objects? Pin
stephen.darling21-Sep-10 15:38
stephen.darling21-Sep-10 15:38 
QuestionNested Set Pin
aspbeast21-Sep-10 11:25
aspbeast21-Sep-10 11:25 
AnswerRe: Nested Set Pin
Chris Trelawny-Ross21-Sep-10 13:17
Chris Trelawny-Ross21-Sep-10 13:17 
GeneralRe: Nested Set Pin
aspbeast21-Sep-10 20:02
aspbeast21-Sep-10 20:02 
GeneralRe: Nested Set Pin
Chris Trelawny-Ross22-Sep-10 4:12
Chris Trelawny-Ross22-Sep-10 4:12 
QuestionServer Client Communication Problem Pin
teknolog12321-Sep-10 10:17
teknolog12321-Sep-10 10:17 
AnswerRe: Server Client Communication Problem Pin
Eddy Vluggen22-Sep-10 9:05
professionalEddy Vluggen22-Sep-10 9:05 
GeneralRe: Server Client Communication Problem Pin
teknolog12322-Sep-10 10:39
teknolog12322-Sep-10 10:39 
GeneralRe: Server Client Communication Problem Pin
Eddy Vluggen22-Sep-10 11:15
professionalEddy Vluggen22-Sep-10 11:15 
Questioncustom color on winform Pin
jashimu21-Sep-10 10:14
jashimu21-Sep-10 10:14 
AnswerRe: custom color on winform Pin
DaveyM6921-Sep-10 12:19
professionalDaveyM6921-Sep-10 12:19 
QuestionDebug: enable? Pin
albh0721-Sep-10 10:11
albh0721-Sep-10 10:11 
AnswerRe: Debug: enable? Pin
Chris Trelawny-Ross21-Sep-10 13:25
Chris Trelawny-Ross21-Sep-10 13:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.