From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- .../ViewModels/Drawer/LogViewModel.cs | 1784 -------------------- 1 file changed, 1784 deletions(-) delete mode 100644 Gestor.Application/ViewModels/Drawer/LogViewModel.cs (limited to 'Gestor.Application/ViewModels/Drawer/LogViewModel.cs') diff --git a/Gestor.Application/ViewModels/Drawer/LogViewModel.cs b/Gestor.Application/ViewModels/Drawer/LogViewModel.cs deleted file mode 100644 index cdeb60c..0000000 --- a/Gestor.Application/ViewModels/Drawer/LogViewModel.cs +++ /dev/null @@ -1,1784 +0,0 @@ -using ControlzEx; -using CsQuery.ExtensionMethods.Internal; -using Gestor.Application.Helpers; -using Gestor.Application.Servicos; -using Gestor.Application.ViewModels.Generic; -using Gestor.Model.Common; -using Gestor.Model.Domain.Common; -using Gestor.Model.Domain.Configuracoes; -using Gestor.Model.Domain.Ferramentas; -using Gestor.Model.Domain.Financeiro; -using Gestor.Model.Domain.Generic; -using Gestor.Model.Domain.Seguros; -using Gestor.Model.Validation; -using MaterialDesignThemes.Wpf; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Windows; - -namespace Gestor.Application.ViewModels.Drawer -{ - public class LogViewModel : BaseSegurosViewModel - { - private readonly LogServico _servico; - - private readonly TipoTela _tipoTela; - - private readonly long _id; - - private Visibility _visibilityDetalhesLog = Visibility.Hidden; - - private bool _mostrar; - - private bool _mostrarMensagem; - - private string _mostrarToolTip = "MOSTRAR TODAS OS CAMPOS"; - - private long _mostrarColuna = (long)120; - - private PackIcon _mostrarIcone; - - private ObservableCollection _logs; - - private string _currentDescription; - - private RegistroLog _selectedLog; - - private List _lists; - - private ObservableCollection _listsAlterados; - - private ObservableCollection _listsAdicionados; - - private ObservableCollection _listsRemovidos; - - private string _textAdicoes; - - public string CurrentDescription - { - get - { - return this._currentDescription; - } - set - { - this._currentDescription = value; - base.OnPropertyChanged("CurrentDescription"); - } - } - - public List Lists - { - get - { - return this._lists; - } - set - { - this._lists = value; - this.SetListaFiltrada(value); - base.OnPropertyChanged("Lists"); - } - } - - public ObservableCollection ListsAdicionados - { - get - { - return this._listsAdicionados; - } - set - { - this._listsAdicionados = value; - base.OnPropertyChanged("ListsAdicionados"); - } - } - - public ObservableCollection ListsAlterados - { - get - { - return this._listsAlterados; - } - set - { - this._listsAlterados = value; - base.OnPropertyChanged("ListsAlterados"); - } - } - - public ObservableCollection ListsRemovidos - { - get - { - return this._listsRemovidos; - } - set - { - this._listsRemovidos = value; - if (this.ListsAlterados != null || this.ListsAdicionados != null || value != null) - { - this.MostrarMensagem = false; - } - else - { - this.MostrarMensagem = true; - } - base.OnPropertyChanged("ListsRemovidos"); - } - } - - public ObservableCollection Logs - { - get - { - return this._logs; - } - set - { - this._logs = value; - base.OnPropertyChanged("Logs"); - } - } - - public bool Mostrar - { - get - { - return this._mostrar; - } - set - { - this._mostrar = value; - if (!value) - { - this.MostrarColuna = (long)240; - this.MostrarToolTip = "MOSTRAR TODOS OS CAMPOS"; - PackIcon packIcon = new PackIcon(); - packIcon.set_Kind(1497); - this.MostrarIcone = packIcon; - } - else - { - this.MostrarColuna = (long)240; - this.MostrarToolTip = "ESCONDER CAMPOS INALTERADOS"; - PackIcon packIcon1 = new PackIcon(); - packIcon1.set_Kind(1492); - this.MostrarIcone = packIcon1; - } - base.OnPropertyChanged("Mostrar"); - } - } - - public long MostrarColuna - { - get - { - return this._mostrarColuna; - } - set - { - this._mostrarColuna = value; - base.OnPropertyChanged("MostrarColuna"); - } - } - - public PackIcon MostrarIcone - { - get - { - return this._mostrarIcone; - } - set - { - this._mostrarIcone = value; - base.OnPropertyChanged("MostrarIcone"); - } - } - - public bool MostrarMensagem - { - get - { - return this._mostrarMensagem; - } - set - { - this._mostrarMensagem = value; - base.OnPropertyChanged("MostrarMensagem"); - } - } - - public string MostrarToolTip - { - get - { - return this._mostrarToolTip; - } - set - { - this._mostrarToolTip = value; - base.OnPropertyChanged("MostrarToolTip"); - } - } - - public RegistroLog SelectedLog - { - get - { - return this._selectedLog; - } - set - { - List tupleLists; - ObservableCollection> observableCollection; - List.Enumerator enumerator; - this._selectedLog = value; - List tupleLists1 = new List(); - try - { - if (!value.get_ModeloNovo()) - { - switch (this._tipoTela) - { - case 1: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 2: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(base.Restricao(14)); - break; - } - case 3: - { - Item item = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()); - if (item.get_Aeronautico() != null) - { - tupleLists1 = Aeronautico.Log(item); - break; - } - else if (item.get_Auto() != null) - { - tupleLists1 = Auto.Log(item); - break; - } - else if (item.get_Granizo() != null) - { - tupleLists1 = Granizo.Log(item); - break; - } - else if (item.get_Patrimonial() != null) - { - tupleLists1 = Patrimonial.Log(item); - break; - } - else if (item.get_RiscosDiversos() == null) - { - if (item.get_Vida() == null) - { - break; - } - tupleLists1 = Vida.Log(item); - break; - } - else - { - tupleLists1 = RiscosDiversos.Log(item); - break; - } - } - case 4: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 5: - { - try - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(base.Restricao(14), base.Restricao(95)); - break; - } - catch - { - tupleLists1 = LogViewModel.DefaultLog(this.SelectedLog.get_Descricao(), this.SelectedLog.get_Acao()); - break; - } - break; - } - case 6: - case 8: - case 20: - case 21: - case 23: - case 25: - case 27: - case 32: - case 35: - case 39: - case 40: - case 44: - case 47: - case 49: - case 50: - case 51: - case 53: - { - tupleLists1 = LogViewModel.DefaultLog(this.SelectedLog.get_Descricao(), this.SelectedLog.get_Acao()); - break; - } - case 7: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 9: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 10: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 11: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 12: - { - Ramo ramo = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()); - List list = ( - from x in Recursos.Coberturas - where x.get_IdRamo() == ramo.get_Id() - orderby x.get_Padrao() descending, x.get_Descricao() - select x).ToList(); - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(list); - break; - } - case 13: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 14: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 15: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 16: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 17: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 18: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 19: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 22: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 24: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 26: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 28: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 29: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 30: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 31: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 33: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 34: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 36: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 37: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(base.Restricao(14), base.Restricao(95)); - break; - } - case 38: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 41: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 42: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 43: - { - List>>>>> tuples = JsonConvert.DeserializeObject>>>>>>(this.SelectedLog.get_Descricao()); - tupleLists = new List(); - foreach (Tuple>>>> tuple in tuples) - { - observableCollection = new ObservableCollection>() - { - new Tuple(string.Concat(tuple.Item1, "$"), "", "") - }; - foreach (Tuple>> item2 in tuple.Item2) - { - observableCollection.Add(new Tuple(string.Concat(" ", item2.Item1, "$"), "", "")); - foreach (Tuple item21 in item2.Item2) - { - observableCollection.Add(new Tuple(string.Concat(" ", item21.Item1), item21.Item2, "")); - } - } - TupleList tupleList = new TupleList(); - tupleList.set_Tuples(observableCollection); - tupleLists.Add(tupleList); - } - enumerator = tupleLists.GetEnumerator(); - try - { - while (enumerator.MoveNext()) - { - tupleLists1.Add(enumerator.Current); - } - break; - } - finally - { - ((IDisposable)enumerator).Dispose(); - } - break; - } - case 45: - { - List vendedors = JsonConvert.DeserializeObject>(this.SelectedLog.get_Descricao()); - tupleLists = new List(); - observableCollection = new ObservableCollection>() - { - new Tuple("VENDEDORES VINCULADOS$", "", "") - }; - foreach (Vendedor vendedor in vendedors) - { - observableCollection.Add(new Tuple(string.Format(" VENDEDOR {0}", vendedors.IndexOf(vendedor) + 1), vendedor.get_Nome(), "")); - } - TupleList tupleList1 = new TupleList(); - tupleList1.set_Tuples(observableCollection); - tupleLists.Add(tupleList1); - enumerator = tupleLists.GetEnumerator(); - try - { - while (enumerator.MoveNext()) - { - tupleLists1.Add(enumerator.Current); - } - break; - } - finally - { - ((IDisposable)enumerator).Dispose(); - } - break; - } - case 46: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 48: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 52: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 54: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 55: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - case 56: - { - tupleLists1 = JsonConvert.DeserializeObject(this.SelectedLog.get_Descricao()).Log(); - break; - } - default: - { - goto case 53; - } - } - } - else - { - switch (value.get_Acao()) - { - case 0: - case 2: - { - tupleLists1 = JsonConvert.DeserializeObject>(this.SelectedLog.get_Descricao()).LogList(base.Restricao(14)); - break; - } - case 1: - { - tupleLists1 = JsonConvert.DeserializeObject>(this.SelectedLog.get_Descricao()).LogList(base.Restricao(14)); - break; - } - } - } - } - catch (Exception exception) - { - } - this.Lists = tupleLists1; - base.OnPropertyChanged("SelectedLog"); - } - } - - public string TextAdicoes - { - get - { - return this._textAdicoes; - } - set - { - this._textAdicoes = value; - base.OnPropertyChanged("TextAdicoes"); - } - } - - public Visibility VisiblityDetalhesLog - { - get - { - return this._visibilityDetalhesLog; - } - set - { - this._visibilityDetalhesLog = value; - base.OnPropertyChanged("VisiblityDetalhesLog"); - } - } - - public LogViewModel(TipoTela tela, long id, List parcelas = null, int numparcela = 0) - { - this._visibilityDetalhesLog = Visibility.Hidden; - this._mostrarToolTip = "MOSTRAR TODAS OS CAMPOS"; - this._mostrarColuna = (long)120; - PackIcon packIcon = new PackIcon(); - packIcon.set_Kind(1497); - this._mostrarIcone = packIcon; - this._logs = new ObservableCollection(); - this._currentDescription = ""; - this._lists = new List(); - this._listsAlterados = new ObservableCollection(); - this._listsAdicionados = new ObservableCollection(); - this._listsRemovidos = new ObservableCollection(); - this._textAdicoes = "INCLUSÃO"; - base(); - this._servico = new LogServico(); - this._tipoTela = tela; - this._id = id; - this.VisiblityDetalhesLog = (Recursos.Configuracoes.Any((ConfiguracaoSistema c) => c.get_Configuracao() == 55) ? Visibility.Visible : Visibility.Hidden); - base.EnableMenu = true; - if (parcelas != null) - { - this.LogParcelas(id, parcelas, numparcela); - return; - } - this.Seleciona(tela, id, null, null); - } - - public int BuscaNumeroParcela(string json) - { - int num; - int num1; - try - { - string[] strArrays = json.Split(new char[] { '}' }).FirstOrDefault((string x) => x.Contains("NumeroParcela")).Split(new char[] { ':' }); - num1 = (int.TryParse(strArrays[(int)strArrays.Length - 1].Replace("\"", ""), out num) ? num : 0); - } - catch - { - num1 = 0; - } - return num1; - } - - private static List DefaultLog(string log, TipoAcao acao) - { - List tupleLists = new List(); - TupleList tupleList = new TupleList(); - tupleList.set_Tuples(new ObservableCollection>() - { - new Tuple(Gestor.Model.Validation.Funcoes.GetDescription(acao), log, "") - }); - tupleLists.Add(tupleList); - return tupleLists; - } - - public void Imprimir() - { - bool count; - bool flag; - bool count1; - bool flag1; - bool count2; - bool flag2; - string str = "LOGS
"; - ObservableCollection listsAlterados = this.ListsAlterados; - if (listsAlterados != null) - { - count = listsAlterados.Count > 0; - } - else - { - count = false; - } - if (count) - { - str = string.Concat(str, "ALTERAÇÃO"); - } - if (this.ListsAlterados != null) - { - foreach (TupleList listsAlterado in this.ListsAlterados) - { - foreach (Tuple tuple in listsAlterado.get_Tuples()) - { - if (tuple == listsAlterado.get_Tuples().First>()) - { - str = string.Concat(str, ""); - if (!this.Mostrar) - { - str = string.Concat(str, ""); - } - str = string.Concat(str, "
DESCRIÇÃOVALOR LOG SELECIONADOVALOR LOG ANTERIOR
"); - } - bool flag3 = tuple.Item1.Contains("$"); - string[] item2 = new string[] { str, ""; - str = string.Concat(item2); - if (!this.Mostrar) - { - str = string.Concat(str, ""); - } - str = string.Concat(str, "
"; - item2[4] = tuple.Item1.Replace(" ", " ").Replace("$", ""); - item2[5] = ""; - item2[8] = tuple.Item2; - item2[9] = "", tuple.Item3, "
"); - } - if ((object)listsAlterado == (object)this.ListsAlterados.Last()) - { - continue; - } - str = string.Concat(str, "
"); - } - } - ObservableCollection listsAdicionados = this.ListsAdicionados; - if (listsAdicionados != null) - { - flag = listsAdicionados.Count > 0; - } - else - { - flag = false; - } - if (flag) - { - ObservableCollection observableCollection = this.ListsAlterados; - if (observableCollection != null) - { - flag2 = observableCollection.Count > 0; - } - else - { - flag2 = false; - } - if (flag2) - { - str = string.Concat(str, "


"); - } - str = string.Concat(str, "INCLUSÃO"); - } - if (this.ListsAdicionados != null) - { - foreach (TupleList listsAdicionado in this.ListsAdicionados) - { - foreach (Tuple tuple1 in listsAdicionado.get_Tuples()) - { - if (tuple1 == listsAdicionado.get_Tuples().First>()) - { - str = string.Concat(str, ""); - if (!this.Mostrar) - { - str = string.Concat(str, ""); - } - str = string.Concat(str, "
DESCRIÇÃOVALOR LOG SELECIONADOVALOR LOG ANTERIOR
"); - } - bool flag4 = tuple1.Item1.Contains("$"); - string[] strArrays = new string[] { str, ""; - str = string.Concat(strArrays); - if (!this.Mostrar) - { - str = string.Concat(str, ""); - } - str = string.Concat(str, "
"; - strArrays[4] = tuple1.Item1.Replace(" ", " ").Replace("$", ""); - strArrays[5] = ""; - strArrays[8] = tuple1.Item2; - strArrays[9] = "", tuple1.Item3, "
"); - } - if ((object)listsAdicionado == (object)this.ListsAdicionados.Last()) - { - continue; - } - str = string.Concat(str, "
"); - } - } - ObservableCollection listsRemovidos = this.ListsRemovidos; - if (listsRemovidos != null) - { - count1 = listsRemovidos.Count > 0; - } - else - { - count1 = false; - } - if (count1) - { - ObservableCollection listsAlterados1 = this.ListsAlterados; - if (listsAlterados1 != null) - { - flag1 = listsAlterados1.Count > 0; - } - else - { - flag1 = false; - } - if (!flag1) - { - ObservableCollection listsAdicionados1 = this.ListsAdicionados; - if (listsAdicionados1 != null) - { - count2 = listsAdicionados1.Count > 0; - } - else - { - count2 = false; - } - if (!count2) - { - goto Label0; - } - } - str = string.Concat(str, "


"); - Label0: - str = string.Concat(str, "EXCLUSÃO"); - } - if (this.ListsRemovidos != null) - { - foreach (TupleList listsRemovido in this.ListsRemovidos) - { - foreach (Tuple tuple2 in listsRemovido.get_Tuples()) - { - if (tuple2 == listsRemovido.get_Tuples().First>()) - { - str = string.Concat(str, ""); - if (!this.Mostrar) - { - str = string.Concat(str, ""); - } - str = string.Concat(str, "
DESCRIÇÃOVALOR LOG SELECIONADOVALOR LOG ANTERIOR
"); - } - bool flag5 = tuple2.Item1.Contains("$"); - string[] item21 = new string[] { str, ""; - str = string.Concat(item21); - if (!this.Mostrar) - { - str = string.Concat(str, ""); - } - str = string.Concat(str, "
"; - item21[4] = tuple2.Item1.Replace(" ", " ").Replace("$", ""); - item21[5] = ""; - item21[8] = tuple2.Item2; - item21[9] = "", tuple2.Item3, "
"); - } - if ((object)listsRemovido == (object)this.ListsRemovidos.Last()) - { - continue; - } - str = string.Concat(str, "
"); - } - } - str = string.Concat(str, "
"); - string tempPath = Path.GetTempPath(); - string str1 = string.Format("{0}{1}_{2:ddMMyyyyhhmmss}.html", tempPath, (TipoExtrato)0, Gestor.Application.Helpers.Funcoes.GetNetworkTime()); - StreamWriter streamWriter = new StreamWriter(str1, true, Encoding.UTF8); - streamWriter.Write(str); - streamWriter.Close(); - Process.Start(str1); - base.RegistrarAcao(string.Format("IMPRIMIU O LOG DE ALTERAÇÕES DE {0} DO ID \"{1}\"", Gestor.Model.Validation.Funcoes.GetDescription(this._tipoTela), this._id), this._id, new TipoTela?(this._tipoTela), string.Format("ID ENTIDADE: {0}\nTIPO: {1}", this._id, Gestor.Model.Validation.Funcoes.GetDescription(this._tipoTela))); - } - - private async void LogParcelas(long documento, List parcelas, int numparcela) - { - base.Loading(true); - List nums = new List(); - nums.AddRange(parcelas); - nums.Add(documento); - this.Logs = new ObservableCollection((IEnumerable)await this._servico.BuscaLogParcelas(nums)); - ObservableCollection observableCollection = new ObservableCollection(); - List list = this.Logs.Where((RegistroLog x) => { - if (x.get_ModeloNovo()) - { - return false; - } - return x.get_EntidadeId() == documento; - }).ToList(); - for (int i = list.Count - 1; i >= 0; i--) - { - ObservableCollection observableCollection1 = new ObservableCollection(); - try - { - for (int j = i; j >= 0 && list[j].get_DataHora() < list[i].get_DataHora().AddSeconds(4); j--) - { - Parcela parcela = JsonConvert.DeserializeObject(this.Logs[j].get_Descricao()); - if (parcela != null && (numparcela == 0 || this.BuscaNumeroParcela(this.Logs[j].get_Descricao()) == numparcela)) - { - observableCollection1.Add(parcela); - } - i = j; - } - } - catch (Exception exception1) - { - try - { - List parcelas1 = JsonConvert.DeserializeObject>(this.Logs[i].get_Descricao()); - if (parcelas1 != null && (numparcela == 0 || this.BuscaNumeroParcela(this.Logs[i].get_Descricao()) == numparcela)) - { - ExtensionMethods.AddRange(observableCollection1, parcelas1); - } - } - catch (Exception exception) - { - RegistroLog item = this.Logs[i]; - string descricao = this.Logs[i].get_Descricao(); - if (descricao == null) - { - descricao = ""; - } - item.set_Descricao(descricao); - observableCollection.Insert(0, this.Logs[i]); - goto Label0; - } - } - ObservableCollection observableCollection2 = observableCollection1; - observableCollection1 = new ObservableCollection( - from x in observableCollection2 - orderby x.get_NumeroParcela() - select x); - if (observableCollection1 != null && observableCollection1.Count != 0 && observableCollection1[0].get_Documento() != null) - { - RegistroLog registroLog = list[i]; - Parcelas parcela1 = new Parcelas(); - parcela1.set_ParcelasList(observableCollection1); - parcela1.set_TipoRecebimento(observableCollection1[0].get_Documento().get_TipoRecebimento()); - JsonSerializerSettings jsonSerializerSetting = new JsonSerializerSettings(); - jsonSerializerSetting.set_ReferenceLoopHandling(1); - registroLog.set_Descricao(JsonConvert.SerializeObject(parcela1, jsonSerializerSetting)); - observableCollection.Insert(0, list[i]); - } - Label0: - } - List registroLogs = new List(); - ObservableCollection logs = this.Logs; - List list1 = ( - from x in logs - where x.get_ModeloNovo() - select x).ToList(); - if (numparcela != 0) - { - foreach (RegistroLog registroLog1 in list1) - { - int num = this.BuscaNumeroParcela(registroLog1.get_Descricao()); - if ((num == 0 || num != numparcela) && (numparcela == 0 || parcelas.Count != 1 || registroLog1.get_EntidadeId() == documento)) - { - continue; - } - registroLogs.Add(registroLog1); - } - } - else - { - registroLogs.AddRange(list1); - } - this.Logs = observableCollection; - ExtensionMethods.AddRange(this.Logs, registroLogs); - if (this.Logs.Count <= 0) - { - this.SetListaFiltrada(this.Lists); - } - else - { - this.SelectedLog = this.Logs[0]; - } - base.Loading(false); - } - - public void MostrarCampos() - { - if (this.SelectedLog == null || this.SelectedLog.get_ModeloNovo()) - { - return; - } - this.Mostrar = !this.Mostrar; - this.Lists = this.Lists; - } - - private static int QntEspaco(string str) - { - return Regex.Match(str, "[^\\s]").Index; - } - - private async void Seleciona(TipoTela tela, long id, List parcelas = null, long? parcela = null) - { - base.Loading(true); - this.Logs = new ObservableCollection((IEnumerable)await this._servico.FindByEntityId(tela, id)); - if (tela == 37) - { - ObservableCollection observableCollection = new ObservableCollection(); - ObservableCollection logs = this.Logs; - List list = ( - from x in logs - where !x.get_ModeloNovo() - select x).ToList(); - for (int i = list.Count - 1; i >= 0; i--) - { - ObservableCollection observableCollection1 = new ObservableCollection(); - for (int j = i; j >= 0 && list[j].get_DataHora() < list[i].get_DataHora().AddSeconds(4); j--) - { - observableCollection1.Add(JsonConvert.DeserializeObject(list[j].get_Descricao())); - i = j; - } - ObservableCollection observableCollection2 = observableCollection1; - observableCollection1 = new ObservableCollection( - from x in observableCollection2 - orderby x.get_Id() - select x); - RegistroLog item = list[i]; - VendedorParcelas vendedorParcela = new VendedorParcelas(); - vendedorParcela.set_VendedorParcelasList(observableCollection1); - JsonSerializerSettings jsonSerializerSetting = new JsonSerializerSettings(); - jsonSerializerSetting.set_ReferenceLoopHandling(1); - item.set_Descricao(JsonConvert.SerializeObject(vendedorParcela, jsonSerializerSetting)); - observableCollection.Insert(0, list[i]); - } - ObservableCollection logs1 = this.Logs; - List registroLogs = ( - from x in logs1 - where x.get_ModeloNovo() - select x).ToList(); - this.Logs = observableCollection; - ExtensionMethods.AddRange(this.Logs, registroLogs); - } - if (this.Logs.Count <= 0) - { - this.SetListaFiltrada(this.Lists); - } - else - { - this.SelectedLog = this.Logs[0]; - } - base.Loading(false); - } - - public void SetListaFiltrada(List listAtual) - { - List tupleLists; - ObservableCollection> observableCollection; - List.Enumerator enumerator; - ObservableCollection observableCollection1; - ObservableCollection observableCollection2; - ObservableCollection observableCollection3; - if (this.Logs.Count == 0) - { - this.ListsAlterados = null; - this.ListsAdicionados = null; - this.ListsRemovidos = null; - return; - } - if (this.SelectedLog.get_ModeloNovo() && this.SelectedLog.get_Acao() == 1) - { - this.TextAdicoes = "ALTERAÇÕES"; - this.ListsAdicionados = null; - this.ListsRemovidos = null; - this.ListsAlterados = new ObservableCollection(this.Lists); - this.MostrarMensagem = false; - return; - } - if (this.SelectedLog.get_ModeloNovo() && this.SelectedLog.get_Acao() == null) - { - this.TextAdicoes = "INCLUSÕES"; - this.ListsAlterados = null; - this.ListsRemovidos = null; - this.ListsAdicionados = new ObservableCollection(listAtual); - this.MostrarMensagem = false; - return; - } - if (this.SelectedLog.get_ModeloNovo() && this.SelectedLog.get_Acao() == 2) - { - this.TextAdicoes = "EXCLUSÕES"; - this.ListsAlterados = null; - this.ListsAdicionados = null; - this.ListsRemovidos = new ObservableCollection(listAtual); - this.MostrarMensagem = false; - return; - } - if (this.Mostrar || (object)this.Logs.Last() == (object)this.SelectedLog) - { - this.TextAdicoes = ((object)this.Logs.Last() != (object)this.SelectedLog ? "LOG COMPLETO" : "INCLUSÃO"); - this.ListsAlterados = null; - this.ListsAdicionados = new ObservableCollection(listAtual); - this.ListsRemovidos = null; - return; - } - this.TextAdicoes = "INCLUSÃO"; - List tupleLists1 = new List(); - try - { - switch (this._tipoTela) - { - case 1: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 2: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(base.Restricao(14)); - goto case 53; - } - case 3: - { - Item item = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()); - if (item.get_Aeronautico() != null) - { - tupleLists1 = Aeronautico.Log(item); - goto case 53; - } - else if (item.get_Auto() != null) - { - tupleLists1 = Auto.Log(item); - goto case 53; - } - else if (item.get_Granizo() != null) - { - tupleLists1 = Granizo.Log(item); - goto case 53; - } - else if (item.get_Patrimonial() != null) - { - tupleLists1 = Patrimonial.Log(item); - goto case 53; - } - else if (item.get_RiscosDiversos() == null) - { - if (item.get_Vida() == null) - { - goto case 53; - } - tupleLists1 = Vida.Log(item); - goto case 53; - } - else - { - tupleLists1 = RiscosDiversos.Log(item); - goto case 53; - } - } - case 4: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 5: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(base.Restricao(14), base.Restricao(95)); - goto case 53; - } - case 6: - case 8: - case 20: - case 21: - case 23: - case 25: - case 27: - case 32: - case 35: - case 39: - case 40: - case 44: - case 47: - case 49: - case 50: - case 51: - case 53: - { - break; - } - case 7: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 9: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 10: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 11: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 12: - { - Ramo ramo = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()); - List list = ( - from x in Recursos.Coberturas - where x.get_IdRamo() == ramo.get_Id() - orderby x.get_Padrao() descending, x.get_Descricao() - select x).ToList(); - tupleLists1 = ramo.Log(list); - goto case 53; - } - case 13: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 14: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 15: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 16: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 17: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 18: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 19: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 22: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 24: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 26: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 28: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 29: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 30: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 31: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 33: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 34: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 36: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 37: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(base.Restricao(14), base.Restricao(95)); - goto case 53; - } - case 38: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 41: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 42: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 43: - { - List>>>>> tuples = JsonConvert.DeserializeObject>>>>>>(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()); - tupleLists = new List(); - foreach (Tuple>>>> tuple in tuples) - { - observableCollection = new ObservableCollection>() - { - new Tuple(string.Concat(tuple.Item1, "$"), "", "") - }; - foreach (Tuple>> item2 in tuple.Item2) - { - observableCollection.Add(new Tuple(string.Concat(" ", item2.Item1, "$"), "", "")); - foreach (Tuple item21 in item2.Item2) - { - observableCollection.Add(new Tuple(string.Concat(" ", item21.Item1), item21.Item2, "")); - } - } - TupleList tupleList = new TupleList(); - tupleList.set_Tuples(observableCollection); - tupleLists.Add(tupleList); - } - enumerator = tupleLists.GetEnumerator(); - try - { - while (enumerator.MoveNext()) - { - tupleLists1.Add(enumerator.Current); - } - goto case 53; - } - finally - { - ((IDisposable)enumerator).Dispose(); - } - break; - } - case 45: - { - List vendedors = JsonConvert.DeserializeObject>(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()); - tupleLists = new List(); - observableCollection = new ObservableCollection>() - { - new Tuple("VENDEDORES VINCULADOS$", "", "") - }; - foreach (Vendedor vendedor in vendedors) - { - observableCollection.Add(new Tuple(string.Format(" VENDEDOR {0}", vendedors.IndexOf(vendedor) + 1), vendedor.get_Nome(), "")); - } - TupleList tupleList1 = new TupleList(); - tupleList1.set_Tuples(observableCollection); - tupleLists.Add(tupleList1); - enumerator = tupleLists.GetEnumerator(); - try - { - while (enumerator.MoveNext()) - { - tupleLists1.Add(enumerator.Current); - } - goto case 53; - } - finally - { - ((IDisposable)enumerator).Dispose(); - } - break; - } - case 46: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 48: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 52: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 54: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 55: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - case 56: - { - tupleLists1 = JsonConvert.DeserializeObject(this.Logs[this.Logs.IndexOf(this.SelectedLog) + 1].get_Descricao()).Log(); - goto case 53; - } - default: - { - goto case 53; - } - } - } - catch (Exception exception) - { - } - ObservableCollection observableCollection4 = new ObservableCollection(); - foreach (TupleList tupleList2 in listAtual) - { - int num = -1; - if (tupleLists1.Count - 1 < listAtual.IndexOf(tupleList2)) - { - continue; - } - for (int i = 0; i < tupleList2.get_Tuples().Count; i++) - { - Tuple item1 = tupleList2.get_Tuples()[i]; - if (LogViewModel.QntEspaco(item1.Item1) != 0) - { - List strs = new List(); - int num1 = LogViewModel.QntEspaco(item1.Item1); - for (int j = i; j >= 0; j--) - { - if (LogViewModel.QntEspaco(tupleList2.get_Tuples()[j].Item1) <= num1) - { - strs.Insert(0, tupleList2.get_Tuples()[j].Item1); - num1 = LogViewModel.QntEspaco(tupleList2.get_Tuples()[j].Item1); - } - } - bool flag = false; - int num2 = 0; - Label2: - foreach (string str in strs) - { - if (!flag) - { - int num3 = num2; - while (num3 < tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples().Count) - { - if (num3 == tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples().Count - 1 && str != tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples()[num3].Item1) - { - flag = true; - goto Label2; - } - else if (str != tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples()[num3].Item1) - { - num3++; - } - else - { - num2 = num3; - goto Label2; - } - } - } - else - { - goto Label1; - } - } - Label1: - if (!flag && item1.Item2 != tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples()[num2].Item2) - { - if (num < listAtual.IndexOf(tupleList2)) - { - TupleList tupleList3 = new TupleList(); - tupleList3.set_Tuples(new ObservableCollection>()); - observableCollection4.Add(tupleList3); - num = listAtual.IndexOf(tupleList2); - } - int count = observableCollection4.Last().get_Tuples().Count; - int num4 = LogViewModel.QntEspaco(item1.Item1); - for (int k = i - 1; k >= 0; k--) - { - if (LogViewModel.QntEspaco(tupleList2.get_Tuples()[k].Item1) < LogViewModel.QntEspaco(item1.Item1) && LogViewModel.QntEspaco(tupleList2.get_Tuples()[k].Item1) < num4) - { - bool flag1 = false; - int count1 = observableCollection4.Last().get_Tuples().Count - 1; - while (count1 >= 0) - { - if (observableCollection4.Last().get_Tuples()[count1].Item1 != tupleList2.get_Tuples()[k].Item1) - { - count1--; - } - else - { - flag1 = true; - break; - } - } - if (flag1) - { - break; - } - num4 = LogViewModel.QntEspaco(tupleList2.get_Tuples()[k].Item1); - observableCollection4.Last().get_Tuples().Insert(count, new Tuple(tupleList2.get_Tuples()[k].Item1, tupleList2.get_Tuples()[k].Item2, "")); - } - } - observableCollection4.Last().get_Tuples().Add(new Tuple(item1.Item1, item1.Item2, tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples()[num2].Item2)); - } - } - else if (item1.Item2 != tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples()[tupleList2.get_Tuples().IndexOf(item1)].Item2) - { - if (num < listAtual.IndexOf(tupleList2)) - { - TupleList tupleList4 = new TupleList(); - tupleList4.set_Tuples(new ObservableCollection>()); - observableCollection4.Add(tupleList4); - num = listAtual.IndexOf(tupleList2); - } - observableCollection4.Last().get_Tuples().Add(new Tuple(item1.Item1, item1.Item2, tupleLists1[listAtual.IndexOf(tupleList2)].get_Tuples()[tupleList2.get_Tuples().IndexOf(item1)].Item2)); - } - } - } - if (observableCollection4.Count == 0) - { - observableCollection1 = null; - } - else - { - observableCollection1 = observableCollection4; - } - this.ListsAlterados = observableCollection1; - observableCollection4 = new ObservableCollection(); - foreach (TupleList tupleList5 in listAtual) - { - int num5 = -1; - if (tupleLists1.Count - 1 < listAtual.IndexOf(tupleList5)) - { - continue; - } - for (int l = 0; l < tupleList5.get_Tuples().Count; l++) - { - Tuple tuple1 = tupleList5.get_Tuples()[l]; - if (LogViewModel.QntEspaco(tuple1.Item1) > 0) - { - List strs1 = new List(); - int num6 = LogViewModel.QntEspaco(tuple1.Item1); - for (int m = l; m >= 0; m--) - { - if (LogViewModel.QntEspaco(tupleList5.get_Tuples()[m].Item1) <= num6) - { - strs1.Insert(0, tupleList5.get_Tuples()[m].Item1); - num6 = LogViewModel.QntEspaco(tupleList5.get_Tuples()[m].Item1); - } - } - bool flag2 = false; - int num7 = 0; - Label4: - foreach (string str1 in strs1) - { - if (!flag2) - { - int num8 = num7; - while (num8 < tupleLists1[listAtual.IndexOf(tupleList5)].get_Tuples().Count) - { - if (num8 == tupleLists1[listAtual.IndexOf(tupleList5)].get_Tuples().Count - 1 && str1 != tupleLists1[listAtual.IndexOf(tupleList5)].get_Tuples()[num8].Item1) - { - flag2 = true; - goto Label4; - } - else if (str1 != tupleLists1[listAtual.IndexOf(tupleList5)].get_Tuples()[num8].Item1) - { - num8++; - } - else - { - num7 = num8; - goto Label4; - } - } - } - else - { - goto Label3; - } - } - Label3: - if (flag2) - { - if (num5 < listAtual.IndexOf(tupleList5)) - { - TupleList tupleList6 = new TupleList(); - tupleList6.set_Tuples(new ObservableCollection>()); - observableCollection4.Add(tupleList6); - num5 = listAtual.IndexOf(tupleList5); - } - int count2 = observableCollection4.Last().get_Tuples().Count; - int num9 = LogViewModel.QntEspaco(tuple1.Item1); - for (int n = l - 1; n >= 0; n--) - { - if (LogViewModel.QntEspaco(tupleList5.get_Tuples()[n].Item1) < LogViewModel.QntEspaco(tuple1.Item1) && LogViewModel.QntEspaco(tupleList5.get_Tuples()[n].Item1) < num9) - { - bool flag3 = false; - int count3 = observableCollection4.Last().get_Tuples().Count - 1; - while (count3 >= 0) - { - if (observableCollection4.Last().get_Tuples()[count3].Item1 != tupleList5.get_Tuples()[n].Item1) - { - count3--; - } - else - { - flag3 = true; - break; - } - } - if (flag3) - { - break; - } - num9 = LogViewModel.QntEspaco(tupleList5.get_Tuples()[n].Item1); - observableCollection4.Last().get_Tuples().Insert(count2, new Tuple(tupleList5.get_Tuples()[n].Item1, tupleList5.get_Tuples()[n].Item2, "")); - } - } - observableCollection4.Last().get_Tuples().Add(new Tuple(tuple1.Item1, tuple1.Item2, "")); - } - } - } - } - if (observableCollection4.Count == 0) - { - observableCollection2 = null; - } - else - { - observableCollection2 = observableCollection4; - } - this.ListsAdicionados = observableCollection2; - observableCollection4 = new ObservableCollection(); - foreach (TupleList tupleList7 in tupleLists1) - { - int num10 = -1; - for (int o = 0; o < tupleList7.get_Tuples().Count; o++) - { - Tuple tuple2 = tupleList7.get_Tuples()[o]; - if (LogViewModel.QntEspaco(tuple2.Item1) > 0) - { - List strs2 = new List(); - int num11 = LogViewModel.QntEspaco(tuple2.Item1); - for (int p = o; p >= 0; p--) - { - if (LogViewModel.QntEspaco(tupleList7.get_Tuples()[p].Item1) <= num11) - { - strs2.Insert(0, tupleList7.get_Tuples()[p].Item1); - num11 = LogViewModel.QntEspaco(tupleList7.get_Tuples()[p].Item1); - } - } - bool flag4 = false; - int num12 = 0; - Label6: - foreach (string str2 in strs2) - { - if (!flag4) - { - if (listAtual.Count - 1 < tupleLists1.IndexOf(tupleList7)) - { - continue; - } - int num13 = num12; - while (num13 < listAtual[tupleLists1.IndexOf(tupleList7)].get_Tuples().Count) - { - if (num13 == listAtual[tupleLists1.IndexOf(tupleList7)].get_Tuples().Count - 1 && str2 != listAtual[tupleLists1.IndexOf(tupleList7)].get_Tuples()[num13].Item1) - { - flag4 = true; - goto Label6; - } - else if (str2 != listAtual[tupleLists1.IndexOf(tupleList7)].get_Tuples()[num13].Item1) - { - num13++; - } - else - { - num12 = num13; - goto Label6; - } - } - } - else - { - goto Label5; - } - } - Label5: - if (flag4) - { - if (num10 < tupleLists1.IndexOf(tupleList7)) - { - TupleList tupleList8 = new TupleList(); - tupleList8.set_Tuples(new ObservableCollection>()); - observableCollection4.Add(tupleList8); - num10 = tupleLists1.IndexOf(tupleList7); - } - int count4 = observableCollection4.Last().get_Tuples().Count; - int num14 = LogViewModel.QntEspaco(tuple2.Item1); - for (int q = o - 1; q >= 0; q--) - { - if (LogViewModel.QntEspaco(tupleList7.get_Tuples()[q].Item1) < LogViewModel.QntEspaco(tuple2.Item1) && LogViewModel.QntEspaco(tupleList7.get_Tuples()[q].Item1) < num14) - { - bool flag5 = false; - int count5 = observableCollection4.Last().get_Tuples().Count - 1; - while (count5 >= 0) - { - if (observableCollection4.Last().get_Tuples()[count5].Item1 != tupleList7.get_Tuples()[q].Item1) - { - count5--; - } - else - { - flag5 = true; - break; - } - } - if (flag5) - { - break; - } - num14 = LogViewModel.QntEspaco(tupleList7.get_Tuples()[q].Item1); - observableCollection4.Last().get_Tuples().Insert(count4, new Tuple(tupleList7.get_Tuples()[q].Item1, tupleList7.get_Tuples()[q].Item2, "")); - } - } - observableCollection4.Last().get_Tuples().Add(new Tuple(tuple2.Item1, "", tuple2.Item2)); - } - } - } - } - if (observableCollection4.Count == 0) - { - observableCollection3 = null; - } - else - { - observableCollection3 = observableCollection4; - } - this.ListsRemovidos = observableCollection3; - } - } -} \ No newline at end of file -- cgit v1.2.3