Click here to Skip to main content
15,905,068 members
Home / Discussions / C#
   

C#

 
GeneralRe: Hot to draw ellipse line intersection Pin
ferry24029-Dec-10 10:33
ferry24029-Dec-10 10:33 
GeneralRe: Hot to draw ellipse line intersection Pin
fjdiewornncalwe29-Dec-10 10:49
professionalfjdiewornncalwe29-Dec-10 10:49 
QuestionWindows Phone 7 passing multiple items between pages Pin
Paul Harsent29-Dec-10 8:06
Paul Harsent29-Dec-10 8:06 
AnswerRe: Windows Phone 7 passing multiple items between pages Pin
Pete O'Hanlon29-Dec-10 9:09
mvePete O'Hanlon29-Dec-10 9:09 
GeneralRe: Windows Phone 7 passing multiple items between pages Pin
Paul Harsent29-Dec-10 10:47
Paul Harsent29-Dec-10 10:47 
GeneralRe: Windows Phone 7 passing multiple items between pages Pin
Pete O'Hanlon29-Dec-10 10:49
mvePete O'Hanlon29-Dec-10 10:49 
QuestionProblem with reading Bytes Pin
Honeyboy_2029-Dec-10 7:49
Honeyboy_2029-Dec-10 7:49 
AnswerRe: Problem with reading Bytes Pin
Honeyboy_2029-Dec-10 7:50
Honeyboy_2029-Dec-10 7:50 
and here's My code
<br />
     #region 1: Count Numbers of blocks.<br />
                int blockCounter = 0;<br />
                int countNumberOfBytes = 0;<br />
                for (int i = 0; i < VopMessageDetails.Count; i++)<br />
                {<br />
                    if (VopMessageDetails[countNumberOfBytes].ToString() == "85")<br />
                    {<br />
                        /* <br />
                         * I am use this loop becasuse the first byte is not 204<br />
                         * so it will through expection so I make it go to first condition<br />
                         * till it reach to the require condition which is else if condition.<br />
                        */<br />
                    }<br />
                    else if (VopMessageDetails[countNumberOfBytes].ToString() == "204" & VopMessageDetails[countNumberOfBytes - 1].ToString() == "204")<br />
                    {<br />
                        blockCounter++;<br />
                    }<br />
                    countNumberOfBytes++;<br />
<br />
                }<br />
                Console.WriteLine(blockCounter);<br />
                #endregion<br />
<br />
                // 2 : Read Each Block As Alone.<br />
<br />
<br />
<br />
<br />
                // To Store Each block in catchBlockBytes Array where each Index represent a block.<br />
                List<string>[] catchBlockBytes = new List<string>[blockCounter];<br />
                //After we Determine Number of Block to catchBlockBytes , Reassignment blockCounter to Zero to set index of each object step by step.<br />
                blockCounter = 0;<br />
                catchBlockBytes[blockCounter] = new List<string>();<br />
<br />
                // To Get the Number of Previous Bytes.<br />
                int PrevBlockCounter = 0;<br />
<br />
                // Catch Each Block.<br />
                for (int k = 0; k < VopMessageDetails.Count; k++)<br />
                {<br />
                    if (VopMessageDetails[0 + PrevBlockCounter].ToString() == "85" & VopMessageDetails[1 + PrevBlockCounter].ToString() == "85")<br />
                    {<br />
                        if (VopMessageDetails[k].ToString() != "204")<br />
                        {<br />
                            catchBlockBytes[blockCounter].Add(VopMessageDetails[k].ToString());<br />
                        }<br />
                        else<br />
                        {<br />
                            // I am 2 to K because the previous if condtion will not add the last 2 bytes ( 204 and 204)<br />
                            // So I am add 2 to start again from 85 and continue with condition.<br />
                            PrevBlockCounter = k + 2;<br />
                            // blockCounter++;<br />
                            k++;<br />
<br />
                            if (VopMessageDetails[PrevBlockCounter - 1].ToString() == "204" & VopMessageDetails[PrevBlockCounter - 2].ToString() == "204")<br />
                            {<br />
                                blockCounter++;<br />
                            }<br />
<br />
<br />
                            // Condition Target : to stop add new object as a item if there is no bytes. <br />
                            if (k != VopMessageDetails.Count - 1)<br />
                            {<br />
                              catchBlockBytes[blockCounter] = new List<string>();   <br />
                            }<br />
<br />
                        }<br />
                    }<br />
<br />
<br />

GeneralRe: Problem with reading Bytes Pin
Richard MacCutchan29-Dec-10 9:23
mveRichard MacCutchan29-Dec-10 9:23 
GeneralRe: Problem with reading Bytes Pin
Luc Pattyn29-Dec-10 9:34
sitebuilderLuc Pattyn29-Dec-10 9:34 
AnswerRe: Problem with reading Bytes Pin
carbon_golem29-Dec-10 8:34
carbon_golem29-Dec-10 8:34 
GeneralRe: Problem with reading Bytes Pin
Honeyboy_2029-Dec-10 8:57
Honeyboy_2029-Dec-10 8:57 
GeneralRe: Problem with reading Bytes Pin
Henry Minute29-Dec-10 9:29
Henry Minute29-Dec-10 9:29 
GeneralRe: Problem with reading Bytes Pin
carbon_golem29-Dec-10 10:30
carbon_golem29-Dec-10 10:30 
AnswerRe: Problem with reading Bytes Pin
carbon_golem29-Dec-10 12:47
carbon_golem29-Dec-10 12:47 
GeneralRe: Problem with reading Bytes Pin
Roger Wright2-Jan-11 18:09
professionalRoger Wright2-Jan-11 18:09 
Questionchanging a table name in dataset Pin
Ramkithepower29-Dec-10 5:58
Ramkithepower29-Dec-10 5:58 
AnswerRe: changing a table name in dataset Pin
Sandesh M Patil29-Dec-10 6:06
Sandesh M Patil29-Dec-10 6:06 
GeneralRe: changing a table name in dataset Pin
Ramkithepower29-Dec-10 22:52
Ramkithepower29-Dec-10 22:52 
GeneralRe: changing a table name in dataset Pin
Sandesh M Patil30-Dec-10 0:36
Sandesh M Patil30-Dec-10 0:36 
QuestionNot your normal timeout... Pin
Pualee29-Dec-10 4:15
Pualee29-Dec-10 4:15 
AnswerRe: Not your normal timeout... Pin
Ravi Sant29-Dec-10 4:25
Ravi Sant29-Dec-10 4:25 
AnswerRe: Not your normal timeout... Pin
Ravi Sant29-Dec-10 4:27
Ravi Sant29-Dec-10 4:27 
GeneralRe: Not your normal timeout... Pin
Pualee29-Dec-10 4:48
Pualee29-Dec-10 4:48 
GeneralRe: Not your normal timeout... Pin
Ravi Sant29-Dec-10 8:25
Ravi Sant29-Dec-10 8: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.