public WatchItemNamePage()
        {
            InitializeComponent();

            // Only Tizen is supported to set the style in VisualElement(Button).
            // API Spec: https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.platformconfiguration.tizenspecific.buttonstyle?view=xamarin-forms
            BottomButton.On <Tizen>().SetStyle(ButtonStyle.Bottom);
        }
        internal new void Initialize(GraphicsDeviceManager Graphics)
        {
            base.Initialize(Graphics);

            TopButton.Initialize(Graphics);
            BottomButton.Initialize(Graphics);

            verticalSlider.Initialize(Graphics);
        }
        internal new void LoadContent(string StyleFilePath, string VerticalScrollbarNodeNameInXml)
        {
            base.LoadContent(StyleFilePath, VerticalScrollbarNodeNameInXml);

            TopButton.LoadContent(StyleFilePath, VerticalScrollbarNodeNameInXml + "/TopButton");
            BottomButton.LoadContent(StyleFilePath, VerticalScrollbarNodeNameInXml + "/BottomButton");

            verticalSlider.LoadContent(StyleFilePath, VerticalScrollbarNodeNameInXml + "/SliderStyle");
        }
        internal new void Draw()
        {
            base.Draw();

            TopButton.Draw();
            BottomButton.Draw();

            verticalSlider.Draw();
        }
        internal new void UpdateOnce(SpriteBatch spriteBatch)
        {
            base.UpdateOnce(spriteBatch);

            verticalSlider.CalculatePixelsToScroll = true;

            TopButton.UpdateOnce(spriteBatch);
            BottomButton.UpdateOnce(spriteBatch);
            verticalSlider.UpdateOnce(spriteBatch);
        }
        internal new void Update(GameTime gameTime)
        {
            UpdateDimantions();

            TopButton.Update(gameTime);
            BottomButton.Update(gameTime);
            verticalSlider.Update(gameTime);

            base.Update(gameTime);
        }
示例#7
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);
            MainMenu.dngNav.SetNavigationBarHidden(true, true);
            RoomImage.Image = rc.Image;
            TopButton.SetTitle(TopButtonDuty.ToString(), UIControlState.Normal);
            BottomButton.SetTitle(BottomButtonDuty.ToString(), UIControlState.Normal);
            RightButton.SetTitle(RightButtonDuty.ToString(), UIControlState.Normal);
            LeftButton.SetTitle(LeftButtonDuty.ToString(), UIControlState.Normal);


            base.ViewDidAppear(animated);
        }
示例#8
0
        void UpdateButton()
        {
            _bottomButton?.Hide();

            if (BottomButton != null)
            {
                _bottomButton = new ElmSharp.Button(_popUp)
                {
                    WeightX = 1.0,
                    WeightY = 1.0,
                    Style   = "bottom"
                };

                if (!string.IsNullOrEmpty(BottomButton.Text))
                {
                    _bottomButton.Text = BottomButton.Text;
                }

                if (BottomButton.Icon != null)
                {
                    var iconPath = BottomButton.Icon.File;
                    if (!string.IsNullOrEmpty(iconPath))
                    {
                        var buttonImage = new ElmSharp.Image(_bottomButton);
                        buttonImage.LoadAsync(ResourcePath.GetPath(iconPath));
                        buttonImage.Show();
                        _bottomButton.SetPartContent("elm.swallow.content", buttonImage);
                    }
                }

                _bottomButton.Clicked += (s, e) =>
                {
                    BottomButton.Activate();
                };

                if (_buttonBgColor != Color.Default)
                {
                    Console.WriteLine($"InformationPopup set button background color:{_buttonBgColor.ToNative()}");
                    _bottomButton.BackgroundColor = _buttonBgColor.ToNative();
                }
            }
            else
            {
                _bottomButton = null;
            }

            _popUp.SetPartContent("button1", _bottomButton);
        }
示例#9
0
        void ReleaseDesignerOutlets()
        {
            if (BottomButton != null)
            {
                BottomButton.Dispose();
                BottomButton = null;
            }

            if (LeftButton != null)
            {
                LeftButton.Dispose();
                LeftButton = null;
            }

            if (OkLootButton != null)
            {
                OkLootButton.Dispose();
                OkLootButton = null;
            }

            if (RightButton != null)
            {
                RightButton.Dispose();
                RightButton = null;
            }

            if (RoomImage != null)
            {
                RoomImage.Dispose();
                RoomImage = null;
            }

            if (TopButton != null)
            {
                TopButton.Dispose();
                TopButton = null;
            }

            if (TreasureFoundLabel != null)
            {
                TreasureFoundLabel.Dispose();
                TreasureFoundLabel = null;
            }
        }
示例#10
0
        void UpdateButton()
        {
            _bottomButton?.Hide();

            if (BottomButton != null)
            {
                _bottomButton = new ElmSharp.Button(_popUp)
                {
                    WeightX = 1.0,
                    WeightY = 1.0,
                    Style   = "bottom"
                };

                if (!string.IsNullOrEmpty(BottomButton.Text))
                {
                    _bottomButton.Text = BottomButton.Text;
                }

                if (BottomButton.Icon != null)
                {
                    var iconPath = BottomButton.Icon.File;
                    if (!string.IsNullOrEmpty(iconPath))
                    {
                        var buttonImage = new ElmSharp.Image(_bottomButton);
                        buttonImage.LoadAsync(ResourcePath.GetPath(iconPath));
                        buttonImage.Show();
                        _bottomButton.SetPartContent("elm.swallow.content", buttonImage);
                    }
                }

                _bottomButton.Clicked += (s, e) =>
                {
                    BottomButton.Activate();
                };
            }
            else
            {
                _bottomButton = null;
            }

            _popUp.SetPartContent("button1", _bottomButton);
        }
 public void OnButtonPress(BottomButton button)
 {
     Events.instance.Raise(new ButtonPressEvent(button.Element));
 }
示例#12
0
 public BottomButtonView(BottomButton bottomButton)
 {
     InitializeComponent();
     DataContext  = this;
     BottomButton = bottomButton;
 }