コード例 #1
0
        private void initTabs()
        {
            UserControls.TabControl tC = new UserControls.TabControl(this, new PsychoPy());
            tC.setTestLogo(@"\Images\Psychopy.png");
            tabPsy.Content = tC;
            tC.TabItem     = tabPsy;
            tabControls.Add(tC);
            tabPsy.Header = new TextBlock
            {
                Text = tabPsy.Header.ToString(),
            };

            UserControls.TabControl tC2 = new UserControls.TabControl(this, new EPrime());
            tC2.setTestLogo(@"\Images\eprime.png");
            tabEPrime.Content = tC2;
            tC2.TabItem       = tabEPrime;
            tabControls.Add(tC2);
            tabEPrime.Header = new TextBlock
            {
                Text = tabEPrime.Header.ToString(),
            };

            UserControls.TabControl tC3 = new UserControls.TabControl(this, new ZTree());
            tC3.setTestLogo(@"\Images\ztree.png");
            tabZTree.Content = tC3;
            tC3.TabItem      = tabZTree;
            tabControls.Add(tC3);
            tabZTree.Header = new TextBlock
            {
                Text = tabZTree.Header.ToString(),
            };

            ((Button)tC3.FindName("btnRun")).Content          = "Run Leaves";
            ((Button)tC3.FindName("btnBrowse")).Visibility    = Visibility.Hidden;
            ((TextBlock)tC3.FindName("txbBrowse")).Visibility = Visibility.Hidden;
            ((CheckBox)tC3.FindName("cbxCopyAll")).Visibility = Visibility.Hidden;

            UserControls.ChromeTab tC4 = new UserControls.ChromeTab(this);
            tC4.setTestLogo(@"\Images\chrome-logo.png");
            tabChrome.Content = tC4;
            tC4.TabItem       = tabChrome;
            tabControls.Add(tC4);
            tabChrome.Header = new TextBlock
            {
                Text = tabChrome.Header.ToString(),
            };

            UserControls.CustomRun tC5 = new UserControls.CustomRun(this, this.clients);
            tabCustom.Content = tC5;
            tC5.TabItem       = tabCustom;
            tabControls.Add(tC5);
            tabCustom.Header = new TextBlock
            {
                Text = tabCustom.Header.ToString(),
            };
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: cobelab/LabRun
        private void InitTabs()
        {
            var tC = new TabControl(this, new PsychoPy());
            tC.setTestLogo(@"\Images\Psychopy.png");
            tabPsy.Content = tC;
            tC.TabItem = tabPsy;
            tabControls.Add(tC);
            tabPsy.Header = new TextBlock
            {
                Text = tabPsy.Header.ToString()
            };

            var tC2 = new TabControl(this, new EPrime());
            tC2.setTestLogo(@"\Images\eprime.png");
            tabEPrime.Content = tC2;
            tC2.TabItem = tabEPrime;
            tabControls.Add(tC2);
            tabEPrime.Header = new TextBlock
            {
                Text = tabEPrime.Header.ToString()
            };

            var tC3 = new TabControl(this, new ZTree());
            tC3.setTestLogo(@"\Images\ztree.png");
            tabZTree.Content = tC3;
            tC3.TabItem = tabZTree;
            tabControls.Add(tC3);
            tabZTree.Header = new TextBlock
            {
                Text = tabZTree.Header.ToString()
            };

            ((Button) tC3.FindName("btnRun")).Content = "Run Leaves";
            ((Button) tC3.FindName("btnBrowse")).Visibility = Visibility.Hidden;
            ((TextBlock) tC3.FindName("txbBrowse")).Visibility = Visibility.Hidden;
            ((CheckBox) tC3.FindName("cbxCopyAll")).Visibility = Visibility.Hidden;

            var tC4 = new ChromeTab(this);
            tC4.setTestLogo(@"\Images\chrome-logo.png");
            tabChrome.Content = tC4;
            tC4.TabItem = tabChrome;
            tabControls.Add(tC4);
            tabChrome.Header = new TextBlock
            {
                Text = tabChrome.Header.ToString()
            };

            var tC5 = new CustomRun(this, clients);
            tabCustom.Content = tC5;
            tC5.TabItem = tabCustom;
            tabControls.Add(tC5);
            tabCustom.Header = new TextBlock
            {
                Text = tabCustom.Header.ToString()
            };
        }