Click here to Skip to main content
15,881,424 members
Home / Discussions / C#
   

C#

 
AnswerRe: I'm getting error code CS1001. And I'm not sure how to diagnose the problem. Pin
OriginalGriff13-Nov-22 18:53
mveOriginalGriff13-Nov-22 18:53 
AnswerRe: I'm getting error code CS1001. And I'm not sure how to diagnose the problem. Pin
Calin Negru14-Nov-22 3:28
Calin Negru14-Nov-22 3:28 
AnswerRe: I'm getting error code CS1001. And I'm not sure how to diagnose the problem. Pin
Victor Nijegorodov14-Nov-22 3:40
Victor Nijegorodov14-Nov-22 3:40 
QuestionMy Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Radheya Patil9-Nov-22 17:45
Radheya Patil9-Nov-22 17:45 
AnswerRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
OriginalGriff9-Nov-22 18:48
mveOriginalGriff9-Nov-22 18:48 
GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Radheya Patil10-Nov-22 1:05
Radheya Patil10-Nov-22 1:05 
GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Richard Deeming10-Nov-22 1:24
mveRichard Deeming10-Nov-22 1:24 
GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Radheya Patil10-Nov-22 1:42
Radheya Patil10-Nov-22 1:42 
The below code runs in an infinite loop in console application. Message box is shown and user press OK everytime it is shown. At last iteration of foreach loop when user press ok it should continue to check next if condition in an infinite loop, mean while it does not. And when i pause my code to check where the control of the code is, it shows me control at Message.ShowBox line and even after pressing step over it still remains at that place.


Just for info.. it is developed in .net Compact 3.5 in visual studio 2008

for(;;)
{
if (CheckBitData(5, 965) == true)                                   //Checking Read Request from File to Mac
                {
                    string[] TypeofProcess = { "P", "V", "F", "C", "Q" };
                    int i = 0;
                    foreach (string p in TypeofProcess)
                    {
                        string FileToFetch1 = getFileName(p);
                        if (File.Exists(FileToFetch1))
                        {
                            using (StreamReader r = File.OpenText(FileToFetch1))
                            {
                                ReadAndDumpToCNC(r, 36000+i, 31000+i, 41000+i);
                            }
                        }
                        else
                        {
                            MessageBox.Show(p + "File Not Found...!!!!");
                        }
                        i = i + 1000;
                    }

                    MakeZeroPMC(5, 965);
                }

                if (CheckBitData(5, 967) == true)                                   // Data File Generation using History Data
                {
                    ManipulateArray(31000, 31999, 41000, 36000, 11075, 11076);      //(readStart,readEnd,wrStart1,wrStart2,MaxVar,MinVar)
                    MakeMasterData("Power", "Max", 41000, 41999);
                    MakeMasterData("Power", "Min", 36000, 36999);
                    ManipulateArray(32000, 32999, 42000, 37000, 11077, 11078);
                    MakeMasterData("Voltage", "Max", 42000, 42999);
                    MakeMasterData("Voltage", "Min", 37000, 37999);
                    ManipulateArray(33000, 33999, 43000, 38000, 11079, 11080);
                    MakeMasterData("Freq", "Max", 43000, 43999);
                    MakeMasterData("Freq", "Min", 38000, 38999);
                    ManipulateArray(34000, 34999, 44000, 39000, 11081, 11082);
                    MakeMasterData("Curr", "Max", 44000, 44999);
                    MakeMasterData("Curr", "Min", 39000, 39999);
                    ManipulateArray(35000, 35999, 45000, 40000, 11083, 11084);
                    MakeMasterData("Quench", "Max", 45000, 45999);
                    MakeMasterData("Quench", "Min", 40000, 40999);
                    MakeZeroPMC(5, 967);
                }

                if (CheckBitData(5, 968) == true)                                   
                {
                    DumpMasterDataG1V();
                    MakeZeroPMC(5, 968);
                }
                if (CheckBitData(5, 969) == true)                                   
                {
                    DumpMasterDataG1Q();
                    MakeZeroPMC(5, 969);
                }
                if (CheckBitData(5, 970) == true)                                   
                {
                    DumpMasterDataG2V();
                    MakeZeroPMC(5, 970);
                }
                if (CheckBitData(5, 971) == true)                                   
                {
                    DumpMasterDataG2Q();
                    MakeZeroPMC(5, 971);
                }
            
                System.Threading.Thread.Sleep(10);
            }

GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Richard Deeming10-Nov-22 2:00
mveRichard Deeming10-Nov-22 2:00 
GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Radheya Patil10-Nov-22 16:37
Radheya Patil10-Nov-22 16:37 
GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
jsc4210-Nov-22 5:08
professionaljsc4210-Nov-22 5:08 
GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Radheya Patil10-Nov-22 16:39
Radheya Patil10-Nov-22 16:39 
GeneralRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
OriginalGriff10-Nov-22 20:18
mveOriginalGriff10-Nov-22 20:18 
QuestionRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Eddy Vluggen11-Nov-22 6:37
professionalEddy Vluggen11-Nov-22 6:37 
AnswerRe: My Code gets stuck at MessageBox.Show() after pressing OK it does not move further. Pin
Gerry Schmitz11-Nov-22 6:46
mveGerry Schmitz11-Nov-22 6:46 
QuestionNet framework again Pin
Calin Negru8-Nov-22 7:59
Calin Negru8-Nov-22 7:59 
AnswerRe: Net framework again Pin
OriginalGriff8-Nov-22 10:05
mveOriginalGriff8-Nov-22 10:05 
GeneralRe: Net framework again Pin
Calin Negru8-Nov-22 22:01
Calin Negru8-Nov-22 22:01 
GeneralRe: Net framework again Pin
OriginalGriff8-Nov-22 23:14
mveOriginalGriff8-Nov-22 23:14 
GeneralRe: Net framework again Pin
Calin Negru9-Nov-22 4:00
Calin Negru9-Nov-22 4:00 
GeneralRe: Net framework again Pin
OriginalGriff9-Nov-22 4:12
mveOriginalGriff9-Nov-22 4:12 
AnswerRe: Net framework again Pin
Sam Hobbs8-Nov-22 17:59
Sam Hobbs8-Nov-22 17:59 
GeneralRe: Net framework again Pin
Richard Andrew x6420-Nov-22 6:34
professionalRichard Andrew x6420-Nov-22 6:34 
AnswerRe: Net framework again Pin
Gerry Schmitz8-Nov-22 18:02
mveGerry Schmitz8-Nov-22 18:02 
GeneralRe: Net framework again Pin
Richard Deeming8-Nov-22 21:38
mveRichard Deeming8-Nov-22 21:38 

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.