Ejemplo n.º 1
0
        public AndroidCipherCell(Context context, CipherViewCell cipherView, Typeface faTypeface, Typeface miTypeface)
            : base(context)
        {
            CipherViewCell = cipherView;
            _faTypeface    = faTypeface;
            _miTypeface    = miTypeface;

            var view = (context as Activity).LayoutInflater.Inflate(Resource.Layout.CipherViewCell, null);

            IconImage         = view.FindViewById <IconImageView>(Resource.Id.CipherCellIconImage);
            Icon              = view.FindViewById <TextView>(Resource.Id.CipherCellIcon);
            Name              = view.FindViewById <TextView>(Resource.Id.CipherCellName);
            SubTitle          = view.FindViewById <TextView>(Resource.Id.CipherCellSubTitle);
            SharedIcon        = view.FindViewById <TextView>(Resource.Id.CipherCellSharedIcon);
            AttachmentsIcon   = view.FindViewById <TextView>(Resource.Id.CipherCellAttachmentsIcon);
            MoreButton        = view.FindViewById <Android.Widget.Button>(Resource.Id.CipherCellButton);
            MoreButton.Click += MoreButton_Click;

            Icon.Typeface            = _faTypeface;
            SharedIcon.Typeface      = _faTypeface;
            AttachmentsIcon.Typeface = _faTypeface;
            MoreButton.Typeface      = _miTypeface;

            var small = (float)Device.GetNamedSize(NamedSize.Small, typeof(Label));

            Icon.SetTextSize(ComplexUnitType.Sp, 22.0952380952381F);
            Name.SetTextSize(ComplexUnitType.Sp, (float)Device.GetNamedSize(NamedSize.Medium, typeof(Label)));
            SubTitle.SetTextSize(ComplexUnitType.Sp, small);
            SharedIcon.SetTextSize(ComplexUnitType.Sp, small);
            AttachmentsIcon.SetTextSize(ComplexUnitType.Sp, small);
            MoreButton.SetTextSize(ComplexUnitType.Sp, 25);

            AddView(view);
        }
Ejemplo n.º 2
0
        protected override void ShowMore()
        {
            request          = new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
            request.Success += sets => Schedule(() =>
            {
                MoreButton.FadeTo(sets.Count == ItemsPerPage ? 1 : 0);
                MoreButton.IsLoading = false;

                if (!sets.Any() && VisiblePages == 1)
                {
                    MissingText.Show();
                    return;
                }

                foreach (var s in sets)
                {
                    if (!s.OnlineBeatmapSetID.HasValue)
                    {
                        continue;
                    }

                    ItemsContainer.Add(new DirectGridPanel(s.ToBeatmapSet(Rulesets))
                    {
                        Anchor = Anchor.TopCentre,
                        Origin = Anchor.TopCentre,
                    });
                }
            });

            Api.Queue(request);
        }
        // Initializes the sample UI.
        private void Start()
        {
            Debug.Assert(To != null, "Please specify \"To\"!");
            Debug.Assert(Cc != null, "Please specify \"Cc\"!");
            Debug.Assert(Bcc != null, "Please specify \"Bcc\"!");
            Debug.Assert(Subject != null, "Please specify \"Subject\"!");
            Debug.Assert(Body != null, "Please specify \"Body\"!");
            Debug.Assert(SendButton != null, "Please specify \"SendButton\"!");
            Load();

            emailSender.text = "Sender address: " + EmailAddress;

            var moreButton = MoreButton.FindInstance();

            if (moreButton != null)
            {
                moreButton.MenuItems = new MoreButton.PopupMenuItem[] { new MoreButton.PopupMenuItem("EXIT", () => Application.Quit()) };
            }

            SendButton.onClick.AddListener(Send);

            if (!IsSmtpConfigured())
            {
                SendButton.GetComponentInChildren <Text>().text = CantSendText;
            }
        }
Ejemplo n.º 4
0
 //------------------------------------------------------------------------------------
 private void MovieListBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         MoreButton.PerformClick();
     }
 }
Ejemplo n.º 5
0
 //------------------------------------------------------------------------------------
 private void MovieListBox_DoubleClick(object sender, EventArgs e)
 {
     if (shortMList.Count > 0)
     {
         MoreButton.PerformClick();
     }
 }
