public void Function() { switch (type) { case FuncType.NOPARAMS: FunctionA(); break; case FuncType.STRLIST: { if (ExperimentFace.GetFileDialogs(out List <string> files, FunctionParams)) { FunctionB(files); } break; } case FuncType.EXPERIMENTFACE_STRING: { if (ExperimentFace.GetFileDialogs(out List <string> files, FunctionParams)) { FunctionC(ExperimentFace, files); } break; } case FuncType.EXPERIMENTFACE_ROMS: { if (ExperimentFace.GetFileDialogs(out List <string> files, RomParams)) { FunctionC(ExperimentFace, files); } break; } case FuncType.NOPARAMS_EXPERIMENTFACE: { FunctionD(ExperimentFace); } break; } }