Пример #1
0
        public Bundle toBundle()
        {
            Bundle midi = new Bundle();

            midi.putInt(com.disappointedpig.midi.MIDIConstants.MSG_COMMAND, this.channel_status);
            midi.putInt(com.disappointedpig.midi.MIDIConstants.MSG_CHANNEL, this.channel);
            midi.putInt(com.disappointedpig.midi.MIDIConstants.MSG_NOTE, this.note);
            midi.putInt(com.disappointedpig.midi.MIDIConstants.MSG_VELOCITY, this.velocity);
            return(midi);
        }
 /// <summary>
 /// Saves the current state to bundle
 /// </summary>
 /// <param name="savedState"> the bundle we should save to </param>
 internal virtual void writeToBundle(Bundle savedState)
 {
     savedState.putString(MEDIA_URI, mMediaUri != null ? mMediaUri.ToString() : null);
     savedState.putString(COVER_URI, mAlbumArtUri != null ? mAlbumArtUri.ToString() : null);
     savedState.putString(TITLE, mTitle);
     savedState.putString(ARTIST, mArtist);
     savedState.putString(MIMETYPE, mMimeType);
     savedState.putString(PLAYER_STATE, mPlayback != null ? mPlayback.ToString() : null);
     savedState.putInt(POSITION, mPosition);
     savedState.putInt(DURATION, mDuration);
     savedState.putInt(MUTE, mMute ? 1 : 0);
     savedState.putString(DEVICE_ID, mDeviceId);
 }
Пример #3
0
        public Bundle getRInfo()
        {
            Bundle rinfo = new Bundle();

            rinfo.putString(com.disappointedpig.midi.MIDIConstants.RINFO_ADDR, address.getHostAddress());
            rinfo.putInt(MIDIConstants.RINFO_PORT, port);
            return(rinfo);
        }
Пример #4
0
            /// <summary>
            /// Saves the current state to bundle
            /// </summary>
            /// <param name="savedState"> the bundle we should save to </param>
            internal virtual void writeToBundle(Bundle savedState)
            {
                savedState.putString(MEDIA_URI, mMediaUri.ToString());

                if (mSubtitlesUri != null)
                {
                    savedState.putString(SUBTITLES_URI, mSubtitlesUri.ToString());
                }

                savedState.putString(TITLE, mTitle);
                savedState.putString(MIME_TYPE, mMimeType);
                savedState.putString(PLAYER_STATE, mPlayback.ToString());
                savedState.putInt(POSITION, mPosition);
                savedState.putInt(DURATION, mDuration);
                savedState.putInt(MUTE, mMute?1:0);
                savedState.putString(DEVICE_ID, mDeviceId);
            }
Пример #5
0
 public override void onSaveInstanceState(Bundle outState)
 {
     base.onSaveInstanceState(outState);
     if (mDeviceId != null)
     {
         outState.putString("deviceId", mDeviceId);
         outState.putInt("selectedType", mSelectedType);
     }
 }
 public static Fragment newInstance(int position, Book book, String epubFileName, bool isSmilAvailable) {
     EPubReaderFragment fragment = new EPubReaderFragment();
     Bundle args = new Bundle();
     args.putInt(BUNDLE_POSITION, position);
     args.putSerializable(BUNDLE_BOOK, book);
     args.putString(BUNDLE_EPUB_FILE_NAME, epubFileName);
     args.putSerializable(BUNDLE_IS_SMIL_AVAILABLE, isSmilAvailable);
     fragment.setArguments(args);
     return fragment;
 }
Пример #7
0
        /// <summary>
        /// This method saves current configuration in AppInfo of this application
        ///
        /// </summary>
        private void setConfiguration(SapaApp sapaApp, int volume)
        {
            Bundle bundle = new Bundle();

            bundle.putInt("CONFIG", volume);
            SapaAppInfo info = this.mAppInfoList[sapaApp.InstanceId];

            Log.d(TAG, "kaka volume[" + volume + "] was set in " + sapaApp.InstanceId);
            info.Configuration = bundle;
        }
Пример #8
0
        public Bundle rinfo()
        {
            Bundle rinfo = new Bundle();

            rinfo.putString(RINFO_NAME, name);
            rinfo.putString(RINFO_ADDR, address);
            rinfo.putInt(RINFO_PORT, port);
            rinfo.putBoolean(RINFO_RECON, reconnect);
            return(rinfo);
        }
Пример #9
0
        public override void OnRequestConfigBandwidthDone(int errorCode)
        {
            Bundle  args = new Bundle();
            Message msg  = mMsgHandler.obtainMessage(EVENT_CONFIG_D2D_BW_DONE);

            Log.Verbose(TAG, "OnRequestConfigBandwidthDone: errorCode = " + errorCode);

            args.putInt(D2D_CMD_RESULT_CODE, errorCode);
            msg.setData(args);
            mMsgHandler.sendMessage(msg);
        }
Пример #10
0
        public override void OnRequestSendCtrlCmdDone(int errorCode)
        {
            Bundle  args = new Bundle();
            Message msg  = mMsgHandler.obtainMessage(EVENT_SEND_D2D_CTRL_CMD_DONE);

            Log.Verbose(TAG, "OnRequestSendCtrlCmdDone: errorCode = " + errorCode);

            args.putInt(D2D_CMD_RESULT_CODE, errorCode);
            msg.setData(args);
            mMsgHandler.sendMessage(msg);
        }
Пример #11
0
        public override void OnRequestFreqNegotiationDone(int errorCode)
        {
            Bundle  args = new Bundle();
            Message msg  = mMsgHandler.obtainMessage(EVENT_REQUEST_FREQUENCY_NEGOTIATION_DONE);

            Log.Verbose(TAG, "OnRequestFreqNegotiationDone: errorCode = " + errorCode);

            args.putInt(D2D_CMD_RESULT_CODE, errorCode);
            msg.setData(args);
            mMsgHandler.sendMessage(msg);
        }
Пример #12
0
        private static Message buildMessage(int action, string timeStamp)
        {
            Bundle bundle = new Bundle(2);

            bundle.putInt(WorkerHandler.ACTION, action);
            bundle.putString(WorkerHandler.TIMESTAMP, timeStamp);
            Message message = new Message();

            message.Data = bundle;
            return(message);
        }
Пример #13
0
        public override void OnRequestFreqHopCtrlDone(int errorCode)
        {
            Bundle  args = new Bundle();
            Message msg  = mMsgHandler.obtainMessage(EVENT_FREQUENCY_HOPPING_CTRL_DONE);

            Log.Verbose(TAG, "OnRequestFreqHopCtrlDone: errorCode = " + errorCode);

            args.putInt(D2D_CMD_RESULT_CODE, errorCode);
            msg.setData(args);
            mMsgHandler.sendMessage(msg);
        }
Пример #14
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: public static AlertDialogFragment newInstance(@DrawableRes int iconId, CharSequence title, CharSequence message, boolean finishActivity)
            public static AlertDialogFragment newInstance(int iconId, CharSequence title, CharSequence message, bool finishActivity)
            {
                AlertDialogFragment fragment = new AlertDialogFragment();

                Bundle args = new Bundle();

                args.putInt("icon", iconId);
                args.putCharSequence("title", title);
                args.putCharSequence("message", message);
                args.putBoolean("finish_activity", finishActivity);

                fragment.Arguments = args;
                return(fragment);
            }
			/// <summary>
			/// Saves the current state to bundle
			/// </summary>
			/// <param name="savedState"> the bundle we should save to </param>
			internal virtual void writeToBundle(Bundle savedState)
			{
				savedState.putString(MEDIA_URI, mMediaUri.ToString());

				if (mSubtitlesUri != null)
				{
					savedState.putString(SUBTITLES_URI, mSubtitlesUri.ToString());
				}

				savedState.putString(TITLE, mTitle);
				savedState.putString(MIME_TYPE, mMimeType);
				savedState.putString(PLAYER_STATE, mPlayback.ToString());
				savedState.putInt(POSITION, mPosition);
				savedState.putInt(DURATION, mDuration);
				savedState.putInt(MUTE, mMute?1:0);
				savedState.putString(DEVICE_ID, mDeviceId);
			}
			/// <summary>
			/// Saves the current state to bundle
			/// </summary>
			/// <param name="savedState"> the bundle we should save to </param>
			internal virtual void writeToBundle(Bundle savedState)
			{
				savedState.putString(MEDIA_URI, mMediaUri != null ? mMediaUri.ToString() : null);
				savedState.putString(COVER_URI, mAlbumArtUri != null ? mAlbumArtUri.ToString() : null);
				savedState.putString(TITLE, mTitle);
				savedState.putString(ARTIST, mArtist);
				savedState.putString(MIMETYPE, mMimeType);
				savedState.putString(PLAYER_STATE, mPlayback != null ? mPlayback.ToString() : null);
				savedState.putInt(POSITION, mPosition);
				savedState.putInt(DURATION, mDuration);
				savedState.putInt(MUTE, mMute ? 1 : 0);
				savedState.putString(DEVICE_ID, mDeviceId);
			}
Пример #17
0
		public override void onSaveInstanceState(Bundle outState)
		{
			base.onSaveInstanceState(outState);
			if (mDeviceId != null)
			{
				outState.putString("deviceId", mDeviceId);
				outState.putInt("selectedType", mSelectedType);
			}
		}