Ejemplo n.º 6
0
        void ReleaseDesignerOutlets()
        {
            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }

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

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

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

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

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

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

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

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
Ejemplo n.º 7
0
        public void Configure(ITransactionsWidgetViewModel viewModel)
        {
            if (!_configured)
            {
                _viewModel = viewModel;

                TitleLabel.Text = "Transactions";
                TransactionsTableView.RegisterNibForCellReuse(RecordTableViewCell.Nib, RecordTableViewCell.Key);
                TransactionsTableView.Source = _viewModel.Transactions.GetTableViewSource(BindTransactionCell, RecordTableViewCell.Key, () => new TableViewSourceExtension <WalletTransaction>(TransactionSelected));

                MoreButton.SetCommand(_viewModel.MoreButtonAction);
                _configured = true;
            }
        }
Ejemplo n.º 8
0
        public AndroidSendCell(Context context, SendViewCell sendView, Typeface faTypeface, Typeface miTypeface)
            : base(context)
        {
            SendViewCell = sendView;
            _faTypeface  = faTypeface;
            _miTypeface  = miTypeface;

            var view = (context as Activity).LayoutInflater.Inflate(Resource.Layout.SendViewCell, null);

            Icon                      = view.FindViewById <TextView>(Resource.Id.SendCellIcon);
            Name                      = view.FindViewById <TextView>(Resource.Id.SendCellName);
            SubTitle                  = view.FindViewById <TextView>(Resource.Id.SendCellSubTitle);
            DisabledIcon              = view.FindViewById <TextView>(Resource.Id.SendCellDisabledIcon);
            HasPasswordIcon           = view.FindViewById <TextView>(Resource.Id.SendCellHasPasswordIcon);
            MaxAccessCountReachedIcon = view.FindViewById <TextView>(Resource.Id.SendCellMaxAccessCountReachedIcon);
            ExpiredIcon               = view.FindViewById <TextView>(Resource.Id.SendCellExpiredIcon);
            PendingDeleteIcon         = view.FindViewById <TextView>(Resource.Id.SendCellPendingDeleteIcon);
            MoreButton                = view.FindViewById <Button>(Resource.Id.SendCellButton);
            MoreButton.Click         += MoreButton_Click;

            Icon.Typeface                      = _faTypeface;
            DisabledIcon.Typeface              = _faTypeface;
            HasPasswordIcon.Typeface           = _faTypeface;
            MaxAccessCountReachedIcon.Typeface = _faTypeface;
            ExpiredIcon.Typeface               = _faTypeface;
            PendingDeleteIcon.Typeface         = _faTypeface;
            MoreButton.Typeface                = _miTypeface;

            var small = (float)Device.GetNamedSize(NamedSize.Small, typeof(Label));

            Icon.SetTextSize(ComplexUnitType.Pt, 10);
            Name.SetTextSize(ComplexUnitType.Sp, (float)Device.GetNamedSize(NamedSize.Medium, typeof(Label)));
            SubTitle.SetTextSize(ComplexUnitType.Sp, small);
            DisabledIcon.SetTextSize(ComplexUnitType.Sp, small);
            HasPasswordIcon.SetTextSize(ComplexUnitType.Sp, small);
            MaxAccessCountReachedIcon.SetTextSize(ComplexUnitType.Sp, small);
            ExpiredIcon.SetTextSize(ComplexUnitType.Sp, small);
            PendingDeleteIcon.SetTextSize(ComplexUnitType.Sp, small);
            MoreButton.SetTextSize(ComplexUnitType.Sp, 25);

            if (!SendViewCell.ShowOptions)
            {
                MoreButton.Visibility = ViewStates.Gone;
            }

            AddView(view);
        }
Ejemplo n.º 9
0
        // Initializes the sample UI.
        private void Start()
        {
            Debug.Assert(To != null, "Please specify \"To\"!");
            Debug.Assert(Cc != null, "Please specify \"Cc\"!");
            Debug.Assert(Bcc != null, "Please specify \"Bcc\"!");
            Debug.Assert(Subject != null, "Please specify \"Subject\"!");
            Debug.Assert(Body != null, "Please specify \"Body\"!");
            Load();

            emailSender.text = "Sender address: " + EmailAddress;

            var moreButton = MoreButton.FindInstance();

            if (moreButton != null)
            {
                moreButton.MenuItems = new MoreButton.PopupMenuItem[] { new MoreButton.PopupMenuItem("EXIT", () => Application.Quit()) };
            }
        }
