• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Spinner类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例5: 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


示例6: 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


示例7: 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


示例8: 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


示例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


示例16: OnCreate

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

      SetContentView(Resource.Layout.view_expense);

      dialog = ServiceContainer.Resolve<IMessageDialog>();

      var id = Intent.GetIntExtra("ID", -1);
      viewModel = ServiceContainer.Resolve<ExpenseViewModel>();
      await viewModel.Init(id);

      this.ActionBar.Title = viewModel.Title;
      viewModel.IsBusyChanged = (busy) =>
      {
        if (busy)
          AndHUD.Shared.Show(this, "Loading...");
        else
          AndHUD.Shared.Dismiss(this);
      };

      name = FindViewById<EditText>(Resource.Id.name);
      date = FindViewById<DatePicker>(Resource.Id.date);
      notes = FindViewById<EditText>(Resource.Id.notes);
      total = FindViewById<EditText>(Resource.Id.total);
      billable = FindViewById<CheckBox>(Resource.Id.billable);
      category = FindViewById<Spinner>(Resource.Id.category);
      category.Adapter = new ArrayAdapter<string>(this, global::Android.Resource.Layout.SimpleSpinnerDropDownItem, viewModel.Categories);
      category.SetSelection(viewModel.Categories.IndexOf(viewModel.Category));
      name.Text = viewModel.Name;
      date.DateTime = viewModel.Due;
      notes.Text = viewModel.Notes;
      total.Text = viewModel.Total;
      billable.Checked = viewModel.Billable;
    }
开发者ID:jv9,项目名称:MyExpenses,代码行数:35,代码来源:ExpenseActivity.cs


示例17: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView(Resource.Layout.SettingsScreen);

            themeSpinner = FindViewById<Spinner> (Resource.Id.ThemeSpinner);
            fontSizeSpinner = FindViewById<Spinner> (Resource.Id.FontSizeSpinner);

            selectedTheme = Convert.ToInt32 (prefs.GetString (ThemeKey, "0"));
            selectedFontSize = Convert.ToInt32 (prefs.GetString (FontSizeKey, "0"));

            themeSpinner.ItemSelected += ThemeSpinner_ItemSelected;
            var adapter = ArrayAdapter.CreateFromResource (
                this, Resource.Array.themes, Android.Resource.Layout.SimpleSpinnerItem);
            adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
            themeSpinner.Adapter = adapter;

            fontSizeSpinner.ItemSelected += FontSizeSpinner_ItemSelected;
            adapter = ArrayAdapter.CreateFromResource (
                this, Resource.Array.font_sizes, Android.Resource.Layout.SimpleSpinnerItem);
            adapter.SetDropDownViewResource (Android.Resource.Layout.SimpleSpinnerDropDownItem);
            fontSizeSpinner.Adapter = adapter;

            themeSpinner.SetSelection (selectedTheme);
            fontSizeSpinner.SetSelection (selectedFontSize);
        }
开发者ID:chikerenda,项目名称:Android-labs,代码行数:26,代码来源:SettingsScreen.cs


示例18: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            // return inflater.Inflate(Resource.Layout.YourFragment, container, false);

            base.OnCreateView (inflater, container, savedInstanceState);

            Dialog.SetCanceledOnTouchOutside (true);

            View view = inflater.Inflate (Resource.Layout.RoutDialog, container, false);

            tvSearchPhrase = view.FindViewById <TextView> (Resource.Id.rdSearchPhrase);
            tvSearchPhrase.TextChanged += SearchPhrase_TextChanged;

            tvDanger = view.FindViewById <TextView> (Resource.Id.rdDangerText);
            tvSuccess = view.FindViewById <TextView> (Resource.Id.rdSuccessText);

            btnPick = view.FindViewById <Button> (Resource.Id.rdPick);

            btnPick.Click += (object sender, EventArgs e) => {
                if (position != -1) {
                    Arguments.PutInt(PHARMACY_ID, pharmacies[position].id);
                    OnAfterPick(EventArgs.Empty);
                    Dismiss();
                }
            };

            llDanger = view.FindViewById <LinearLayout> (Resource.Id.rdDangerLayout);
            llSuccess = view.FindViewById <LinearLayout> (Resource.Id.rdSuccessLayout);

            spnPharmacyPicker = view.FindViewById <Spinner> (Resource.Id.rdPharmacyPicker);
            spnPharmacyPicker.ItemSelected += PharmacyPicker_ItemSelected;

            return view;
        }
