예제 #1
0
        private List <KeyMapping> BuildKeyMappings()
        {
            List <KeyMapping> maps = new List <KeyMapping>();

            #region primary keymapping
            KeyMapping primary = new KeyMapping()
            {
                Up            = cboUp1.Text,
                Down          = cboDown1.Text,
                Left          = cboLeft1.Text,
                Right         = cboRight1.Text,
                Fire          = cboFire1.Text,
                Select        = cboSelect1.Text,
                One           = cboOne1.Text,
                Two           = cboTwo1.Text,
                A             = cboA1.Text,
                B             = cboB1.Text,
                C             = cboC1.Text,
                StartSequence = txtStartSeq.Text,
                Descriptions  = new KeyDescriptions()
                {
                    Up     = txtUp1.Text,
                    Down   = txtDown1.Text,
                    Left   = txtLeft1.Text,
                    Right  = txtRight1.Text,
                    Fire   = txtFire1.Text,
                    Select = txtSelect1.Text,
                    One    = txtOne1.Text,
                    Two    = txtTwo1.Text,
                    A      = txtA1.Text,
                    B      = txtB1.Text,
                    C      = txtC1.Text
                }
            };

            maps.Add(primary);
            #endregion

            #region secondary keymapping
            if (showSecondaryContorls)
            {
                KeyMapping secondary = new KeyMapping()
                {
                    Up           = cboUp2.Text,
                    Down         = cboDown2.Text,
                    Left         = cboLeft2.Text,
                    Right        = cboRight2.Text,
                    Fire         = cboFire2.Text,
                    Select       = cboSelect2.Text,
                    One          = cboOne2.Text,
                    Two          = cboTwo2.Text,
                    A            = cboA2.Text,
                    B            = cboB2.Text,
                    C            = cboC2.Text,
                    Descriptions = new KeyDescriptions()
                    {
                        Up     = txtUp2.Text,
                        Down   = txtDown2.Text,
                        Left   = txtLeft2.Text,
                        Right  = txtRight2.Text,
                        Fire   = txtFire2.Text,
                        Select = txtSelect2.Text,
                        One    = txtOne2.Text,
                        Two    = txtTwo2.Text,
                        A      = txtA2.Text,
                        B      = txtB2.Text,
                        C      = txtC2.Text
                    }
                };

                maps.Add(secondary);
            }
            #endregion

            return(maps);
        }
예제 #2
0
        private List<KeyMapping> BuildKeyMappings()
        {
            List<KeyMapping> maps = new List<KeyMapping>();

            #region primary keymapping
            KeyMapping primary = new KeyMapping()
            {
                Up = cboUp1.Text,
                Down = cboDown1.Text,
                Left = cboLeft1.Text,
                Right = cboRight1.Text,
                Fire = cboFire1.Text,
                Select = cboSelect1.Text,
                One = cboOne1.Text,
                Two = cboTwo1.Text,
                A = cboA1.Text,
                B = cboB1.Text,
                C = cboC1.Text,
                StartSequence = txtStartSeq.Text,
                Descriptions = new KeyDescriptions()
                {
                    Up = txtUp1.Text,
                    Down = txtDown1.Text,
                    Left = txtLeft1.Text,
                    Right = txtRight1.Text,
                    Fire = txtFire1.Text,
                    Select = txtSelect1.Text,
                    One = txtOne1.Text,
                    Two = txtTwo1.Text,
                    A = txtA1.Text,
                    B = txtB1.Text,
                    C = txtC1.Text
                }
            };

            maps.Add(primary);
            #endregion

            #region secondary keymapping
            if (showSecondaryContorls)
            {
                KeyMapping secondary = new KeyMapping()
                {
                    Up = cboUp2.Text,
                    Down = cboDown2.Text,
                    Left = cboLeft2.Text,
                    Right = cboRight2.Text,
                    Fire = cboFire2.Text,
                    Select = cboSelect2.Text,
                    One = cboOne2.Text,
                    Two = cboTwo2.Text,
                    A = cboA2.Text,
                    B = cboB2.Text,
                    C = cboC2.Text,
                    Descriptions = new KeyDescriptions()
                    {
                        Up = txtUp2.Text,
                        Down = txtDown2.Text,
                        Left = txtLeft2.Text,
                        Right = txtRight2.Text,
                        Fire = txtFire2.Text,
                        Select = txtSelect2.Text,
                        One = txtOne2.Text,
                        Two = txtTwo2.Text,
                        A = txtA2.Text,
                        B = txtB2.Text,
                        C = txtC2.Text
                    }
                };

                maps.Add(secondary);
            }
            #endregion

            return maps;
        }