Пример #1
0
 /// <summary>
 /// Popups initialisation.
 /// </summary>
 private void OnIntialize()
 {
     _popup = CreatePopup();
     _popup.SetContent(CreateContent());
     _popup.Focusable = (true);
     _popup.SetDisplayState(Tizen.NUI.UIComponents.Popup.DisplayStateType.Hidden);
 }
Пример #2
0
        /// <summary>
        /// Create popup
        /// </summary>
        /// <returns>
        /// The _popup which be created in this function
        /// </returns>
        Tizen.NUI.UIComponents.Popup CreatePopup()
        {
            Tizen.NUI.UIComponents.Popup confirmationPopup = new Tizen.NUI.UIComponents.Popup();

            confirmationPopup.ParentOrigin       = ParentOrigin.TopLeft;
            confirmationPopup.PivotPoint         = PivotPoint.TopLeft;
            confirmationPopup.WidthResizePolicy  = ResizePolicyType.FitToChildren;
            confirmationPopup.HeightResizePolicy = ResizePolicyType.FitToChildren;

            confirmationPopup.Position             = new Position(530, 306, 0);
            confirmationPopup.PopupBackgroundImage = popupBGImage;
            return(confirmationPopup);
        }
Пример #3
0
        private void OnLogoTapped(object source, TapGestureDetector.DetectedEventArgs e)
        {
            // Only show if currently fully hidden. If transitioning-out, the transition will not be interrupted.
            if (!mVersionPopup || (mVersionPopup.DisplayState == Tizen.NUI.UIComponents.Popup.DisplayStateType.Hidden))
            {
                if (!mVersionPopup)
                {
                    string stream = "";
                    stream += "DALi Core: " + CORE_MAJOR_VERSION + "." + CORE_MINOR_VERSION + "." + CORE_MICRO_VERSION + "\n";
                    stream += "DALi Adaptor: " + ADAPTOR_MAJOR_VERSION + "." + ADAPTOR_MINOR_VERSION + "." + ADAPTOR_MICRO_VERSION + "\n";
                    stream += "DALi Toolkit: " + TOOLKIT_MAJOR_VERSION + "." + TOOLKIT_MINOR_VERSION + "." + TOOLKIT_MICRO_VERSION + "\n";

                    mVersionPopup = new Tizen.NUI.UIComponents.Popup();
                    mVersionPopup.PositionUsesPivotPoint = true;
                    mVersionPopup.PivotPoint             = PivotPoint.Center;
                    mVersionPopup.ParentOrigin           = ParentOrigin.Center;

                    TextLabel titleActor = new TextLabel("Version information");
                    titleActor.Name = "titleActor";
                    titleActor.HorizontalAlignment = HorizontalAlignment.Center;

                    TextLabel contentActor = new TextLabel(stream);
                    contentActor.Name                = "contentActor";
                    contentActor.MultiLine           = true;
                    contentActor.HorizontalAlignment = HorizontalAlignment.Center;
                    contentActor.SetPadding(new PaddingType(0, 0, 20, 0));

                    mVersionPopup.SetTitle(titleActor);
                    mVersionPopup.SetContent(contentActor);

                    mVersionPopup.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
                    mVersionPopup.SetSizeModeFactor(new Vector3(0.75f, 1.0f, 1.0f));
                    mVersionPopup.HeightResizePolicy = ResizePolicyType.FitToChildren;

                    mVersionPopup.TouchedOutside += HideVersionPopup;
                    Window.Instance.Add(mVersionPopup);
                }

                mVersionPopup.SetDisplayState(Tizen.NUI.UIComponents.Popup.DisplayStateType.Shown);
            }
        }