Пример #1
0
 private void Recived_NewTube()
 {
     Connection connection = new Connection();
     mainWindow.New_Tube();
     if ((mainWindow.Parameters.Count == 12) && (mainWindow.Parameters2.Count == 1))
     {
         Write_NewTube write_newTube = new Write_NewTube();
         try
         {
             write_newTube.DoIt(buffForRead, bufferRecive);
         }
         catch (Exception ex)
         {
             Console.WriteLine("========================================");
             Console.WriteLine("Write.cs");
             Console.WriteLine("Recived_NewTube()  :  " + DateTime.Now.ToString());
             Console.WriteLine("Error write bd:");
             Console.WriteLine(ex.ToString());
         }
         write_newTube = null;
     }
     else
     {
         Console.WriteLine("========================================");
         Console.WriteLine("Write.cs");
         Console.WriteLine("Recived_NewTube()  :  " + DateTime.Now.ToString());
         Console.WriteLine("Ошибка количества параметров");
     }
     bufferRecive.Clear();
     //out
     {
         int last = mainWindow.parAdvn.GetDb_Last_NumberTube();
         mainWindow.Dispatcher.Invoke(new ThreadStart(delegate
         {
             mainWindow.lblinfo6.Content = "Пройдено труб:\t\t " + last;
         }));
     }
     connection = null;
 }
Пример #2
0
        public void TestMethod1()
        {
            ac = new ArchiveControl();
            MainWindow.ac_m = ac;
            wnt = new Write_NewTube();
            cc = new CollectClass();

            ac._countLastIndex = wnt.lastIndex_defectsdata();
            for (int i = 0; i < 50; i++)
            {
                cc.Cyears(_countYears);
                cc.Cdyears(_countDefectsYears);
                cc.Cmonths(_countMonths);
                cc.Cdmonths(_countDefectsMonths);
                cc.Cdays(_countDays);
                cc.Cddays(_countDefectsDays);
                cc.Csmens(_countSmens);
                cc.Cdsmens(_countDefectsSmens);
                cc.Cparts(_countParts);
                cc.cdparts(_countDefectsParts);
            }
        }