private void pgData_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (m_SelectedNode != null)
     {
         m_SelectedNode.SetProperty(e.ChangedItem.Label, e.ChangedItem.Value);
         pgData.SelectedObject = m_SelectedNode.GenerateProperties();
     }
 }
        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;
                }
            }
        }
Exemplo n.º 3
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;
                }
            }
        }