Post: Project/Tool Sources
12-18-2012, 01:42 AM #1
BriceC
Computer Programmer
(adsbygoogle = window.adsbygoogle || []).push({}); Im done messing with these and i have no use for them anymore so here..Do what you want with them, if you use them and re-release please give credits.

Downloads:
{VB} FF Viewer.rar You must login or register to view this content.
{C#} W@W Fastfile Editor.rar You must login or register to view this content.
{C#} Real Time COD MW3.rar You must login or register to view this content.
{C#} Modern Warfare 2 CodeBrowser.rar You must login or register to view this content.
(Most Updated) {C#} Beautifier All Version.rar You must login or register to view this content.
iHc Class Tool You must login or register to view this content.

{C#} Optimize and De-Optimize Code's
    private void button3_Click(object sender, EventArgs e)
{
source.Text = Regex.Replace(source.Text, @"(
){2,}", "

");
source.Text = Regex.Replace(source.Text, @"\t", "");
source.Text = Regex.Replace(source.Text, @"\( ", "(");
source.Text = Regex.Replace(source.Text, @" \)", ")");
source.Text = Regex.Replace(source.Text, @"\[ ", "[");
source.Text = Regex.Replace(source.Text, @" \]", "]");
source.Text = Regex.Replace(source.Text, ", ", ",");
source.Text = Regex.Replace(source.Text, @" \+ ", @"+");
source.Text = Regex.Replace(source.Text, " - ", "-");
source.Text = Regex.Replace(source.Text, " = ", "=");
source.Text = Regex.Replace(source.Text, " == ", "=");
source.Text = Regex.Replace(source.Text, " != ", "!=");
source.Text = Regex.Replace(source.Text, @" \+= ", @"+=");
source.Text = Regex.Replace(source.Text, " -= ", "-=");
source.Text = Regex.Replace(source.Text, @" \+\+ ", @"++");
source.Text = Regex.Replace(source.Text, " < ", "<");
source.Text = Regex.Replace(source.Text, " > ", ">");
source.Text = Regex.Replace(source.Text, "; ", ";");
source.Text = Regex.Replace(source.Text, "for ", "for");
source.Text = Regex.Replace(source.Text, "if ", "if");
source.Text = Regex.Replace(source.Text, "\\s+\\n", "");
MessageBox.Show("Code Simplified Successfully!", "Success!");
}
}
}

private void beautify()
{
indentChar = '\t';
bool whiteSpace = false,
whiteSpacePrev = false,
newLine = false,
nextEndLine = false,
inForLoop = false;
int srcLen = ActiveEditor.Text.Length;
System.Text.StringBuilder dst = new System.Text.StringBuilder(srcLen + (srcLen >> 2));
string prevChar = String.Empty;
string escapedChar = String.Empty;
foreach (char ch in ActiveEditor.Text)
{
nextChar = ch.ToString();
if (escapedChar.Length > 0)
{
escapedChar += nextChar;
if ((escapedChar[0] == 'u' || escapedChar[0] == 'U'Winky Winky && escapedChar.Length < 5)
continue;
if (escapedChar.Length >= 3)
{
dst.Length--;
char escCh;
string escapedCharLower = escapedChar.ToLower();
try
{
if (escapedCharLower[0] == 'x' || escapedCharLower[0] == 'u'Winky Winky
{
escCh = (char)int.Parse(escapedCharLower.Substring(1), System.Globalization.NumberStyles.HexNumber);
}
else
{
int oct = (int.Parse(escapedCharLower[0].ToString()) << 6) + (int.Parse(escapedCharLower[1].ToString()) << 3) + int.Parse(escapedCharLower[2].ToString());
escCh = (char)((byte)oct);
}
if (escCh >= ' ' && escCh <= '~'Winky Winky
{
dst[dst.Length - 1] = escCh;
prevChar = escCh.ToString();
}
else
dst.Append(escapedChar);
}
catch
{
dst.Append(escapedChar);
}
escapedChar = String.Empty;
continue;
}
else
continue;
}
if (nextEndLine)
{
if (ch != ';'Winky Winky
dst.Append("
" + spaces(level));
nextEndLine = false;
}
whiteSpacePrev = whiteSpace;
whiteSpace = false;
if (prevChar == "\\" && inString != StringType.None)
{
if (ch == 'x' || ch == 'X' || ch == 'u' || ch == 'U' || (ch >= '0' && ch <= '9'Winky Winky)
escapedChar = nextChar;
}

switch (ch)
{
case ' ':
case '\t':
case '\r':
case '\n':
if (!newLine)
whiteSpace = true;
nextChar = String.Empty;
break;
case '{':
if (inString == StringType.None)
{
removeWhitespaceAtEnd(dst);

newLine = true;
dst.Append("
" + spaces(level) + "{
");
nextChar = String.Empty;
dst.Append(spaces(++level));
}
break;
case '}':
if (inString == StringType.None)
{
newLine = true;
if (--level < 0)
{
dst.Append("
<<< Bogus level >>>
");
level = 0;
}
removeWhitespaceAtEnd(dst);
if (!endsWith(dst, "
"))
dst.Append("
");
dst.Append(spaces(level) + "}");
nextEndLine = true;
nextChar = String.Empty;
}
break;
case ';':
if (inString == StringType.None)
{
nextChar = String.Empty;
if (endsWith(dst, "
"))
dst.Length -= 2;
dst.Append(";");
if (!inForLoop)
dst.Append("
" + spaces(level));
newLine = true;
}
break;
case '\'':
if (inString != StringType.DoubleQuote &&
prevChar != "\\")
inString = (inString == StringType.None ? StringType.SingleQuote : StringType.None);
break;
case '\"':
if (inString != StringType.SingleQuote &&
prevChar != "\\")
inString = (inString == StringType.None ? StringType.DoubleQuote : StringType.None);
break;
case '(':
if (endsWith(dst, "for"))
inForLoop = true;
break;
case 'Winky Winky':
inForLoop = false;
break;
}

if (!whiteSpace)
{
prevChar = ch.ToString();
if (whiteSpacePrev)
{
if (!newLine)
dst.Append(" ");
whiteSpace = false;
}
if (nextChar != String.Empty)
{
dst.Append(nextChar);
newLine = false;
}
}

} // For loop
ActiveEditor.Text = dst.ToString();
MessageBox.Show("Code Beautified Successfully!", "Success!");
}

enum StringType
{
None,
SingleQuote,
DoubleQuote
}
string spaces(int level)
{
return new string(indentChar, level);
}

void removeWhitespaceAtEnd(System.Text.StringBuilder dst)
{
int x = dst.Length - 1;
while (dst[x] == ' ' || dst[x] == '\t'Winky Winky
--x;
dst.Length = x + 1;
}

bool endsWith(System.Text.StringBuilder dst, string check)
{
int x = dst.Length - check.Length,
y = 0;
while (dst[x] == check[y++])
{
++x;
if (y == check.Length)
break;
}
return x == dst.Length;
}


Optimizer Code
    void*Optimise()
********{
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*{",*"{");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("{*",*"{");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*{*",*"{");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*(",*"(");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("(*",*"(");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*(*",*"(");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*=",*"=");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("=*",*"=");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*=*",*"=");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*;",*";");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace(";*",*";");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*;*",*";");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*\"",*"\"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*\"*",*"\"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("\"*",*"\"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*,",*",");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace(",*",*",");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*,*",*",");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*<",*"<");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("<*",*"<");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*<*",*"<");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*>",*">");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace(">*",*">");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*>*",*">");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*&&",*"&&");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("&&*",*"&&");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*&&*",*"&&");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*++",*"++");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("++*",*"++");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*++*",*"++");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*--",*"--");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("--*",*"--");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("*--*",*"--");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("****",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("********",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("************",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("****************",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("********************",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("************************",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("****************************",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("********************************",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("************************************",*"");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("**",*"*");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("***",*"*");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace("****",*"*");
************textEditorControl1.Text*=*textEditorControl1.Text.Replace(Environment.NewLine,*"");
********}*
(adsbygoogle = window.adsbygoogle || []).push({});

The following 8 users say thank you to BriceC for this useful post:

^TPP^, ohhImpreza, Oliver1556, Master Ro, Tony Stark, Vampytwistッ, xePixTvx, xXdynomite1997X
12-18-2012, 03:30 AM #2
TheFallen
Former Dark Night
Spoilers, this thread needs them... anyways nice post, thanks for contributing Smile

The following user thanked TheFallen for this useful post:

BriceC
12-18-2012, 04:42 AM #3
BriceC
Computer Programmer
Originally posted by TheFallen View Post
Spoilers, this thread needs them... anyways nice post, thanks for contributing Smile


Lol yeah idk how to make the spoiler hahahaha but your welcome. Happy
12-18-2012, 05:43 AM #4
TheFallen
Former Dark Night
Originally posted by Elite
Lol yeah idk how to make the spoiler hahahaha but your welcome. Happy

There ya go Winky Winky and for future reference it's (no space in [ /spoiler])
12-18-2012, 06:55 AM #5
ohhImpreza
Bounty hunter
Fix the Code Browser link ?
12-18-2012, 09:55 AM #6
Nice release but could you fix the links? The only ones working are Real Time COD MW3.rar and W@W Fastfile Editor.rar.
12-18-2012, 02:03 PM #7
BriceC
Computer Programmer
Originally posted by DJ
Nice release but could you fix the links? The only ones working are Real Time COD MW3.rar and W@W Fastfile Editor.rar.


Ok Ile fix and use media fire. Give me a few hours I'm really busy but they will be up by 1pm it's 8am where I am.

---------- Post added at 08:03 AM ---------- Previous post was at 08:02 AM ----------

Originally posted by pistolmad99 View Post
Fix the Code Browser link ?


Ok Ile fix and use media fire. Give me a few hours I'm really busy but they will be up by 1pm it's 8am where I am

The following 2 users say thank you to BriceC for this useful post:

ohhImpreza, Vampytwistッ
12-18-2012, 06:19 PM #8
BriceC
Computer Programmer
Originally posted by pistolmad99 View Post
Fix the Code Browser link ?


Updated links bro Happy

---------- Post added at 12:19 PM ---------- Previous post was at 12:18 PM ----------

Originally posted by DJ
Nice release but could you fix the links? The only ones working are Real Time COD MW3.rar and W@W Fastfile Editor.rar.



Updated links bro Happy

The following user thanked BriceC for this useful post:

Vampytwistッ
12-19-2012, 01:05 AM #9
BriceC
Computer Programmer
bump Winky Winky dotdotdotdot

The following user groaned BriceC for this awful post:

TheUnexpected
12-19-2012, 06:08 PM #10
BriceC
Computer Programmer
Bumping...

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo