Ejemplo n.º 1
0
        private void Local_Minus_Load(object sender, EventArgs e)
        {
            //폼실행시 기준 경로가 파일이라 ㄱㅊ
            //string[] allLines = File.ReadAllLines(@"C:\Temp\test.txt", Encoding.Default);
            string[] allLines = new_list;

            hex_handler hex = new hex_handler();

            int hex_length  = hex.hex_length();
            int start_point = 0x500;

            //string[] allLines = new string[j];

            allLines[0] = hex.hex_read(0x500);

            for (int y = 0; y < hex_length; y++)
            {
                allLines[y]  = hex.hex_read(start_point);
                start_point += 0x100;
            }

            MessageBox.Show("얻은 길이 " + hex.hex_length());

            int i;

            for (i = 0; i < hex_length; i++)
            {
                if (!allLines[i].Equals(""))
                {
                    FolderAccess access = new FolderAccess();
                    //access.panja_inherit_recover(allLines[i]);
                }
                TreeNode rootNode = new TreeNode(allLines[i]);
                //rootNode.Text = allLines[i];
                rootNode.ImageIndex         = 2;
                rootNode.SelectedImageIndex = 2;
                List_own.Nodes.Add(rootNode);
            }



            List_own.FullRowSelect = true;

            /*
             * int i;
             * for (i = 0; i < allLines.Length; i++)
             * {
             *  TreeNode rootNode = new TreeNode(allLines[i]);
             *  //rootNode.Text = allLines[i];
             *  rootNode.ImageIndex = 2;
             *  rootNode.SelectedImageIndex = 2;
             *  List_own.Nodes.Add(rootNode);
             *  //Fill(rootNode, allLines[i]);
             * }
             */
        }
Ejemplo n.º 2
0
        void treeview_fill()
        {
            hex_handler hex = new hex_handler();
            //string absTemp = @"C:\Users\rooto\Source\Repos\Panja_Project\Panja_Project\Properties";

            //삭제
            //absPro = @"C:\Program Files (x86)\Default Company Name\SetupSample\Panja\Properties\test.txt";

            //확인용
            //MessageBox.Show("얻은 문자열 " + hex.hex_read(0x500));

            /*
             *
             * string[] allLines = File.ReadAllLines(absPro, Encoding.Default);
             *
             * int i;
             * for (i = 0; i < allLines.Length; i++)
             * {
             *  if (!allLines[i].Equals(""))
             *  {
             *      FolderAccess access = new FolderAccess();
             *      access.panja_inherit_recover(allLines[i]);
             *  }
             *  TreeNode rootNode = new TreeNode(allLines[i]);
             *  //rootNode.Text = allLines[i];
             *  rootNode.ImageIndex = 2;
             *  rootNode.SelectedImageIndex = 2;
             *  treeView1.Nodes.Add(rootNode);
             *  Fill(rootNode, allLines[i]);
             * }
             */
            int j           = hex.hex_length();
            int start_point = 0x500;

            //string[] allLines = new string[j];

            allLines[0] = hex.hex_read(0x500);

            for (int y = 0; y < j; y++)
            {
                allLines[y]  = hex.hex_read(start_point);
                start_point += 0x100;
            }

            //MessageBox.Show("얻은 길이 " + hex.hex_length());

            int i;

            for (i = 0; i < j; i++)
            {
                if (!allLines[i].Equals(""))
                {
                    FolderAccess access = new FolderAccess();
                    //access.panja_inherit_recover(allLines[i]);
                }
                TreeNode rootNode = new TreeNode(allLines[i]);
                //rootNode.Text = allLines[i];
                rootNode.ImageIndex         = 2;
                rootNode.SelectedImageIndex = 2;
                treeView1.Nodes.Add(rootNode);
                Fill(rootNode, allLines[i]);
            }



            listView1.FullRowSelect = true;
        }