コード例 #1
0
ファイル: frmMain.cs プロジェクト: jerry0914/usi_shd1_tools
 public frmMain()
 {
     InitializeComponent();
     this.Text                   = Title + " - V" + Version.ToString(3);
     currentTestModeItem         = dUT1ToDUT2ToolStripMenuItem;
     deviceList                  = new List <AdbDeviceInfomation>();
     Logger.LiveLogEventHandler += new EventHandler <LoggerLiveMessageEventArgs>(liveLogMessageEventHandler);
     Logger.LogLevel             = Logger.LogLevels.Verbose;
     startDevicesMonitor();
     //if (ucDUT == null)
     //{
     //    ucDUT = new ucDutTelephonyAutomation(this);
     //}
     if (uc8960 == null)
     {
         uc8960 = new uc8960TelephonyAutomation(this);
     }
     menuTestMode_Clicked(_8960toDUTToolStripMenuItem, new EventArgs());
 }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: jerry0914/usi_shd1_tools
        private void menuTestMode_Clicked(object sender, EventArgs e)
        {
            ToolStripMenuItem item   = sender as ToolStripMenuItem;
            UserControl       usrctl = null;

            currentTestModeItem = item;
            foreach (ToolStripMenuItem tsmi in testModeToolStripMenuItem.DropDownItems)
            {
                tsmi.Checked = false;
            }
            item.Checked = true;
            switch (item.Name)
            {
            case "dUT1ToDUT2ToolStripMenuItem":
                //if (ucDUT == null)
                //{
                //    ucDUT = new ucDutTelephonyAutomation(this);
                //}
                //usrctl = ucDUT;
                break;

            case "_8960toDUTToolStripMenuItem":
                if (uc8960 == null)
                {
                    uc8960 = new uc8960TelephonyAutomation(this);
                }
                usrctl = uc8960;
                break;

            default:
                break;
            }
            if (usrctl != null)
            {
                pnlMain.Controls.Clear();
                pnlMain.Controls.Add(usrctl);
                usrctl.Dock = DockStyle.Fill;
                usrctl.Show();
            }
        }