Ejemplo n.º 1
0
        private void AddAnalyse_Click_1(object sender, EventArgs e)
        {
            AnalyseModel addmodel  = new AnalyseModel();
            DateModel    datemodel = new DateModel();

            datemodel.Day   = Program.Current_Date.Date;
            datemodel.Time += Program.Current_Date.TimeOfDay;

            addmodel.Date_Id = date.Add(datemodel);
            try
            {
                int selected = ListView.SelectedIndices[0];
                addmodel.Type_Id   = Analyse_Type.SelectedIndex + 1;
                addmodel.Client_Id = long.Parse(ListView.Items[selected].SubItems[0].Text);
                addmodel.Result    = long.Parse(ResultText.Text);
                addmodel.Coment    = Coment.Text;
                analyse.Add(addmodel);
                Coment.Clear();
                ResultText.Clear();
                MessageBox.Show("Данные внесены");
            }
            catch
            {
                MessageBox.Show("Некоторые поля не выбраны");
            }
        }
Ejemplo n.º 2
0
 private void ScanBarcode()
 {
     if (_loadedImage == null)
     {
         return;
     }
     if (_modifiedImage != null)
     {
         _modifiedImage.Dispose();
         _modifiedImage = null;
     }
     _modifiedImage     = AdjustSharpness(_loadedImage as Bitmap, (float)SharpnessTrack.Value / SharpnessTrack.Maximum);
     BarcodeImage.Image = _modifiedImage;
     using (ZBar.ImageScanner scanner = new ZBar.ImageScanner())
     {
         scanner.SetConfiguration(ZBar.SymbolType.None, ZBar.Config.XDensity, 3);
         scanner.SetConfiguration(ZBar.SymbolType.None, ZBar.Config.YDensity, 3);
         List <ZBar.Symbol> symbols = scanner.Scan(_modifiedImage);
         ResultText.Clear();
         foreach (ZBar.Symbol symbol in symbols)
         {
             if (ResultText.TextLength > 0)
             {
                 ResultText.Text += Environment.NewLine;
             }
             ResultText.Text += symbol.Data;
         }
     }
 }
Ejemplo n.º 3
0
 private void clearResultBtn_Click(object sender, EventArgs e)
 {
     ResultText.Clear();
 }
Ejemplo n.º 4
0
 public void MainBreak()
 {
     Result.SetActive(true);
     resultStar.CheckStar(EnemyBreakCount, NorumaCost);
     resultText.Clear(NorumaCost);
 }