Ejemplo n.º 10
0
        protected override void ShowMore()
        {
            request          = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
            request.Success += scores => Schedule(() =>
            {
                foreach (var s in scores)
                {
                    s.Ruleset = Rulesets.GetRuleset(s.RulesetID);
                }

                if (!scores.Any() && VisiblePages == 1)
                {
                    MoreButton.Hide();
                    MoreButton.IsLoading = false;
                    MissingText.Show();
                    return;
                }

                IEnumerable <DrawableProfileScore> drawableScores;

                switch (type)
                {
                default:
                    drawableScores = scores.Select(score => new DrawablePerformanceScore(score, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null));
                    break;

                case ScoreType.Recent:
                    drawableScores = scores.Select(score => new DrawableTotalScore(score));
                    break;
                }

                LoadComponentsAsync(drawableScores, s =>
                {
                    MissingText.Hide();
                    MoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0);
                    MoreButton.IsLoading = false;

                    ItemsContainer.AddRange(s);
                });
            });

            Api.Queue(request);
        }
Ejemplo n.º 11
0
        protected override void ShowMore()
        {
            request          = new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++ *ItemsPerPage);
            request.Success += beatmaps => Schedule(() =>
            {
                MoreButton.FadeTo(beatmaps.Count == ItemsPerPage ? 1 : 0);
                MoreButton.IsLoading = false;

                if (!beatmaps.Any() && VisiblePages == 1)
                {
                    MissingText.Show();
                    return;
                }

                MissingText.Hide();

                foreach (var beatmap in beatmaps)
                {
                    ItemsContainer.Add(new DrawableMostPlayedRow(beatmap.GetBeatmapInfo(Rulesets), beatmap.PlayCount));
                }
            });

            Api.Queue(request);
        }
Ejemplo n.º 12
0
        protected override void ShowMore()
        {
            request          = new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++ *ItemsPerPage);
            request.Success += activities => Schedule(() =>
            {
                MoreButton.FadeTo(activities.Count == ItemsPerPage ? 1 : 0);
                MoreButton.IsLoading = false;

                if (!activities.Any() && VisiblePages == 1)
                {
                    MissingText.Show();
                    return;
                }

                MissingText.Hide();

                foreach (APIRecentActivity activity in activities)
                {
                    ItemsContainer.Add(new DrawableRecentActivity(activity));
                }
            });

            Api.Queue(request);
        }
Ejemplo n.º 13
0
 public void ClickMoreButton()
 {
     MoreButton.Click();
 }
Ejemplo n.º 14
0
 public MemberListPage ClickMore()
 {
     MoreButton.Click();
     return(new MemberListPage(driver));
 }
