• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UILabel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UILabel的典型用法代码示例。如果您正苦于以下问题:C# UILabel类的具体用法?C# UILabel怎么用?C# UILabel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UILabel类属于命名空间,在下文中一共展示了UILabel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Initialize

        private void Initialize()
        {
			BackgroundColor = GlobalTheme.BackgroundColor;

            _lblFrequency = new UILabel(new RectangleF(12, 4, 60, 36));
            _lblFrequency.BackgroundColor = UIColor.Clear;
            _lblFrequency.TextColor = UIColor.White;
            _lblFrequency.Font = UIFont.FromName("HelveticaNeue-Light", 12.0f);

            _lblValue = new UILabel(new RectangleF(UIScreen.MainScreen.Bounds.Width - 60 - 14, 4, 60, 36));
            _lblValue.BackgroundColor = UIColor.Clear;
            _lblValue.Text = "0.0 dB";
            _lblValue.TextColor = UIColor.White;
            _lblValue.TextAlignment = UITextAlignment.Right;
            _lblValue.Font = UIFont.FromName("HelveticaNeue-Light", 12.0f);

            _slider = new SessionsSlider(new RectangleF(62, 4, UIScreen.MainScreen.Bounds.Width - 120 - 14, 36));
            _slider.MinValue = -6;
            _slider.MaxValue = 6;
            _slider.Value = 0;
            _slider.SetThumbImage(UIImage.FromBundle("Images/Sliders/thumb"), UIControlState.Normal);
            _slider.SetMinTrackImage(UIImage.FromBundle("Images/Sliders/slider2").CreateResizableImage(new UIEdgeInsets(0, 8, 0, 8), UIImageResizingMode.Tile), UIControlState.Normal);
            _slider.SetMaxTrackImage(UIImage.FromBundle("Images/Sliders/slider").CreateResizableImage(new UIEdgeInsets(0, 8, 0, 8), UIImageResizingMode.Tile), UIControlState.Normal);
            _slider.ValueChanged += HandleSliderValueChanged;

            AddSubview(_lblFrequency);
            AddSubview(_lblValue);
            AddSubview(_slider);
        }
开发者ID:pascalfr,项目名称:MPfm,代码行数:29,代码来源:MPfmEqualizerFaderView.cs


示例2: ViewDidLoad

        public override void ViewDidLoad()
        {
            View = new UIView(){ BackgroundColor = UIColor.White};
            base.ViewDidLoad();

            var label = new UILabel(new RectangleF(10, 10, 300, 40));
            Add(label);
            var textField = new UITextField(new RectangleF(10, 50, 300, 40));
            Add(textField);
            var button = new UIButton(UIButtonType.RoundedRect);
            button.SetTitle("Click Me", UIControlState.Normal);
            button.Frame = new RectangleF(10, 90, 300, 40);
            Add(button);
            var button2 = new UIButton(UIButtonType.RoundedRect);
            button2.SetTitle("Go Second", UIControlState.Normal);
            button2.Frame = new RectangleF(10, 130, 300, 40);
            Add(button2);

            var set = this.CreateBindingSet<FirstView, Core.ViewModels.FirstViewModel>();
            set.Bind(label).To(vm => vm.Hello);
            set.Bind(textField).To(vm => vm.Hello);
            set.Bind(button).To(vm => vm.MyCommand);
            set.Bind(button2).To(vm => vm.GoSecondCommand);
            set.Apply();
        }
开发者ID:janvdp,项目名称:NPlus1DaysOfMvvmCross,代码行数:25,代码来源:FirstView.cs


示例3: GetCell

		public override UITableViewCell GetCell(UITableView tv)
		{
			RectangleF frame;
			if (datePicker == null)
			{
				label = new UILabel
				{
					Text = Caption
				};
				label.SizeToFit();
				frame = label.Frame;
				frame.X = 15;
				frame.Y = 5;
				label.Frame = frame;

				datePicker = CreatePicker();
				
			}
			if(datePicker.Date != DateValue)
				datePicker.Date = DateValue;

			frame = datePicker.Frame;
			frame.Y = frame.X = 0;
			datePicker.Frame = frame;
			var cell = tv.DequeueReusableCell("datePicker") ?? new UITableViewCell(UITableViewCellStyle.Default, "datePicker") { Accessory = UITableViewCellAccessory.None };
			cell.ContentView.Add(label);
			if(cell.ContentView != datePicker.Superview)
				cell.ContentView.Add(datePicker);
			
			return cell;
		}
