PDA

View Full Version : [SHARE] HD SAE .NET (skillacquire.txt explorer) + sources


humordwarf
07.05.2006, 22:15
NOT EDITOR, JUST VIEWER
no any AntiLE keys needed :D

.net framework 2.0 required

shot:
http://img473.imageshack.us/img473/4674/hdsaeshot1zh.th.jpg (http://img473.imageshack.us/my.php?image=hdsaeshot1zh.jpg)

sources:

using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace hd_sae
{
public partial class Main : Form
{
const int SAParamCount = 8;
const string sInclude = "include";
const string sBegin = "begin";
const string sEnd = "end";
const string sSkill = "skill";
const string sError = "error";

ArrayList SA = new ArrayList();
StreamReader sr;

void AddClassToTree(string ClassName)
{
Tree.Nodes.Add(ClassName);
}

void AddSkillToListView(string SkillLine)
{
string[] ss = SkillLine.Split('\t');
if (ss.Length == SAParamCount)
{
ListViewItem li = ListView.Items.Add(GetSkillValue(ss[2]));
li.SubItems.Add(GetSkillValue(ss[3]));
li.SubItems.Add(GetSkillValue(ss[4]));
li.SubItems.Add(GetSkillValue(ss[5]));
li.SubItems.Add(GetSkillValue(ss[6]));
}
}

void BuildTree()
{
string s1="", s2="";
Tree.Nodes.Clear();
ListView.Items.Clear();
for (int i = 0; i < SA.Count; i++)
{
if (ExtractParams((string)SA[i], ref s1, ref s2))
{
if (s1 == sSkill)
{
}
else if (s1 == sInclude)
{
}
else if (s2 == sBegin)
{
AddClassToTree(s1);
}
}
}
}

string GetSkillValue(string s)
{
string[] ss = s.Split('=');
if (ss.Length == 2)
{
return ss[1];
}
else
{
return sError;
}
}

void AddClassToListView(string ClassName)
{
ArrayList IncList = GetIncludeList(ClassName);
for (int i = 0; i < IncList.Count; i++)
{
AddClassToListView((string)IncList[i]);
}

string s1 = "", s2 = "", cc = "";
for (int i = 0; i < SA.Count; i++)
{
if (ExtractParams((string)SA[i], ref s1, ref s2))
{
if (s1 == sSkill)
{
if (cc == ClassName)
{
AddSkillToListView((string)SA[i]);
}
}
else if (s1 == sInclude)
{
}
else if (s2 == sBegin)
{
cc = s1;
}
else if (s2 == sEnd && cc == ClassName)
{
cc = "";
break;
}

}
}
}

ArrayList GetIncludeList(string ClassName)
{
ArrayList r = new ArrayList();
string s1="",s2="",cc="";
for (int i = 0; i < SA.Count; i++)
{
if (ExtractParams((string)SA[i], ref s1, ref s2))
{
if (s1 == sSkill)
{
}
else if (s1 == sInclude)
{
if (cc == ClassName)
{
r.Add(s2);
}
}
else if (s2 == sBegin)
{
cc = s1;
}
else if (s2 == sEnd && cc==ClassName)
{
cc = "";
break;
}

}
}
return r;
}

bool ExtractParams(string Line, ref string s1, ref string s2)
{
string[] ss = Line.Split('\t');
if (ss.Length == SAParamCount)
{
string[] s0 = ss[0].Split('_');
if (s0.Length >= 2)
{
s1 = s0[0];
s2 = s0[s0.Length - 1];

if (s1 == sInclude)
{
for (int i = 1; i < s0.Length - 1; i++)
{
s2 = s0[i] + "_" + s2;
}

}
else
{
for (int i = 1; i < s0.Length - 1; i++)
{
s1 = s1 + "_" + s0[i];
}
}
return true;
}
}
s1 = "";
s2 = "";
return false;
}

public Main()
{
InitializeComponent();
}

private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
if (OpenDlg.ShowDialog() == DialogResult.OK)
{
string Line;
sr = File.OpenText(OpenDlg.FileName);
SA.Clear();
while ((Line = sr.ReadLine()) != null)
{
SA.Add(Line);
}
sr.Close();
BuildTree();
}
}

private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}

private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
frmAbout About = new frmAbout();
About.ShowDialog();
}

private void Tree_AfterSelect(object sender, TreeViewEventArgs e)
{
ListView.ListViewItemSorter = null;
ListView.Sorting = SortOrder.None;
ListView.Items.Clear();
AddClassToListView(Tree.SelectedNode.Text);
}

