Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 07.05.2006, 22:15   #1
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default [SHARE] HD SAE .NET (skillacquire.txt explorer) + sources

NOT EDITOR, JUST VIEWER
no any AntiLE keys needed

.net framework 2.0 required

shot:


sources:
Code:
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 is offline  
Old 07.05.2006, 22:15   #2
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default [SHARE] HD SAE .NET (skillacquire.txt explorer) + sources

NOT EDITOR, JUST VIEWER
no any AntiLE keys needed

.net framework 2.0 required

shot:


sources:
Code:
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 is offline  
Old 07.05.2006, 22:37   #3
Mattho
Архивный участник
 
Join Date: Jan 2006
Posts: 188
Default

what the hell is wrong with you?

keep up good work...
Mattho is offline  
Old 07.05.2006, 22:37   #4
Mattho
Архивный участник
 
Join Date: Jan 2006
Posts: 188
Default

what the hell is wrong with you?

keep up good work...
Mattho is offline  
Old 07.05.2006, 23:12   #5
jtomasrl
Архивный участник
 
Join Date: Apr 2006
Posts: 33
Default

WTH is this
jtomasrl is offline  
Old 07.05.2006, 23:12   #6
jtomasrl
Архивный участник
 
Join Date: Apr 2006
Posts: 33
Default

WTH is this
jtomasrl is offline  
Old 07.05.2006, 23:16   #7
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

Quote:
Originally Posted by jtomasrl
WTH is this
skillacquire.txt viewer, are you blind or cant read?
madar is offline  
Old 07.05.2006, 23:16   #8
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

Quote:
Originally Posted by jtomasrl
WTH is this
skillacquire.txt viewer, are you blind or cant read?
madar is offline  
Old 08.05.2006, 01:05   #9
jtomasrl
Архивный участник
 
Join Date: Apr 2006
Posts: 33
Default

cant read
jtomasrl is offline  
Old 08.05.2006, 01:05   #10
jtomasrl
Архивный участник
 
Join Date: Apr 2006
Posts: 33
Default

cant read
jtomasrl is offline  
Old 08.05.2006, 02:12   #11
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

Quote:
Originally Posted by jtomasrl
cant read
//spanish
no seas huevon pibe, media pila
//spanish

//english
not be a leecher, read and learn
//english
RipperX is offline  
Old 08.05.2006, 02:12   #12
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

Quote:
Originally Posted by jtomasrl
cant read
//spanish
no seas huevon pibe, media pila
//spanish

//english
not be a leecher, read and learn
//english
RipperX is offline  
Old 08.05.2006, 02:40   #13
jtomasrl
Архивный участник
 
Join Date: Apr 2006
Posts: 33
Default

//spanish
huevon = leecher?
pff
//spanish
jtomasrl is offline  
Old 08.05.2006, 02:40   #14
jtomasrl
Архивный участник
 
Join Date: Apr 2006
Posts: 33
Default

//spanish
huevon = leecher?
pff
//spanish
jtomasrl is offline  
Old 08.05.2006, 04:24   #15
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

you are a GOD
tpuNIsher is offline  
Old 08.05.2006, 04:24   #16
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

you are a GOD
tpuNIsher is offline  
Old 08.05.2006, 07:28   #17
TheOrder
Архивный участник
 
Join Date: Sep 2005
Posts: 731
Default

Humordwarf you Rule !!! Tnx again for this tool !!!
TheOrder is offline  
Old 08.05.2006, 07:28   #18
TheOrder
Архивный участник
 
Join Date: Sep 2005
Posts: 731
Default

Humordwarf you Rule !!! Tnx again for this tool !!!
TheOrder is offline  
Old 08.05.2006, 09:55   #19
Zeran
Архивный участник
 
Join Date: Mar 2006
Posts: 97
Default

Big respect to you man!
10x for good job
Zeran is offline  
Old 08.05.2006, 09:55   #20
Zeran
Архивный участник
 
Join Date: Mar 2006
Posts: 97
Default

Big respect to you man!
10x for good job
Zeran is offline  
Old 08.05.2006, 10:18   #21
andrei1516
Архивный участник
 
Join Date: Mar 2006
Posts: 84
Default

oOOOOo
Thnx again, and thx for sourse code !!!!!
andrei1516 is offline  
Old 08.05.2006, 10:18   #22
andrei1516
Архивный участник
 
Join Date: Mar 2006
Posts: 84
Default

oOOOOo
Thnx again, and thx for sourse code !!!!!
andrei1516 is offline  
Old 08.05.2006, 13:04   #23
mantrastic
Архивный участник
 
Join Date: Apr 2006
Posts: 338
Default

you wont stop eh? lol , man , good job! keep it up!
mantrastic is offline  
Old 08.05.2006, 13:04   #24
mantrastic
Архивный участник
 
Join Date: Apr 2006
Posts: 338
Default

you wont stop eh? lol , man , good job! keep it up!
mantrastic is offline  
Old 08.05.2006, 13:44   #25
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

Quote:
Originally Posted by mantrastic
you wont stop eh?
i will, soon.
everything has end.
humordwarf is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:22.