当前位置: 首页>>代码示例>>C#>>正文


C# Bundle.PutInt方法代码示例

本文整理汇总了C#中Bundle.PutInt方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.PutInt方法的具体用法?C# Bundle.PutInt怎么用?C# Bundle.PutInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bundle的用法示例。


在下文中一共展示了Bundle.PutInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateArguments

 public static Bundle CreateArguments(int errorCode, int requestCode)
 {
    Bundle args = new Bundle();
    args.PutInt(GooglePlayServicesErrorDialogFragment.ARG_ERROR_CODE, errorCode);
    args.PutInt(GooglePlayServicesErrorDialogFragment.ARG_REQUEST_CODE, requestCode);
    return args;
 }
开发者ID:MahendrenGanesan,项目名称:samples,代码行数:7,代码来源:GooglePlayServicesErrorDialogFragment.cs

示例2: NewInstance

        public static RegisterUserFragment NewInstance(GoFragments go)
        {
            var fragment = new RegisterUserFragment ();
            var args = new Bundle ();
            switch (go) {

            case GoFragments.InitFragment:

                args.PutInt ("Go", 0);

                break;

            case GoFragments.SubastaFragment:

                args.PutInt ("Go", 1);

                break;
            default:
                args.PutInt ("Go", 0);
                break;
            }

            fragment.Arguments = args;
            return fragment;
        }
开发者ID:jhondiaz,项目名称:Poraka,代码行数:25,代码来源:RegisterUserFragment.cs

示例3: OnSaveInstanceState

        public override void OnSaveInstanceState (Bundle outState)
        {
            base.OnSaveInstanceState (outState);

            outState.PutInt (DigitsEnteredKey, digitsEntered);
            outState.PutInt (NewDurationHoursKey, newDuration.Hours);
            outState.PutInt (NewDurationMinutesKey, newDuration.Minutes);
        }
开发者ID:karabatov,项目名称:mobile,代码行数:8,代码来源:ChangeTimeEntryDurationDialogFragment.cs

示例4: Create

 public static DialogFragment Create(int errorCode, int requestCode)
 {
    DialogFragment fragment = new GooglePlusErrorDialogFragment();
    Bundle args = new Bundle();
    args.PutInt(GooglePlusErrorDialogFragment.ARG_ERROR_CODE, errorCode);
    args.PutInt(GooglePlusErrorDialogFragment.ARG_REQUEST_CODE, requestCode);
    fragment.SetArguments(args);
    return fragment;
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:9,代码来源:GooglePlusErrorDialogFragment.cs

示例5: NewInstance

 public static MessageDialog NewInstance(int message, int title)
 {
     var dialog = new MessageDialog();
     var args = new Bundle();
     args.PutInt(MESSAGE, message);
     args.PutInt(TITLE, title);
     dialog.Arguments = args;
     return dialog;
 }
开发者ID:lsgsk,项目名称:AndroidPatterns,代码行数:9,代码来源:MessageDialog.cs

示例6: newInstance

		public static TrickSelectorPreMenuDialogFragment newInstance(int position, int rank)
		{
			var frag = new TrickSelectorPreMenuDialogFragment();
			args = new Bundle();
			args.PutInt("Rank", rank);
			args.PutInt("Pos", position);
			frag.Arguments = args;

			return frag;
		}
开发者ID:JMHornberg,项目名称:PJ6000-Hovedprosjekt,代码行数:10,代码来源:TrickSelectorPreMenuDialogFragment.cs

示例7: NewInstance

        public static ValueChooserDialogFragment NewInstance(int id, int titleId, int itemsArrayId)
        {
            ValueChooserDialogFragment fragment = new ValueChooserDialogFragment();
            Bundle args = new Bundle();
            args.PutInt(ARG_ID, id);
            args.PutInt(ARG_TITLE, titleId);
            args.PutInt(ARG_ITEMS_ARRAY, itemsArrayId);
            fragment.Arguments = args;

            return fragment;
        }
开发者ID:GuyMicciche,项目名称:ActionsContentView,代码行数:11,代码来源:ValueChooserDialogFragment.cs

示例8: NewInstance

        public static TimePickerFragment NewInstance(DateTime date)
        {
            TimePickerFragment fragment = new TimePickerFragment();
            fragment.mDate = date;

            Bundle args = new Bundle();
            args.PutInt(EXTRA_HOUR, date.Hour);
            args.PutInt(EXTRA_MINUTE, date.Minute);
            fragment.Arguments = args;

            return fragment;
        }
开发者ID:yingfangdu,项目名称:BNR,代码行数:12,代码来源:TimePickerFragment.cs

示例9: NewInstance

        public static DatePickerFragment NewInstance(DateTime date)
        {
            DatePickerFragment fragment = new DatePickerFragment();
            fragment.mDate = date;

            Bundle args = new Bundle();
            args.PutInt(EXTRA_YEAR, date.Year);
            args.PutInt(EXTRA_MONTH, date.Month);
            args.PutInt(EXTRA_DAY, date.Day);
            fragment.Arguments = args;

            return fragment;
        }
开发者ID:yingfangdu,项目名称:BNR,代码行数:13,代码来源:DatePickerFragment.cs

示例10: NewInstance

		/**
	     * Create a new instance of DetailFragment.
	     * @param resourceId The resource ID of the Drawable image to show
	     * @param title The title of the image
	     * @param x The horizontal position of the grid item in pixel
	     * @param y The vertical position of the grid item in pixel
	     * @param width The width of the grid item in pixel
	     * @param height The height of the grid item in pixel
	     * @return a new instance of DetailFragment
	     */
		public static DetailFragment NewInstance (int resourceId, string title, int x, int y, int width, int height)
		{
			var fragment = new DetailFragment ();
			var args = new Bundle ();
			args.PutInt (ARG_RESOURCE_ID, resourceId);
			args.PutString (ARG_TITLE, title);
			args.PutInt (ARG_X, x);
			args.PutInt (ARG_Y, y);
			args.PutInt (ARG_WIDTH, width);
			args.PutInt (ARG_HEIGHT, height);
			fragment.Arguments = args;
			return fragment;
		}
开发者ID:EssMarkus,项目名称:monodroid-samples,代码行数:23,代码来源:DetailFragment.cs

示例11: NewInstance

        public static DatePickerFragment NewInstance(Action<int, int, int> OnDateSet, int year, int monthOfYear, int dayOfMonth)
        {
            var fragment = new DatePickerFragment();
            fragment._onDateSet = OnDateSet;

            var args = new Bundle();
            args.PutInt("year", year);
            args.PutInt("monthOfYear", monthOfYear - 1);
            args.PutInt("dayOfMonth", dayOfMonth);
            fragment.Arguments = args;

            return fragment;
        }
开发者ID:fatelord,项目名称:chgk,代码行数:13,代码来源:DatePickerFragment.cs

示例12: NewInstance

        public static TimeFragment NewInstance(int theme,int hour,int minute,
			bool isClientSpecified24HourTime,bool is24HourTime)
        {
            TimeFragment t = new TimeFragment ();
            Bundle b = new Bundle ();
            b.PutInt ("theme", theme);
            b.PutInt ("hour", hour);
            b.PutInt ("minute", minute);
            b.PutBoolean ("isClientSpecified24HourTime", isClientSpecified24HourTime);
            b.PutBoolean ("is24HourTime", is24HourTime);
            t.Arguments = b;

            return t;
        }
开发者ID:meirongIn83,项目名称:SlideDatetimePickerCSharp,代码行数:14,代码来源:TimeFragment.cs

示例13: NewInstance

		/**
     * Return an instance of TimeFragment with its bundle filled with the
     * constructor arguments. The values in the bundle are retrieved in
     * {@link #onCreateView()} below to properly initialize the TimePicker.
     *
     * @param theme
     * @param hour
     * @param minute
     * @param isClientSpecified24HourTime
     * @param is24HourTime
     * @return
     */
		public static TimeFragment NewInstance(int Theme, int Hour, int Minute,bool IsClientSpecified24HourTime, bool Is24HourTime)
		{
			TimeFragment timeFragment = new TimeFragment();

			Bundle bundle = new Bundle();
			bundle.PutInt("theme", Theme);
			bundle.PutInt("hour", Hour);
			bundle.PutInt("minute", Minute);
			bundle.PutBoolean("isClientSpecified24HourTime", IsClientSpecified24HourTime);
			bundle.PutBoolean("is24HourTime", Is24HourTime);
			timeFragment.Arguments=bundle;

			return timeFragment;
		}
开发者ID:jeedey93,项目名称:xamarin-android-samples,代码行数:26,代码来源:TimeFragment.cs

示例14: newInstance

		/**
     * Return an instance of DateFragment with its bundle filled with the
     * constructor arguments. The values in the bundle are retrieved in
     * {@link #onCreateView()} below to properly initialize the DatePicker.
     *
     * @param theme
     * @param year
     * @param month
     * @param day
     * @param minDate
     * @param maxDate
     * @return an instance of DateFragment
     */
		public static DateFragment newInstance(int Theme, int Year, int Month,int Day, Date MinDate, Date MaxDate)
		{
			DateFragment dateFragment = new DateFragment();

			Bundle b = new Bundle();
			b.PutInt("theme", Theme);
			b.PutInt("year", Year);
			b.PutInt("month", Month);
			b.PutInt("day", Day);
			b.PutSerializable("minDate", MinDate);
			b.PutSerializable("maxDate", MaxDate);
			dateFragment.Arguments=b;

			return dateFragment;
		}
开发者ID:jeedey93,项目名称:xamarin-android-samples,代码行数:28,代码来源:DateFragment.cs

示例15: SaveGameAndPlayer

        protected void SaveGameAndPlayer()
        {
            // Create an array to store player into
            List<GamePlayer> attendees = new List<GamePlayer>();
            int listItemCount = _playersListView.ChildCount;
            for (int i = 0; i < listItemCount; i++)
            {
                CheckBox cbox = (_playersListView.GetChildAt(i)).FindViewById<CheckBox>(Resource.Id.playerCheckbox);
                if (cbox.Checked)
                {
                    attendees.Add(new GamePlayer()
                    {
                        PlayerId = (int)GameData.PlayerService.Players[i].Id,
                        PlayerAlias = GameData.PlayerService.Players[i].Name,
                        Score = 0
                    });
                }
            }
            Game game = new Game()
            {
                Name = Arguments.GetString("game_name"),
                Players = attendees
            };
            GameData.Service.SaveGame(game);
            //StartActivity(typeof(GamesActivity));

            var fragment = new GameFragment();
            Bundle bundle = new Bundle();
            bundle.PutInt("game_id", (int)game.Id);
            fragment.Arguments = bundle;

            var trans = Activity.SupportFragmentManager.BeginTransaction();
            trans.Add(Resource.Id.fragmentContainer, fragment, "GameFragment");
            trans.Commit();
        }
开发者ID:quanb,项目名称:SimpleScoreBoard,代码行数:35,代码来源:GameAddAttendeeFragment.cs


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