protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.room; ActionBar actionBar = ActionBar; actionBar.HomeButtonEnabled = true; actionBar.DisplayHomeAsUpEnabled = true; mSession = new MySession(this); mMessageEditText = (EditText) findViewById(R.id.message); ViewGroup preview = (ViewGroup) findViewById(R.id.preview); mSession.PreviewView = preview; mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); ViewPager playersView = (ViewPager) findViewById(R.id.pager); mSession.PlayersViewContainer = playersView; mSession.setMessageView((TextView) findViewById(R.id.messageView), (ScrollView) findViewById(R.id.scroller)); mSession.connect(); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.xy_chart; // the top part of the UI components for adding new data points mX = (EditText)findViewById(R.id.xValue); mY = (EditText)findViewById(R.id.yValue); mAdd = (Button)findViewById(R.id.add); // set some properties on the main renderer mRenderer.ApplyBackgroundColor = true; mRenderer.BackgroundColor = Color.argb(100, 50, 50, 50); mRenderer.AxisTitleTextSize = 16; mRenderer.ChartTitleTextSize = 20; mRenderer.LabelsTextSize = 15; mRenderer.LegendTextSize = 15; mRenderer.Margins = new int[] { 20, 30, 15, 0 }; mRenderer.ZoomButtonsVisible = true; mRenderer.PointSize = 5; // the button that handles the new series of data creation mNewSeries = (Button)findViewById(R.id.new_series); mNewSeries.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); mAdd.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this); }
private void printBitmap() { string pathName = mTextView.Text.ToString(); Bitmap bitmap = null; if (pathName.Length == 0) { mImageView.buildDrawingCache(); bitmap = mImageView.DrawingCache; } EditText editText = (EditText)findViewById(R.id.editText1); int horizontalStartPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText2); int verticalStartPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText3); int width = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText4); int level = int.Parse(editText.Text.ToString()); if (bitmap == null) { MainActivity.mBixolonLabelPrinter.drawBitmap(pathName, horizontalStartPosition, verticalStartPosition, width, level); } else { MainActivity.mBixolonLabelPrinter.drawBitmap(bitmap, horizontalStartPosition, verticalStartPosition, width, level); } MainActivity.mBixolonLabelPrinter.print(1, 1); }
private static void setRoomNameFieldInDialog(EditText roomNameEditText, AlertDialog.Builder alertDialogBuilder, Context context) { roomNameEditText.Hint = "room name"; int horizontalPadding = context.Resources.getDimensionPixelOffset(R.dimen.activity_horizontal_margin); int verticalPadding = context.Resources.getDimensionPixelOffset(R.dimen.activity_vertical_margin); alertDialogBuilder.setView(roomNameEditText, horizontalPadding, verticalPadding, horizontalPadding, 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; }
//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); }
//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); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.room; ActionBar actionBar = ActionBar; actionBar.HomeButtonEnabled = true; actionBar.DisplayHomeAsUpEnabled = true; mSession = new MySession(this); mMessageEditText = (EditText)findViewById(R.id.message); ViewGroup preview = (ViewGroup)findViewById(R.id.preview); mSession.PreviewView = preview; mNotificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); ViewPager playersView = (ViewPager)findViewById(R.id.pager); mSession.PlayersViewContainer = playersView; mSession.setMessageView((TextView)findViewById(R.id.messageView), (ScrollView)findViewById(R.id.scroller)); mSession.connect(); }
//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; }
private void printDataMatrix() { EditText editText = (EditText)findViewById(R.id.editText1); if (editText.Text.ToString().Equals("")) { editText.Text = "BIXOLON Label Printer"; } string data = editText.Text.ToString(); editText = (EditText)findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "200"; } int horizontalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int verticalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText4); if (editText.Text.ToString().Equals("")) { editText.Text = "2"; } int size = int.Parse(editText.Text.ToString()); CheckBox checkBox = (CheckBox)findViewById(R.id.checkBox1); bool isReversed = checkBox.Checked; int rotation = BixolonLabelPrinter.ROTATION_NONE; RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio2: rotation = BixolonLabelPrinter.ROTATION_90_DEGREES; break; case R.id.radio3: rotation = BixolonLabelPrinter.ROTATION_180_DEGREES; break; case R.id.radio4: rotation = BixolonLabelPrinter.ROTATION_270_DEGREES; break; } MainActivity.mBixolonLabelPrinter.drawDataMatrix(data, horizontalPosition, verticalPosition, size, isReversed, rotation); MainActivity.mBixolonLabelPrinter.print(1, 1); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.login; mLoginName = (EditText)findViewById(R.id.loginName); mLoginButton = (Button)findViewById(R.id.loginButton); mLoginButton.Enabled = false; mLoginButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.login; mLoginName = (EditText) findViewById(R.id.loginName); mLoginButton = (Button) findViewById(R.id.loginButton); mLoginButton.Enabled = false; mLoginButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); }
protected virtual void onAddEditTextToDialogView(android.view.View arg0, android.widget.EditText arg1) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.preference.EditTextPreference._onAddEditTextToDialogView6806, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.preference.EditTextPreference.staticClass, global::android.preference.EditTextPreference._onAddEditTextToDialogView6806, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)); } }
private void printCircle() { EditText editText = (EditText)findViewById(R.id.editText1); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int horizontalStartPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "200"; } int verticalStartPosition = int.Parse(editText.Text.ToString()); int size = BixolonLabelPrinter.CIRCLE_SIZE_DIAMETER5; RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio1: size = BixolonLabelPrinter.CIRCLE_SIZE_DIAMETER7; break; case R.id.radio2: size = BixolonLabelPrinter.CIRCLE_SIZE_DIAMETER9; break; case R.id.radio3: size = BixolonLabelPrinter.CIRCLE_SIZE_DIAMETER11; break; case R.id.radio4: size = BixolonLabelPrinter.CIRCLE_SIZE_DIAMETER13; break; case R.id.radio5: size = BixolonLabelPrinter.CIRCLE_SIZE_DIAMETER21; break; } editText = (EditText)findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "2"; } int multiplier = int.Parse(editText.Text.ToString()); MainActivity.mBixolonLabelPrinter.drawCircle(horizontalStartPosition, verticalStartPosition, size, multiplier); MainActivity.mBixolonLabelPrinter.print(1, 1); }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_pos_printer_firmware, container, false); fileNameEditText = (EditText) view.findViewById(R.id.editTextFileName); view.findViewById(R.id.buttonBrowse).OnClickListener = this; view.findViewById(R.id.buttonGo).OnClickListener = this; deviceMessagesTextView = (TextView) view.findViewById(R.id.textViewDeviceMessages); return view; }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.main; mCallName = (EditText) findViewById(R.id.callName); mCallButton = (Button) findViewById(R.id.callButton); mCallButton.Enabled = false; mCallButton.OnClickListener = buttonClickListener; Button stopButton = (Button) findViewById(R.id.stopButton); stopButton.OnClickListener = buttonClickListener; }
public override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_pos_printer_firmware, container, false); fileNameEditText = (EditText)view.findViewById(R.id.editTextFileName); view.findViewById(R.id.buttonBrowse).OnClickListener = this; view.findViewById(R.id.buttonGo).OnClickListener = this; deviceMessagesTextView = (TextView)view.findViewById(R.id.textViewDeviceMessages); return(view); }
public override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_print_barcode; mDataEdit = (EditText) findViewById(R.id.editText1); RadioGroup radioGroup = (RadioGroup) findViewById(R.id.radioGroup1); radioGroup.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this); Button button = (Button) findViewById(R.id.button1); button.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.main; mCallName = (EditText)findViewById(R.id.callName); mCallButton = (Button)findViewById(R.id.callButton); mCallButton.Enabled = false; mCallButton.OnClickListener = buttonClickListener; Button stopButton = (Button)findViewById(R.id.stopButton); stopButton.OnClickListener = buttonClickListener; }
public static AlertDialog createConnectDialog(EditText participantEditText, DialogInterface.OnClickListener callParticipantsClickListener, DialogInterface.OnClickListener cancelClickListener, Context context) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); alertDialogBuilder.Icon = R.drawable.ic_call_black_24dp; alertDialogBuilder.Title = "Connect to a room"; alertDialogBuilder.setPositiveButton("Connect", callParticipantsClickListener); alertDialogBuilder.setNegativeButton("Cancel", cancelClickListener); alertDialogBuilder.Cancelable = false; setRoomNameFieldInDialog(participantEditText, alertDialogBuilder, context); return(alertDialogBuilder.create()); }
public static AlertDialog createConnectDialog(EditText participantEditText, DialogInterface.OnClickListener callParticipantsClickListener, DialogInterface.OnClickListener cancelClickListener, Context context) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); alertDialogBuilder.Icon = R.drawable.ic_call_black_24dp; alertDialogBuilder.Title = "Connect to a room"; alertDialogBuilder.setPositiveButton("Connect", callParticipantsClickListener); alertDialogBuilder.setNegativeButton("Cancel", cancelClickListener); alertDialogBuilder.Cancelable = false; setRoomNameFieldInDialog(participantEditText, alertDialogBuilder, context); return alertDialogBuilder.create(); }
public override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_draw_maxicode; Button button = (Button)findViewById(R.id.button1); button.OnClickListener = this; mEditText = (EditText)findViewById(R.id.editText1); mRadioGroup = (RadioGroup)findViewById(R.id.radioGroup1); mRadioGroup.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(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); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.xy_chart; mValue = (EditText) findViewById(R.id.xValue); mRenderer.ZoomButtonsVisible = true; mRenderer.StartAngle = 180; mRenderer.DisplayValues = true; mAdd = (Button) findViewById(R.id.add); mAdd.Enabled = true; mValue.Enabled = true; mAdd.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.xy_chart; mValue = (EditText)findViewById(R.id.xValue); mRenderer.ZoomButtonsVisible = true; mRenderer.StartAngle = 180; mRenderer.DisplayValues = true; mAdd = (Button)findViewById(R.id.add); mAdd.Enabled = true; mValue.Enabled = true; mAdd.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(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; }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_direct_io; mCommandEdit = (EditText) findViewById(R.id.editText1); mResponseLengthEdit = (EditText) findViewById(R.id.editText2); mCheckBox = (CheckBox) findViewById(R.id.checkBox1); mCheckBox.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this); Button button = (Button) findViewById(R.id.button1); button.OnClickListener = this; button = (Button) findViewById(R.id.button2); button.OnClickListener = this; }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_direct_io; mCommandEdit = (EditText)findViewById(R.id.editText1); mResponseLengthEdit = (EditText)findViewById(R.id.editText2); mCheckBox = (CheckBox)findViewById(R.id.checkBox1); mCheckBox.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this); Button button = (Button)findViewById(R.id.button1); button.OnClickListener = this; button = (Button)findViewById(R.id.button2); button.OnClickListener = this; }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_draw_block_two; mEditText = (EditText) findViewById(R.id.editText5); mExOrEditText7 = (EditText) findViewById(R.id.editText7); mExOrEditText8 = (EditText) findViewById(R.id.editText8); mExOrEditText9 = (EditText) findViewById(R.id.editText9); mExOrEditText10 = (EditText) findViewById(R.id.editText10); mRadioGroup = (RadioGroup) findViewById(R.id.radioGroup1); mRadioGroup.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this); Button button = (Button) findViewById(R.id.button1); button.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); }
public override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_writingbuddy_edittext; EditText editInput = (EditText)findViewById(R.id.edit_input); mOutputImageView = (ImageView)findViewById(R.id.image_output); mWritingBuddy = new SlookWritingBuddy(editInput); Button enableButton = (Button)findViewById(R.id.btn_enable); enableButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); Button modeButton = (Button)findViewById(R.id.btn_enable_image); modeButton.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_draw_block_two; mEditText = (EditText)findViewById(R.id.editText5); mExOrEditText7 = (EditText)findViewById(R.id.editText7); mExOrEditText8 = (EditText)findViewById(R.id.editText8); mExOrEditText9 = (EditText)findViewById(R.id.editText9); mExOrEditText10 = (EditText)findViewById(R.id.editText10); mRadioGroup = (RadioGroup)findViewById(R.id.radioGroup1); mRadioGroup.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this); Button button = (Button)findViewById(R.id.button1); button.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); }
public override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_print_bitmap; mImageView = (ImageView) findViewById(R.id.imageView1); mTextView = (TextView) findViewById(R.id.textView4); mWidthEdit = (EditText) findViewById(R.id.editText2); mWidthRadioGroup = (RadioGroup) findViewById(R.id.radioGroup2); mWidthRadioGroup.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this); Button button = (Button) findViewById(R.id.button1); button.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); button = (Button) findViewById(R.id.button2); button.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this); IntentFilter filter = new IntentFilter(); filter.addAction(MainActivity.ACTION_COMPLETE_PROCESS_BITMAP); registerReceiver(mReceiver, filter); }
public virtual void onClick(View v) { string data = mEditText.Text.ToString(); EditText editText = (EditText)findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "200"; } int horizontalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "200"; } int verticalPosition = int.Parse(editText.Text.ToString()); MainActivity.mBixolonLabelPrinter.drawMaxicode(data, horizontalPosition, verticalPosition, mMode); MainActivity.mBixolonLabelPrinter.print(1, 1); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_main; mPhoneNumber = (EditText) findViewById(R.id.phoneNumber); mSmsButton = (Button) findViewById(R.id.smsVerificationButton); mFlashCallButton = (Button) findViewById(R.id.callVerificationButton); mCountryIso = PhoneNumberUtils.getDefaultCountryIso(this); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String defaultCountryName = new java.util.Locale("", mCountryIso).getDisplayName(); string defaultCountryName = (new Locale("", mCountryIso)).DisplayName; //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final CountrySpinner spinner = (CountrySpinner) findViewById(R.id.spinner); CountrySpinner spinner = (CountrySpinner) findViewById(R.id.spinner); spinner.init(defaultCountryName); spinner.addCountryIsoSelectedListener(new CountryIsoSelectedListenerAnonymousInnerClassHelper(this)); resetNumberTextWatcher(mCountryIso); tryAndPrefillPhoneNumber(); }
public override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_print_bitmap; mImageView = (ImageView)findViewById(R.id.imageView1); mTextView = (TextView)findViewById(R.id.textView4); mWidthEdit = (EditText)findViewById(R.id.editText2); mWidthRadioGroup = (RadioGroup)findViewById(R.id.radioGroup2); mWidthRadioGroup.OnCheckedChangeListener = new OnCheckedChangeListenerAnonymousInnerClassHelper(this); Button button = (Button)findViewById(R.id.button1); button.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); button = (Button)findViewById(R.id.button2); button.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this); IntentFilter filter = new IntentFilter(); filter.addAction(MainActivity.ACTION_COMPLETE_PROCESS_BITMAP); registerReceiver(mReceiver, filter); }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.activity_main; mPhoneNumber = (EditText)findViewById(R.id.phoneNumber); mSmsButton = (Button)findViewById(R.id.smsVerificationButton); mFlashCallButton = (Button)findViewById(R.id.callVerificationButton); mCountryIso = PhoneNumberUtils.getDefaultCountryIso(this); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String defaultCountryName = new java.util.Locale("", mCountryIso).getDisplayName(); string defaultCountryName = (new Locale("", mCountryIso)).DisplayName; //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final CountrySpinner spinner = (CountrySpinner) findViewById(R.id.spinner); CountrySpinner spinner = (CountrySpinner)findViewById(R.id.spinner); spinner.init(defaultCountryName); spinner.addCountryIsoSelectedListener(new CountryIsoSelectedListenerAnonymousInnerClassHelper(this)); resetNumberTextWatcher(mCountryIso); tryAndPrefillPhoneNumber(); }
public TimePicker(android.content.Context context, android.util.AttributeSet attrs , int defStyle) : base(context, attrs, defStyle) { setCurrentLocale(System.Globalization.CultureInfo.CurrentCulture); android.content.res.TypedArray attributesArray = context.obtainStyledAttributes(attrs , [email protected], defStyle, 0); int layoutResourceId = attributesArray.getResourceId([email protected] .TimePicker_layout, [email protected]_picker); attributesArray.recycle(); android.view.LayoutInflater inflater = (android.view.LayoutInflater)context.getSystemService (android.content.Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(layoutResourceId, this, true); mHourSpinner = (android.widget.NumberPicker)findViewById([email protected] ); mHourSpinner.setOnValueChangedListener(new _OnValueChangeListener_147(this)); mHourSpinnerInput = (android.widget.EditText)mHourSpinner.findViewById([email protected] .id.numberpicker_input); mHourSpinnerInput.setImeOptions(android.view.inputmethod.EditorInfo.IME_ACTION_NEXT ); mDivider = (android.widget.TextView)findViewById([email protected]); if (mDivider != null) { mDivider.setText([email protected][email protected]_picker_separator); } mMinuteSpinner = (android.widget.NumberPicker)findViewById([email protected] .minute); mMinuteSpinner.setMinValue(0); mMinuteSpinner.setMaxValue(59); mMinuteSpinner.setOnLongPressUpdateInterval(100); mMinuteSpinner.setFormatter(android.widget.NumberPicker.TWO_DIGIT_FORMATTER); mMinuteSpinner.setOnValueChangedListener(new _OnValueChangeListener_175(this)); mMinuteSpinnerInput = (android.widget.EditText)mMinuteSpinner.findViewById([email protected] .id.numberpicker_input); mMinuteSpinnerInput.setImeOptions(android.view.inputmethod.EditorInfo.IME_ACTION_NEXT ); mAmPmStrings = new java.text.DateFormatSymbols().getAmPmStrings(); android.view.View amPmView = findViewById([email protected]); if (amPmView is android.widget.Button) { mAmPmSpinner = null; mAmPmSpinnerInput = null; mAmPmButton = (android.widget.Button)amPmView; mAmPmButton.setOnClickListener(new _OnClickListener_210(this)); } else { mAmPmButton = null; mAmPmSpinner = (android.widget.NumberPicker)amPmView; mAmPmSpinner.setMinValue(0); mAmPmSpinner.setMaxValue(1); mAmPmSpinner.setDisplayedValues(mAmPmStrings); mAmPmSpinner.setOnValueChangedListener(new _OnValueChangeListener_223(this)); mAmPmSpinnerInput = (android.widget.EditText)mAmPmSpinner.findViewById([email protected] .id.numberpicker_input); mAmPmSpinnerInput.setImeOptions(android.view.inputmethod.EditorInfo.IME_ACTION_DONE ); } // update controls to initial state updateHourControl(); updateAmPmControl(); setOnTimeChangedListener(NO_OP_CHANGE_LISTENER); // set to current time setCurrentHour(mTempCalendar.get(java.util.Calendar.HOUR_OF_DAY)); setCurrentMinute(mTempCalendar.get(java.util.Calendar.MINUTE)); if (!isEnabled()) { setEnabled(false); } // set the content descriptions setContentDescriptions(); }
private void printLabel() { EditText editText = (EditText)findViewById(R.id.editText1); string data = editText.Text.ToString(); editText = (EditText)findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "50"; } int horizontalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int verticalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText4); if (editText.Text.ToString().Equals("")) { editText.Text = "0"; } int rightSpace = int.Parse(editText.Text.ToString()); RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); int rotation = BixolonLabelPrinter.ROTATION_NONE; switch (radioGroup.CheckedRadioButtonId) { case R.id.radio1: rotation = BixolonLabelPrinter.ROTATION_90_DEGREES; break; case R.id.radio2: rotation = BixolonLabelPrinter.ROTATION_180_DEGREES; break; case R.id.radio3: rotation = BixolonLabelPrinter.ROTATION_270_DEGREES; break; } CheckBox checkBox = (CheckBox)findViewById(R.id.checkBox1); bool reverse = checkBox.Checked; checkBox = (CheckBox)findViewById(R.id.checkBox2); bool bold = checkBox.Checked; radioGroup = (RadioGroup)findViewById(R.id.radioGroup2); int alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_NONE; switch (radioGroup.CheckedRadioButtonId) { case R.id.radio5: alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_LEFT; break; case R.id.radio6: alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_RIGHT; break; case R.id.radio7: alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_RIGHT_TO_LEFT; break; } MainActivity.mBixolonLabelPrinter.drawText(data, horizontalPosition, verticalPosition, mFontSize, mHorizontalMultiplier, mVerticalMultiplier, rightSpace, rotation, reverse, bold, alignment); MainActivity.mBixolonLabelPrinter.print(1, 1); }
private void setPageMode() { RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); if (radioGroup.CheckedRadioButtonId == R.id.radio0) { MainActivity.mBixolonPrinter.setStandardMode(); } else { MainActivity.mBixolonPrinter.setPageMode(); radioGroup = (RadioGroup)findViewById(R.id.radioGroup2); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio2: MainActivity.mBixolonPrinter.PrintDirection = BixolonPrinter.DIRECTION_0_DEGREE_ROTATION; break; case R.id.radio3: MainActivity.mBixolonPrinter.PrintDirection = BixolonPrinter.DIRECTION_90_DEGREE_ROTATION; break; case R.id.radio4: MainActivity.mBixolonPrinter.PrintDirection = BixolonPrinter.DIRECTION_180_DEGREE_ROTATION; break; case R.id.radio5: MainActivity.mBixolonPrinter.PrintDirection = BixolonPrinter.DIRECTION_270_DEGREE_ROTATION; break; } EditText editText = (EditText)findViewById(R.id.editText1); string @string = editText.Text.ToString(); if (@string.Length == 0) { Toast.makeText(ApplicationContext, "Please enter the horizontal start position again", Toast.LENGTH_SHORT).show(); return; } int x = int.Parse(@string); editText = (EditText)findViewById(R.id.editText2); @string = editText.Text.ToString(); if (@string.Length == 0) { Toast.makeText(ApplicationContext, "Please enter the vertical start position again", Toast.LENGTH_SHORT).show(); return; } int y = int.Parse(@string); editText = (EditText)findViewById(R.id.editText3); @string = editText.Text.ToString(); if (@string.Length == 0) { Toast.makeText(ApplicationContext, "Please enter the horizontal print area again", Toast.LENGTH_SHORT).show(); return; } int width = int.Parse(@string); editText = (EditText)findViewById(R.id.editText4); @string = editText.Text.ToString(); if (@string.Length == 0) { Toast.makeText(ApplicationContext, "Please enter the vertical print area again", Toast.LENGTH_SHORT).show(); return; } int height = int.Parse(@string); MainActivity.mBixolonPrinter.setPrintArea(x, y, width, height); } }
private void printBlock() { EditText editText = (EditText)findViewById(R.id.editText1); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int horizontalStartPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int verticalStartPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "800"; } int horizontalEndPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText4); if (editText.Text.ToString().Equals("")) { editText.Text = "120"; } int verticalEndPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText5); if (editText.Text.ToString().Equals("")) { editText.Text = "10"; } int thickness = int.Parse(editText.Text.ToString()); if (mOption == BixolonLabelPrinter.BLOCK_OPTION_LINE_EXCLUSIVE_OR) { editText = (EditText)findViewById(R.id.editText7); if (editText.Text.ToString().Equals("")) { editText.Text = "200"; } int horizontalStartPositionSquare2 = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText8); if (editText.Text.ToString().Equals("")) { editText.Text = "10"; } int verticalStartPositionSquare2 = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText9); if (editText.Text.ToString().Equals("")) { editText.Text = "220"; } int horizontalEndPositionSquare2 = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText10); if (editText.Text.ToString().Equals("")) { editText.Text = "300"; } int verticalEndPositionSquare2 = int.Parse(editText.Text.ToString()); MainActivity.mBixolonLabelPrinter.drawTowBlock(horizontalStartPosition, verticalStartPosition, horizontalEndPosition, verticalEndPosition, mOption, horizontalStartPositionSquare2, verticalStartPositionSquare2, horizontalEndPositionSquare2, verticalEndPositionSquare2, mOption); MainActivity.mBixolonLabelPrinter.print(1, 1); } else { MainActivity.mBixolonLabelPrinter.drawBlock(horizontalStartPosition, verticalStartPosition, horizontalEndPosition, verticalEndPosition, mOption, thickness); MainActivity.mBixolonLabelPrinter.print(1, 1); } }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); ContentView = R.layout.xy_chart; // the top part of the UI components for adding new data points mX = (EditText) findViewById(R.id.xValue); mY = (EditText) findViewById(R.id.yValue); mAdd = (Button) findViewById(R.id.add); // set some properties on the main renderer mRenderer.ApplyBackgroundColor = true; mRenderer.BackgroundColor = Color.argb(100, 50, 50, 50); mRenderer.AxisTitleTextSize = 16; mRenderer.ChartTitleTextSize = 20; mRenderer.LabelsTextSize = 15; mRenderer.LegendTextSize = 15; mRenderer.Margins = new int[] {20, 30, 15, 0}; mRenderer.ZoomButtonsVisible = true; mRenderer.PointSize = 5; // the button that handles the new series of data creation mNewSeries = (Button) findViewById(R.id.new_series); mNewSeries.OnClickListener = new OnClickListenerAnonymousInnerClassHelper(this); mAdd.OnClickListener = new OnClickListenerAnonymousInnerClassHelper2(this); }
private void printText() { EditText editText = (EditText)findViewById(R.id.editText1); string text = editText.Text.ToString(); int alignment = BixolonPrinter.ALIGNMENT_LEFT; RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio0: alignment = BixolonPrinter.ALIGNMENT_LEFT; break; case R.id.radio1: alignment = BixolonPrinter.ALIGNMENT_CENTER; break; case R.id.radio2: alignment = BixolonPrinter.ALIGNMENT_RIGHT; break; } int attribute = 0; radioGroup = (RadioGroup)findViewById(R.id.radioGroup2); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio3: attribute |= BixolonPrinter.TEXT_ATTRIBUTE_FONT_A; break; case R.id.radio4: attribute |= BixolonPrinter.TEXT_ATTRIBUTE_FONT_B; break; case R.id.radio5: attribute |= BixolonPrinter.TEXT_ATTRIBUTE_FONT_C; break; } radioGroup = (RadioGroup)findViewById(R.id.radioGroup3); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio7: attribute |= BixolonPrinter.TEXT_ATTRIBUTE_UNDERLINE1; break; case R.id.radio8: attribute |= BixolonPrinter.TEXT_ATTRIBUTE_UNDERLINE2; break; } CheckBox checkBox = (CheckBox)findViewById(R.id.checkBox1); if (checkBox.Checked) { attribute |= BixolonPrinter.TEXT_ATTRIBUTE_EMPHASIZED; } checkBox = (CheckBox)findViewById(R.id.checkBox2); if (checkBox.Checked) { attribute |= BixolonPrinter.TEXT_ATTRIBUTE_REVERSE; } int size = 0; SeekBar seekBar = (SeekBar)findViewById(R.id.seekBar1); switch (seekBar.Progress) { case 0: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL1; break; case 1: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL2; break; case 2: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL3; break; case 3: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL4; break; case 4: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL5; break; case 5: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL6; break; case 6: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL7; break; case 7: size = BixolonPrinter.TEXT_SIZE_HORIZONTAL8; break; } seekBar = (SeekBar)findViewById(R.id.seekBar2); switch (seekBar.Progress) { case 0: size |= BixolonPrinter.TEXT_SIZE_VERTICAL1; break; case 1: size |= BixolonPrinter.TEXT_SIZE_VERTICAL2; break; case 2: size |= BixolonPrinter.TEXT_SIZE_VERTICAL3; break; case 3: size |= BixolonPrinter.TEXT_SIZE_VERTICAL4; break; case 4: size |= BixolonPrinter.TEXT_SIZE_VERTICAL5; break; case 5: size |= BixolonPrinter.TEXT_SIZE_VERTICAL6; break; case 6: size |= BixolonPrinter.TEXT_SIZE_VERTICAL7; break; case 7: size |= BixolonPrinter.TEXT_SIZE_VERTICAL8; break; } checkBox = (CheckBox)findViewById(R.id.checkBox3); bool formFeed = checkBox.Checked; checkBox = (CheckBox)findViewById(R.id.checkBox4); if (checkBox.Checked) { MainActivity.mBixolonPrinter.printDotMatrixText(text, alignment, attribute, size, false); } else { if (formFeed) { MainActivity.mBixolonPrinter.printText(text, alignment, attribute, size, false); MainActivity.mBixolonPrinter.formFeed(false); } else { MainActivity.mBixolonPrinter.printText(text, alignment, attribute, size, false); } } MainActivity.mBixolonPrinter.lineFeed(3, false); MainActivity.mBixolonPrinter.cutPaper(true); MainActivity.mBixolonPrinter.kickOutDrawer(BixolonPrinter.DRAWER_CONNECTOR_PIN5); }
/// <summary>Create a new number picker</summary> /// <param name="context">the application environment.</param> /// <param name="attrs">a collection of attributes.</param> /// <param name="defStyle">The default style to apply to this view.</param> public NumberPicker(android.content.Context context, android.util.AttributeSet attrs , int defStyle) : base(context, attrs, defStyle) { android.content.res.TypedArray attributesArray = context.obtainStyledAttributes(attrs , [email protected], defStyle, 0); mSolidColor = attributesArray.getColor([email protected]_solidColor , 0); mFlingable = attributesArray.getBoolean([email protected]_flingable , true); mSelectionDivider = attributesArray.getDrawable([email protected]_selectionDivider ); int defSelectionDividerHeight = (int)android.util.TypedValue.applyDimension(android.util.TypedValue .COMPLEX_UNIT_DIP, UNSCALED_DEFAULT_SELECTION_DIVIDER_HEIGHT, getResources().getDisplayMetrics ()); mSelectionDividerHeight = attributesArray.getDimensionPixelSize([email protected] .styleable.NumberPicker_selectionDividerHeight, defSelectionDividerHeight); attributesArray.recycle(); mShowInputControlsAnimimationDuration = getResources().getInteger([email protected] .integer.config_longAnimTime); setWillNotDraw(false); setSelectorWheelState(SELECTOR_WHEEL_STATE_NONE); android.view.LayoutInflater inflater = (android.view.LayoutInflater)getContext(). getSystemService(android.content.Context.LAYOUT_INFLATER_SERVICE); inflater.inflate([email protected]_picker, this, true); android.view.View.OnClickListener onClickListener = new _OnClickListener_537(this ); android.view.View.OnLongClickListener onLongClickListener = new _OnLongClickListener_552 (this); mIncrementButton = (android.widget.ImageButton)findViewById([email protected] .increment); mIncrementButton.setOnClickListener(onClickListener); mIncrementButton.setOnLongClickListener(onLongClickListener); mDecrementButton = (android.widget.ImageButton)findViewById([email protected] .decrement); mDecrementButton.setOnClickListener(onClickListener); mDecrementButton.setOnLongClickListener(onLongClickListener); mInputText = (android.widget.EditText)findViewById([email protected]_input ); mInputText.setOnFocusChangeListener(new _OnFocusChangeListener_576(this)); mInputText.setFilters(new android.text.InputFilter[] { new android.widget.NumberPicker .InputTextFilter(this) }); mInputText.setRawInputType(android.text.InputTypeClass.TYPE_CLASS_NUMBER); mTouchSlop = android.view.ViewConfiguration.getTapTimeout(); android.view.ViewConfiguration configuration = android.view.ViewConfiguration.get (context); mTouchSlop = configuration.getScaledTouchSlop(); mMinimumFlingVelocity = configuration.getScaledMinimumFlingVelocity(); mMaximumFlingVelocity = configuration.getScaledMaximumFlingVelocity() / SELECTOR_MAX_FLING_VELOCITY_ADJUSTMENT; mTextSize = (int)mInputText.getTextSize(); android.graphics.Paint paint = new android.graphics.Paint(); paint.setAntiAlias(true); paint.setTextAlign(android.graphics.Paint.Align.CENTER); paint.setTextSize(mTextSize); paint.setTypeface(mInputText.getTypeface()); android.content.res.ColorStateList colors = mInputText.getTextColors(); int color = colors.getColorForState(ENABLED_STATE_SET, android.graphics.Color.WHITE ); paint.setColor(color); mSelectorWheelPaint = paint; mDimSelectorWheelAnimator = android.animation.ObjectAnimator.ofInt(this, PROPERTY_SELECTOR_PAINT_ALPHA , SELECTOR_WHEEL_BRIGHT_ALPHA, SELECTOR_WHEEL_DIM_ALPHA); android.animation.ObjectAnimator showIncrementButton = android.animation.ObjectAnimator .ofFloat(mIncrementButton, PROPERTY_BUTTON_ALPHA, BUTTON_ALPHA_TRANSPARENT, BUTTON_ALPHA_OPAQUE ); android.animation.ObjectAnimator showDecrementButton = android.animation.ObjectAnimator .ofFloat(mDecrementButton, PROPERTY_BUTTON_ALPHA, BUTTON_ALPHA_TRANSPARENT, BUTTON_ALPHA_OPAQUE ); mShowInputControlsAnimator = new android.animation.AnimatorSet(); mShowInputControlsAnimator.playTogether(mDimSelectorWheelAnimator, showIncrementButton , showDecrementButton); mShowInputControlsAnimator.addListener(new _AnimatorListenerAdapter_626(this)); // create the fling and adjust scrollers mFlingScroller = new android.widget.Scroller(getContext(), null, true); mAdjustScroller = new android.widget.Scroller(getContext(), new android.view.animation.DecelerateInterpolator (2.5f)); updateInputTextView(); updateIncrementAndDecrementButtonsVisibilityState(); if (mFlingable) { if (isInEditMode()) { setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL); } else { // Start with shown selector wheel and hidden controls. When made // visible hide the selector and fade-in the controls to suggest // fling interaction. setSelectorWheelState(SELECTOR_WHEEL_STATE_LARGE); hideInputControls(); } } }
private void printLabel() { EditText editText = (EditText)findViewById(R.id.editText1); string data = editText.Text.ToString(); editText = (EditText)findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "50"; } int horizontalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int verticalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText4); if (editText.Text.ToString().Equals("")) { editText.Text = "25"; } int width = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText5); if (editText.Text.ToString().Equals("")) { editText.Text = "25"; } int height = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText6); if (editText.Text.ToString().Equals("")) { editText.Text = "0"; } int rightSpace = int.Parse(editText.Text.ToString()); CheckBox checkBox = (CheckBox)findViewById(R.id.checkBox1); bool bold = checkBox.Checked; checkBox = (CheckBox)findViewById(R.id.checkBox2); bool reverse = checkBox.Checked; checkBox = (CheckBox)findViewById(R.id.checkBox3); bool italic = checkBox.Checked; RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); int rotation = BixolonLabelPrinter.ROTATION_NONE; switch (radioGroup.CheckedRadioButtonId) { case R.id.radio1: rotation = BixolonLabelPrinter.ROTATION_90_DEGREES; break; case R.id.radio2: rotation = BixolonLabelPrinter.ROTATION_180_DEGREES; break; case R.id.radio3: rotation = BixolonLabelPrinter.ROTATION_270_DEGREES; break; } radioGroup = (RadioGroup)findViewById(R.id.radioGroup2); int alignment = BixolonLabelPrinter.VECTOR_FONT_TEXT_ALIGNMENT_LEFT; switch (radioGroup.CheckedRadioButtonId) { case R.id.radio5: rotation = BixolonLabelPrinter.VECTOR_FONT_TEXT_ALIGNMENT_RIGHT; break; case R.id.radio6: rotation = BixolonLabelPrinter.VECTOR_FONT_TEXT_ALIGNMENT_CENTER; break; } radioGroup = (RadioGroup)findViewById(R.id.radioGroup3); int direction = BixolonLabelPrinter.VECTOR_FONT_TEXT_DIRECTION_LEFT_TO_RIGHT; if (radioGroup.CheckedRadioButtonId == R.id.radio8) { direction = BixolonLabelPrinter.VECTOR_FONT_TEXT_DIRECTION_RIGHT_TO_LEET; } MainActivity.mBixolonLabelPrinter.drawVectorFontText(data, horizontalPosition, verticalPosition, mFont, width, height, rightSpace, bold, reverse, italic, rotation, alignment, direction); MainActivity.mBixolonLabelPrinter.print(1, 1); }
private void printLabel() { EditText editText = (EditText) findViewById(R.id.editText1); string data = editText.Text.ToString(); editText = (EditText) findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "50"; } int horizontalPosition = int.Parse(editText.Text.ToString()); editText = (EditText) findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int verticalPosition = int.Parse(editText.Text.ToString()); editText = (EditText) findViewById(R.id.editText4); if (editText.Text.ToString().Equals("")) { editText.Text = "0"; } int rightSpace = int.Parse(editText.Text.ToString()); RadioGroup radioGroup = (RadioGroup) findViewById(R.id.radioGroup1); int rotation = BixolonLabelPrinter.ROTATION_NONE; switch (radioGroup.CheckedRadioButtonId) { case R.id.radio1: rotation = BixolonLabelPrinter.ROTATION_90_DEGREES; break; case R.id.radio2: rotation = BixolonLabelPrinter.ROTATION_180_DEGREES; break; case R.id.radio3: rotation = BixolonLabelPrinter.ROTATION_270_DEGREES; break; } CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox1); bool reverse = checkBox.Checked; checkBox = (CheckBox) findViewById(R.id.checkBox2); bool bold = checkBox.Checked; radioGroup = (RadioGroup) findViewById(R.id.radioGroup2); int alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_NONE; switch (radioGroup.CheckedRadioButtonId) { case R.id.radio5: alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_LEFT; break; case R.id.radio6: alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_RIGHT; break; case R.id.radio7: alignment = BixolonLabelPrinter.TEXT_ALIGNMENT_RIGHT_TO_LEFT; break; } MainActivity.mBixolonLabelPrinter.drawText(data, horizontalPosition, verticalPosition, mFontSize, mHorizontalMultiplier, mVerticalMultiplier, rightSpace, rotation, reverse, bold, alignment); MainActivity.mBixolonLabelPrinter.print(1, 1); }
private void print1dBarcode() { EditText editText = (EditText)findViewById(R.id.editText1); if (editText.Text.ToString().Equals("")) { editText.Text = "1234567890"; } string data = editText.Text.ToString(); editText = (EditText)findViewById(R.id.editText2); if (editText.Text.ToString().Equals("")) { editText.Text = "78"; } int horizontalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText3); if (editText.Text.ToString().Equals("")) { editText.Text = "196"; } int verticalPosition = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText4); if (editText.Text.ToString().Equals("")) { editText.Text = "2"; } int narrowBarWidth = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText5); if (editText.Text.ToString().Equals("")) { editText.Text = "6"; } int wideBarWidth = int.Parse(editText.Text.ToString()); editText = (EditText)findViewById(R.id.editText6); if (editText.Text.ToString().Equals("")) { editText.Text = "100"; } int height = int.Parse(editText.Text.ToString()); RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); int rotation = BixolonLabelPrinter.ROTATION_NONE; switch (radioGroup.CheckedRadioButtonId) { case R.id.radio1: rotation = BixolonLabelPrinter.ROTATION_90_DEGREES; break; case R.id.radio2: rotation = BixolonLabelPrinter.ROTATION_180_DEGREES; break; case R.id.radio3: rotation = BixolonLabelPrinter.ROTATION_270_DEGREES; break; } editText = (EditText)findViewById(R.id.editText7); if (editText.Text.ToString().Equals("")) { editText.Text = "0"; } int quietZoneWidth = int.Parse(editText.Text.ToString()); MainActivity.mBixolonLabelPrinter.draw1dBarcode(data, horizontalPosition, verticalPosition, mBarcodeSelection, narrowBarWidth, wideBarWidth, height, rotation, mHri, quietZoneWidth); MainActivity.mBixolonLabelPrinter.print(1, 1); }
public override void onClick(View v) { switch (v.Id) { case R.id.button1: RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radioGroup1); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio0: MainActivity.mBcd.ScrollMode = BixolonCustomerDisplay.MODE_OVERWRITE; break; case R.id.radio1: MainActivity.mBcd.ScrollMode = BixolonCustomerDisplay.MODE_VERTICAL; break; case R.id.radio2: MainActivity.mBcd.ScrollMode = BixolonCustomerDisplay.MODE_HORIZONTAL; break; } EditText editText = (EditText)findViewById(R.id.editText3); string @string = editText.Text.ToString(); if (@string.Length > 0) { int interval = int.Parse(@string); MainActivity.mBcd.BlinkInterval = interval; } radioGroup = (RadioGroup)findViewById(R.id.radioGroup2); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio3: MainActivity.mBcd.DimmingControl = BixolonCustomerDisplay.BRIGHTNESS_20; break; case R.id.radio4: MainActivity.mBcd.DimmingControl = BixolonCustomerDisplay.BRIGHTNESS_40; break; case R.id.radio5: MainActivity.mBcd.DimmingControl = BixolonCustomerDisplay.BRIGHTNESS_60; break; case R.id.radio6: MainActivity.mBcd.DimmingControl = BixolonCustomerDisplay.BRIGHTNESS_100; break; } radioGroup = (RadioGroup)findViewById(R.id.radioGroup3); switch (radioGroup.CheckedRadioButtonId) { case R.id.radio7: MainActivity.mBcd.clearLineBlinking(BixolonCustomerDisplay.UPPER_LINE); MainActivity.mBcd.clearLineBlinking(BixolonCustomerDisplay.LOWER_LINE); break; case R.id.radio8: MainActivity.mBcd.LineBlinking = BixolonCustomerDisplay.UPPER_LINE; break; case R.id.radio9: MainActivity.mBcd.LineBlinking = BixolonCustomerDisplay.LOWER_LINE; break; } editText = (EditText)findViewById(R.id.editText1); string text = editText.Text.ToString(); MainActivity.mBcd.writeString(text, BixolonCustomerDisplay.UPPER_LINE); editText = (EditText)findViewById(R.id.editText2); text = editText.Text.ToString(); MainActivity.mBcd.writeString(text, BixolonCustomerDisplay.LOWER_LINE); break; case R.id.button2: MainActivity.mBcd.clearScreen(); break; } }