开发者ID:stecenko,项目名称:MyCompany,代码行数:31,代码来源:DateTimeElement.cs


示例4: LoadView

    public void LoadView()
    {
        mBox = new UIBox(UIConstants.BoxRect, UIConstants.MainBackground);

        mBackgroundTextureLabel = new UILabel(UIConstants.RectLabelOne, UIConstants.CloudRecognition);

        string [] extendedTrackingStyle = {UIConstants.ExtendedTrackingStyleOff, UIConstants.ExtendedTrackingStyleOn};
        mExtendedTracking = new UICheckButton(UIConstants.RectOptionOne, false, extendedTrackingStyle);

        string[] aboutStyles = { UIConstants.AboutLableStyle, UIConstants.AboutLableStyle };
        mAboutLabel = new UICheckButton(UIConstants.RectLabelAbout, false, aboutStyles);

        string[] cameraFlashStyles = {UIConstants.CameraFlashStyleOff, UIConstants.CameraFlashStyleOn};
        mCameraFlashSettings = new UICheckButton(UIConstants.RectOptionThree, false, cameraFlashStyles);

        string[] autofocusStyles = {UIConstants.AutoFocusStyleOff, UIConstants.AutoFocusStyleOn};
        mAutoFocusSetting = new UICheckButton(UIConstants.RectOptionTwo, false, autofocusStyles);

        mCameraLabel = new UILabel(UIConstants.RectLabelTwo, UIConstants.CameraLabelStyle);

        string[,] cameraFacingStyles = new string[2,2] {{UIConstants.CameraFacingFrontStyleOff, UIConstants.CameraFacingFrontStyleOn},{ UIConstants.CameraFacingRearStyleOff, UIConstants.CameraFacingRearStyleOn}};
        UIRect[] cameraRect = { UIConstants.RectOptionFour, UIConstants.RectOptionFive };
        mCameraFacing = new UIRadioButton(cameraRect, 1, cameraFacingStyles);

        string[] closeButtonStyles = {UIConstants.closeButtonStyleOff, UIConstants.closeButtonStyleOn };
        mCloseButton = new UIButton(UIConstants.CloseButtonRect, closeButtonStyles);
    }
开发者ID:nileshlg2003,项目名称:NewCloud,代码行数:27,代码来源:CloudRecognitionUIView.cs


示例5: LoadingIndicator

		private LoadingIndicator() : base()
		{
			int ScreenWidth = Platform.ScreenWidth;
			int ScreenHeight = Platform.ScreenHeight - 80;
			const int Padding = 10;
			const int TextWidth = 65;
			const int SpinnerSize = 20;
			const int SeparateWidth = 5;
			const int Width = Padding + SpinnerSize + SeparateWidth + TextWidth + Padding;
			const int Height = Padding + SpinnerSize + Padding;
		
			Frame = new RectangleF((ScreenWidth - Width) / 2, ScreenHeight / 2, Width, Height);
			BackgroundColor = UIColor.FromWhiteAlpha(0.5f, 0.5f);
			
			spinner = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.WhiteLarge)
            {
				Frame = new RectangleF(Padding, Padding, SpinnerSize, SpinnerSize)
			};
			
			label = new UILabel
            {
				Frame = new RectangleF(Padding + SpinnerSize + SeparateWidth, Padding, TextWidth, SpinnerSize),
				Text = "Loading...",
				TextColor = StyleExtensions.lightGrayText,
				BackgroundColor = StyleExtensions.transparent,
				AdjustsFontSizeToFitWidth = true
			};
			
			AddSubview(label);
			AddSubview(spinner);
			
			Hidden = true;
		}
开发者ID:Smeedee,项目名称:Smeedee-Mobile,代码行数:33,代码来源:LoadingIndicator.cs


示例6: Start

	void Start () {
        root = GameObject.Find("UI Root");
        gm = GameObject.Find("GameManager").GetComponent<GameManager>();
        nameLabel = root.transform.Find("Avg_Panel/Label_Name").GetComponent<UILabel>();
        dialogLabel = root.transform.Find("Avg_Panel/Label_Dialog").GetComponent<UILabel>();
        nameLabel.fontSize = 22;
	}
开发者ID:lshy1993,项目名称:LianaiYuTuili,代码行数:7,代码来源:TextManager.cs


