Click here to Skip to main content
15,909,742 members
Home / Discussions / C#
   

C#

 
AnswerRe: I need a full stop Pin
PhilipPainter27-Aug-07 11:48
PhilipPainter27-Aug-07 11:48 
QuestionNew to C# Programming Pin
invalidsyntax101024-Aug-07 9:53
invalidsyntax101024-Aug-07 9:53 
AnswerRe: New to C# Programming [modified] Pin
Dio2224-Aug-07 10:04
Dio2224-Aug-07 10:04 
AnswerRe: New to C# Programming Pin
PIEBALDconsult24-Aug-07 10:26
mvePIEBALDconsult24-Aug-07 10:26 
GeneralRe: New to C# Programming Pin
Christian Graus24-Aug-07 11:47
protectorChristian Graus24-Aug-07 11:47 
AnswerRe: New to C# Programming Pin
ghle24-Aug-07 11:04
ghle24-Aug-07 11:04 
AnswerRe: New to C# Programming Pin
humayunlalzad24-Aug-07 11:19
humayunlalzad24-Aug-07 11:19 
GeneralRe: New to C# Programming Pin
Colin Angus Mackay24-Aug-07 14:19
Colin Angus Mackay24-Aug-07 14:19 
AnswerRe: New to C# Programming Pin
Christian Graus24-Aug-07 11:47
protectorChristian Graus24-Aug-07 11:47 
GeneralRe: New to C# Programming Pin
invalidsyntax101024-Aug-07 12:05
invalidsyntax101024-Aug-07 12:05 
GeneralRe: New to C# Programming Pin
ChrisKo24-Aug-07 12:56
ChrisKo24-Aug-07 12:56 
AnswerRe: New to C# Programming Pin
Luc Pattyn24-Aug-07 13:28
sitebuilderLuc Pattyn24-Aug-07 13:28 
AnswerRe: New to C# Programming Pin
George L. Jackson24-Aug-07 14:02
George L. Jackson24-Aug-07 14:02 
Newsyou guys rock Pin
invalidsyntax101024-Aug-07 15:54
invalidsyntax101024-Aug-07 15:54 
AnswerRe: New to C# Programming Pin
Thomas Stockwell25-Aug-07 2:31
professionalThomas Stockwell25-Aug-07 2:31 
GeneralRe: New to C# Programming Pin
George L. Jackson25-Aug-07 3:12
George L. Jackson25-Aug-07 3:12 
Question(nOOb help) comparing ArrayLists of structs.. Pin
Dio2224-Aug-07 9:43
Dio2224-Aug-07 9:43 
AnswerRe: (nOOb help) comparing ArrayLists of structs.. Pin
ghle24-Aug-07 11:08
ghle24-Aug-07 11:08 
AnswerRe: (nOOb help) comparing ArrayLists of structs.. Pin
Luc Pattyn24-Aug-07 13:37
sitebuilderLuc Pattyn24-Aug-07 13:37 
QuestionHow do I incorporate these two routines? Pin
solutionsville24-Aug-07 9:21
solutionsville24-Aug-07 9:21 
AnswerRe: How do I incorporate these two routines? Pin
Hessam Jalali24-Aug-07 9:55
Hessam Jalali24-Aug-07 9:55 
AnswerRe: How do I incorporate these two routines? Pin
solutionsville24-Aug-07 10:16
solutionsville24-Aug-07 10:16 
AnswerRe: How do I incorporate these two routines? Pin
Big Daddy Farang24-Aug-07 12:37
Big Daddy Farang24-Aug-07 12:37 
AnswerRe: How do I incorporate these two routines? [modified] Pin
solutionsville24-Aug-07 17:54
solutionsville24-Aug-07 17:54 
Big Daddy, you are the man!

This have been driving me nuts for about a week. This is what it looks like combined and working.

--------------
So if I want to add this piece to the same method above, where would I put this?

private void findSequenceNumbers()
{
toolStripStatusLabel.Visible = toolStripProgressBar.Visible = true;
toolStripProgressBar.Value = 0;
int lineNum = 0;
bool startingNewLine = true;
FontStyle style = FontStyle.Bold;
string[] lines = rtbDoc.Lines;
string text = rtbDoc.Text;
toolStripProgressBar.Maximum = text.Length;
for (int i = 0; i < text.Length; i++)
{
if (startingNewLine)
{
if ((lines[lineNum].Contains("ARES_EINDICATION")) || (lines[lineNum].Contains("ARES_INDICATION")))
{
i += 169;

rtbDoc.Select(i, 2);
rtbDoc.SelectionFont = new Font(rtbDoc.SelectionFont, rtbDoc.SelectionFont.Style ^ style);
rtbDoc.SelectionColor = Color.DarkBlue;
}
else if (lines[lineNum].Contains("]CODELINE_INDICATION_MSG"))
{
i += 160;
rtbDoc.Select(i, 2);
rtbDoc.SelectionFont = new Font(rtbDoc.SelectionFont, rtbDoc.SelectionFont.Style ^ style);
rtbDoc.SelectionColor = Color.DarkBlue;
}
else
{
i += lines[lineNum].Length - 1;
}
startingNewLine = false;
Application.DoEvents();
}
if (text[i] == '\n')
{
startingNewLine = true;
lineNum++;
}
toolStripProgressBar.Value = i;
}
toolStripStatusLabel.Visible = toolStripProgressBar.Visible = false;
rtbDoc.Select(0, 0);
rtbDoc.ScrollToCaret();
}


Thanks and have a good weekend!



-- modified at 15:53 Saturday 25th August, 2007
GeneralRe: How do I incorporate these two routines? Pin
Big Daddy Farang27-Aug-07 10:03
Big Daddy Farang27-Aug-07 10:03 

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.