private void ListView_ColumnClick(object sender, ColumnClickEventArgs e)
{
ListView.ListViewItemSorter = new ListViewItemComparer(e.Column);
}

class ListViewItemComparer : IComparer
{
private int col;
public ListViewItemComparer()
{
col = 0;
}
public ListViewItemComparer(int column)
{
col = column;
}
public int Compare(object x, object y)
{
int a, b;
if (col == 1 || col == 2)
{
try
{
a = int.Parse(((ListViewItem)x).SubItems[col].Text);
b = int.Parse(((ListViewItem)y).SubItems[col].Text);
return a - b;
}
catch
{
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
}
}
else
{
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
}
}
}
}
}

humordwarf
07.05.2006, 22:15
NOT EDITOR, JUST VIEWER
no any AntiLE keys needed :D

.net framework 2.0 required

shot:
http://img473.imageshack.us/img473/4674/hdsaeshot1zh.th.jpg (http://img473.imageshack.us/my.php?image=hdsaeshot1zh.jpg)

sources:

using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace hd_sae
{
public partial class Main : Form
{
const int SAParamCount = 8;
const string sInclude = "include";
const string sBegin = "begin";
const string sEnd = "end";
const string sSkill = "skill";
const string sError = "error";

ArrayList SA = new ArrayList();
StreamReader sr;

void AddClassToTree(string ClassName)
{
Tree.Nodes.Add(ClassName);
}

void AddSkillToListView(string SkillLine)
{
string[] ss = SkillLine.Split('\t');
if (ss.Length == SAParamCount)
{
ListViewItem li = ListView.Items.Add(GetSkillValue(ss[2]));
li.SubItems.Add(GetSkillValue(ss[3]));
li.SubItems.Add(GetSkillValue(ss[4]));
li.SubItems.Add(GetSkillValue(ss[5]));
li.SubItems.Add(GetSkillValue(ss[6]));
}
}

void BuildTree()
{
string s1="", s2="";
Tree.Nodes.Clear();
ListView.Items.Clear();
for (int i = 0; i < SA.Count; i++)
{
if (ExtractParams((string)SA[i], ref s1, ref s2))
{
if (s1 == sSkill)
{
}
else if (s1 == sInclude)
{
}
else if (s2 == sBegin)
{
AddClassToTree(s1);
}
}
}
}

string GetSkillValue(string s)
{
string[] ss = s.Split('=');
if (ss.Length == 2)
{
return ss[1];
}
else
{
return sError;
}
}

void AddClassToListView(string ClassName)
{
ArrayList IncList = GetIncludeList(ClassName);
for (int i = 0; i < IncList.Count; i++)
{
AddClassToListView((string)IncList[i]);
}

string s1 = "", s2 = "", cc = "";
for (int i = 0; i < SA.Count; i++)
{
if (ExtractParams((string)SA[i], ref s1, ref s2))
{
if (s1 == sSkill)
{
if (cc == ClassName)
{
AddSkillToListView((string)SA[i]);
}
}
else if (s1 == sInclude)
{
}
else if (s2 == sBegin)
{
cc = s1;
}
else if (s2 == sEnd && cc == ClassName)
{
cc = "";
break;
}

}
}
}

ArrayList GetIncludeList(string ClassName)
{
ArrayList r = new ArrayList();
string s1="",s2="",cc="";
for (int i = 0; i < SA.Count; i++)
{
if (ExtractParams((string)SA[i], ref s1, ref s2))
{
if (s1 == sSkill)
{
}
else if (s1 == sInclude)
{
if (cc == ClassName)
{
r.Add(s2);
}
}
else if (s2 == sBegin)
{
cc = s1;
}
else if (s2 == sEnd && cc==ClassName)
{
cc = "";
break;
}

}
}
return r;
}

bool ExtractParams(string Line, ref string s1, ref string s2)
{
string[] ss = Line.Split('\t');
if (ss.Length == SAParamCount)
{
string[] s0 = ss[0].Split('_');
if (s0.Length >= 2)
{
s1 = s0[0];
s2 = s0[s0.Length - 1];

if (s1 == sInclude)
{
for (int i = 1; i < s0.Length - 1; i++)
{
s2 = s0[i] + "_" + s2;
}

}
else
{
for (int i = 1; i < s0.Length - 1; i++)
{
s1 = s1 + "_" + s0[i];
}
}
return true;
}
}
s1 = "";
s2 = "";
return false;
}

public Main()
{
InitializeComponent();
}

private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
if (OpenDlg.ShowDialog() == DialogResult.OK)
{
string Line;
sr = File.OpenText(OpenDlg.FileName);
SA.Clear();
while ((Line = sr.ReadLine()) != null)
{
SA.Add(Line);
}
sr.Close();
BuildTree();
}
}

private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}

