Exemplo n.º 1
0
        public MainWindow()
        {
            Switcher.Initialize(this);
            InitializeComponent();
            CheckRunningApp();

            try
            {
                var data     = new HandleFile();
                var dataInfo = data.Load <DataInfo>();
                DataInfo = dataInfo ?? new DataInfo();
            }
            catch (Exception ex)
            {
                var _ = new Error(ex);
                DataInfo = new DataInfo();
            }

            Switcher.Switch(new MainPage(DataInfo));
        }
Exemplo n.º 2
0
        public Error(Exception exception, bool recursion = false)
        {
            var handleFile = new HandleFile();

            _exception = exception;

            var appendedMessage = "";

            if (Verify())
            {
                appendedMessage = SendError() ? "\nError log sent" : "\nFailed to send error log";
            }
            else
            {
                appendedMessage = "\nUser cancelled";
            }
            if (!recursion)
            {
                handleFile.Save(exception.Message + appendedMessage);
            }
        }
Exemplo n.º 3
0
        public MainWindow()
        {
            try
            {
                var data     = new HandleFile();
                var dataInfo = data.Load <DataInfo>();
                UserInfo = dataInfo.UserInfo;
                Form     = dataInfo.Form;
            }
            catch (Exception ex)
            {
                var _ = new Error(ex);
            }

            InitializeComponent();
            SwitchScreen(3);
            DeviceNameLabel.Content = Environment.MachineName;
            _startingHead           = HeaderField.Text;
            _startingBody           = BodyField.Text;
            CheckRunningApp();
            SwitchScreen(1);
        }