private void tvSDAT_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node == null || e.Node.Tag == null)
            {
                return;
            }
            else
            {
                string   tag      = e.Node.Tag.ToString();
                string[] location = tag.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries);

                switch (location[1].ToLowerInvariant())
                {
                case "info":
                {
                    switch (location[2].ToLowerInvariant())
                    {
                    case "records0":
                    {
                        int entryIndex = int.Parse(location[3]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords0SEQ()[entryIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;

                    case "records1":
                    {
                        int entryIndex = int.Parse(location[3]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords1SEQARC()[entryIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;

                    case "records2":
                    {
                        int entryIndex = int.Parse(location[3]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords2BANK()[entryIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;

                    case "records3":
                    {
                        int entryIndex = int.Parse(location[3]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords3WAVEARC()[entryIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;

                    case "records4":
                    {
                        int entryIndex = int.Parse(location[3]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords4PLAYER()[entryIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;

                    case "records5":
                    {
                        int entryIndex = int.Parse(location[3]);
                        if (location.Length <= 4)
                        {
                            break;
                        }
                        int groupIndex = int.Parse(location[4]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords5GROUP()[entryIndex].GetGroupEntries()[groupIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;

                    case "records6":
                    {
                        int entryIndex = int.Parse(location[3]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords6PLAYER2()[entryIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;

                    case "records7":
                    {
                        int entryIndex = int.Parse(location[3]);
                        m_SelectedNode        = m_SDAT.m_Info.GetRecords7STREAM()[entryIndex];
                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                    }
                    break;
                    }
                }
                break;
                }
            }
        }
Пример #2
0
        private void tvSDAT_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node == null || e.Node.Tag == null)
                return;
            else
            {
                string tag = e.Node.Tag.ToString();
                string[] location = tag.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries);

                switch (location[1].ToLowerInvariant())
                {
                    case "info":
                        {
                            switch (location[2].ToLowerInvariant())
                            {
                                case "records0":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords0SEQ()[entryIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                                case "records1":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords1SEQARC()[entryIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                                case "records2":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords2BANK()[entryIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                                case "records3":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords3WAVEARC()[entryIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                                case "records4":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords4PLAYER()[entryIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                                case "records5":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        if (location.Length <= 4)
                                            break;
                                        int groupIndex = int.Parse(location[4]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords5GROUP()[entryIndex].GetGroupEntries()[groupIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                                case "records6":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords6PLAYER2()[entryIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                                case "records7":
                                    {
                                        int entryIndex = int.Parse(location[3]);
                                        m_SelectedNode = m_SDAT.m_Info.GetRecords7STREAM()[entryIndex];
                                        pgData.SelectedObject = m_SelectedNode.GenerateProperties();
                                    }
                                    break;
                            }
                        }
                        break;
                }
            }
        }