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


C# Spinner类代码示例

本文整理汇总了C#中Spinner的典型用法代码示例。如果您正苦于以下问题:C# Spinner类的具体用法?C# Spinner怎么用?C# Spinner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.ShareLocation);

            customDate = DateTime.Now;

            boxProgress = FindViewById<LinearLayout> (Resource.Id.boxProgress);
            boxProgress.Visibility = ViewStates.Gone;

            textDate = FindViewById<TextView> (Resource.Id.textDate);
            textDate.Visibility = ViewStates.Gone;

            spinnerTime = FindViewById<Spinner> (Resource.Id.spinnerTime);
            spinnerTime.ItemSelected += HandleItemSelected;
            arrayAdapter = ArrayAdapter.CreateFromResource (this, Resource.Array.expiration_time_array, Android.Resource.Layout.SimpleSpinnerItem);
            arrayAdapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinnerTime.Adapter = arrayAdapter;
            spinnerTime.SetSelection (defaultTimeIndex);
            selectedTime = timeValues [defaultTimeIndex];

            shareButton = FindViewById<Button> (Resource.Id.buttonShare);
            shareButton.Click += HandleShareClick;

            textDate.Click += delegate {
                ShowDialog (0);
            };
        }
开发者ID:slluis,项目名称:TrackMe,代码行数:29,代码来源:ShareLocationActivity.cs

示例2: OnCreateOptionsMenu

		public override bool OnCreateOptionsMenu (Android.Views.IMenu menu)
		{
			MenuInflater.Inflate (Resource.Menu.main_screen, menu);

			_addAlarmMenuButton = menu.FindItem (Resource.Id.add_alarm);
			_acceptMenuButton = menu.FindItem (Resource.Id.accept);
			_alarmNameMenuItem = menu.FindItem (Resource.Id.alarm_name);
			_deleteAlarmMenuItem = menu.FindItem (Resource.Id.delete);
			_disableAlarmMenuItem = menu.FindItem (Resource.Id.switch_button);
			_alarmRadiusMenuItem = menu.FindItem (Resource.Id.alarm_radius);
			_settingsMenuItem = menu.FindItem (Resource.Id.action_settings);
            
			_alarmNameEditText = MenuItemCompat.GetActionView (_alarmNameMenuItem) as EditText;
			_alarmNameEditText.Hint = Resources.GetString (Resource.String.alarm_name);
			_alarmNameEditText.SetWidth (Resources.GetDimensionPixelSize (Resource.Dimension.abc_search_view_preferred_width));

			_enableAlarmToggleButton = MenuItemCompat.GetActionView (_disableAlarmMenuItem) as ToggleButton;
			_enableAlarmToggleButton.CheckedChange += AlarmEnabledChange;

			_alarmRadiusSpinner = MenuItemCompat.GetActionView (_alarmRadiusMenuItem) as Spinner;
			var adapter = new ArrayAdapter (this, Resource.Layout.support_simple_spinner_dropdown_item, 
				              Android.Resource.Id.Text1, Constants.AlarmRadiusValues.Select (r => string.Format ("{0} m", r)).ToList ());
			adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
			_alarmRadiusSpinner.Adapter = adapter;
			_alarmRadiusSpinner.ItemSelected += (s, e) => RedrawAddCircle ();

			ManageMenuItemsVisibilityForMode ();

			_addAlarmMenuButton.SetVisible (_isGooglePlayServicesAvailable == ConnectionResult.Success);

			return base.OnCreateOptionsMenu (menu);
		}
开发者ID:foxanna,项目名称:SimpleLocationAlarm,代码行数:32,代码来源:HomeActivityAddMode.cs

