public bool QualityCheck()
 {
     if (cmbFixtures.SelectedIndex == -1 && txtFixture.Text.Trim().Length == 0)
     {
         MessageBox.Show("请输入一个治具型号!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
         return(false);
     }
     if (Operation == WindowOperation.Add && SQliteDbContext.CheckFixturetype((App.Current.Resources["Locator"] as ViewModelLocator).ExcelPaper.Fixture.FixtureType))
     {
         MessageBox.Show("治具型号不能重复!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
         return(false);
     }
     if (imagetxt.Text.Trim().Length == 0)
     {
         MessageBox.Show("请导入图片!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
         return(false);
     }
     if (this.ledAddr.Text.Trim().Length == 0)
     {
         MessageBox.Show("请输入LED地址!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
         ledAddr.Focus();
         return(false);
     }
     if (!IsNumber(this.ledAddr.Text.Trim()))
     {
         MessageBox.Show("LED地址只能为整数!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
         ledAddr.Focus();
         return(false);
     }
     if (Operation == WindowOperation.Add && SQliteDbContext.CheckLEDAddress(ledAddr.Text.Trim()))
     {
         MessageBox.Show("LED地址不能重复!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
         ledAddr.Focus();
         return(false);
     }
     if (Operation == WindowOperation.Update && templed != ledAddr.Text)
     {
         if (SQliteDbContext.CheckLEDAddress(ledAddr.Text.Trim()))
         {
             MessageBox.Show("LED地址不能重复!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
             ledAddr.Focus();
             return(false);
         }
     }
     return(true);
 }