Exemplo n.º 1
0
        public void SetBadgeNumber(int i)
        {
            if (i > 999)
            {
                number.Text = "999+";
            }
            else
            {
                number.Text = "" + i;
            }

            if (i < 10)
            {
                ResourceUrl = CommonResource.GetResourcePath() + "bg_2.9.png";
            }
            else if (i < 99)
            {
                ResourceUrl = CommonResource.GetResourcePath() + "bg_2.9.png";
            }
            else
            {
                ResourceUrl = CommonResource.GetResourcePath() + "bg_3.9.png";
            }
            Color = new Color(1.0f, 0.4f, 0.0f, 1.0f);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new instance of a RotaryDeleteBadege.
 /// </summary>
 public RotaryBadege(int res)
 {
     ParentOrigin           = Tizen.NUI.ParentOrigin.Center;
     PivotPoint             = Tizen.NUI.PivotPoint.Center;
     PositionUsesPivotPoint = true;
     if (res == 0)
     {
         ResourceUrl = CommonResource.GetResourcePath() + "b_home_badge_delete_icon.png";
     }
     else if (res == 1)
     {
         ResourceUrl = CommonResource.GetResourcePath() + "Rectangle_12.svg";
         number      = new TextLabel()
         {
             Size                   = new Size(30, 30),
             TextColor              = Color.White,
             PointSize              = 4.0f,
             HorizontalAlignment    = HorizontalAlignment.Center,
             VerticalAlignment      = VerticalAlignment.Center,
             ParentOrigin           = Tizen.NUI.ParentOrigin.Center,
             PivotPoint             = Tizen.NUI.PivotPoint.Center,
             PositionUsesPivotPoint = true,
         };
         this.Add(number);
     }
     PositionUsesPivotPoint = true;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new instance of a RotaryDeleteBadege.
 /// </summary>
 public RotaryDeleteBadege()
 {
     Size = new Size(30, 30);
     //BackgroundColor = Color.Red;
     BackgroundImage        = CommonResource.GetResourcePath() + "b_home_badge_delete_icon.png";
     PositionUsesPivotPoint = true;
 }
Exemplo n.º 4
0
        internal void ChangeMode(bool isEditMode, int currentPage, int lastPage)
        {
            if (isEditMode)
            {
                BackgroundImage = CommonResource.GetResourcePath() + "/b_home_screen_container.png";
                editBGView      = new EditBGView(currentPage, lastPage);

                this.Add(editBGView);
                editBGView.LowerToBottom();


                this.mainText.Text    = "Edit mode";
                this.mainText.Opacity = 0.0f;
                this.subText.Text     = "";

                rotaryIndicator.Hide();
            }
            else
            {
                editBGView.DisposeChild();
                editBGView.Unparent();
                editBGView.Dispose();
                editBGView = null;

                this.BackgroundColor  = Color.Black;
                this.mainText.Opacity = 0.0f;

                //rotaryIndicator.SetRotaryPosition(0);
                rotaryIndicator.Show();
            }
            this.isEditMode = isEditMode;
        }
Exemplo n.º 5
0
        internal void ChangeMode(bool isEditMode, int currentPage, int lastPage)
        {
            if (isEditMode)
            {
                BackgroundImage = CommonResource.GetResourcePath() + "/b_home_screen_container.png";
                //container.BackgroundColor = Color.Black;
                editBGView = new EditBGView(currentPage, lastPage);

                this.Add(editBGView);
                editBGView.LowerToBottom();

                movingIcon = new ImageView()
                {
                    Size                   = new Size(60, 60),
                    PivotPoint             = Tizen.NUI.PivotPoint.Center,
                    PositionUsesPivotPoint = true,
                };
                this.Add(movingIcon);


                this.mainText.Text    = "Edit mode";
                this.mainText.Opacity = 0.0f;
                this.subText.Text     = "";

                rotaryIndicator.Hide();
            }
            else
            {
                editBGView.DisposeChild();
                editBGView.Unparent();
                editBGView.Dispose();
                editBGView = null;

                this.BackgroundColor  = Color.Black;
                this.mainText.Text    = itemList[0].MainText;
                this.subText.Text     = itemList[0].SubText;
                this.mainText.Opacity = 0.0f;

                //rotaryIndicator.SetRotaryPosition(0);
                rotaryIndicator.Show();
            }
            this.isEditMode = isEditMode;
        }
Exemplo n.º 6
0
        public EditBGView(int currentPage, int lastPage)
        {
            bgView = new View();
            bgView.HeightResizePolicy     = ResizePolicyType.FillToParent;
            bgView.WidthResizePolicy      = ResizePolicyType.FillToParent;
            bgView.ParentOrigin           = Tizen.NUI.ParentOrigin.Center;
            bgView.PivotPoint             = Tizen.NUI.PivotPoint.Center;
            bgView.PositionUsesPivotPoint = true;
            bgView.BackgroundColor        = Color.Black;
            bgView.Scale        = new Vector3(0.9f, 0.9f, 1.0f);
            bgView.CornerRadius = 180.0f;
            this.Add(bgView);

            //this.BackgroundColor = Color.Black;
            this.currentPage = currentPage;
            this.lastPage    = lastPage;

            int screen_size = ApplicationConstants.SCREEN_SIZE_RADIUS * 2;

            Size = new Size(screen_size, screen_size);

            editEfView = new ImageView();
            editEfView.BackgroundImage        = CommonResource.GetResourcePath() + "/b_home_screen_edit_mode_ef.png";
            editEfView.ParentOrigin           = Tizen.NUI.ParentOrigin.Center;
            editEfView.PivotPoint             = Tizen.NUI.PivotPoint.Center;
            editEfView.PositionUsesPivotPoint = true;
            this.Add(editEfView);

            editRightSelectView                        = new ImageView();
            editRightSelectView.Color                  = new Color(0.1f, 0.5f, 0.85f, 1.0f);
            editRightSelectView.BackgroundImage        = CommonResource.GetResourcePath() + "/b_home_screen_edit_mode_ef_r.png";
            editRightSelectView.ParentOrigin           = Tizen.NUI.ParentOrigin.CenterRight;
            editRightSelectView.PivotPoint             = Tizen.NUI.PivotPoint.Center;
            editRightSelectView.PositionUsesPivotPoint = true;
            editRightSelectView.Position               = new Position(20, 0);
            editRightSelectView.TouchEvent            += EditRightSelectView_TouchEvent;

            this.Add(editRightSelectView);

            editLeftSelectView                        = new ImageView();
            editLeftSelectView.Color                  = new Color(0.1f, 0.5f, 0.85f, 1.0f);
            editLeftSelectView.BackgroundImage        = CommonResource.GetResourcePath() + "/b_home_screen_edit_mode_ef_l.png";
            editLeftSelectView.ParentOrigin           = Tizen.NUI.ParentOrigin.CenterLeft;
            editLeftSelectView.PivotPoint             = Tizen.NUI.PivotPoint.Center;
            editLeftSelectView.PositionUsesPivotPoint = true;
            editLeftSelectView.Position               = new Position(-20, 0);
            editLeftSelectView.TouchEvent            += EditLeftSelectView_TouchEvent;
            this.Add(editLeftSelectView);

            Animation ani = new Animation(333);

            ani.AnimateBy(editRightSelectView, "Position", new Position(-20.0f, 0.0f), new AlphaFunction(new Vector2(0.25f, 0.46f), new Vector2(0.45f, 1.0f)));
            ani.AnimateBy(editLeftSelectView, "Position", new Position(20.0f, 0.0f), new AlphaFunction(new Vector2(0.25f, 0.46f), new Vector2(0.45f, 1.0f)));
            ani.Play();

            CheckNextPrevPage(currentPage, lastPage);


            checkingEnterTimer       = new Timer(500);
            checkingEnterTimer.Tick += Timer_Tick;
        }