示例7: Start

	// Use this for initialization
	void Start ()
    {
        uiSprite = thumbImgaeObject.GetComponent<UI2DSprite>();
        uiLabelName = placeNameObject.GetComponent<UILabel>();
        uiLabelInfo = placeInfoObject.GetComponent<UILabel>();
        spr = Resources.LoadAll<Sprite>("Background");
	}
开发者ID:lshy1993,项目名称:LianaiYuTuili,代码行数:8,代码来源:PlaceButton.cs


示例8: ViewForItem

		public override UIView ViewForItem(CarouselView carousel, uint index, UIView reusingView)
		{

			UILabel label;

			if (reusingView == null)
			{
				var imgView = new UIImageView(new RectangleF(0, 0, 200, 200))
				{

					Image = FromUrl( index > 1 ? product[0].ImageForSize(250) : product[(int)index].ImageForSize(250) ),
					ContentMode = UIViewContentMode.Center
				};


				label = new UILabel(imgView.Bounds)
				{
					BackgroundColor = UIColor.Clear,
					TextAlignment = UITextAlignment.Center,
					Tag = 1
				};
				label.Font = label.Font.WithSize(50);
				imgView.AddSubview(label);
				reusingView = imgView;
			}
			else
			{
				label = (UILabel)reusingView.ViewWithTag(1);
			}
				

			return reusingView;
		}
开发者ID:jonburn,项目名称:xamarin-store-app,代码行数:33,代码来源:ProductListViewController.cs


示例9: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.BackgroundColor = UIColor.White;

            var gameNameLabel = new UILabel(new RectangleF(10, 80, View.Frame.Width - 20, 20));
            gameNameLabel.Text = "Spartakiade Quiz";

            View.AddSubview(gameNameLabel);

            var playname = new UITextView(new RectangleF(10, 110, View.Frame.Width - 20, 20));
            playname.BackgroundColor = UIColor.Brown;

            View.AddSubview(playname);

            var btnStartGame = new UIButton(new RectangleF(10, 140, View.Frame.Width - 20, 20));
            btnStartGame.SetTitle("Start game", UIControlState.Normal);
            btnStartGame.BackgroundColor = UIColor.Blue;
            btnStartGame.TouchUpInside += delegate
            {
                NavigationController.PushViewController(new PlayGameController(playname.Text), true);
            };

            View.AddSubview(btnStartGame);
        }
开发者ID:CayasSoftware,项目名称:Spartakiade,代码行数:26,代码来源:GameStartController.cs


示例10: FinishedLaunching

		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			// check is it 64bit or 32bit
			Console.WriteLine (IntPtr.Size);

			// Main app do nothing
			// Go to Photo > Edit then choose PhotoFilter to start app extension

			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.BackgroundColor = UIColor.White;

			note = new UILabel ();
			note.Text = "Note that the app in this sample only serves as a host for the extension. To use the sample extension, edit a photo or video using the Photos app, and tap the extension icon";
			note.Lines = 0;
			note.LineBreakMode = UILineBreakMode.WordWrap;
			var frame = note.Frame;
			note.Frame = new CGRect (0, 0, UIScreen.MainScreen.Bounds.Width * 0.75f, 0);
			note.SizeToFit ();

			window.AddSubview (note);
			note.Center = window.Center;

			window.MakeKeyAndVisible ();
			return true;
		}
开发者ID:g7steve,项目名称:monotouch-samples,代码行数:25,代码来源:AppDelegate.cs


示例11: Draw

        /// <summary>
        /// this is where we do the meat of creating our alert, which includes adding 
        /// controls, etc.
        /// </summary>
        public override void Draw(RectangleF rect)
        {
            // if the control hasn't been setup yet
            if (activityIndicator == null)
            {
                // if we have a message
                if (!string.IsNullOrEmpty (message))
                {
                    lblMessage = new UILabel (new RectangleF (20, 10, rect.Width - 40, 33));
                    lblMessage.BackgroundColor = UIColor.Clear;
                    lblMessage.TextColor = UIColor.LightTextColor;
                    lblMessage.TextAlignment = UITextAlignment.Center;
                    lblMessage.Text = message;
                    this.AddSubview (lblMessage);
                }

                // instantiate a new activity indicator
                activityIndicator = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.White);
                activityIndicator.Frame = new RectangleF ((rect.Width / 2) - (activityIndicator.Frame.Width / 2)
                    , 50, activityIndicator.Frame.Width, activityIndicator.Frame.Height);
                this.AddSubview (activityIndicator);
                activityIndicator.StartAnimating ();
            }
            base.Draw (rect);
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:29,代码来源:ActivityIndicatorAlertView.cs


