示例#1
0
 // Инициализация формы если выбрана строка в DataGridView на форме FormStart
 public FormAddEdit(FormStart fsClass, ActionParameters param, DataGridViewSelectedCellCollection selectedCells) : this(fsClass, param)
 {
     this.selectedCells = selectedCells;
     switch (param)
     {
     case ActionParameters.EditFish:
     case ActionParameters.EditPlant:
         TBName.Text = selectedCells[1].Value.ToString();
         TBType.Text = selectedCells[2].Value.ToString();
         break;
     }
 }
示例#2
0
        // Начальная инициаллизыция формы
        public FormAddEdit(FormStart fsClass, ActionParameters param)
        {
            InitializeComponent();
            this.fsClass = fsClass;
            this.param   = param;
            switch (param)
            {
            case ActionParameters.AddFish:
            case ActionParameters.AddPlant:
                Text = "Добавить";
                Icon = Icon.FromHandle(Properties.Resources.plus.GetHicon());
                break;

            case ActionParameters.EditFish:
            case ActionParameters.EditPlant:
                Text = "Редактировать";
                Icon = Icon.FromHandle(Properties.Resources.edit.GetHicon());
                break;
            }
        }