Ejemplo n.º 15
0
    void _ui()
    {
        // 整个界面Panel
        float panel_posx   = Display.main.systemWidth,
              panel_width  = Display.main.systemWidth,
              panel_height = Display.main.systemHeight;

        Panel.GetComponent <RectTransform>().sizeDelta          = new Vector2(panel_width, panel_height);
        Panel.GetComponent <RectTransform>().anchoredPosition3D = new Vector3(panel_posx, 0, 0);

        // backButton
        float back_button_posx  = (float)(15 / 375.0) * Display.main.systemWidth,
              back_button_posy  = -(float)(36.5 / 667.0) * Display.main.systemHeight,
              back_button_width = (float)(31.5 / 375.0) * Display.main.systemWidth;

        BackButton.GetComponent <RectTransform>().sizeDelta          = new Vector2(back_button_width, back_button_width);
        BackButton.GetComponent <RectTransform>().anchoredPosition3D = new Vector3(back_button_posx, back_button_posy, 0);
        // helloText
        float hello_text_posy   = -(float)(208.5 / 667.0) * Display.main.systemHeight,
              hello_text_width  = (float)(97 / 375.0) * Display.main.systemWidth,
              hello_text_height = (float)(13 / 97.0) * hello_text_width;

        HelloText.rectTransform.sizeDelta          = new Vector2(hello_text_width, hello_text_height);
        HelloText.rectTransform.anchoredPosition3D = new Vector3(0, hello_text_posy, 0);
        // 输入框
        float input_field_posx   = -(float)(24 / 375.0) * Display.main.systemWidth,
              input_field_posy   = -(float)(37.5 / 667.0) * Display.main.systemHeight,
              input_filed_width  = (float)(294 / 375.0) * Display.main.systemWidth,
              input_filed_height = (float)(30 / 667.0) * Display.main.systemHeight;

        InputField.GetComponent <RectTransform>().sizeDelta          = new Vector2(input_filed_width, input_filed_height);
        InputField.GetComponent <RectTransform>().anchoredPosition3D = new Vector3(input_field_posx, input_field_posy, 0);
        // searchButton、image
        float search_button_width  = (float)(36 / 375.0) * Display.main.systemWidth,
              search_button_height = (float)(34 / 36.0) * search_button_width,
              search_image_posx    = -(float)(6 / 375.0) * Display.main.systemWidth,
              search_image_width   = (float)(19.77 / 375.0) * Display.main.systemWidth,
              search_image_height  = (float)(15.471 / 19.77) * search_image_width;

        SearchButton.GetComponent <RectTransform>().sizeDelta = new Vector2(search_button_width, search_button_height);
        SearchImage.rectTransform.anchoredPosition3D          = new Vector3(search_image_posx, 0, 0);
        SearchImage.rectTransform.sizeDelta = new Vector2(search_image_width, search_image_height);
        // 输入框文本
        float inputfiled_text_posx   = (float)(20 / 375.0) * Display.main.systemWidth,
              inputfiled_text_height = (float)(16 / 667.0) * Display.main.systemHeight;

        InputFieldText.rectTransform.anchoredPosition3D = new Vector3(inputfiled_text_posx, 0, 0);
        InputFieldText.rectTransform.sizeDelta          = new Vector2(InputField.GetComponent <RectTransform>().rect.width - inputfiled_text_posx - SearchButton.GetComponent <RectTransform>().rect.width, inputfiled_text_height);

        // scorllPanel
        float scorll_panel_posy   = -(float)(80 / 667.0) * Display.main.systemHeight,
              scorll_panel_height = Display.main.systemHeight + scorll_panel_posy;

        ScorllPanel.GetComponent <RectTransform>().sizeDelta          = new Vector2(Display.main.systemWidth, scorll_panel_height);
        ScorllPanel.GetComponent <RectTransform>().anchoredPosition3D = new Vector3(0, scorll_panel_posy, 0);

        // moreButton
        var more_button_height      = (float)(44.5 / 667.0) * Display.main.systemHeight;
        var more_button_width       = (float)((375.0 - 25.5 - 24.5) / 375.0) * Display.main.systemWidth;
        var more_button_text_height = (float)(12.5 / 667.0) * Display.main.systemHeight;

        MoreButton.GetComponent <RectTransform>().sizeDelta = new Vector2(more_button_width, more_button_height);
        MoreButton.transform.GetChild(0).GetComponent <Text>().rectTransform.sizeDelta = new Vector2(MoreButton.transform.GetChild(0).GetComponent <Text>().rectTransform.sizeDelta.x, more_button_text_height);
        // maskPanel
        var mask_panel_bottom = (float)(65.5 / 667.0) * Display.main.systemHeight;
        var mask_panel_height = (float)(Display.main.systemHeight - mask_panel_bottom - Mathf.Abs(ScorllPanel.GetComponent <RectTransform>().anchoredPosition3D.y));

        MaskPanel.GetComponent <RectTransform>().sizeDelta = new Vector2(Display.main.systemWidth, mask_panel_height);
        // animation image
        var animation_image_posy = -(float)(Display.main.systemHeight / 4.0);

        if (animation_image_posy > InputField.GetComponent <RectTransform>().anchoredPosition3D.y - InputField.GetComponent <RectTransform>().rect.height)
        {
            animation_image_posy = InputField.GetComponent <RectTransform>().anchoredPosition3D.y - InputField.GetComponent <RectTransform>().rect.height;
        }
        //var animation_image_width = (float)(101 / 375.0) * Display.main.systemWidth;
        //var animation_image_height = (float)(107 / 101.0) * animation_image_width;
        //AnimationImage.rectTransform.sizeDelta = new Vector2(animation_image_width, animation_image_height);
        AnimationImage.rectTransform.anchoredPosition3D = new Vector3(0, animation_image_posy, 0);
    }