示例12: OnDrawProperties

    protected override bool OnDrawProperties()
    {
        mLabel = mWidget as UILabel;
        ComponentSelector.Draw<UIFont>(mLabel.font, OnSelectFont);
        if (mLabel.font == null) return false;

        string text = EditorGUILayout.TextArea(mLabel.text, GUILayout.Height(100f));
        if (!text.Equals(mLabel.text)) { RegisterUndo(); mLabel.text = text; }

        GUILayout.BeginHorizontal();
        {
            float len = EditorGUILayout.FloatField("Line Width", mLabel.lineWidth, GUILayout.Width(120f));
            if (len != mLabel.lineWidth) { RegisterUndo(); mLabel.lineWidth = len; }

            bool multi = EditorGUILayout.Toggle("Multi-line", mLabel.multiLine, GUILayout.Width(100f));
            if (multi != mLabel.multiLine) { RegisterUndo(); mLabel.multiLine = multi; }
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        {
            bool password = EditorGUILayout.Toggle("Password", mLabel.password, GUILayout.Width(120f));
            if (password != mLabel.password) { RegisterUndo(); mLabel.password = password; }

            bool encoding = EditorGUILayout.Toggle("Encoding", mLabel.supportEncoding, GUILayout.Width(100f));
            if (encoding != mLabel.supportEncoding) { RegisterUndo(); mLabel.supportEncoding = encoding; }
        }
        GUILayout.EndHorizontal();
        return true;
    }
开发者ID:xxxred,项目名称:SoulOfSword,代码行数:30,代码来源:UILabelInspector.cs


示例13: Update

	void Update ()
	{
		if (mLabel == null)
		{
			mLabel = GetComponent<UILabel>();
			mLabel.supportEncoding = false;
			mLabel.symbolStyle = NGUIText.SymbolStyle.None;
			mText = mLabel.processedText;
		}

		if (mOffset < mText.Length)
		{
			if (mNextChar <= RealTime.time)
			{
				charsPerSecond = Mathf.Max(1, charsPerSecond);

				// Periods and end-of-line characters should pause for a longer time.
				float delay = 1f / charsPerSecond;
				char c = mText[mOffset];
				if (c == '.' || c == '\n' || c == '!' || c == '?') delay *= 4f;

				mNextChar = RealTime.time + delay;
				mLabel.text = mText.Substring(0, ++mOffset);
			}
		}
		else Destroy(this);
	}
开发者ID:henryj41043,项目名称:TheUnseen,代码行数:27,代码来源:TypewriterEffect.cs


示例14: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            // Setup Background image
            var imgView = new UIImageView (UIImage.FromBundle ("background")) {
                ContentMode = UIViewContentMode.ScaleToFill,
                AutoresizingMask = UIViewAutoresizing.All,
                Frame = View.Bounds
            };
            View.AddSubview (imgView);

            // Setup iCarousel view
            Carousel = new iCarousel (View.Bounds) {
                CarouselType = iCarouselType.CoverFlow2,
                DataSource = new ControlsDataSource (this)
            };

            View.AddSubview (Carousel);

            // Setup info label
            Label = new UILabel (new RectangleF (20, 362, 280, 21)) {
                BackgroundColor = UIColor.Clear,
                Text = string.Empty,
                TextAlignment = UITextAlignment.Center
            };

            View.AddSubview (Label);
        }
开发者ID:WinterGroveProductions,项目名称:monotouch-bindings,代码行数:29,代码来源:ControlsViewController.cs


示例15: CreateObjects

 private void CreateObjects()
 {
     Transform transform = base.transform.Find("personInfoLayer");
     this.mNameLabel = transform.Find("name").GetComponent<UILabel>();
     this.mGuildNameLabel = transform.Find("guildName").GetComponent<UILabel>();
     Transform transform2 = transform.Find("bg");
     this.mIcon = transform2.Find("icon").GetComponent<UISprite>();
     this.mQualityMask = transform2.Find("Frame").GetComponent<UISprite>();
     GameObject gameObject = transform.Find("closeBtn").gameObject;
     UIEventListener expr_8C = UIEventListener.Get(gameObject);
     expr_8C.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_8C.onClick, new UIEventListener.VoidDelegate(this.OnCloseBtnClick));
     GameObject gameObject2 = transform.Find("chatBtn").gameObject;
     UIEventListener expr_C4 = UIEventListener.Get(gameObject2);
     expr_C4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_C4.onClick, new UIEventListener.VoidDelegate(this.OnChatClick));
     GameObject gameObject3 = transform.Find("viewBtn").gameObject;
     UIEventListener expr_FE = UIEventListener.Get(gameObject3);
     expr_FE.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_FE.onClick, new UIEventListener.VoidDelegate(this.OnViewClick));
     GameObject gameObject4 = transform.Find("friendBtn").gameObject;
     UIEventListener expr_138 = UIEventListener.Get(gameObject4);
     expr_138.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_138.onClick, new UIEventListener.VoidDelegate(this.OnFriendClick));
     this.mFriendLabel = gameObject4.transform.Find("Label").GetComponent<UILabel>();
     GameObject gameObject5 = transform.Find("backlistBtn").gameObject;
     UIEventListener expr_18E = UIEventListener.Get(gameObject5);
     expr_18E.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_18E.onClick, new UIEventListener.VoidDelegate(this.OnBacklistClick));
     this.mBacklistLabel = gameObject5.transform.Find("Label").GetComponent<UILabel>();
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:26,代码来源:GUIPersonalInfoLayerV2F.cs


示例16: Awake

    void Awake()
    {
        m_transform = transform;
        gameObject.SetActive(false);
        ClimbTowerUILogicManager.Instance.Initialize(this);
        m_rewardList = m_transform.FindChild("RightBox/RewardList");
        m_towerList = m_transform.FindChild("TowerList");
        m_report = m_transform.FindChild("report").gameObject;
        m_reportList = m_transform.FindChild("report/BattleReportList");
        m_rewardTitle = m_transform.FindChild("report/img/lblTitle").GetComponentsInChildren<UILabel>(true)[0];
        m_highHistory = m_transform.FindChild("RightBox/historyHigh").GetComponentsInChildren<UILabel>(true)[0];
        //m_currentLevel = m_transform.FindChild("RightBox/TriPager/lblCurrentLevel").GetComponentsInChildren<UILabel>(true)[0];
        m_leftChallengeCount = m_transform.FindChild("LeftBox/lblContainer/lblChallengeCount").GetComponentsInChildren<UILabel>(true)[0];
        m_lblGuide = m_transform.FindChild("LeftBox/lblContainer/lblGuide").GetComponentsInChildren<UILabel>(true)[0];
        m_leftVIPSweepCount = m_transform.FindChild("LeftBox/lblContainer/lblVIPSweepCount").GetComponentsInChildren<UILabel>(true)[0];
        m_closeAnchor = m_transform.FindChild("closeAnchor").GetComponentsInChildren<UIAnchor>(true)[0];
        m_buttonVIP = m_transform.FindChild("RightBox/btnTowerVIP").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
        m_buttonNormal = m_transform.FindChild("RightBox/btnTowerNormal").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
        AddButtonListener("onClicked", "RightBox/btnEnter", ClimbTowerUILogicManager.Instance.OnEnterMap);
        AddButtonListener("onClicked", "LeftBox/btnTowerCharge", ClimbTowerUILogicManager.Instance.Charge);
        AddButtonListener("onClicked", "RightBox/btnTowerNormal", ClimbTowerUILogicManager.Instance.NormalSweep);
        AddButtonListener("onClicked", "RightBox/btnTowerVIP", ClimbTowerUILogicManager.Instance.VIPSweep);
        AddButtonListener("onClicked", "closeAnchor/btnClose", Close);
        AddButtonListener("onClicked", "report/img/btnClose", closeReport);
        if (MogoUIManager.Instance.WaitingWidgetName == "btnEnter")
        {
            TimerHeap.AddTimer(100, 0, () => { EventDispatcher.TriggerEvent("WaitingWidgetFinished"); });
        }

        //m_towerList.GetComponent<MogoListImproved>().SetGridLayout<TowerUnit>(7, m_towerList.transform, TowerLoaded);
    }
开发者ID:lbddk,项目名称:ahzs-client,代码行数:31,代码来源:ClimbTowerUIViewManager.cs


示例17: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var view = new UIView
            {
                BackgroundColor = UIColor.White
            };

            var label = new UILabel
            {
                TranslatesAutoresizingMaskIntoConstraints = false,
                Text = "No Conversation Selected",
                TextColor = UIColor.FromWhiteAlpha(0.0f, 0.4f),
                Font = UIFont.PreferredHeadline
            };
            view.AddSubview(label);

            view.AddConstraint(NSLayoutConstraint.Create(label, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal,
                    view, NSLayoutAttribute.CenterX, 1.0f, 0.0f));
            view.AddConstraint(NSLayoutConstraint.Create(label, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal,
                    view, NSLayoutAttribute.CenterY, 1.0f, 0.0f));

            View = view;
        }