开发者ID:pafik13,项目名称:pharm-merch-tablet,代码行数:35,代码来源:RoutDialog.cs


示例19: OnCreate

        //AccessRights rights;
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            SetTitle (Resource.String.title_sonew);
            SetContentView (Resource.Layout.CreateSO);
            EventManagerFacade.Instance.GetEventManager().AddListener(this);

            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            //rights = Utility.GetAccessRights (pathToDatabase);
            apara =  DataHelper.GetAdPara (pathToDatabase);

            // Create your application here
            _date = DateTime.Today;
            spinner = FindViewById<Spinner> (Resource.Id.newinv_custcode);
            spinnerBill = FindViewById<Spinner> (Resource.Id.newinv_billto);
            TextView lbBillto = FindViewById<TextView> (Resource.Id.lbbillto);
            lbBillto.Text = "PAY FROM";

            Button butSave = FindViewById<Button> (Resource.Id.newinv_bsave);
            Button butNew = FindViewById<Button> (Resource.Id.newinv_cancel);
            Button butFind = FindViewById<Button> (Resource.Id.newinv_bfind);
            Button butBillFind = FindViewById<Button> (Resource.Id.newinv_billfind);
            //spinner.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs> (spinner_ItemSelected);
            //spinnerBill.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();
            };
            butBillFind.Click+= (object sender, EventArgs e) => {
                ShowBillToLookUp();
            };

            //SqliteConnection.CreateFile(pathToDatabase);
            using (var db = new SQLite.SQLiteConnection(pathToDatabase))
            {
                items = db.Table<Trader> ().ToList<Trader> ();
            }

            var icodes = GetCustCode (IsValidCustTo);
            var icodes2 = GetCustCode (IsValidBillTo);

            dataAdapter = new ArrayAdapter<String> (this, Resource.Layout.spinner_item, icodes);
            dataAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinner.Adapter =dataAdapter;

            dataAdapter2 = new ArrayAdapter<String> (this, Resource.Layout.spinner_item, icodes2);
            dataAdapter2.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinnerBill.Adapter =dataAdapter2;
        }
开发者ID:mokth,项目名称:merpV3,代码行数:61,代码来源:CreateSaleOrder+_WT.cs


示例20: OnCreate

		/// <summary>
		/// Starts the current <c>Activity</c>
		/// </summary>
		/// <param name="bundle">Bundle.</param>
		protected override void OnCreate (Bundle bundle)
		{
			// Attempt to attach to the Google Play Service
			StartSetup ();

			// Do the base setup
			base.OnCreate (bundle);

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

			// Attach to the GUI elements
			_produtctSpinner = FindViewById<Spinner> (Resource.Id.productSpinner);
			_buyButton = FindViewById<Button> (Resource.Id.buyButton);
			_lvPurchsedItems = FindViewById<ListView> (Resource.Id.purchasedItemsList);

			// Configure buy button
			_buyButton.Click += (sender, e) => {
				// Ask the open connection's billing handler to purchase the selected product
				if (_selectedProduct!=null)
					_serviceConnection.BillingHandler.BuyProduct(_selectedProduct);
			}; 

			// Configure the purchased items list
			_lvPurchsedItems.OnItemClickListener = this;

			// Configure the available product spinner
			_produtctSpinner.Enabled = false;
			_produtctSpinner.OnItemSelectedListener = this;

			// Initialize the list of available items
			_products = new List<Product> ();

		}
开发者ID:foxanna,项目名称:SimpleLocationAlarm,代码行数:38,代码来源:MainActivity.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SpreadsheetDocument类代码示例发布时间:2022-05-24
下一篇:
C# Spine类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap