Beispiel #1
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            ContentView = R.layout.activity_settings;

            bxlConfigLoader = new BXLConfigLoader(this);

            arrayAdapter = new ArrayAdapter <string>(this, android.R.layout.simple_list_item_1);

            ListView listView = (ListView)findViewById(R.id.listView1);

            listView.Adapter = arrayAdapter;
            registerForContextMenu(listView);

            try
            {
                bxlConfigLoader.openFile();
//JAVA TO C# CONVERTER TODO TASK: Java wildcard generics are not converted to .NET:
//ORIGINAL LINE: java.util.List<?> entries = bxlConfigLoader.getEntries();
                IList <?> entries = bxlConfigLoader.Entries;
                foreach (object entry in entries)
                {
                    arrayAdapter.add(((JposEntry)entry).LogicalName);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
                bxlConfigLoader.newFile();
            }
        }
		protected internal override void onCreate(Bundle savedInstanceState)
		{
			base.onCreate(savedInstanceState);
			ContentView = R.layout.activity_settings;

			bxlConfigLoader = new BXLConfigLoader(this);

			arrayAdapter = new ArrayAdapter<string>(this, android.R.layout.simple_list_item_1);

			ListView listView = (ListView) findViewById(R.id.listView1);
			listView.Adapter = arrayAdapter;
			registerForContextMenu(listView);

			try
			{
				bxlConfigLoader.openFile();
//JAVA TO C# CONVERTER TODO TASK: Java wildcard generics are not converted to .NET:
//ORIGINAL LINE: java.util.List<?> entries = bxlConfigLoader.getEntries();
				IList<?> entries = bxlConfigLoader.Entries;
				foreach (object entry in entries)
				{
					arrayAdapter.add(((JposEntry) entry).LogicalName);
				}
			}
			catch (Exception e)
			{
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
				bxlConfigLoader.newFile();
			}
		}
Beispiel #3
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            ContentView = R.layout.activity_main;

            pathTextView     = (TextView)findViewById(R.id.textViewPath);
            progressTextView = (TextView)findViewById(R.id.textViewProgress);

            openRadioGroup = (RadioGroup)findViewById(R.id.radioGroupOpen);
            openRadioGroup.OnCheckedChangeListener = this;

            openFromDeviceStorageButton = (Button)findViewById(R.id.buttonOpenFromDeviceStorage);
            openFromDeviceStorageButton.OnClickListener = this;

            findViewById(R.id.buttonOpenPrinter).OnClickListener  = this;
            findViewById(R.id.buttonPrint).OnClickListener        = this;
            findViewById(R.id.buttonClosePrinter).OnClickListener = this;

            SeekBar seekBar = (SeekBar)findViewById(R.id.seekBarBrightness);

            seekBar.OnSeekBarChangeListener = this;

            setBondedDevices();

            arrayAdapter = new ArrayAdapter <>(this, android.R.layout.simple_list_item_single_choice, bondedDevices);
            ListView listView = (ListView)findViewById(R.id.listViewPairedDevices);

            listView.Adapter = arrayAdapter;

            listView.ChoiceMode          = ListView.CHOICE_MODE_SINGLE;
            listView.OnItemClickListener = this;

            bxlConfigLoader = new BXLConfigLoader(this);
            try
            {
                bxlConfigLoader.openFile();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
                bxlConfigLoader.newFile();
            }
            posPrinter = new POSPrinter(this);
        }
Beispiel #4
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            ContentView = R.layout.activity_main;

            setBondedDevices();

            arrayAdapter = new ArrayAdapter <>(this, android.R.layout.simple_list_item_single_choice, bondedDevices);
            ListView listView = (ListView)findViewById(R.id.listViewPairedDevices);

            listView.Adapter = arrayAdapter;

            listView.ChoiceMode          = ListView.CHOICE_MODE_SINGLE;
            listView.OnItemClickListener = this;

            dataEditText           = (EditText)findViewById(R.id.editTextData);
            dataEditText.Selection = dataEditText.Text.length();

            escapeSequencesSpinner = (Spinner)findViewById(R.id.spinnerEscapeSequences);

            findViewById(R.id.buttonAdd).OnClickListener   = this;
            findViewById(R.id.buttonPrint).OnClickListener = this;

            bxlConfigLoader = new BXLConfigLoader(this);
            try
            {
                bxlConfigLoader.openFile();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
                bxlConfigLoader.newFile();
            }
            posPrinter = new POSPrinter(this);
        }