public TelaPrincipal() { InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green700, Primary.Green200, Accent.Red100, TextShade.WHITE); AbaAtualizacao = new AbaAtualizacao(); AbaConfiguracoes = new AbaConfiguracoes(); AtualizarAsync = new Atualizar(this); Indicadores = new IndicadoresManutencao(AbaConfiguracoes.ConfiguracaoModel); atualizarModelBindingSource.DataSource = AbaAtualizacao.AtualizarModel; abaAtualizacaoBindingSource.DataSource = AbaAtualizacao; configuracaoModelBindingSource.DataSource = AbaConfiguracoes.ConfiguracaoModel; abaConfiguracoesBindingSource.DataSource = AbaConfiguracoes; Start(); }
private async void OnLoad() { AbaAtualizar = new AbaAtualizar(); AbaConfiguracoes = new AbaConfiguracoes(); Indicadores = new IndicadoresManutencao(AbaConfiguracoes.ConfiguracaoModel); _atualizarAsync = new Atualizar(this); LocalSistemaCommand = new DelegateCommand(OnLocalSistema); LocalPostgresCommand = new DelegateCommand(OnLocalPostgres); SalvarCommand = new DelegateCommand(OnSalvar); TestarConexaoCommand = new DelegateCommand(OnTestarConexao); AtualizarCommand = new DelegateCommand(OnAtualizarClick); AtualizarAfterCommand = new DelegateCommand(OnAtualizarAfter); IniciarCommand = new DelegateCommand(OnIniciar); PausarCommand = new DelegateCommand(OnPausar); LoginCommand = new DelegateCommand(OnLogin); CancelarLoginCommand = new DelegateCommand(OnCancelarLogin); DesbloquearCommand = new DelegateCommand(OnDesbloquear); BloquearCommand = new DelegateCommand(OnLogout); FecharCommand = new DelegateCommand(OnFechar, OnPodeFechar); MenuFecharCommand = new DelegateCommand(OnMenuFechar); SobreContentCommand = new DelegateCommand(OnSobre); InputSenha = AbaConfiguracoes.ConfiguracaoModel.Senha; var conexao = await OnTestarConexaoAsync(); if (conexao) { if (!Indicadores.EmManutencao && (Indicadores.FimManutencao || !Indicadores.FimManutencao)) { OnIniciar(); } else { OnAtualizar(false); } } }