示例3: GetPropertyWindowLayout

		public override View GetPropertyWindowLayout (Android.Content.Context context)
		{
			gridlayout = new GridLayout (context); 
			gridlayout.RowCount = 2;
			gridlayout.ColumnCount = 2;

			conditionTextView = new TextView (context);
			conditionTextView.Text = "Select the Condition to filter";
			columnTextView = new TextView (context);
			columnTextView.Text = "Select the Column to filter";
			columnDropdown = new Spinner(context);
			var columnAdapter = ArrayAdapter.CreateFromResource (context, Resource.Array.column_array, Android.Resource.Layout.SimpleSpinnerItem);
			columnAdapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
			columnDropdown.Adapter = columnAdapter;
			conditionDropdown = new Spinner (context);
			condtionAdapter = new ArrayAdapter (context, Android.Resource.Layout.SimpleSpinnerItem);
			condtionAdapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
			conditionDropdown.Adapter = condtionAdapter;
			columnDropdown.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (OnColumnSelected);
			conditionDropdown.ItemSelected += OnConditionSelected;
			gridlayout.LayoutParameters = new LinearLayout.LayoutParams (LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
			gridlayout.AddView (columnTextView);
			gridlayout.AddView (columnDropdown);
			gridlayout.AddView (conditionTextView);
			gridlayout.AddView (conditionDropdown);
			return gridlayout;
		}
开发者ID:IanLeatherbury,项目名称:tryfsharpforms,代码行数:27,代码来源:Filtering.cs

示例4: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);
            button = FindViewById<Button> (Resource.Id.button);

            button.Click += (o, e) =>  {
                // use an array adapter to populate a spinner item from our string array
                ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                    Android.Resource.Layout.SimpleSpinnerItem, villains);

                // create the spinner and populate it with our items
                Spinner spinner = new Spinner(this);
                spinner.LayoutParameters = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent);
                spinner.Adapter = adapter;

                // handle item selection
                spinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (ItemSelected);

                // build the alert dialog
                AlertDialog.Builder builder = new AlertDialog.Builder(this);
                builder.SetView(spinner);
                builder.SetNeutralButton("OK", delegate {});
                builder.Show();
            };
        }
开发者ID:liangzhuang,项目名称:xamarin-recipes,代码行数:28,代码来源:MainActivity.cs

示例5: OnCreate

        protected override void OnCreate (Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            SetContentView (Resource.Layout.AddExpensePopUpLayout);
            SetCancelable (true);

            var save = (Button)FindViewById (Resource.Id.addExpenseSave);
            save.Enabled = !Assignment.IsHistory;
            save.SetOnClickListener (this);

            deleteExpense = (Button)FindViewById (Resource.Id.addExpenseDelete);
            deleteExpense.Enabled = !Assignment.IsHistory;
            deleteExpense.SetOnClickListener (this);

            var cancel = (Button)FindViewById (Resource.Id.addExpenseCancel);
            cancel.SetOnClickListener (this);

            expenseType = (Spinner)FindViewById (Resource.Id.addExpenseType);
            expenseDescription = (EditText)FindViewById (Resource.Id.addExpenseDescription);
            expenseDescription.Enabled = !Assignment.IsHistory;
            expenseAmount = (TextView)FindViewById (Resource.Id.addExpenseAmount);
            expenseAmount.Enabled = !Assignment.IsHistory;
            expensePhoto = (ImageView)FindViewById (Resource.Id.addExpenseImage);
            expenseAddPhoto = (Button)FindViewById (Resource.Id.addExpenseAddPhoto);
            expenseAddPhoto.Enabled = !Assignment.IsHistory;
            expenseAddPhoto.SetOnClickListener (this);

            var adapter = new SpinnerAdapter<ExpenseCategory> (expenseTypes, Context, Resource.Layout.SimpleSpinnerItem);
            adapter.TextColor = Color.Black;
            adapter.Background = Color.White;
            expenseType.Adapter = adapter;
            expenseType.Enabled = !Assignment.IsHistory;
            expenseType.OnItemSelectedListener = this;
        }
开发者ID:EminosoftCorp,项目名称:prebuilt-apps,代码行数:35,代码来源:ExpenseDialog.cs

示例6: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            SetContentView (Resource.Layout.CreateInvoice);
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            compCode = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            branchCode = ((GlobalvarsApp)this.Application).BRANCH_CODE;

            EventManagerFacade.Instance.GetEventManager().AddListener(this);

            // Create your application here
            _date = DateTime.Today;
            spinner = FindViewById<Spinner> (Resource.Id.newinv_custcode);
            Spinner spinnerType = FindViewById<Spinner> (Resource.Id.newinv_type);
            Button butSave = FindViewById<Button> (Resource.Id.newinv_bsave);
            Button butNew = FindViewById<Button> (Resource.Id.newinv_cancel);
            Button butFind = FindViewById<Button> (Resource.Id.newinv_bfind);
            spinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (spinner_ItemSelected);
            butSave.Click += butSaveClick;
            butNew.Click += butCancelClick;
            TextView invno =  FindViewById<TextView> (Resource.Id.newinv_no);
            invno.Text = "AUTO";
            EditText trxdate =  FindViewById<EditText> (Resource.Id.newinv_date);
             			trxdate.Text = _date.ToString ("dd-MM-yyyy");
            trxdate.Click += delegate(object sender, EventArgs e) {
                ShowDialog (0);
            };
            butFind.Click+= (object sender, EventArgs e) => {
                ShowCustLookUp();
            };

            ccType =  FindViewById<EditText> (Resource.Id.newinv_cctype);
            ccNo =  FindViewById<EditText> (Resource.Id.newinv_ccno);
            ccNo.AfterTextChanged+= CcNo_AfterTextChanged;

            ccNo.RequestFocus ();
            apara =  DataHelper.GetAdPara (pathToDatabase,compCode,branchCode);
            //SqliteConnection.CreateFile(pathToDatabase);
            LoadTrader ();

            List<string> icodes = new List<string> ();
            foreach (Trader item in items) {
                icodes.Add (item.CustCode+" | "+item.CustName);
            }

            dataAdapter = new ArrayAdapter<String> (this, Resource.Layout.spinner_item, icodes);
            dataAdapter2 =ArrayAdapter.CreateFromResource (
                            this, Resource.Array.trxtype, Resource.Layout.spinner_item);

            // Drop down layout style - list view with radio button
            dataAdapter.SetDropDownViewResource(Resource.Layout.SimpleSpinnerDropDownItemEx);
            dataAdapter2.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);

            // attaching data adapter to spinner
            spinner.Adapter =dataAdapter;
            spinnerType.Adapter =dataAdapter2;
        }
