Beispiel #1
0
 private void btnAddParam_Click(object sender, EventArgs e)
 {
     if (cbParam.SelectedIndex >= 0)
     {
         OCP_Parameters n = new OCP_Parameters();
         n.unk1 = currentPartner.id;
         n.unk2 = currentPartner.parameters.Count;
         n.unk3 = -1;
         n.unk4 = 0;
         n.unk5 = 0;
         currentPartner.parameters.Add(n);
         partners[cbPartners.SelectedIndex] = currentPartner;
         cbParam.SelectedIndex = -1;
         cbParam.Items.Clear();
         for (int i = 0; i < currentPartner.parameters.Count; i++)
         {
             cbParam.Items.Add(i);
         }
         txtParam1.Text = "";
         txtParam2.Text = "";
         txtParam3.Text = "";
         txtParam4.Text = "";
         txtParam5.Text = "";
     }
 }
Beispiel #2
0
 private void cbParam_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (partners.Count > 0 && cbParam.SelectedIndex >= 0)
     {
         currentParam   = currentPartner.parameters[cbParam.SelectedIndex];
         txtParam1.Text = currentParam.unk1.ToString();
         txtParam2.Text = currentParam.unk2.ToString();
         txtParam3.Text = currentParam.unk3.ToString();
         txtParam4.Text = currentParam.unk4.ToString();
         txtParam5.Text = currentParam.unk5.ToString();
     }
 }