summaryrefslogtreecommitdiff
path: root/Gestor.Application/Views/Generic/ErrorWindow.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
commit1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch)
treee1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Gestor.Application/Views/Generic/ErrorWindow.cs
parent674ca83ba9243a9e95a7568c797668dab6aee26a (diff)
downloadgestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz
gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip
chore: location
Diffstat (limited to 'Gestor.Application/Views/Generic/ErrorWindow.cs')
-rw-r--r--Gestor.Application/Views/Generic/ErrorWindow.cs101
1 files changed, 0 insertions, 101 deletions
diff --git a/Gestor.Application/Views/Generic/ErrorWindow.cs b/Gestor.Application/Views/Generic/ErrorWindow.cs
deleted file mode 100644
index e1b7df0..0000000
--- a/Gestor.Application/Views/Generic/ErrorWindow.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using Gestor.Application.Helpers;
-using Gestor.Common.Validation;
-using Gestor.Model.API;
-using System;
-using System.CodeDom.Compiler;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Reflection;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Markup;
-
-namespace Gestor.Application.Views.Generic
-{
- public class ErrorWindow : Window, IComponentConnector
- {
- internal TextBlock DescricaoErro;
-
- internal RepeatButton ContinuarButton;
-
- private bool _contentLoaded;
-
- public ErrorWindow(TipoErro tipo, bool fecharSistema = false)
- {
- this.InitializeComponent();
- this.HanddleErro(tipo);
- if (fecharSistema)
- {
- this.ContinuarButton.Visibility = System.Windows.Visibility.Collapsed;
- }
- }
-
- private void ContinuarButton_OnClick(object sender, RoutedEventArgs e)
- {
- base.Close();
- }
-
- private void HanddleErro(TipoErro tipo)
- {
- this.DescricaoErro.Text = ValidationHelper.GetCategory(tipo);
- if (tipo != 3)
- {
- this.ContinuarButton.Visibility = System.Windows.Visibility.Visible;
- return;
- }
- this.ContinuarButton.Visibility = System.Windows.Visibility.Collapsed;
- }
-
- [DebuggerNonUserCode]
- [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
- public void InitializeComponent()
- {
- if (this._contentLoaded)
- {
- return;
- }
- this._contentLoaded = true;
- System.Windows.Application.LoadComponent(this, new Uri("/Gestor.Application;component/views/generic/errorwindow.xaml", UriKind.Relative));
- }
-
- private void Reiniciar_OnClick(object sender, RoutedEventArgs e)
- {
- this.Shutdown();
- }
-
- private void Shutdown()
- {
- Instancia.ExcluirCfg();
- Process.Start(System.Windows.Application.ResourceAssembly.Location, (ApplicationHelper.Conectado ? "INICIAR CONECTADO" : "INICIAR"));
- System.Windows.Application.Current.Shutdown();
- }
-
- [DebuggerNonUserCode]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
- void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
- {
- switch (connectionId)
- {
- case 1:
- {
- this.DescricaoErro = (TextBlock)target;
- return;
- }
- case 2:
- {
- this.ContinuarButton = (RepeatButton)target;
- this.ContinuarButton.Click += new RoutedEventHandler(this.ContinuarButton_OnClick);
- return;
- }
- case 3:
- {
- ((RepeatButton)target).Click += new RoutedEventHandler(this.Reiniciar_OnClick);
- return;
- }
- }
- this._contentLoaded = true;
- }
- }
-} \ No newline at end of file