Ejemplo n.º 1
0
        private void btnChangeType_Click(object sender, EventArgs e)
        {
            ChangeNameOrType form = new ChangeNameOrType();

            form.ChangeType(2);
            form.cbType.SelectedIndex = currentRequest.Plane.PlaneType - 1;

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                currentRequest.Plane.PlaneType = form.cbType.SelectedIndex + 1;
                labelType.Text = getTypeString(currentRequest.Plane.PlaneType);
            }
            form.Dispose();
        }
Ejemplo n.º 2
0
        private void btnChangeName_Click(object sender, EventArgs e)
        {
            ChangeNameOrType form = new ChangeNameOrType();

            form.ChangeType(1);
            form.tbName.Text = currentRequest.Plane.Name;

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                currentRequest.Plane.Name = form.tbName.Text.Trim();
                labelName.Text            = form.tbName.Text.Trim();
            }
            form.Dispose();
        }