private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
frmAbout About = new frmAbout();
About.ShowDialog();
}

private void Tree_AfterSelect(object sender, TreeViewEventArgs e)
{
ListView.ListViewItemSorter = null;
ListView.Sorting = SortOrder.None;
ListView.Items.Clear();
AddClassToListView(Tree.SelectedNode.Text);
}

private void ListView_ColumnClick(object sender, ColumnClickEventArgs e)
{
ListView.ListViewItemSorter = new ListViewItemComparer(e.Column);
}

class ListViewItemComparer : IComparer
{
private int col;
public ListViewItemComparer()
{
col = 0;
}
public ListViewItemComparer(int column)
{
col = column;
}
public int Compare(object x, object y)
{
int a, b;
if (col == 1 || col == 2)
{
try
{
a = int.Parse(((ListViewItem)x).SubItems[col].Text);
b = int.Parse(((ListViewItem)y).SubItems[col].Text);
return a - b;
}
catch
{
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
}
}
else
{
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
}
}
}
}
}

Mattho
07.05.2006, 22:37
what the hell is wrong with you? :D

keep up good work...

Mattho
07.05.2006, 22:37
what the hell is wrong with you? :D

keep up good work...

jtomasrl
07.05.2006, 23:12
WTH is this

jtomasrl
07.05.2006, 23:12
WTH is this

madar
07.05.2006, 23:16
WTH is this

skillacquire.txt viewer, are you blind or cant read?

madar
07.05.2006, 23:16
WTH is this

skillacquire.txt viewer, are you blind or cant read?

jtomasrl
08.05.2006, 01:05
cant read

jtomasrl
08.05.2006, 01:05
cant read

RipperX
08.05.2006, 02:12
cant read

//spanish
no seas huevon pibe, media pila
//spanish

//english
not be a leecher, read and learn
//english

RipperX
08.05.2006, 02:12
cant read

//spanish
no seas huevon pibe, media pila
//spanish

//english
not be a leecher, read and learn
//english

jtomasrl
08.05.2006, 02:40
//spanish
huevon = leecher?
pff
//spanish

jtomasrl
08.05.2006, 02:40
//spanish
huevon = leecher?
pff
//spanish

tpuNIsher
08.05.2006, 04:24
you are a GOD

tpuNIsher
08.05.2006, 04:24
you are a GOD

TheOrder
08.05.2006, 07:28
Humordwarf you Rule !!! Tnx again for this tool !!!

TheOrder
08.05.2006, 07:28
Humordwarf you Rule !!! Tnx again for this tool !!!

Zeran
08.05.2006, 09:55
Big respect to you man!
10x for good job :)

Zeran
08.05.2006, 09:55
Big respect to you man!
10x for good job :)

andrei1516
08.05.2006, 10:18
oOOOOo
Thnx again, and thx for sourse code !!!!!

andrei1516
08.05.2006, 10:18
oOOOOo
Thnx again, and thx for sourse code !!!!!

mantrastic
08.05.2006, 13:04
you wont stop eh? lol , man , good job! keep it up! :D

mantrastic
08.05.2006, 13:04
you wont stop eh? lol , man , good job! keep it up! :D

humordwarf
08.05.2006, 13:44
you wont stop eh?

i will, soon.
everything has end.

humordwarf
08.05.2006, 13:44
you wont stop eh?

i will, soon.
everything has end.

hel
08.05.2006, 14:02
humordwarf:
Yo, man. You're good dev, and i'll be happy, if you'll stay here, even still short...
Your shares is great, thanks a lot!

hel
08.05.2006, 14:02
humordwarf:
Yo, man. You're good dev, and i'll be happy, if you'll stay here, even still short...
Your shares is great, thanks a lot!

Shraier
08.05.2006, 18:46
Well, he rocks :D
thanks!

Zeran
08.05.2006, 21:43
Guys,can you share already compiled program?Pls, i don't want install VS to compile program...
thnks a lot!

FidoW
08.05.2006, 22:28
Guys,can you share already compiled program?Pls, i don't want install VS to compile program...
thnks a lot!
go to HD website...

Firedaemon
11.05.2006, 07:38
thank you for sharing the source. It will allow other talented devs to expand upon what you have done

wappie
11.05.2006, 09:44
carefull with sharing sources, NCsoft might leach from u :)

shturm
11.05.2006, 11:53
Always make backups ^) работает с огоньком GJ man