public MainWindow()
 {
     log_file = new System.IO.FileStream("log3.txt", System.IO.FileMode.Append);
     log_sw = new System.IO.StreamWriter(log_file);
     InitializeComponent();
     ac_m = new ArchiveControl();
     Console.SetOut(log_sw);
     _LogTimer.Interval = System.TimeSpan.FromSeconds(5);
     _LogTimer.Tick += flushLog;
     _LogTimer.Start();
     Console.WriteLine("========================================");
     Console.WriteLine("MainWindow()");
     Console.WriteLine(DateTime.Now.ToString());
     log_sw.Flush();
     write.mainWindow = this;
     try
     {
         button_NP_Click(null, null);
         button_NS_Click(null, null);
     } catch { }
     TabItem1.Visibility = Visibility.Hidden;
     TabItem2.Visibility = Visibility.Hidden;
     TabItem3.Visibility = Visibility.Hidden;
     TabItem4.Visibility = Visibility.Hidden;
     //
     mainWindow = this;
     ac_m.count();
 }
Exemple #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);
            }
        }