Example #1
0
        public async void ValidateDialog()
        {
            if (this.FwPath != "" && File.Exists(this.FwPath))
            {
                try
                {
                    StringWriter sw = new StringWriter();
                    this.ValidateData = FwTools.Validate(this.FwPath, sw);
                    this.FwParseLog   = sw.ToString();
                    this.FwName       = Path.GetFileName(this.FwPath);
                }
                catch (Exception ex)
                {
                    this.ValidateData = new FwTools.FwInfo();
                    this.FwParseLog   = ex.GetExceptionMsg();
                }

                this.IsDialogOpen = true;
                await coordinator.ShowMetroDialogAsync(this, dialogValidate, dialogSettings);
            }
            else
            {
                MessageBox.Show(ERR1, "BSL430.NET", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
            this.IsDialogOpen = false;
        }
Example #2
0
        public void FirmwareValidate(TestData.Fw fw_paths)
        {
            foreach (TestData.Fw fw in fw_paths.GetFlags())
            {
                FwTools.FwInfo ret = FwTools.Validate(TestData.GetFwPath(fw));

                Assert.NotNull(ret);
                Assert.True(ret.SizeCode > 0);
            }
        }