Ejemplo n.º 1
0
		void RefreshLabels()
		{
			bool multitap_1 = cbMultitap_1.Checked;
			bool multitap_2 = cbMultitap_2.Checked;

			bool b1 = multitap_1;
			lbl_1_1.Visible = b1;
			lbl_1_2.Visible = b1;
			lbl_1_3.Visible = b1;
			lbl_1_4.Visible = b1;
			combo_1_2.Enabled = b1;
			combo_1_3.Enabled = b1;
			combo_1_4.Enabled = b1;
			lbl_p_1_2.Visible = b1;
			lbl_p_1_3.Visible = b1;
			lbl_p_1_4.Visible = b1;

			bool b2 = multitap_2;
			lbl_2_1.Visible = b2;
			lbl_2_2.Visible = b2;
			lbl_2_3.Visible = b2;
			lbl_2_4.Visible = b2;
			combo_2_2.Enabled = b2;
			combo_2_3.Enabled = b2;
			combo_2_4.Enabled = b2;
			lbl_p_2_2.Visible = b2;
			lbl_p_2_3.Visible = b2;
			lbl_p_2_4.Visible = b2;

			OctoshockControlUserConfig uc = new OctoshockControlUserConfig();
			
			uc.Multitaps[0] = multitap_1;
			uc.Multitaps[1] = multitap_2;

			var combos = new[] { combo_1_1, combo_1_2, combo_1_3, combo_1_4, combo_2_1, combo_2_2, combo_2_3, combo_2_4};
			for (int i = 0; i < 8; i++)
			{
				var combo = combos[i];
				if (combo.SelectedIndex == 0) uc.Devices8[i] = OctoshockDll.ePeripheralType.None;
				if (combo.SelectedIndex == 1) uc.Devices8[i] = OctoshockDll.ePeripheralType.DualAnalog;
				if (combo.SelectedIndex == 2) uc.Devices8[i] = OctoshockDll.ePeripheralType.DualShock;
			}

			var LC = uc.ToLogicalConfig();

			var p_labels = new[] { lbl_p_1_1,lbl_p_1_2,lbl_p_1_3,lbl_p_1_4,lbl_p_2_1,lbl_p_2_2,lbl_p_2_3,lbl_p_2_4};
			for (int i = 0; i < 8; i++)
			{
				var lbl = p_labels[i];
				if (LC.PlayerAssignments[i] == -1)
					lbl.Visible = false;
				else
				{
					lbl.Text = "P" + LC.PlayerAssignments[i];
					lbl.Visible = true;
				}
			}

		}
Ejemplo n.º 2
0
		internal void PopulateFrom(OctoshockControlUserConfig userConfig)
		{
			Multitaps = (bool[])userConfig.Multitaps.Clone();
			Devices8 = (OctoshockDll.ePeripheralType[])userConfig.Devices8.Clone();

			int id = 1;

			if (userConfig.Devices8[0] == OctoshockDll.ePeripheralType.None) PlayerAssignments[0] = -1; else PlayerAssignments[0] = id++;
			if (userConfig.Devices8[1] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[0]) PlayerAssignments[1] = -1; else PlayerAssignments[1] = id++;
			if (userConfig.Devices8[2] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[0]) PlayerAssignments[2] = -1; else PlayerAssignments[2] = id++;
			if (userConfig.Devices8[3] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[0]) PlayerAssignments[3] = -1; else PlayerAssignments[3] = id++;

			if (userConfig.Devices8[4] == OctoshockDll.ePeripheralType.None) PlayerAssignments[4] = -1; else PlayerAssignments[4] = id++;
			if (userConfig.Devices8[5] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[1]) PlayerAssignments[5] = -1; else PlayerAssignments[5] = id++;
			if (userConfig.Devices8[6] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[1]) PlayerAssignments[6] = -1; else PlayerAssignments[6] = id++;
			if (userConfig.Devices8[7] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[1]) PlayerAssignments[7] = -1; else PlayerAssignments[7] = id++;
		}
Ejemplo n.º 3
0
        internal void PopulateFrom(OctoshockControlUserConfig userConfig)
        {
            Multitaps = (bool[])userConfig.Multitaps.Clone();
            Devices8  = (OctoshockDll.ePeripheralType[])userConfig.Devices8.Clone();

            int id = 1;

            if (userConfig.Devices8[0] == OctoshockDll.ePeripheralType.None)
            {
                PlayerAssignments[0] = -1;
            }
            else
            {
                PlayerAssignments[0] = id++;
            }
            if (userConfig.Devices8[1] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[0])
            {
                PlayerAssignments[1] = -1;
            }
            else
            {
                PlayerAssignments[1] = id++;
            }
            if (userConfig.Devices8[2] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[0])
            {
                PlayerAssignments[2] = -1;
            }
            else
            {
                PlayerAssignments[2] = id++;
            }
            if (userConfig.Devices8[3] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[0])
            {
                PlayerAssignments[3] = -1;
            }
            else
            {
                PlayerAssignments[3] = id++;
            }

            if (userConfig.Devices8[4] == OctoshockDll.ePeripheralType.None)
            {
                PlayerAssignments[4] = -1;
            }
            else
            {
                PlayerAssignments[4] = id++;
            }
            if (userConfig.Devices8[5] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[1])
            {
                PlayerAssignments[5] = -1;
            }
            else
            {
                PlayerAssignments[5] = id++;
            }
            if (userConfig.Devices8[6] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[1])
            {
                PlayerAssignments[6] = -1;
            }
            else
            {
                PlayerAssignments[6] = id++;
            }
            if (userConfig.Devices8[7] == OctoshockDll.ePeripheralType.None || !userConfig.Multitaps[1])
            {
                PlayerAssignments[7] = -1;
            }
            else
            {
                PlayerAssignments[7] = id++;
            }
        }