Ya veo por donde vas. A las dos funciones anteriores agrégale estas dos:
Código Delphi
[-]
function StrToDias(S: String): TDias;
var
Lista: TStrings;
I: Integer;
begin
Lista := TStringList.Create;
Result := [];
try
Lista.CommaText := S;
for I := 0 to Lista.Count - 1 do
Include(Result, StrToDia(Lista[i]));
finally
Lista.Free;
end;
end;
function DiasToStr(Dias: TDias): String;
var
Lista: TStringList;
Dia: TDia;
begin
Lista := TStringList.Create;
try
for Dia := Domingo to Sabado do
if Dia in Dias then
Lista.Add(DiaToStr(Dia));
Result := Lista.CommaText;
finally
Lista.Free;
end;
end;
Pero aquí estoy suponiendo que vas a escribir en los edit tus conjuntos separando los elementos con comas y no espacios. Aunque a fin de cuentas así es como se escriben los conjuntos ¿no?
// Saludos