From 1c1613b93134055ec17204dd83495925b14c0d89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Mon, 2 Oct 2017 13:04:25 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30501 --- client/Maestro/MaestroForm.Source.cs | 7 +++++-- client/Maestro/Sources/NexioRESTSource.cs | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/Maestro/MaestroForm.Source.cs b/client/Maestro/MaestroForm.Source.cs index 0c58ffed..9ea1b4af 100644 --- a/client/Maestro/MaestroForm.Source.cs +++ b/client/Maestro/MaestroForm.Source.cs @@ -170,9 +170,12 @@ namespace Maestro { return; } string query = selectedSources[0]; - int separatorPosition = query.IndexOf("-") == -1 ? query.IndexOf("_") : query.IndexOf("-"); + int separatorPosition = query.IndexOf("-") < 0 ? query.IndexOf("_") : query.IndexOf("-"); int dotPosition = query.IndexOf("."); - startingName = separatorPosition == -1 ? query.Substring(0, dotPosition) : query.Substring(0, separatorPosition); + if (dotPosition < 0) + startingName = separatorPosition < 0 ? query : query.Substring(0, separatorPosition); + else + startingName = query.Substring(0, dotPosition); } private void SetTextSelectedSourceTextFromCheckBoxes() { diff --git a/client/Maestro/Sources/NexioRESTSource.cs b/client/Maestro/Sources/NexioRESTSource.cs index 92298b06..cb801ea4 100644 --- a/client/Maestro/Sources/NexioRESTSource.cs +++ b/client/Maestro/Sources/NexioRESTSource.cs @@ -124,9 +124,9 @@ namespace Maestro.Sources { private void SetItem(ref NexioSourceItem item, JToken token) { item.Name = token[LONGNAMEID].ToString(); - item.Created = DateTime.Parse(token[RECORDDATE].ToString()); + //item.Created = DateTime.Parse(token[RECORDDATE].ToString()); item.Agency = token[EXTAGENCY].ToString(); - item.Modified = DateTime.Parse(token[RECORDDATE].ToString()); + item.Modified = DateTime.Parse(token[MODIFIED].ToString()); if (DateTime.MinValue.Equals(item.Modified)) item.Modified = item.Created; } -- 2.54.0