开发者ID:mokth,项目名称:merpCS,代码行数:60,代码来源:CreateInvoice.cs

示例7: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            dataProvider = new DataProvider(XDocument.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream("Lines.xml")), XDocument.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream("Stations.xml")), XDocument.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream("StationLines.xml")));

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            spinnerLine = FindViewById<Spinner>(Resource.Id.spinnerLine);
            spinnerStationFrom = FindViewById<Spinner>(Resource.Id.spinnerStationFrom);
            spinnerStationTo = FindViewById<Spinner>(Resource.Id.spinnerStationTo);

            Button buttonSwap = FindViewById<Button>(Resource.Id.buttonSwap);
            buttonSwap.Click += new EventHandler(swapDirection);

            Button buttonSave = FindViewById<Button>(Resource.Id.buttonSave);
            buttonSave.Click += new EventHandler(SaveSettings);

            Button buttonSearch = FindViewById<Button>(Resource.Id.buttonSearch);
            buttonSearch.Click += new EventHandler(lookup);

            SetUpLine();
            SetUpStationFrom();
            SetUpStationTo();
        }
开发者ID:MWGNZ,项目名称:Wellington-Trains,代码行数:26,代码来源:MainActivity.cs

示例8: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            try
            {
                button = FindViewById<Button>(Resource.Id.Submit);
                button.Click += new EventHandler(button_Click);
                States = FindViewById<Spinner>(Resource.Id.State);

                var fAdapter = ArrayAdapter.CreateFromResource(this,
                    Resource.Array.states,
                    Android.Resource.Layout.SimpleSpinnerDropDownItem);
                int spinner_dd_item = Android.Resource.
                    Layout.SimpleSpinnerDropDownItem;
                fAdapter.SetDropDownViewResource(spinner_dd_item);
                States.Adapter = fAdapter;

                etAddress = FindViewById<EditText>(Resource.Id.Address);
                etCity = FindViewById<EditText>(Resource.Id.City);
                etZipCode = FindViewById<EditText>(Resource.Id.Zip);

            }
            catch (System.Exception sysExc)
            {
                Toast.MakeText(this, sysExc.Message, ToastLength.Short).Show();
            }
        }
开发者ID:caodaiming,项目名称:Gamodo.Droid.Examples,代码行数:28,代码来源:MainActivity.cs

示例9: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            this.RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

//          this.layout = FindViewById<LinearLayout> (Resource.Id.layout);
            this.buttonAdd = FindViewById<Button>(Resource.Id.buttonAdd);
            this.textLastText = FindViewById<TextView> (Resource.Id.textLastText);
            this.textLastCheck = FindViewById<TextView> (Resource.Id.textLastCheck);
            this.spinner = FindViewById<Spinner> (Resource.Id.spinnerView);
            this.listView = FindViewById<ListView> (Resource.Id.listView1);

//          this.listView = new EditableTextTable (this);
//          this.layout.AddView (this.listView);

            EditableTextViewModel.Instance.Items.SetCellProvider (
                this.listView,
                new TableCellDelegate<EditableText> (this.GetView));

            EditableTextViewModel.Instance.Items.SetProvider (this.spinner, new DropDownCellDelegate<EditableText> (this.GetView));

            this.buttonAdd.Click += (sender, e) => EditableTextViewModel.Instance.AddItem (new EditableText ());
        }
开发者ID:Qwin,项目名称:SimplyMobile,代码行数:27,代码来源:Activity1.cs

