Fix vari
This commit is contained in:
@@ -151,28 +151,31 @@
|
||||
|
||||
private void OnNewName()
|
||||
{
|
||||
switch (Attached.Type)
|
||||
if (Attached != null)
|
||||
{
|
||||
case AttachedDTO.TypeAttached.Position:
|
||||
switch (Attached.Type)
|
||||
{
|
||||
CanAddPosition = false;
|
||||
case AttachedDTO.TypeAttached.Position:
|
||||
{
|
||||
CanAddPosition = false;
|
||||
|
||||
Attached.Description = NewName!;
|
||||
Attached.Description = NewName!;
|
||||
Attached.Name = NewName!;
|
||||
|
||||
break;
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Image:
|
||||
{
|
||||
var extension = Path.GetExtension(Attached.Name);
|
||||
Attached.Name = NewName! + extension;
|
||||
break;
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Image:
|
||||
{
|
||||
var extension = Path.GetExtension(Attached.Name);
|
||||
Attached.Name = NewName! + extension;
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Document:
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
case AttachedDTO.TypeAttached.Document:
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
MudDialog.Close(Attached);
|
||||
|
||||
Reference in New Issue
Block a user