public override void Run()
        {
            var form = new Form();
            var stackPanel = new StackPanel{
                Dock = DockStyle.Fill
            };
            form.Controls.Add(stackPanel) ;

            for(var i = 0; i < 50; i++)
            {
                var button = new ExButton(){
                    Text = Random.Name(),
                    Image = Random.Image16x16()
                };

                stackPanel.Controls.Add(button) ;

                var hyperlink = new ExHyperlink()
                {
                    Text = Random.Name(),
                    Image = Random.Image16x16()
                };

                stackPanel.Controls.Add(hyperlink) ;
            }

            form.ShowDialog();
        }
Exemple #2
0
    void Start()
    {
        AppVersion.text = Application.version;

        CommonHeaderMfn.Instance.SetView(false);

        //ニューロフィードバック
        btnNeuro = gameObject.FindDescendant("btn_NeuroFeedback").AddComponent <ExButton>();


        //BlueTooth
        btnBlueTooth = transform.Find("btn_Connect").GetComponent <Button>();


        BluetoothMgr.Instance.SetButton(btnBlueTooth);
        btnBlueTooth.onClick.AddListener(() => {
            BluetoothMgr.Instance.Bluetooth();
        });



        textDebug = gameObject.FindDescendant("DebugText").GetComponent <Text>();
        textDebug.gameObject.SetActive(false);

        btnNeuro.SetColor(Color.gray);


        /*
         * var txt_Title = transform.Find("txt_Title_NF").GetComponent<Text>();
         * txt_Title.text = ConstData.HeaderType[ConstData.EnumScene.Tr_TrainingNeuro].title; ;
         */
    }
Exemple #3
0
    // Start is called before the first frame update
    void Start()
    {
        CommonHeaderMfn.Instance.SetView(true);

        currentType = ContentType.SelfCheck;

        textTitle      = gameObject.FindDescendant("Text_LogTitle").GetComponent <Text>();
        textTitle.text = titleArray[(int)ContentType.Neuro];

        btnLeft  = gameObject.FindDescendant("Btn_arrowL").AddComponent <ExButton>();
        btnRight = gameObject.FindDescendant("Btn_arrowR").AddComponent <ExButton>();

        resultContentParents[(int)ContentType.Neuro]     = gameObject.FindDescendant("ResultContent_Neuro");
        resultContentParents[(int)ContentType.Heart]     = gameObject.FindDescendant("ResultContent_HeartRate");
        resultContentParents[(int)ContentType.Breath]    = gameObject.FindDescendant("ResultContent_Breath");
        resultContentParents[(int)ContentType.SelfCheck] = gameObject.FindDescendant("ResultContent_SelfCheck");

        scrollRects[(int)ContentType.Neuro]     = gameObject.FindDescendant <ScrollRect>("Scroll_View_Neuro");
        scrollRects[(int)ContentType.Heart]     = gameObject.FindDescendant <ScrollRect>("Scroll_View_HeartRate");
        scrollRects[(int)ContentType.Breath]    = gameObject.FindDescendant <ScrollRect>("Scroll_View_Breath");
        scrollRects[(int)ContentType.SelfCheck] = gameObject.FindDescendant <ScrollRect>("Scroll_View_Self");

        CreateContentsTab();
        ChangeContent(currentType);
    }
Exemple #4
0
    void Start()
    {
        CommonHeaderMfn.Instance.SetView(true);


        btnStart = gameObject.FindDescendant("Btn_Start").AddComponent <ExButton>();
    }
        public SelectView(List <string> list)
        {
            _list = list;

            _buttonHeight = Device.OnPlatform(50, 50, 100);
            _height       = _buttonHeight * list.Count;

            var stackLayout = new StackLayout {
                Spacing = 0,
            };

            for (var i = 0; i < list.Count; i++)
            {
                var button = new ExButton(Alignment.Left);
                button.HeightRequest = _buttonHeight;
                _buttons.Add(button);
                stackLayout.Children.Add(button);
                subViews.Add(button);
                button.Clicked += (s, e) => {
                    Index  = _buttons.IndexOf((ExButton)s);
                    Expand = false;
                };
            }
            Index   = 0;
            Content = stackLayout;
        }
Exemple #6
0
        public MainPage()
        {
            BackgroundColor = Color.FromHex("#0b87a8");
            var BackGroundImage_ = new ImageUpload("arkaplan")
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
            };

            var UserPanel = new ExButton("icon_user")
            {
                TappedCommand = UserCommand
            };
            var QrPanel = new ExButton("icon_qr")
            {
                TappedCommand = ScannerCommand
            };
            var StFirst = new ExStackLayout();

            StFirst.Children.Add(UserPanel);
            StFirst.Children.Add(QrPanel);

            var ListeningPanel = new ExButton("icon_music")
            {
                TappedCommand = InsertFirebaseCommand
            };
            var ReadingPanel = new ExButton("icon_reading")
            {
                TappedCommand = ReadingCommand
            };
            var StSecond = new ExStackLayout();

            StSecond.Children.Add(ListeningPanel);
            StSecond.Children.Add(ReadingPanel);

            var ExContent = new StackLayout()
            {
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand,

                Children =
                {
                    StFirst,
                    StSecond
                }
            };

            var ExGridContent = new ExGrid();

            ExGridContent.Children.Add(BackGroundImage_, 0, 0);
            ExGridContent.Children.Add(ExContent, 0, 0);

            Content = ExGridContent;
        }
Exemple #7
0
        // セル内で拡張ビューを広げたり閉じたりするボタン
        Button CreateButton(string title)
        {
            var button = new ExButton(Alignment.Right)
            {
                Text              = title + " > ",
                HeightRequest     = Device.OnPlatform(50, 50, 80),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                TextColor         = Color.Silver,
            };

            return(button);
        }
Exemple #8
0
        static void Main()
        {
            CreateRes();

            //读入主题包
            byte[] theme = File.ReadAllBytes(".\\Default.ext");

            theApp = new ExApp(theme);
            skin   = new ExSkin(null, null, "你好世界", 0, 0, 600, 400,
                                EWS_BUTTON_CLOSE | EWS_BUTTON_MIN | EWS_CENTERWINDOW | EWS_HASICON |
                                EWS_TITLE | EWS_MOVEABLE | EWS_MAINWINDOW, 0, 0, 0, WndProc
                                );

            if (skin.Validate)
            {
                TestCustomCtrl.RegisterControl();
                //设置背景色
                skin.SetLong(EWL_CRBKG, Color.Blue.ToArgb());

                //ExBaseCtrl ctrl1 = new ExBaseCtrl(skin, "Button", "你好", 50, 50, 200, 35);
                ExButton btn1 = new ExButton(skin, "你好", 50, 50, 150, 40);

                byte[]   img  = File.ReadAllBytes(".\\Res\\bkg.png");
                ExStatic img1 = new ExStatic(skin, img, 50, 110, 300, 200);
                img1.SetBackgroundPlayState(true, false, false);

                ExEdit edit1 = new ExEdit(img1, "测试", 25, 25, 100, 30);

                TestCustomCtrl custom = new TestCustomCtrl(skin, "abc", 360, 110, 50, 50);


                //挂接事件
                btn1.HandleEvent(NM_CLICK,
                                 //lambda delegate
                                 (IntPtr hObj, int nID, int nCode, int wParam, int lParam) =>
                {
                    ExMessageBox.Show(new ExControl(hObj), "单击按钮" + skin.Text, btn1.ClassName, MB_ICONINFORMATION, 0);

                    btn1.Text = "测试";

                    return(false);
                }
                                 );

                //显示
                skin.Visible = true;

                //运行程序
                theApp.Run();
            }
        }