示例10: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.CreateEmployee);

            _supporttoolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.ToolBar);
            _drawer = FindViewById<DrawerLayout>(Resource.Id.DrawerLayout);
            _navigationview = FindViewById<NavigationView>(Resource.Id.nav_view);
            ToolbarCreator toolbarCreator = new ToolbarCreator();
            toolbarCreator.setupToolbar(_supporttoolbar, _drawer, _navigationview, Resource.String.createemployee, this);

            BtnCreateEmployee = FindViewById<Button>(Resource.Id.ButtonCreateEmployee);        
            EditTextFirstName = FindViewById<EditText>(Resource.Id.EditTextFirstName);
            EditTextLastName = FindViewById<EditText>(Resource.Id.EditTextLastName);
            EditTextEmployeeID = FindViewById<EditText>(Resource.Id.EditTextEmployeeID);
            EditTextEmail = FindViewById<EditText>(Resource.Id.EditTextEmail);
            SpinnerDepartment = FindViewById<Spinner>(Resource.Id.SpinnerDepartment);
            SpinnerPrivledge = FindViewById<Spinner>(Resource.Id.SpinnerPrivledgeLevel);
            Color color = new Color(ContextCompat.GetColor(this, Resource.Color.black)); 
            SpinnerDepartment.Background.SetColorFilter(color,PorterDuff.Mode.SrcAtop);
            SpinnerPrivledge.Background.SetColorFilter(color, PorterDuff.Mode.SrcAtop);

            BtnCreateEmployee.Click += async delegate
            {
                BtnCreateEmployee.Enabled = false;
                await createEmployee();
                BtnCreateEmployee.Enabled = true;
            };
        }
开发者ID:ititwcip,项目名称:ITWCIPApplication,代码行数:30,代码来源:CreateEmployeeActivity.cs

示例11: OnViewCreated

		public override void OnViewCreated (View view, Bundle savedInstanceState)
		{
			base.OnViewCreated (view, savedInstanceState);

			productImage = View.FindViewById<ImageView> (Resource.Id.productImage);
			
			sizeSpinner = View.FindViewById<Spinner> (Resource.Id.productSize);

			colorSpinner = View.FindViewById<Spinner> (Resource.Id.productColor);

			var addToBasket = View.FindViewById<Button> (Resource.Id.addToBasket);
			addToBasket.Click += delegate {
				currentProduct.Size = currentProduct.Sizes [sizeSpinner.SelectedItemPosition];
				currentProduct.Color = currentProduct.Colors [colorSpinner.SelectedItemPosition];
				shouldAnimatePop = true;
				Activity.FragmentManager.PopBackStack();
				AddToBasket (currentProduct);
			};

			View.FindViewById<TextView> (Resource.Id.productTitle).Text = currentProduct.Name ?? string.Empty;
			View.FindViewById<TextView> (Resource.Id.productPrice).Text = currentProduct.PriceDescription ?? string.Empty;
			View.FindViewById<TextView> (Resource.Id.productDescription).Text = currentProduct.Description ?? string.Empty;

			((SlidingLayout)View).InitialMainViewDelta = slidingDelta;

			LoadOptions ();
		}
开发者ID:Cheesebaron,项目名称:xamarin-store-app,代码行数:27,代码来源:ProductDetailsFragment.cs

示例12: Screen7Summary

        public Screen7Summary(Activity context, PointDto point)
            : base(context, Resource.Layout.Edit7Summary, point)
        {
            PointPart7Summary item = Point.PointDataDto.PointPart7Summary;

            invalidMoveAvailable = View.FindViewById<Spinner>(Resource.Id.invalid_move_availability);
            invalidHearingAvailable = View.FindViewById<Spinner>(Resource.Id.invalid_hearing_availability);
            invalidEyeAvailable = View.FindViewById<Spinner>(Resource.Id.invalid_eye_availability);
            otherText = View.FindViewById<EditText>(Resource.Id.otherComments);
            reportDate = View.FindViewById<EditText>(Resource.Id.protocolDate);

            invalidMoveAvailable.Adapter = new BoolSpinnerAdapter(context, "ќбъект доступен",
                                                                  "ќбъект не доступен (если нет пандуса, не соответствует ширина проемов, высота порогов)");
            invalidHearingAvailable.Adapter = new BoolSpinnerAdapter(context, "ќбъект доступен",
                                                                     "ќбъект не доступен (если отсутствуют световые табло, индукционна¤ петл¤)");
            invalidEyeAvailable.Adapter = new BoolSpinnerAdapter(context, "ќбъект доступен",
                                                                 "ќбъект не доступен (если отсутствуют тактильные маршруты, звуковое оповещение, контрастна¤ маркировка дверей и стекл¤нных поверхностей)");

            reportDate.Text = item.ReportDate.ToLocalTime().Date.ToString(CultureInfo.CurrentCulture);

            invalidMoveAvailable.SetSelection(BoolSpinnerAdapter.SetPositionOf(item.InvalidMoveAvailability));
            invalidHearingAvailable.SetSelection(BoolSpinnerAdapter.SetPositionOf(item.InvalidHearingAvailability));
            invalidEyeAvailable.SetSelection(BoolSpinnerAdapter.SetPositionOf(item.InvalidEyeAvailability));

            otherText.Text = item.OtherComments;
        }
