Inheritance: System.Windows.Forms.Form
Beispiel #1
0
        private void btnCustomCode_Click(object sender, EventArgs e)
        {
            var cit = lvIsos.SelectedRows[0];
            var bmi = new BootMenuItem(
                cit.Cells[0].Value?.ToString() ?? "",
                cit.Cells[3].Value?.ToString() ?? "",
                selectediline().EntryType,
                cit.Cells[4].Value?.ToString() ?? "")
            {
                Start = false
            };

            var cod = SelectedBootloader().GetCode(bmi);

            var edfrm = new EditCodeFrm("/images/" + Path.GetFileName(cit.Cells[4].Value.ToString()))
            {
                Code = cod
            };

            if (edfrm.ShowDialog(this) == DialogResult.OK)
            {
                lvIsos.SelectedRows[0].Cells[5].Value = edfrm.Code == cod ? "" : edfrm.Code;
                CurImages.First(x => x.Name == cit.Cells[0].Value.ToString()).CustomCode =
                    lvIsos.SelectedRows[0].Cells[5].Value.ToString();
            }
        }
Beispiel #2
0
        private void btnCustomCode_Click(object sender, EventArgs e)
        {
            var cit = lvIsos.SelectedRows[0];
            var bmi = new BootMenuItem(
                cit.Cells[0].Value?.ToString() ?? "",
                cit.Cells[3].Value?.ToString() ?? "",
                selectediline().EntryType,
                cit.Cells[4].Value?.ToString() ?? "") {Start = false};

            var cod = SelectedBootloader().GetCode(bmi);

            var edfrm = new EditCodeFrm("/images/" + Path.GetFileName(cit.Cells[4].Value.ToString())) {Code = cod};
            if (edfrm.ShowDialog(this) == DialogResult.OK)
            {
                lvIsos.SelectedRows[0].Cells[5].Value = edfrm.Code == cod ? "" : edfrm.Code;
                CurImages.First(x => x.Name == cit.Cells[0].Value.ToString()).CustomCode =
                    lvIsos.SelectedRows[0].Cells[5].Value.ToString();
            }
        }