diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
| commit | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch) | |
| tree | e1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Gestor.Model/Model.Domain.Ferramentas/Trilha.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Gestor.Model/Model.Domain.Ferramentas/Trilha.cs')
| -rw-r--r-- | Gestor.Model/Model.Domain.Ferramentas/Trilha.cs | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/Gestor.Model/Model.Domain.Ferramentas/Trilha.cs b/Gestor.Model/Model.Domain.Ferramentas/Trilha.cs deleted file mode 100644 index cf4e075..0000000 --- a/Gestor.Model/Model.Domain.Ferramentas/Trilha.cs +++ /dev/null @@ -1,122 +0,0 @@ -using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Domain.Seguros;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Ferramentas
-{
- public class Trilha : DomainBase, IDomain
- {
- public bool Ativo
- {
- get;
- set;
- }
-
- public string Descricao
- {
- get;
- set;
- }
-
- public List<Fase> Fases
- {
- get;
- set;
- }
-
- public TipoTrilha Tipo
- {
- get;
- set;
- }
-
- public string Titulo
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Trilha trilha = this;
- return new Func<List<KeyValuePair<string, string>>>(trilha.Validate);
- }
- }
-
- public Trilha()
- {
- }
-
- public List<TupleList> Log()
- {
- List<TupleList> tupleLists = new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("TÍTULO DA TRILHA", (string.IsNullOrWhiteSpace(this.Titulo) ? "" : this.Titulo), ""),
- new Tuple<string, string, string>("DESCRIÇÃO DA TRILHA", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), ""),
- new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")
- }
- }
- };
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("FASES$", "", "")
- };
- if (this.Fases != null)
- {
- foreach (Fase fase in this.Fases)
- {
- observableCollection.Add(new Tuple<string, string, string>(string.Format(" FASE {0}$", this.Fases.IndexOf(fase) + 1), "", ""));
- observableCollection.Add(new Tuple<string, string, string>(" TÍTULO DA FASE", (string.IsNullOrWhiteSpace(fase.Titulo) ? "" : fase.Titulo), ""));
- observableCollection.Add(new Tuple<string, string, string>(" DESCRIÇÃO DA FASE", (string.IsNullOrWhiteSpace(fase.Descricao) ? "" : fase.Descricao), ""));
- foreach (Tarefa tarefa in fase.Tarefas)
- {
- observableCollection.Add(new Tuple<string, string, string>(string.Format(" TAREFA {0}$", fase.Tarefas.IndexOf(tarefa) + 1), "", ""));
- observableCollection.Add(new Tuple<string, string, string>(" TÍTULO DA TAREFA", (string.IsNullOrWhiteSpace(tarefa.Titulo) ? "" : tarefa.Titulo), ""));
- DateTime agendamento = tarefa.Agendamento;
- DateTime dateTime = tarefa.Agendamento;
- observableCollection.Add(new Tuple<string, string, string>(" AGENDAMENTO DA TAREFA", dateTime.ToShortDateString(), ""));
- DateTime agendamento1 = tarefa.Agendamento;
- dateTime = tarefa.Agendamento;
- observableCollection.Add(new Tuple<string, string, string>(" HORA DA TAREFA", dateTime.ToShortTimeString(), ""));
- observableCollection.Add(new Tuple<string, string, string>(" ANOTAÇÕES DA TAREFA", (string.IsNullOrWhiteSpace(tarefa.Anotacoes) ? "" : tarefa.Anotacoes), ""));
- observableCollection.Add(new Tuple<string, string, string>(" STATUS DA TAREFA", tarefa.Status.GetDescription(), ""));
- }
- }
- tupleLists.Add(new TupleList()
- {
- Tuples = observableCollection
- });
- }
- return tupleLists;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Titulo))
- {
- keyValuePairs.AddValue<string, string>("Titulo", Messages.Obrigatorio, true);
- }
- if (this.Fases == null || this.Fases.Count == 0)
- {
- keyValuePairs.AddValue<string, string>("Fases", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-}
\ No newline at end of file |