开发者ID:Teplitsa,项目名称:bezpregrad,代码行数:26,代码来源:Screen7Summary.cs

示例13: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.SpeedBetweenNodes);

            settingsFile = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
            settingsFile = Path.Combine(settingsFile, "settings.txt");
            settings = JsonConvert.DeserializeObject<SettingsRecord> (File.ReadLines (settingsFile).First());

            speedSpinner = FindViewById<Spinner> (Resource.Id.speedSpinner);
            speedSpinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (speedSpinner_ItemSelected);
            var adapter = ArrayAdapter.CreateFromResource (this, Resource.Array.speed_array, Android.Resource.Layout.SimpleSpinnerItem);
            adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
            speedSpinner.Adapter = adapter;
            speedSpinner_Initialize ();

            btnApply = FindViewById<Button>(Resource.Id.btnApply2);
            btnApply.Click += delegate {
                if (settingsChanged()){
                    using (TextWriter tw = new StreamWriter(settingsFile,false)){
                        tw.WriteLine (JsonConvert.SerializeObject (settings));
                    }
                    if(isLoggerRunning()){
                        restartLogger();
                    }
                }
                Finish();
            };
        }
开发者ID:MatejVukosav,项目名称:GdjeMiJeAuto,代码行数:30,代码来源:SpeedBetweenNodes.cs

示例14: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            compCode = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            branchCode = ((GlobalvarsApp)this.Application).BRANCH_CODE;
            SetContentView (Resource.Layout.AdPara);
            spinner = FindViewById<Spinner> (Resource.Id.txtSize);
            spinBt= FindViewById<Spinner> (Resource.Id.txtprinters);
            Button butSave = FindViewById<Button> (Resource.Id.ad_bSave);
            Button butCancel = FindViewById<Button> (Resource.Id.ad_Cancel);
            butSave.Click += butSaveClick;
            butCancel.Click += butCancelClick;
            RunOnUiThread(()=>{ findBTPrinter ();});

            adapter = ArrayAdapter.CreateFromResource (this, Resource.Array.papersize_array, Android.Resource.Layout.SimpleSpinnerItem);
            adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinner.Adapter = adapter;
            spinner.ItemSelected+= Spinner_ItemSelected;
            spinBt.ItemSelected+= Spinner_ItemSelected;
            LoadData ();
            // Create your application here
        }
开发者ID:mokth,项目名称:merpCS,代码行数:25,代码来源:SettingActivity.cs

示例15: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            SetTitle (Resource.String.mainmenu_settings);
            SetContentView (Resource.Layout.AdPara);
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            rights = Utility.GetAccessRights (pathToDatabase);

            spinPrType= FindViewById<Spinner> (Resource.Id.txtprintertype);
            spinner = FindViewById<Spinner> (Resource.Id.txtSize);
            spinBt= FindViewById<Spinner> (Resource.Id.txtprinters);
            Button butSave = FindViewById<Button> (Resource.Id.ad_bSave);
            Button butCancel = FindViewById<Button> (Resource.Id.ad_Cancel);
            FindControls ();

            butSave.Click += butSaveClick;
            butCancel.Click += butCancelClick;
            findBTPrinter ();
            //RunOnUiThread(()=>{ findBTPrinter ();});
            adapterPT = ArrayAdapter.CreateFromResource (this, Resource.Array.printer_array, Android.Resource.Layout.SimpleSpinnerItem);
            adapterPT.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);

            adapter = ArrayAdapter.CreateFromResource (this, Resource.Array.papersize_array, Android.Resource.Layout.SimpleSpinnerItem);
            adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);

            spinPrType.Adapter = adapterPT;
            spinner.Adapter = adapter;
            spinner.ItemSelected+= Spinner_ItemSelected;
            spinBt.ItemSelected+= Spinner_ItemSelected;
            LoadData ();
            // Create your application here
        }
开发者ID:mokth,项目名称:merpV3,代码行数:35,代码来源:SettingActivity.cs


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