开发者ID:flolovebit,项目名称:xamarin-evolve-2014,代码行数:25,代码来源:AAPLEmptyViewController.cs


示例18: Awake

    void Awake()
    {
        m_instance = this;
        m_myTransform = transform;
        FillFullNameData(m_myTransform);

        m_goOccupyTowerPassUIPlayer = FindTransform("OccupyTowerPassUIPlayer").gameObject;
        m_goOccupyTowerPassUIPlayer.SetActive(false);
        m_listPlayerInfoPos.Clear();
        for (int i = 1; i <= MAX_PLAYER_COUNT; i++)
        {
            GameObject goPlayerPos = FindTransform(string.Format("OccupyTowerPassUIPlayerPos{0}", i)).gameObject;
            m_listPlayerInfoPos.Add(goPlayerPos);
        }

        AddPlayerInfoList(MAX_PLAYER_COUNT, () =>
            {
                SetPlayerInfoListData(m_listPlayerInfoData);
            });

        m_spOccupyTowerPassUITitle = FindTransform("OccupyTowerPassUITitle").GetComponentsInChildren<UISprite>(true)[0];
        m_lblOccupyTowerPassUICountDown = FindTransform("OccupyTowerPassUICountDown").GetComponentsInChildren<UILabel>(true)[0];
        m_goOccupyTowerPassUIResult = FindTransform("OccupyTowerPassUIResult").gameObject;
        m_lblOccupyTowerPassUIResultText = FindTransform("OccupyTowerPassUIResultText").GetComponentsInChildren<UILabel>(true)[0];
        m_goOccupyTowerPassUIReward = FindTransform("OccupyTowerPassUIReward").gameObject;
        m_lblOccupyTowerPassUIRewardText = FindTransform("OccupyTowerPassUIRewardText").GetComponentsInChildren<UILabel>(true)[0];

        m_lblOccupyTowerPassUIPlayerTitleRank = FindTransform("OccupyTowerPassUIPlayerTitleRank").GetComponentsInChildren<UILabel>(true)[0];
        m_lblOccupyTowerPassUIPlayerTitleAddition = FindTransform("OccupyTowerPassUIPlayerTitleAddition").GetComponentsInChildren<UILabel>(true)[0];

        Initialize();
    }
开发者ID:lbddk,项目名称:ahzs-client,代码行数:32,代码来源:OccupyTowerPassUIViewManager.cs


示例19: SessionCell

		const int buttonSpace = 45; //24;
		
		public SessionCell (UITableViewCellStyle style, NSString ident, Session showSession, string big, string small) : base (style, ident)
		{
			SelectionStyle = UITableViewCellSelectionStyle.Blue;
			
			titleLabel = new UILabel () {
				TextAlignment = UITextAlignment.Left,
				BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f)
			};
			speakerLabel = new UILabel () {
				TextAlignment = UITextAlignment.Left,
				Font = smallFont,
				TextColor = UIColor.DarkGray,
				BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f)
			};
			locationImageView = new UIImageView();
			locationImageView.Image = building;

			button = UIButton.FromType (UIButtonType.Custom);
			button.TouchDown += delegate {
				UpdateImage (ToggleFavorite ());
				if (AppDelegate.IsPad) {
					NSObject o = new NSObject();
					NSDictionary progInfo = NSDictionary.FromObjectAndKey(o, new NSString("FavUpdate"));

					NSNotificationCenter.DefaultCenter.PostNotificationName(
						"NotificationFavoriteUpdated", o, progInfo);
				}
			};
			UpdateCell (showSession, big, small);
			
			ContentView.Add (titleLabel);
			ContentView.Add (speakerLabel);
			ContentView.Add (button);
			ContentView.Add (locationImageView);
		}
开发者ID:topcbl,项目名称:mobile-samples,代码行数:37,代码来源:SessionCell.cs


示例20: Init

    public override void Init()
    {
        base.Init();

		percentLabel = FindComponent<UILabel>("percent");
		detailLabel = FindComponent<UILabel>("detail");
    }
开发者ID:HawardLocke,项目名称:MadLand,代码行数:7,代码来源:LaunchPanel.cs



注:本文中的UILabel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UILocalNotification类代码示例发布时间:2022-05-24
下一篇:
C# UIKit.UILabel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap