Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.inflate(R.layout.fragment_smart_card_rw, container, false);

            SharedPreferences settings = Activity.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE);

            logicalNameEditText      = (EditText)view.findViewById(R.id.editTextLogicalName);
            logicalNameEditText.Text = settings.getString(MainActivity.KEY_LOGICAL_NAME_SMART_CARD_RW, getString([email protected]_card_rw));

            view.findViewById(R.id.buttonOpen).OnClickListener        = this;
            view.findViewById(R.id.buttonClaim).OnClickListener       = this;
            view.findViewById(R.id.buttonRelease).OnClickListener     = this;
            view.findViewById(R.id.buttonClose).OnClickListener       = this;
            view.findViewById(R.id.buttonInfo).OnClickListener        = this;
            view.findViewById(R.id.buttonCheckHealth).OnClickListener = this;
            view.findViewById(R.id.buttonReadData).OnClickListener    = this;

            CheckBox checkBox = (CheckBox)view.findViewById(R.id.checkBoxDeviceEnabled);

            checkBox.OnCheckedChangeListener = this;

            RadioGroup radioGroup = (RadioGroup)view.findViewById(R.id.radioGroup1);

            radioGroup.OnCheckedChangeListener = this;
            radioGroup = (RadioGroup)view.findViewById(R.id.radioGroup2);
            radioGroup.OnCheckedChangeListener = this;

            readDataTextView = (TextView)view.findViewById(R.id.textViewReadData);
            stateTextView    = (TextView)view.findViewById(R.id.textViewState);
            return(view);
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.inflate(R.layout.fragment_cash_drawer, container, false);

            SharedPreferences settings = Activity.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE);

            logicalNameEditText      = (EditText)view.findViewById(R.id.editTextLogicalName);
            logicalNameEditText.Text = settings.getString(MainActivity.KEY_LOGICAL_NAME_POS_PRINTER, getString([email protected]_drawer));

            view.findViewById(R.id.buttonOpen).OnClickListener        = this;
            view.findViewById(R.id.buttonClaim).OnClickListener       = this;
            view.findViewById(R.id.buttonRelease).OnClickListener     = this;
            view.findViewById(R.id.buttonClose).OnClickListener       = this;
            view.findViewById(R.id.buttonInfo).OnClickListener        = this;
            view.findViewById(R.id.buttonCheckHealth).OnClickListener = this;

            deviceEnabledCheckBox = (CheckBox)view.findViewById(R.id.checkBoxDeviceEnabled);
            deviceEnabledCheckBox.OnCheckedChangeListener = this;

            view.findViewById(R.id.buttonOpenDrawer).OnClickListener      = this;
            view.findViewById(R.id.buttonGetDrawerOpened).OnClickListener = this;

            stateTextView = (TextView)view.findViewById(R.id.textViewState);

            deviceMessagesTextView = (TextView)view.findViewById(R.id.textViewDeviceMessages);
            deviceMessagesTextView.MovementMethod           = new ScrollingMovementMethod();
            deviceMessagesTextView.VerticalScrollBarEnabled = true;
            return(view);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Init. </summary>
 /// <param name="context"> application context. </param>
 private EngagementNativePushAgent(Context context)
 {
     /* Init */
     mContext         = context;
     mEngagementAgent = EngagementAgent.getInstance(context);
     mStorage         = context.getSharedPreferences(STORAGE_FILE, 0);
 }
Ejemplo n.º 4
0
        protected internal override void onDestroy()
        {
            Log.d(TAG, "onDestroy");
            unbindService(mConnection);
            SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);

            preferences.edit().putInt(FLOATING_ALIGNMENT_STATE_TAG, mFloatingController.BarAlignment).apply();
            base.onDestroy();
        }
        public override void onDestroyView()
        {
            base.onDestroyView();

            SharedPreferences settings = Activity.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE);

            SharedPreferences.Editor editor = settings.edit();
            editor.putString(MainActivity.KEY_LOGICAL_NAME_POS_PRINTER, logicalNameEditText.Text.ToString());
            editor.commit();
        }
Ejemplo n.º 6
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            Log.d(TAG, "onCreate");
            ContentView = R.layout.activity_main;
            base.onCreate(savedInstanceState);
            this.mService = null;



            // binding to local service.
            this.bindService(new Intent(this, typeof(MainService)), this.mConnection, 0);

            // Views are being set from the layout.
            mFloatingController = (FloatingController)findViewById(R.id.jam_control);
            //Load position form shared preference
            SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
            int barAlignment = preferences.getInt(FLOATING_ALIGNMENT_STATE_TAG, mFloatingController.BarAlignment);

            /// <summary>
            ///This method is used to set floating controller position
            /// To set position you must used one of below value:
            /// HORIZONTAL POSITION
            /// 5 - BOTTOM RIGHT
            /// 6 - BOTTOM LEFT
            /// 4 - TOP RIGHT
            /// 7 - TOP LEFT
            ///
            /// VERTICAL POSITION
            /// 15 - BOTTOM RIGHT
            /// 16 - BOTTOM LEFT
            /// 14 - TOP RIGHT
            /// 17 - TOP LEFT
            /// </summary>
            mFloatingController.loadBarState(barAlignment);
            this.mPlayButton = (ImageButton)findViewById(R.id.playButton);
            this.mStopButton = (ImageButton)findViewById(R.id.stopButton);

            // Received intent is being read.
            Intent intent = Intent;

            if (intent != null)
            {
                this.readIntent(intent);
                changeTitle();
            }

            // Controls actions are being set.
            // Only one button is visible at a time, so visibility needs to be
            // changed.
            this.mPlayButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this);
            this.mStopButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
        public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.inflate(R.layout.fragment_pos_printer_common, container, false);

            SharedPreferences settings = Activity.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE);

            logicalNameEditText      = (EditText)view.findViewById(R.id.editTextLogicalName);
            logicalNameEditText.Text = settings.getString(MainActivity.KEY_LOGICAL_NAME_POS_PRINTER, getString([email protected]_printer));

            view.findViewById(R.id.buttonOpen).OnClickListener        = this;
            view.findViewById(R.id.buttonClaim).OnClickListener       = this;
            view.findViewById(R.id.buttonRelease).OnClickListener     = this;
            view.findViewById(R.id.buttonClose).OnClickListener       = this;
            view.findViewById(R.id.buttonInfo).OnClickListener        = this;
            view.findViewById(R.id.buttonCheckHealth).OnClickListener = this;

            deviceEnabledCheckBox = (CheckBox)view.findViewById(R.id.checkBoxDeviceEnabled);
            deviceEnabledCheckBox.OnCheckedChangeListener = this;
            asyncModeCheckBox = (CheckBox)view.findViewById(R.id.checkBoxAsyncMode);
            asyncModeCheckBox.OnCheckedChangeListener = this;
            try
            {
                deviceEnabledCheckBox.Checked = posPrinter.DeviceEnabled;
            }
            catch (JposException e)
            {
                // TODO Auto-generated catch block
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }

            try
            {
                asyncModeCheckBox.Checked = posPrinter.AsyncMode;
            }
            catch (JposException e)
            {
                // TODO Auto-generated catch block
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }

            stateTextView = (TextView)view.findViewById(R.id.textViewState);

            deviceMessagesTextView = (TextView)view.findViewById(R.id.textViewDeviceMessages);
            deviceMessagesTextView.MovementMethod           = new ScrollingMovementMethod();
            deviceMessagesTextView.VerticalScrollBarEnabled = true;
            return(view);
        }
Ejemplo n.º 8
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            Log.d(TAG, "onCreate");
            ContentView = R.layout.activity_main;
            base.onCreate(savedInstanceState);
            mService = null;
            //binding to local service.
            bindService(new Intent(this, typeof(MainService)), mConnection, 0);

            //Views are being set from the layout.

            mFloatingController = (FloatingController)findViewById(R.id.jam_control);
            SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
            int barAlignment = preferences.getInt(FLOATING_ALIGNMENT_STATE_TAG, mFloatingController.BarAlignment);

            /// <summary>
            ///This method is used to set floating controller position
            /// To set position you must used one of below value:
            /// HORIZONTAL POSITION
            /// 5 - BOTTOM RIGHT
            /// 6 - BOTTOM LEFT
            /// 4 - TOP RIGHT
            /// 7 - TOP LEFT
            ///
            /// VERTICAL POSITION
            /// 15 - BOTTOM RIGHT
            /// 16 - BOTTOM LEFT
            /// 14 - TOP RIGHT
            /// 17 - TOP LEFT
            /// </summary>
            mFloatingController.loadBarState(barAlignment);
            ViewGroup vg = (ViewGroup)findViewById(R.id.layout_keys);

            int size = vg.ChildCount;

            for (int i = 0; i < size; ++i)
            {
                View v = vg.getChildAt(i);
                if (v is KeyButton)
                {
                    v.OnTouchListener = this;
                }
            }
        }
Ejemplo n.º 9
0
 public PersistedSettings(SinchService outerInstance, Context context)
 {
     this.outerInstance = outerInstance;
     mStore             = context.getSharedPreferences(PREF_KEY, MODE_PRIVATE);
 }
	  /// <summary>
	  /// Init. </summary>
	  /// <param name="context"> application context. </param>
	  private EngagementNativePushAgent(Context context)
	  {
		/* Init */
		mContext = context;
		mEngagementAgent = EngagementAgent.getInstance(context);
		mStorage = context.getSharedPreferences(STORAGE_FILE, 0);
	  }
Ejemplo n.º 11
0
			public PersistedSettings(SinchService outerInstance, Context context)
			{
				this.outerInstance = outerInstance;
				mStore = context.getSharedPreferences(PREF_KEY, MODE_PRIVATE);
			}
Ejemplo n.º 12
0
 void android.content.SharedPreferences_OnSharedPreferenceChangeListener.onSharedPreferenceChanged(android.content.SharedPreferences arg0, java.lang.String arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.content.SharedPreferences_OnSharedPreferenceChangeListener_._onSharedPreferenceChanged1765, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.content.SharedPreferences_OnSharedPreferenceChangeListener_.staticClass, global::android.content.SharedPreferences_OnSharedPreferenceChangeListener_._onSharedPreferenceChanged1765, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
 }