Esempio n. 1
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            vl.AddChild(new Button("Swipe Horizontal Layout Screen", SwipeHorizontalLayoutScreen_OnClick));
            vl.AddChild(new Button("Swipe Vertical Layout Screen", SwipeVerticalLayoutScreen_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }
Esempio n. 2
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            _textEditText           = new EditText();
            _textEditText.CssClass  = "EditText";
            _textEditText.Text      = "PLEASE CHANGE MY TEXT";
            _textEditText.AutoFocus = true;

            _horizontalLine          = new HorizontalLine();
            _horizontalLine.Visible  = true;
            _horizontalLine.CssClass = "HorizontalLine";
            _horizontalLine.Id       = "ID Of Horizontal Line";

            _textView          = new TextView();
            _textView.Visible  = true;
            _textView.CssClass = "TextView";
            //_textView.Text = Translator.Translate("test");
            _textView.Text = "THIS IS TEST OF TEXTVIEW";
            _textView.Id   = "ID Of TextView";

            vl.AddChild(new Button("Change Css Of HL", ChangeCSSofHL_OnClick));
            vl.AddChild(_horizontalLine);
            vl.AddChild(new Button("Change Visibility Of HL", ChangeVisibilityOfHL_OnClick));
            vl.AddChild(new HorizontalLine());
            vl.AddChild(new Button("Change Css Of TextView", ChangeCssOfTextView_OnClick));
            vl.AddChild(_textView);
            vl.AddChild(new Button("Change Visibility Of TextView", ChangeVisibilityOfTextView_OnClick));
            vl.AddChild(new Button("Change Text Of TextView", ChangeTextOfTextView_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }
Esempio n. 3
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            vl.AddChild(new Button("Web View", WebView_OnClick));
            vl.AddChild(new Button("Web Map Google", WebMapGoogle_OnClick));
            vl.AddChild(new Button("Web Image", WebImage_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }
Esempio n. 4
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);


            _swipeVerticalLayout            = new SwipeVerticalLayout();
            _swipeVerticalLayout.Visible    = true;
            _swipeVerticalLayout.CssClass   = "SwipeVerticalLayout";
            _swipeVerticalLayout.Scrollable = true;
            _swipeVerticalLayout.OnSwipe   += SwipeIndex_OnSwipe;

            _verticalLayout          = new VerticalLayout();
            _verticalLayout.CssClass = "VlForSwipeVertical";


            _image          = new Image();
            _image.Source   = "Image\\cats.jpg";
            _image.Visible  = true;
            _image.CssClass = "ImageForSwipeVertical";

            _image2          = new Image();
            _image2.Source   = "Image\\cat2.jpg";
            _image2.Visible  = true;
            _image2.CssClass = "ImageForSwipeVertical";

            _image3          = new Image();
            _image3.Source   = "Image\\cat3.jpg";
            _image3.Visible  = true;
            _image3.CssClass = "ImageForSwipeVertical";

            _image4          = new Image();
            _image4.Source   = "Image\\cat4.jpg";
            _image4.Visible  = true;
            _image4.CssClass = "ImageForSwipeVertical";



            _verticalLayout.AddChild(_swipeVerticalLayout);

            vl.AddChild(new Button("Default alignment", AlignmentDefault_OnClick));
            vl.AddChild(new Button("Center alignment", AlignmentCenter_OnClick));
            vl.AddChild(new Button("Swipe To Third Image", SwipeToThird_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));

            _swipeVerticalLayout.AddChild(_image);
            _swipeVerticalLayout.AddChild(_image2);
            _swipeVerticalLayout.AddChild(_image3);
            _swipeVerticalLayout.AddChild(_image4);


            vl.AddChild(_verticalLayout);
        }
Esempio n. 5
0
        public override void OnLoading()
        {
            base.OnLoading();
            DConsole.WriteLine("OnLoading EventList");

            _tabBarComponent  = new TabBarComponent(this);
            _topInfoComponent = new TopInfoComponent(this)
            {
                LeftButtonControl = new Image {
                    Source = ResourceManager.GetImage("topheading_sync")
                },
                RightButtonControl = new Image {
                    Source = ResourceManager.GetImage("topheading_map")
                },
                Header = Translator.Translate("orders")
            };

            var statistic = DBHelper.GetEventsStatistic();

            var extraHorizontalLayout = new HorizontalLayout {
                CssClass = "ExtraHorizontalLayout"
            };
            var leftExtraLayout = new VerticalLayout {
                CssClass = "ExtraLeftLayoutCss"
            };
            var rightExtraLayout = new VerticalLayout {
                CssClass = "ExtraRightLayoutCss"
            };

            extraHorizontalLayout.AddChild(leftExtraLayout);
            extraHorizontalLayout.AddChild(rightExtraLayout);

            leftExtraLayout.AddChild(
                new TextView($"{statistic.DayCompleteAmout}/{statistic.DayTotalAmount}")
            {
                CssClass = "ExtraInfo"
            });
            leftExtraLayout.AddChild(new TextView(Translator.Translate("today"))
            {
                CssClass = "ButtonExtraInfo"
            });

            rightExtraLayout.AddChild(
                new TextView($"{statistic.MonthCompleteAmout}/{statistic.MonthTotalAmount}")
            {
                CssClass = "ExtraInfo"
            });
            rightExtraLayout.AddChild(new TextView(Translator.Translate("per_month"))
            {
                CssClass = "ButtonExtraInfo"
            });

            _topInfoComponent.ExtraLayout.AddChild(extraHorizontalLayout);
        }
Esempio n. 6
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            vl.AddChild(new Button("VerticalLayout", VerticalLayoutScreen_OnClick));
            vl.AddChild(new Button("HorizontalLayout", HorizontalLayoutScreen_OnClick));
            vl.AddChild(new Button("TestHorizontalLayoutScreen", TestHorizontalLayoutScreen_OnClick));
            vl.AddChild(new Button("DockLayout", DockLayoutScreen_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }
        private void Initialize()
        {
            vl = new VerticalLayout();
            AddChild(vl);


            vl.AddChild(new Button("ID", ID_OnClick));
            vl.AddChild(new Button("Stop GPS", StopGPS_OnClick));
            vl.AddChild(new Button("Start GPS", StartTracking_OnClick));
            vl.AddChild(new Button("Add Web Map Google", Add_WebMap_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);


            vl.AddChild(new Button("LastError", LastError_OnClick));
            vl.AddChild(new Button("Delete Private And Shared", Delete_OnClick));
            vl.AddChild(new Button("Sync shared + private", SyncSharedPrivate_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            _autoMemoEdit        = new MemoEdit();
            _defaultMemoEditt    = new MemoEdit();
            _numericMemoEdit     = new MemoEdit();
            _emailMemoEdit       = new MemoEdit();
            _urlMemoEdit         = new MemoEdit();
            _phoneMemoEdit       = new MemoEdit();
            _onGetFocusMemoEdit  = new MemoEdit();
            _onLostFocusMemoEdit = new MemoEdit();

            _autoMemoEdit.CssClass        = "MemoEdit";
            _defaultMemoEditt.CssClass    = "MemoEdit";
            _numericMemoEdit.CssClass     = "MemoEdit";
            _emailMemoEdit.CssClass       = "MemoEdit";
            _urlMemoEdit.CssClass         = "MemoEdit";
            _phoneMemoEdit.CssClass       = "MemoEdit";
            _onGetFocusMemoEdit.CssClass  = "MemoEdit";
            _onLostFocusMemoEdit.CssClass = "MemoEdit";

            _autoMemoEdit.Keyboard     = "auto";
            _defaultMemoEditt.Keyboard = "default";
            _numericMemoEdit.Keyboard  = "numeric";
            _emailMemoEdit.Keyboard    = "email";
            _urlMemoEdit.Keyboard      = "url";
            _phoneMemoEdit.Keyboard    = "phone";

            _autoMemoEdit.Text        = "Auto Memo Edit";
            _defaultMemoEditt.Text    = "Default Memo Edit";
            _numericMemoEdit.Text     = "Numeric Memo Edit";
            _emailMemoEdit.Text       = "Email Memo Edit";
            _urlMemoEdit.Text         = "Url Memo Edit";
            _phoneMemoEdit.Text       = "Phone Memo Edit";
            _onGetFocusMemoEdit.Text  = "Get Focus And Back To MemoEdit Screen";
            _onLostFocusMemoEdit.Text = "Lost Focus And Back To MemoEdit Screen";

//если вставить эту строку, невозможно будет перейти на экран
//            _phoneMemoEdit.OnChange += Back_OnClick;

            _onGetFocusMemoEdit.OnGetFocus   += Back_OnClick;
            _onLostFocusMemoEdit.OnLostFocus += Back_OnClick;

            vl.AddChild(_autoMemoEdit);
            vl.AddChild(_defaultMemoEditt);
            vl.AddChild(_numericMemoEdit);
            vl.AddChild(_emailMemoEdit);
            vl.AddChild(_urlMemoEdit);
            vl.AddChild(_phoneMemoEdit);
            vl.AddChild(_onGetFocusMemoEdit);
            vl.AddChild(_onLostFocusMemoEdit);
            vl.AddChild(new Button("Back", Back_OnClick));
        }
        public StoreScreen(Action <Store> HireAgentFunction, Action <Store> FireAgentFunction) : base()
        {
            Layout.PushLayout("storeScreen");
            this.HireAgentFunction = HireAgentFunction;
            this.FireAgentFunction = FireAgentFunction;

            Padding = new Point(10, 10);
            Margin  = 10;
            SetFixedSize(700, 500);

            VerticalLayout leftSide = new VerticalLayout();

            leftSide.SetFixedWidth(300);

            deliveredPizzas        = new KeyValueText("deliveredPizzas", "0");
            outStandingOrders      = new KeyValueText("outstandingOrders", "0");
            avgDeliveryTime        = new KeyValueText("avgDeliveryTime", "5");
            deliveryEmployeesCount = new KeyValueText("deliveryEmployees", "3");

            HorizontalLayout buttonsHor = new HorizontalLayout();
            Button           hireButton = new Button("hireEmployee");
            Button           fireButton = new Button("fireEmployee");

            hireButton.OnMouseClick = () => { HireAgentFunction(store); UpdateTexts(); };
            fireButton.OnMouseClick = () => { FireAgentFunction(store); UpdateTexts(); };
            buttonsHor.AddChild(hireButton, fireButton);

            lastWeeksIncome = new KeyValueText("lastWeekIncome", "0");

            costs              = new Text("costs");
            weeklyRent         = new KeyValueText("rent", "0");
            weeklyEmployeeWage = new KeyValueText("employees", "0");
            weeklyTotalCost    = new KeyValueText("total", "0");


            leftSide.AddChild(deliveryEmployeesCount);
            leftSide.AddChild(deliveredPizzas);
            leftSide.AddChild(outStandingOrders);
            leftSide.AddChild(avgDeliveryTime);
            leftSide.AddChild(buttonsHor);
            leftSide.AddChild(lastWeeksIncome);
            leftSide.AddChild(costs);
            leftSide.AddChild(weeklyRent);
            leftSide.AddChild(weeklyEmployeeWage);
            leftSide.AddChild(weeklyTotalCost);


            AddChild(leftSide);
            Layout.PopLayout("storeScreen");
        }
Esempio n. 11
0
        private void AddNewButton_OnClick(object sender, EventArgs e)
        {
            _newButton = new Button("My name is NewButton", Back_OnClick);
            var text = new EditText();

            text.Text = "New EditText";
            var image = new Image();

            image.Source = "Image\\cats.jpg";
            _vl.AddChild(_newButton);
            _vl.AddChild(text);
            _vl.AddChild(image);
            _vl.Refresh();
        }
Esempio n. 12
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);


            vl.AddChild(new Button("Test Dialog.Message Success", AddNewDialog_OnClick));
            vl.AddChild(new Button("Test Dialog", Dialog_OnClick));



            vl.AddChild(new Button("Back", Back_OnClick));
        }
Esempio n. 13
0
        public override void OnLoading()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            var btn = new Button();

            btn.Text     = "Make snapshot";
            btn.OnClick += btn_OnClick;

            vl.AddChild(btn);

            vl.AddChild(new Button("Back", back_OnClick));
        }
Esempio n. 14
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            _webView          = new WebView();
            _webView.CssClass = "WebView";
            _webView.Visible  = true;
            _webView.Url      = "https://youtube.com";



            vl.AddChild(_webView);
            vl.AddChild(new Button("Back", Back_OnClick));
        }
        private void CreateUI()
        {
            Point windowSizes = new Point(600, 400);

            Style.PushStyle("moneyPanel");
            Panel moneyPanel = new VerticalLayout().SetAnchor(AnchorX.Right, AnchorY.Top);

            moneyPanel.SetFixedWidth(300).SetLayoutSize(LayoutSize.FixedSize, LayoutSize.WrapContent);
            moneyPanel.sprite  = Style.sprites["panel"];
            moneyPanel.Padding = new Point(16, 8);
            moneyPanel.AddChild(new Text($"${simulator.playerCompany.displayMoney}").SetTextUpdateFunction(() => { return($"${simulator.playerCompany.displayMoney}"); }).SetAllignments(Allignment.Right, Allignment.Middle).SetFont(Style.fonts["textSmall"]).SetGetTranslation(false));

            uiCanvas.AddChild(moneyPanel);

            Style.PopStyle();
            Style.PushStyle("mainButtonPanel");

            Panel mainButtonPanel = new VerticalLayout().SetAnchor(AnchorX.Left, AnchorY.Bottom);

            mainButtonPanel.SetMargin(8).SetLayoutSize(LayoutSize.WrapContent, LayoutSize.WrapContent);
            mainButtonPanel.sprite  = Style.sprites["panel"];
            mainButtonPanel.Padding = new Point(8, 8);

            foreach (GameState gs in Enum.GetValues(typeof(GameState)))
            {
                GameState state = gs;
                Button    b     = new Button(state.ToString());
                b.OnMouseClick = () => ChangeGameState(state);
                mainButtonPanel.AddChild(b);
            }

            uiCanvas.AddChild(mainButtonPanel);

            Style.PopStyle();
            Style.PushStyle("storeScreen");

            playerStoreUIScreen = new StoreScreen(CreateAgent, FireAgent);
            Style.PushStyle("panelSpriteOn");
            playerStoreWindow = new Window(playerStoreUIScreen, "Store", uiCanvas).SetIsDraggable(false);
            playerStoreWindow.SetAnchor(AnchorX.Middle, AnchorY.Middle);
            playerStoreWindow.Close();
            Style.PopStyle("panelSpriteOn");
            uiCanvas.AddChild(playerStoreWindow);


            CitiesScreen citiesScreen = new CitiesScreen(windowSizes, simulator.cities);

            Style.PushStyle("panelSpriteOn");
            citiesWindow = new Window(citiesScreen, "Cities", uiCanvas).SetIsDraggable(false);
            citiesWindow.SetAnchor(AnchorX.Middle, AnchorY.Middle);
            citiesWindow.Close();
            Style.PopStyle("panelSpriteOn");
            uiCanvas.AddChild(citiesWindow);

            Style.PopStyle();

            uiCanvas.AddChild(CreateTimeControlls());

            uiCanvas.FinishCreation();
        }
Esempio n. 16
0
//        -------------------------------------------------------
        public override void OnLoading()
        {
            base.OnLoading();
            _tabBarComponent = new TabBarComponent(this);

            _leftButtonVerticalLayout =
                (VerticalLayout)GetControl("TopInfoLeftButton", true);

            _leftButtonVerticalLayout.AddChild(new Image
            {
                Source = ResourceManager.GetImage("fptr_errorlist")
            });

            _rightButtonVerticalLayout =
                (VerticalLayout)GetControl("TopInfoRightButton", true);

            _rightButtonVerticalLayout.AddChild(new Image
            {
                Source = ResourceManager.GetImage("fptr_settings")
            });

            B672E6Cf63784Ca9A44Eaa6024E0B11B();

            ChangeLayoutsAsync();
        }
Esempio n. 17
0
        private void GenerateChildren()
        {
            _rootLayout.ClearChildren();

            foreach (var fileName in AllFiles())
            {
                if (IsDone(fileName))
                {
                    _rootLayout.AddChild(new Label($"- DONE {fileName}", _assetManager.AbilityFontSmall, Color.Gray));
                }
                else
                {
                    _rootLayout.AddChild(new Label($"- TODO {fileName}", _assetManager.AbilityFontSmall, Color.White));
                }
            }
        }
        Panel CreateTimeControlls()
        {
            Style.PushStyle("timeBar");
            Style.PushStyle("panelSpriteOn");

            Layout.PushLayout("timeBar");
            Layout.PushLayout("timeBarPanel");
            VerticalLayout vertLayout = new VerticalLayout();

            Layout.PopLayout("timeBarPanel");

            Style.PopStyle("panelSpriteOn");

            HorizontalLayout time     = new HorizontalLayout();
            Text             week     = new Text($"Week: 111", false).SetTextUpdateFunction(() => { return($"{Texts.Get("week")}: {simulator.week}"); });
            Text             day      = new Text($"Week: 111", false).SetTextUpdateFunction(() => { return($"{Texts.Get("day")}: {simulator.day}"); });
            Text             progress = new Text($"Week: 111", false).SetTextUpdateFunction(() => { return($"{simulator.GetDayProgress().ToString("p1")}"); });

            time.AddChild(week, day, progress);
            vertLayout.AddChild(time);

            Style.PushStyle("speedControls");

            HorizontalLayout speedControlls = new HorizontalLayout();


            simSpeedButtons = new Button[] { new Button(Style.sprites["speedPaused"]),
                                             new Button(Style.sprites["speedNormalSel"]),
                                             new Button(Style.sprites["speedFast"]),
                                             new Button(Style.sprites["speedFaster"]) };

            for (int i = 0; i < 4; i++)
            {
                SimSpeed speed = (SimSpeed)i;
                simSpeedButtons[i].OnMouseClick = () => ChangeSimSpeed(speed);
                speedControlls.AddChild(simSpeedButtons[i]);
            }

            Layout.PopLayout("timeBar");

            Style.PopStyle("speedControls");
            Style.PopStyle("timeBar");

            vertLayout.AddChild(speedControlls);

            return(vertLayout);
        }
Esempio n. 19
0
        public override void OnLoading()
        {
            _tabBarComponent  = new TabBarComponent(this);
            _topInfoComponent = new TopInfoComponent(this)
            {
                LeftButtonControl = new Image {
                    Source = ResourceManager.GetImage("topheading_sync")
                },
                Header       = Translator.Translate("tenders"),
                ArrowVisible = false
            };

            var extraHorizontalLayout = new HorizontalLayout {
                CssClass = "ExtraHorizontalLayout"
            };
            var leftExtraLayout = new VerticalLayout {
                CssClass = "ExtraLeftLayoutCss"
            };
            var rightExtraLayout = new VerticalLayout {
                CssClass = "ExtraRightLayoutCss"
            };

            extraHorizontalLayout.AddChild(leftExtraLayout);
            extraHorizontalLayout.AddChild(rightExtraLayout);

            leftExtraLayout.AddChild(
                new TextView($"Новые")
            {
                CssClass = "ExtraInfo"
            });
            leftExtraLayout.AddChild(new TextView(Translator.Translate("new").ToLower())
            {
                CssClass = "ButtonExtraInfo"
            });

            rightExtraLayout.AddChild(
                new TextView($"В работе")
            {
                CssClass = "ExtraInfo"
            });
            rightExtraLayout.AddChild(new TextView(Translator.Translate("in_progress").ToLower())
            {
                CssClass = "ButtonExtraInfo"
            });

            _topInfoComponent.ExtraLayout.AddChild(extraHorizontalLayout);
        }
Esempio n. 20
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);
            //_webImage.Url = "http://goo.gl/muPIv2";
            _webImage          = new WebImage();
            _webImage.Visible  = true;
            _webImage.CssClass = "WebImage";
            _webImage.Id       = "ID Of Web Image";
            _webImage.UrlType  = "Absolute";

            _webImage.Url = "http://goo.gl/DqSUF7";

            vl.AddChild(_webImage);
            vl.AddChild(new Button("Back", Back_OnClick));
        }
Esempio n. 21
0
        private void Initialize()
        {
            _vl = new VerticalLayout();
            AddChild(_vl);


            var dialog = new Dialog();

            //dialog.Date();


            _invisibleButton = new Button {
                Text = "HIDE ME", Visible = false
            };
            _invisibleButton.OnClick += Visible_OnClick;

            _cssButton          = new Button();
            _cssButton.CssClass = "CssButton";
            _cssButton.Text     = "CssButton";
            _cssButton.OnClick += ChangeCssAndText_OnClick;
            _cssButton.Id       = "Id Of Invisible Button";

            _textButton          = new Button();
            _textButton.Text     = "TextButton";
            _textButton.OnClick += ChangeText_OnClick;

            _vl.AddChild(new Button("Unhide Button", Visible_OnClick));

            _vl.AddChild(_invisibleButton);
            _vl.AddChild(_cssButton);
            _vl.AddChild(_textButton);
            _vl.AddChild(new Button("Add New Button, EditText and Image", AddNewButton_OnClick));
            _vl.AddChild(new Button("Test Dialog", AddNewDialog_OnClick));
            _vl.AddChild(new Button("Back", Back_OnClick));
        }
Esempio n. 22
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            _mediaPlayer          = new MediaPlayer();
            _mediaPlayer.Visible  = true;
            _mediaPlayer.Id       = "Id Of MediaPlayer";
            _mediaPlayer.CssClass = "MediaPlayer";


            vl.AddChild(new TextView("YOU CAN SEE MEDIAPLAYER IN NEXT VERSION"));
            vl.AddChild(new Button("Play", Play_OnClick));
            vl.AddChild(new Button("Pause", Pause_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
            //vl.AddChild(_mediaPlayer);
        }
 private void Add_WebMap_OnClick(object sender, EventArgs e)
 {
     _webMapGoogle          = new WebMapGoogle();
     _webMapGoogle.Visible  = true;
     _webMapGoogle.CssClass = "WebMapGoogle";
     _webMapGoogle.Id       = "ID OF WEB MAP GOOGLE";
     _webMapGoogle.AddMarker("marker", GPS.CurrentLocation.Latitude, GPS.CurrentLocation.Longitude, "red");
     vl.AddChild(_webMapGoogle);
     vl.Refresh();
 }
Esempio n. 24
0
        private void Initialize()
        {
            var vl = new VerticalLayout();


            _image          = new Image();
            _image.Source   = "Image\\cats.jpg";
            _image.CssClass = "Image";
            _image.Id       = "ID Of Image";

            //poleviImage = new Image();
            //poleviImage.CssClass = "cats";

            vl.AddChild(new Button("INVISIBLE IMAGE", Visible_OnClick));
            vl.AddChild(new Button("Change CSS Image", ChangeCssImage_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
            vl.AddChild(_image);
            //vl.AddChild(poleviImage);
            //vl.OnClick += vl_OnClick;

            AddChild(vl);
        }
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            _vl2          = new VerticalLayout();
            _vl2.CssClass = "vl";
            _vl2.OnClick += Vl2_OnClick;
            _vl2.Id       = "ID Of Second Vertical Layout";

            _textView          = new TextView();
            _textView.Text     = "В онклик лейаута задана функция DoBack";
            _textView.CssClass = "CssTextView";

            vl.AddChild(new Button("Change Visibility Of VL2", ChangeVisibilityOfVL2_OnClick));
            vl.AddChild(new Button("Change CSS Of VL2", ChangeCSSofVL2_OnClick));
            vl.AddChild(_textView);
            vl.AddChild(new Button("Back", Back_OnClick));
            vl.AddChild(_vl2);
            _vl2.AddChild(new TextView("ALLOHA VL2"));
        }
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            _hl          = new HorizontalLayout();
            _hl.CssClass = "HorizontalLayout";
            _hl.OnClick += Hl_OnClick;
            _hl.Id       = "ID Of Horizontal Layout";

            _textView          = new TextView();
            _textView.Text     = "В онклик лейаута задана функция DoBack";
            _textView.CssClass = "CssTextView";

            vl.AddChild(new Button("Change Visibility Of HL2", ChangeVisibilityOfHL2_OnClick));
            vl.AddChild(new Button("Change CSS Of HL2", ChangeCSSofHL2_OnClick));
            vl.AddChild(_textView);
            vl.AddChild(new Button("Back", Back_OnClick));
            _hl.AddChild(new Button("BackHL", Back_OnClick));
            _hl.AddChild(new Button("BackHL2", Back_OnClick));
            vl.AddChild(_hl);
        }
Esempio n. 27
0
        private void BuildPopovers()
        {
            _popoverPadding = new Vector4(20, 10, 20, 10);

            {
                _messageBox = new VerticalLayout {
                    Renderer  = new ColorRenderer(Color.White),
                    Padding   = _popoverPadding,
                    SortOrder = Camera2D.SortUI + 1000,
                    Position  = new Vector2(500, 50)
                };

                _messageBoxLabel = _messageBox.AddChild(new Label("Message Box", _assetManager.Font));
                Entity.Scene.AddAndInitializeRootEntity(_messageBox, _assetManager);
            }
        }
Esempio n. 28
0
 private void AddIfNotEmpty(VerticalLayout verticalLayout, IWrappedControl3 control)
 {
     if (verticalLayout.Controls.Length == 0)
     {
         verticalLayout.AddChild(control);
     }
     if (LeftButtonControl == null || RightButtonControl == null)
     {
         return;
     }
     if (LeftButtonControl.GetType().Name == nameof(Image) && RightButtonControl.GetType().Name == nameof(Image))
     {
         _leftButton.CssClass  = "TopInfoButtonLeftWithPicOnly";
         _rightButton.CssClass = "TopInfoButtonRightWithPicOnly";
         _topInfoHeadingTextLayout.CssClass = "TopInfoHeadingTextLayoutWithPicOnly";
         DConsole.WriteLine("They are both images!");
     }
 }
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            text      = new TextView();
            text.Text = "89119901150";

            editText = new EditText();


            vl.AddChild(text);
            vl.AddChild(new Button("Make Call", Phone_OnClick));
            vl.AddChild(new Button("Camera MakeSnapshot", Camera_OnClick));
            vl.AddChild(editText);
            vl.AddChild(new Button("Copy To Clipboard", CopyToClipboard_OnClick));
            vl.AddChild(new Button("From Clipboard To Dconsole", FromClipboardToConsole_OnClick));
            vl.AddChild(new Button("Gallery", Gallery_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }
Esempio n. 30
0
        private void Initialize()
        {
            var vl = new VerticalLayout();

            AddChild(vl);

            _checkBoxTrue          = new CheckBox();
            _checkBoxTrue.Visible  = true;
            _checkBoxTrue.CssClass = "CheckBox";
            _checkBoxTrue.Checked  = true;

            _checkBoxFalse          = new CheckBox();
            _checkBoxFalse.Visible  = true;
            _checkBoxFalse.CssClass = "CheckBox";
            _checkBoxFalse.Checked  = false;

            _cssCheckBox          = new CheckBox();
            _cssCheckBox.CssClass = "CheckBox";
            _cssCheckBox.Id       = "Id Of Css CheckBox";

            _changeCssButton          = new Button();
            _changeCssButton.CssClass = "CssButton";
            _changeCssButton.Text     = "ChangeCssOfCheckBox";
            _changeCssButton.OnClick += ChangeCssCheckBox_OnClick;

            _invisibleCheckBox          = new CheckBox();
            _invisibleCheckBox.CssClass = "CheckBox";
            _invisibleCheckBox.Visible  = false;

            vl.AddChild(_checkBoxTrue);
            vl.AddChild(_checkBoxFalse);
            vl.AddChild(_changeCssButton);
            vl.AddChild(_cssCheckBox);
            vl.AddChild(new Button("Unhide CheckBox", Visible_OnClick));
            vl.AddChild(_invisibleCheckBox);
            vl.AddChild(new Button("Change Check Status", ChangeCheckStatus_OnClick));
            vl.AddChild(new Button("Back", Back_OnClick));
        }