void EditRecord(object parameter) { if (!ValidateParams(parameter)) { ShowInfoWindow("Podaj poprawne dane"); return; } var values = (object[])parameter; string newType = values[0].ToString(); string newName = values[1].ToString(); RecordViewModel currentRecord = (RecordViewModel)values[2]; if (recordService.EditRecord(newType, newName, currentRecord.ID)) { RefereshAll(); } }