Exemplo n.º 1
0
        private void downButton_click(object sender, EventArgs e)
        {
            //Console.WriteLine("btn with:{0}, height:{1}, letf:{2}, up:{3}", downButton.Width, downButton.Height, downButton.Left, downButton.Top);
            EventListView f = new EventListView(DriverEvent);

            f.Show();
        }
        private void showKernelLogButton_Click(object sender, EventArgs e)
        {
            if (kernelLogPath == null || timeTobeSertch == null || wlanLog.Count == 0)
            {
                return;
            }

            //String CMD = "\"" + WelcomeForm.uePath + "\" \"" + kernelLogPath + "\" -f" + wlanLog[lineIndex];
            //String CMD = "\"" + WelcomeForm.uePath + "\" \"" + kernelLogPath + "\"";
            //Console.WriteLine("CMD:" + CMD);
            //MessageBox.Show(CMD, "CMD", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            EventListView.Execute("\"" + WelcomeForm.uePath + "\"", "\"" + kernelLogPath + " -f" + wlanLog[lineIndex] + "\"");
        }
 //listview 点击事件
 private void listView1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.listView1.FocusedItem != null)//这个if必须的,不然会得到值但会报错
     {
         //MessageBox.Show(this.listView1.FocusedItem.SubItems[0].Text);
         String tmp = this.listView1.FocusedItem.SubItems[0].Text;//获得的listView的值显示在文本框里
         Console.WriteLine("打开 " + WelcomeForm.logFileName + " 行:" + tmp);
         if (WelcomeForm.logFileName != null)
         {
             //String CMD =WelcomeForm.uePath + " " +  WelcomeForm.logFileName + " -l" + tmp;
             //Console.WriteLine("CMD:" + CMD);
             //MessageBox.Show(CMD, "CMD", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             EventListView.Execute("\"" + WelcomeForm.uePath + "\"", "\"" + WelcomeForm.logFileName + " -l" + tmp + "\"");
         }
     }
 }
Exemplo n.º 4
0
        private void startButton_Click(object sender, EventArgs e)
        {
            List <logcatInfo> logCheckes = new List <logcatInfo>();

            for (int i = 0; i < this.listView1.Items.Count; i++)
            //for (int i = 0; i < this.logcatList.Count; i++)
            {
                if (this.listView1.Items[i].Checked)
                {
                    logCheckes.Add(logcatList[i]);
                }
            }
            //利用list 中 sort排序, 自定义排序方法
            logCheckes.Sort(Compare);
            CombineFile(logCheckes, WelcomeForm.logDirPath + "\\LOGANALYSIS");

            for (int i = 0; i < logCheckes.Count; i++)
            {
                Console.WriteLine(logCheckes[i].name + "----" + logCheckes[i].startTime);
            }

            WelcomeForm.logFileName = WelcomeForm.logDirPath + "\\LOGANALYSIS";
            //分析log,打开新窗口
            LOGDLL.LogResult[] myLog = LOGDLL.Analysis(WelcomeForm.logDirPath + "\\LOGANALYSIS");
            Form logAnalysisForm     = new LogAnalysis(myLog);

            logAnalysisForm.Show();
            this.Close();


            //处理kernel log
            String kernelLogPath = Utils.IOHelper.FindFileInDir(WelcomeForm.logDirPath, "dmesglog");

            //EventListView.Execute(Application.StartupPath + @"\dmesgtime.exe " + "\"" + kernelLogPath + "\"" + " 1", 1);
            EventListView.Execute("dmesgtime.exe", "\"" + kernelLogPath + "\" 1");
        }
 private void upButton_click(object sender, EventArgs e)
 {
     //Console.WriteLine("btn with:{0}, height:{1}, letf:{2}, up:{3}", upButton.Width, upButton.Height, upButton.Left, upButton.Top);
     EventListView f = new EventListView(HalEvent);
     f.Show();
 }