Exemplo n.º 1
0
        private void PatchButton_Click(object sender, EventArgs e)
        {
            Button button = sender as Button;
            int    SegNr  = (int)button.Tag;

            FrmSelectSegment frm2 = new FrmSelectSegment();

            frm2.Text = "Select patches";
            frm2.labelSelectOS.Text = frm2.Text;
            frm2.Tag = 30;
            frm2.LoadPatches(PCM1);

            if (frm2.ShowDialog(this) == DialogResult.OK)
            {
                PCM1 = frm2.PCM1;
                if (PCM1.PatchList.Count > 0)
                {
                    button.Text = "Patches: ";
                    foreach (Patch P in PCM1.PatchList)
                    {
                        button.Text += P.Name + ", ";
                    }
                }
                else
                {
                    button.Text = "Patches";
                }
            }
            frm2.Dispose();
        }
Exemplo n.º 2
0
        private void newButton_Click(object sender, EventArgs e)
        {
            CurrentButton = sender as Button;
            int SegNr = (int)CurrentButton.Tag;

            FrmSelectSegment frm2 = new FrmSelectSegment();

            frm2.Text = "Select " + SegmentNames[SegNr];
            frm2.Tag  = SegNr;
            frm2.labelSelectOS.Text = frm2.Text;

            frm2.LoadCalibrations(CurrentButton, ref PCM1);
            if (frm2.ShowDialog(this) == DialogResult.OK)
            {
                PCM1 = frm2.PCM1;
                if (SegNr == 9)
                {
                    if (PCM1.NewVIN == "")
                    {
                        MyButtons[10].Text = "VIN: " + PCM1.VIN;
                    }
                    else
                    {
                        MyButtons[10].Text = "VIN: " + PCM1.NewVIN;
                    }
                }
            }
            frm2.Dispose();
        }
Exemplo n.º 3
0
        private void btnAddPatches_Click(object sender, EventArgs e)
        {
            FrmSelectSegment frmSS = new FrmSelectSegment();

            frmSS.Text = "Select patches";
            frmSS.labelSelectOS.Text = frmSS.Text;
            frmSS.Tag = 40;
            frmSS.LoadPatches(PCM1);

            if (frmSS.ShowDialog(this) == DialogResult.OK)
            {
                PCM1 = frmSS.PCM1;
                frmSS.Dispose();
                labelBinInfo.Text = PcmBufInfo(PCM1.Segments[1].Data, PCM1);
                labelMods.Text    = PCM1.GetModifications();
            }
        }
Exemplo n.º 4
0
        private void btnBuildBin_Click(object sender, EventArgs e)
        {
            FrmSelectSegment frmSel = new FrmSelectSegment();

            frmSel.Text = "Select OS";
            frmSel.labelSelectOS.Text = frmSel.Text;
            frmSel.Tag = 1;
            PCMData PCM = new PCMData();

            frmSel.LoadOSFiles(sender as Button, ref PCM);
            if (frmSel.ShowDialog() == DialogResult.OK)
            {
                PCM = frmSel.PCM1;
                frmSel.Dispose();
                FrmSegmentList FrmB = new FrmSegmentList();
                FrmB.Show();
                FrmB.StartBuilding(ref PCM);
            }
        }