public void SaveState(DID_Lokacija lokacija) { radniNalogLokacija = db.Query <DID_RadniNalog_Lokacija>( "SELECT * " + "FROM DID_RadniNalog_Lokacija " + "WHERE Lokacija = ? " + "AND RadniNalog = ?", lokacija.SAN_Id, radniNalog).FirstOrDefault(); List <DID_Potvrda> potvrde = db.Query <DID_Potvrda>( "SELECT * " + "FROM DID_Potvrda " + "WHERE RadniNalogLokacijaId = ?", radniNalogLokacija.Id); if (!potvrde.Any() && radniNalogLokacija.Status == 4) { string razlogNeizvrsenja = db.Query <DID_RazlogNeizvrsenjaDeratizacije>( "SELECT * " + "FROM DID_RazlogNeizvrsenjaDeratizacije " + "WHERE Sifra = ?", radniNalogLokacija.RazlogNeizvrsenja).FirstOrDefault().Naziv; localNeizvrsernaLokacijaEdit.PutBoolean("visitedNeizvrsenaLokacija", true); localNeizvrsernaLokacijaEdit.PutBoolean("neprovedenoRadioBtn", true); localNeizvrsernaLokacijaEdit.PutString("opisPosla", radniNalogLokacija.OpisPosla); localNeizvrsernaLokacijaEdit.PutString("napomena", radniNalogLokacija.Napomena); localNeizvrsernaLokacijaEdit.PutString("spinnerSelectedItem", razlogNeizvrsenja); localNeizvrsernaLokacijaEdit.Commit(); } localPotvrdaEdit.PutBoolean("fromList", true); localPotvrdaEdit.Commit(); localKomitentLokacijaEdit.PutInt("radniNalogLokacijaId", radniNalogLokacija.Id); localKomitentLokacijaEdit.PutInt("lokacijaId", lokacija.SAN_Id); localKomitentLokacijaEdit.PutString("lokacijaNaziv", lokacija.SAN_Naziv); localKomitentLokacijaEdit.Commit(); }
/** * Saves the result of the test in the shared preferences, * we will run it again only if the SDK has changed on the phone, * or if this test has been modified. */ private void saveTestResult(bool success) { System.String resolution = mWidth + "x" + mHeight + "-"; ISharedPreferencesEditor editor = mPreferences.Edit(); editor.PutBoolean(PREF_PREFIX + resolution + "success", success); if (success) { editor.PutInt(PREF_PREFIX + resolution + "lastSdk", (int)Build.VERSION.SdkInt); editor.PutInt(PREF_PREFIX + resolution + "lastVersion", VERSION); editor.PutInt(PREF_PREFIX + resolution + "sliceHeight", mNV21.getSliceHeigth()); editor.PutInt(PREF_PREFIX + resolution + "stride", mNV21.getStride()); editor.PutInt(PREF_PREFIX + resolution + "padding", mNV21.getYPadding()); editor.PutBoolean(PREF_PREFIX + resolution + "planar", mNV21.getPlanar()); editor.PutBoolean(PREF_PREFIX + resolution + "reversed", mNV21.getUVPanesReversed()); editor.PutString(PREF_PREFIX + resolution + "encoderName", mEncoderName); editor.PutInt(PREF_PREFIX + resolution + "colorFormat", mEncoderColorFormat); editor.PutString(PREF_PREFIX + resolution + "encoderName", mEncoderName); editor.PutString(PREF_PREFIX + resolution + "pps", mB64PPS); editor.PutString(PREF_PREFIX + resolution + "sps", mB64SPS); } editor.Commit(); }
void OnItemClick(int position) { edit_expert = expert_data.Edit(); edit_dialog = dialog_data.Edit(); var activity2 = new Intent(_context, typeof(SpecialistsOnMapActivity)); edit_dialog.PutString("come_from", dropdown_sub_category_list[position].id); edit_dialog.Apply(); edit_expert.PutString("spec_id", dropdown_sub_category_list[position].id); edit_expert.PutString("spec_type", dropdown_sub_category_list[position].name); edit_expert.PutString("spec_name", LookingForSpecialistsAdapter.name_of_highest_cat); edit_expert.PutBoolean("has_subcategory", dropdown_sub_category_list[position].hasSubcategory); //activity2.PutExtra("spec_id", dropdown_sub_category_list[position].id); //activity2.PutExtra("spec_type", dropdown_sub_category_list[position].name); //activity2.PutExtra("spec_name", LookingForSpecialistsAdapter.name_of_highest_cat); //activity2.PutExtra("has_subcategory", dropdown_sub_category_list[position].hasSubcategory); if (dropdown_sub_category_list[position].name == _context.GetString(Resource.String.all_subcategs)) { edit_expert.PutString("spec_id", LookingForSpecialistsAdapter.id_of_highest_categ); edit_expert.PutBoolean("has_subcategory", LookingForSpecialistsAdapter.has_subcategory_of_highest_cat); edit_expert.PutString("spec_name", LookingForSpecialistsAdapter.name_of_highest_cat); } edit_expert.Apply(); _context.StartActivity(activity2); }
public void NoviMaterijalBtn_Click(object sender, EventArgs args) { localMaterijaliEdit.PutBoolean("checkBox", true); localMaterijaliEdit.Commit(); intent = new Intent(this, typeof(Activity_PotroseniMaterijali_Novo_Lista)); StartActivity(intent); }
public void SaveState() { if (lokacija.SAN_Tip2 == 0) { localPotvrdaEdit.PutInt("lokacijaTip2", 0); localPotvrdaEdit.PutInt("lokacijaTip2BrojObjekata", 0); localPotvrdaEdit.PutBoolean("lokacijaTip2Odraden", false); } else { localPotvrdaEdit.PutInt("lokacijaTip2", lokacija.SAN_Tip2); localPotvrdaEdit.PutInt("lokacijaTip2BrojObjekata", Convert.ToInt32(brojObjekata2Input.Text)); localPotvrdaEdit.PutBoolean("lokacijaTip2Odraden", true); } localPotvrdaEdit.PutInt("lokacijaTip1", lokacija.SAN_Tip); localPotvrdaEdit.PutInt("lokacijaTipBrojObjekata", Convert.ToInt32(brojObjekata1Input.Text)); localPotvrdaEdit.PutBoolean("lokacijaTip1Odraden", true); localPotvrdaEdit.PutString("godina", godinaInput.Text); localPotvrdaEdit.PutString("datumPotvrde", datePicker.DateTime.ToString()); localPotvrdaEdit.PutString("potvrdaBrInput", potvrdaBrInput.Text); localPotvrdaEdit.PutString("opisRadaInput", opisRadaInput.Text); localPotvrdaEdit.PutString("razinaInfestacije", spinnerInfestacija.SelectedItem.ToString()); localPotvrdaEdit.PutBoolean("potvrdaPage1", true); localPotvrdaEdit.Commit(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.odabirDeratizacije); toolbar = FindViewById<Toolbar>(Resource.Id.toolbarLogin); radniNalogBtn = FindViewById<Button>(Resource.Id.radniNalogBtn); bezRadnogNalogaBtn = FindViewById<Button>(Resource.Id.bezRadnogNalogaBtn); naslov2TextView = FindViewById<TextView>(Resource.Id.naslov2TextView); naslov2TextView.Text = "nove Deratizacije"; SetActionBar(toolbar); ActionBar.Title = "Nova Deratizacija"; localKomitentLokacija.Edit().Clear().Commit(); localNewPartner.Edit().Clear().Commit(); localRadniNalozi.Edit().Clear().Commit(); localPozicija.Edit().Clear().Commit(); radniNalogBtn.Click += delegate { radniNaloziEdit.PutBoolean("visitedRadniNalozi", true); radniNaloziEdit.Commit(); intent = new Intent(this, typeof(Activity_RadniNalozi)); StartActivity(intent); }; bezRadnogNalogaBtn.Click += delegate { radniNaloziEdit.PutBoolean("visitedRadniNalozi", false); radniNaloziEdit.Commit(); intent = new Intent(this, typeof(Activity_NoviRadniNalog)); StartActivity(intent); }; }
public void OdabirKomitentaBtn_Click(object sender, EventArgs e) { localPozicijaEdit.PutBoolean("novaPozicija", false); localPozicijaEdit.Commit(); intent = new Intent(this, typeof(Activity_Komitenti)); StartActivity(intent); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.Inflate(Resource.Layout.fragment_menu_mailbag, container, false); prefs = PreferenceManager.GetDefaultSharedPreferences(Context); editor = prefs.Edit(); SetTitle("メールバック"); SetFooterText(""); Button button1 = view.FindViewById <Button>(Resource.Id.btn_mailMenu_regist); button1.Click += delegate { editor.PutBoolean("registFlg", true); editor.Apply(); StartFragment(FragmentManager, typeof(MailManageSelectFragment)); }; Button button2 = view.FindViewById <Button>(Resource.Id.btn_mailMenu_delete); button2.Click += delegate { editor.PutBoolean("registFlg", false); editor.Apply(); StartFragment(FragmentManager, typeof(MailManageSelectFragment)); }; return(view); }
private void SetActions() { var start = FindViewById <Button>(Resource.Id.startService); var stop = FindViewById <Button>(Resource.Id.stopService); var user = FindViewById <Button>(Resource.Id.setUsername); Intent serviceIntent; // stop.Enabled = false; if (Location.owner == 0) { // need to log in before starting GPS service start.Enabled = false; } else { user.SetText(Resource.String.set_new_user); } if (ServiceRunning) { start.Enabled = false; } else { stop.Enabled = false; } start.Click += delegate { serviceIntent = new Intent(this, typeof(LocationService)); StartService(serviceIntent); start.Enabled = false; stop.Enabled = true; Message("Location recording started. It will continue in background, including after reboot, until 'stop service' is used"); editor.PutBoolean("running", true); editor.Apply(); }; stop.Click += delegate { // StopService(new Intent("com.xamarin.LocationService")); serviceIntent = new Intent(this, typeof(LocationService)); StopService(serviceIntent); stop.Enabled = false; if (Location.owner > 0) { start.Enabled = true; } Message("Location recording has been halted"); editor.PutBoolean("running", false); editor.Apply(); }; user.Click += delegate { SetContentView(Resource.Layout.user); var userOK = FindViewById <Button>(Resource.Id.buttonOK); userOK.Click += UserOK_Click; var cancel = FindViewById <Button>(Resource.Id.cancel); cancel.Click += Cancel_Click; }; }
private void InitializeServices() { // Setup Google Play Services Helper helper = new GameHelper(this); // Set Gravity and View for Popups helper.GravityForPopups = (GravityFlags.Bottom | GravityFlags.Center); helper.ViewForPopups = FindViewById <View>(Resource.Id.SMLinearLayout); // Hook up events ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(context); ISharedPreferencesEditor editor = prefs.Edit(); helper.OnSignedIn += (object sender, EventArgs e) => { signInButton.Visibility = ViewStates.Gone; signOutButton.Visibility = ViewStates.Visible; editor.PutBoolean("LoggedInGooglePlay", true); editor.Apply(); }; helper.OnSignInFailed += (object sender, EventArgs e) => { signInButton.Visibility = ViewStates.Visible; signOutButton.Visibility = ViewStates.Gone; editor.PutBoolean("LoggedInGooglePlay", false); editor.Apply(); }; helper.Initialize(); }
/// <summary> /// Save a geofence /// </summary> /// <param name="region">The GeofenceCircularRegion with the values you want to save in SharedPreferemces</param> public override void Save(GeofenceCircularRegion region) { if (!region.Persistent) { return; } string id = region.Id; // Get a SharedPreferences editor instance. Among other things, SharedPreferences ensures that updates are atomic and non-concurrent ISharedPreferencesEditor prefs = mPrefs.Edit(); // Write the geofence values to SharedPreferences prefs.PutFloat(GetFieldKey(id, LatitudeGeofenceRegionKey), (float)region.Latitude); prefs.PutFloat(GetFieldKey(id, LongitudeGeofenceRegionKey), (float)region.Longitude); prefs.PutFloat(GetFieldKey(id, RadiusGeofenceRegionKey), (float)region.Radius); prefs.PutBoolean(GetFieldKey(id, NotifyOnEntryGeofenceRegionKey), region.NotifyOnEntry); prefs.PutBoolean(GetFieldKey(id, NotifyOnExitGeofenceRegionKey), region.NotifyOnExit); prefs.PutBoolean(GetFieldKey(id, NotifyOnStayGeofenceRegionKey), region.NotifyOnStay); prefs.PutString(GetFieldKey(id, NotificationEntryMessageGeofenceRegionKey), region.NotificationEntryMessage); prefs.PutString(GetFieldKey(id, NotificationExitMessageGeofenceRegionKey), region.NotificationExitMessage); prefs.PutString(GetFieldKey(id, NotificationStayMessageGeofenceRegionKey), region.NotificationStayMessage); prefs.PutBoolean(GetFieldKey(id, ShowNotificationGeofenceRegionKey), region.ShowNotification); prefs.PutBoolean(GetFieldKey(id, PersistentGeofenceRegionKey), region.Persistent); prefs.PutInt(GetFieldKey(id, StayedInThresholdDurationGeofenceRegionKey), (int)region.StayedInThresholdDuration.TotalMilliseconds); // Commit the changes prefs.Commit(); }
public override sealed void WriteSettings() { ISharedPreferencesEditor editor = _preferences.Edit(); editor.PutString("url", BaseUrl); editor.PutString("application", ApplicationString); editor.PutString("user", UserName); editor.PutString("password", Password); editor.PutBoolean("clearCache", ClearCacheOnStart); editor.PutBoolean("anonymousAccess", AnonymousAccess); editor.PutString("ftpPort", FtpPort); editor.PutString("platformVersion", CoreInformation.CoreVersion.ToString()); if (ConfigName != null) { editor.PutString("configuration", ConfigName); } if (ConfigVersion != null) { editor.PutString("version", ConfigVersion); } editor.Commit(); InfobaseManager.Current.SaveInfobase(_name, this); }
void OnItemClick(int position) { edit_expert = expert_data.Edit(); edit_dialog = dialog_data.Edit(); var activity2 = new Intent(_context, typeof(SpecialistsOnMapActivity)); edit_dialog.PutString("come_from", categories_list[position].id); edit_dialog.Apply(); edit_expert.PutString("spec_id", categories_list[position].id); LookingForSpecialistsAdapter.id_of_highest_categ = categories_list[position].rootId; LookingForSpecialistsAdapter.name_of_highest_cat = categories_list[position].name; LookingForSpecialistsAdapter.has_subcategory_of_highest_cat = categories_list[position].hasSubcategory; edit_expert.PutString("spec_name", categories_list[position].name); edit_expert.PutString("spec_type", _context.GetString(Resource.String.all_subcategs)); edit_expert.PutBoolean("has_subcategory", categories_list[position].hasSubcategory); //setting values to default edit_expert.PutString("expert_city_id", ""); edit_expert.PutString("expert_city_name", ""); edit_expert.PutString("distance_radius", ""); edit_expert.PutBoolean("has_reviews", false); edit_expert.Apply(); _context.StartActivity(activity2); }
void CheckIfFirstTime() { if (preferences.GetBoolean("first_time", true)) { Log.Debug("DEBUG", "This is the first time the app is being launched"); editor.PutBoolean("first_time", false); editor.Apply(); isCelcius = false; radius = 20; isSortedByDistance = true; isKilometers = false; numberOfResults = 20; editor.PutBoolean("isCelcius", isCelcius); editor.PutInt("radius", radius); editor.PutBoolean("isSortedByDistance", isSortedByDistance); editor.PutBoolean("isKilometers", isKilometers); editor.PutInt("numberOfResults", numberOfResults); editor.Apply(); Android.Support.V7.App.AlertDialog.Builder firstTimeNotfication = new Android.Support.V7.App.AlertDialog.Builder(this); firstTimeNotfication.SetTitle("Alert"); firstTimeNotfication.SetMessage("This application needs to use your device's location. Please turn on location under settings if you haven't done so."); firstTimeNotfication.SetPositiveButton("OK", (sender, e) => { //Alert Dialog closes. }); var alert = firstTimeNotfication.Create(); alert.Show(); } }
public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) { var view = inflater.Inflate(Resource.Layout.DialogRating, null); Button buttonEasy = view.FindViewById<Button>(Resource.Id.buttonEasy); Button buttonYester = view.FindViewById<Button>(Resource.Id.buttonYester); Button buttonNo = view.FindViewById<Button>(Resource.Id.buttonNo); var preferences = Activity.GetPreferences(FileCreationMode.Private); _editor = preferences.Edit(); buttonEasy.Click += (object sender, EventArgs e) => { var url = Android.Net.Uri.Parse("https://itunes.apple.com/ua/app/ers/id604886527?mt=8"); var intent = new Intent(Intent.ActionView, url); StartActivity(intent); _editor.PutBoolean("isShow", false); this.Dismiss(); }; buttonYester.Click += (object sender, EventArgs e) => { _editor.PutBoolean("isShow", true); this.Dismiss(); }; buttonNo.Click += (object sender, EventArgs e) => { _editor.PutBoolean("isShow", false); this.Dismiss(); }; return view; }
private void InitComponent() { SetTitle("納品検品"); TextView txtTokuisaki = view.FindViewById <TextView>(Resource.Id.txt_nohinwork_tokuisakiNm); txtTokuisaki.Text = prefs.GetString("tokuisaki_nm", ""); TextView txtTodokesaki = view.FindViewById <TextView>(Resource.Id.txt_nohinwork_todokesakiNm); txtTodokesaki.Text = prefs.GetString("todokesaki_nm", "");; tvCase = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_case); tvOricon = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_oricon); tvSonota = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_sonota); tvIdo = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_ido); tvMail = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_mail); tvFuteikei = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_futeikei); tvHansoku = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_hansoku); tvTc = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_tc); tvTsumidai = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_tsumidaisu); tvAll = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_all); tvmatehanNm = view.FindViewById <TextView>(Resource.Id.matehanNm); nohinWorkButton = view.FindViewById <BootstrapButton>(Resource.Id.nohinButton); nohinWorkButton.Click += delegate { if (tsumikomiDataList.Count == ko_su) { Log.Debug(TAG, "MAIN NOHIN COMPLETE"); editor.PutString("menu_flg", "2"); editor.PutBoolean("nohinWorkEndFlag", true); editor.Apply(); ShowDialog("報告", "納品検品が\n完了しました。\n\nお疲れ様でした!", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); }); } else { nohinWorkButton.Visibility = ViewStates.Gone; kaizoButton.Visibility = ViewStates.Visible; tvCase.Text = "0"; tvOricon.Text = "0"; tvFuteikei.Text = "0"; tvTc.Text = "0"; tvIdo.Text = "0"; tvMail.Text = "0"; tvHansoku.Text = "0"; tvSonota.Text = "0"; } }; kaizoButton = view.FindViewById <BootstrapButton>(Resource.Id.kaizoButton); kaizoButton.Click += delegate { editor.PutString("menu_flg", "2"); editor.Apply(); StartFragment(FragmentManager, typeof(NohinMailBagPasswordFragment)); }; nohinWorkButton.Visibility = ViewStates.Gone; kaizoButton.Visibility = ViewStates.Visible; }
public void SaveState() { localAnketaEdit.PutString("napomeneInput", napomeneInput.Text); localAnketaEdit.PutString("spinnerSelectedItem", spinnerNeprovedeno.SelectedItem.ToString()); localAnketaEdit.PutBoolean("neprovedenoRadioBtn", neprovedenoRadioBtn.Checked); localAnketaEdit.PutBoolean("visitedPage3", true); localAnketaEdit.Commit(); }
public void NoviMaterijalBtn_Click(object sender, EventArgs args) { //localMaterijaliEdit.PutBoolean("activity_PotroseniMaterijali_pozicija", true); localMaterijaliEdit.PutBoolean("materijaliPoPoziciji", true); localMaterijaliEdit.Commit(); intent = new Intent(this, typeof(Activity_PotroseniMaterijali_List)); StartActivity(intent); }
public void Save(ISharedPreferencesEditor editor, int appWidgetId) { Log.Debug("saving", _savekey + appWidgetId); var boolValue = _checkBox.Checked; editor.PutBoolean(_savekey + appWidgetId, boolValue); editor.PutBoolean(_savekey + PrefsKeys.DefaultValue, boolValue); }
private void BtnStart_Click(object sender, System.EventArgs e) { try { string h1 = etH1.Text; string h2 = etH2.Text; int p1 = int.Parse(etP1.Text); int p2 = int.Parse(etP2.Text); int cp = int.Parse(etCP.Text); int to = int.Parse(etTo.Text); ISharedPreferences preferences = GetSharedPreferences("SETUP", FileCreationMode.Private); ISharedPreferencesEditor editor = preferences.Edit(); editor.PutString("H1", h1); editor.PutString("H2", h2); editor.PutInt("P1", p1); editor.PutInt("P2", p2); editor.PutInt("CP", cp); editor.PutInt("TO", to); editor.PutBoolean("HTTP", cbHttp.Checked); editor.PutBoolean("SSL", cbSsl.Checked); editor.Commit(); Connection c1 = new Connection(h1, p1); Connection c2 = new Connection(h2, p2); tunnel = new PortTunnel(c1, c2, to, cp) { HttpProtocol = cbHttp.Checked, DestIsSsl = cbSsl.Checked }; tunnel.NewLogOutput += (sen, text) => { try { log.Text += text; activeConnections.Text = ((PortTunnel)tunnel).ActiveConnections.ToString(); } catch { } }; tunnel.NewStreamLogCompleted += (sen, content) => { }; BlockInputs(); tunnel.Start(); } catch { } }
private void CompleteMailNohin() { ShowDialog("警告", "メールバッグ納品業務を終了しますか?", () => { Log.Debug(TAG, "F3 return pushed : " + prefs.GetString("tokuisaki_cd", "") + ", " + prefs.GetString("tokuisaki_nm", "")); editor.PutBoolean("mailBagFlag", true); editor.Apply(); FragmentManager.PopBackStack(); }); }
public void setupSharedPreferences() { ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this); ISharedPreferencesEditor editor = prefs.Edit(); editor.PutBoolean("isFullscreen", false); editor.PutBoolean("backHit", false); editor.Apply(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.potroseniMaterijali); Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage); materijaliListView = FindViewById <RecyclerView>(Resource.Id.materijaliListView); ukupanIznosTextView = FindViewById <TextView>(Resource.Id.ukupanIznosTextView); radniNalogTV = FindViewById <TextView>(Resource.Id.radniNalogTV); spinnerPartner = FindViewById <Spinner>(Resource.Id.spinnerPartner); spinnerLokacija = FindViewById <Spinner>(Resource.Id.spinnerLokacija); spinnerRadniNalog = FindViewById <Spinner>(Resource.Id.spinnerRadniNalog); message = FindViewById <TextView>(Resource.Id.message); messagePotvrda = FindViewById <TextView>(Resource.Id.messagePotvrda); prikazMaterijala = FindViewById <ScrollView>(Resource.Id.prikazMaterijala); prikazDropdowna = FindViewById <LinearLayout>(Resource.Id.prikazDropdowna); ukupnoKn = FindViewById <RelativeLayout>(Resource.Id.ukupnoKn); noviMaterijalBtn = FindViewById <Button>(Resource.Id.noviMaterijalBtn); SetActionBar(toolbar); ActionBar.Title = "Popis materijala"; spinnerPartner.ItemSelected += SpinnerPartner_ItemSelected; spinnerLokacija.ItemSelected += SpinnerLokacija_ItemSelected; spinnerRadniNalog.ItemSelected += SpinnerRadniNalog_ItemSelected; noviMaterijalBtn.Click += NoviMaterijalBtn_Click; lokacijaId = localKomitentLokacija.GetInt("lokacijaId", 0); mLayoutManager = new LinearLayoutManager(this); materijaliListView.SetLayoutManager(mLayoutManager); localMaterijaliEdit.PutBoolean("button", false); localMaterijaliEdit.Commit(); List <DID_RadniNalog> radniNalozi = db.Query <DID_RadniNalog>( "SELECT rn.Id, rn.Godina, rn.Broj, rn.Status, rn.PokretnoSkladiste, rn.Voditelj, rn.Izdavatelj, rn.Primatelj, rn.DatumOd, rn.DatumDo, rn.DatumIzrade, rn.DatumIzvrsenja, rn.SinhronizacijaDatumVrijeme, rn.SinhronizacijaPrivremeniKljuc " + "FROM DID_RadniNalog rn " + "INNER JOIN DID_RadniNalog_Lokacija ON rn.Id = DID_RadniNalog_Lokacija.RadniNalog " + "INNER JOIN DID_LokacijaPozicija ON DID_RadniNalog_Lokacija.Lokacija = DID_LokacijaPozicija.SAN_Id " + "INNER JOIN DID_AnketaMaterijali ON DID_LokacijaPozicija.POZ_Id = DID_AnketaMaterijali.PozicijaId " + "GROUP BY Broj, Godina"); if (radniNalozi.Any()) { ToggleVisibility(true); List <string> listRadniNalozi = new List <string>(); radniNaloziIdList = new List <string>(); foreach (var item in radniNalozi) { listRadniNalozi.Add("Broj: " + item.Broj.ToString() + " / Godina: " + item.Godina); radniNaloziIdList.Add(item.Id.ToString()); } ArrayAdapter <string> adapterRNList = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, listRadniNalozi); adapterRNList.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); spinnerRadniNalog.Adapter = adapterRNList; } else { ToggleVisibility(false); } }
public void createLoginSession(string partyMasterId, string Userid, string email, string name, string mobile, string password) { editor.PutBoolean(IS_LOGIN, true); editor.PutString(KEY_PARTYMASTER_ID, partyMasterId); editor.PutString(KEY_ID, Userid); editor.PutString(KEY_EMAIL, email); editor.PutString(KEY_NAME, name); editor.PutString(KEY_MOBILE, mobile); editor.PutString(KEY_PASSWORD, password); editor.Commit(); }
protected override void OnPause() { base.OnPause(); ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this); ISharedPreferencesEditor editor = prefs.Edit(); editor.PutBoolean("SwitchChecked", swiShowTestButtons.Checked); editor.PutBoolean("ButtonsVisible", linearLayout1.Visibility == ViewStates.Visible); // editor.Commit(); // applies changes synchronously on older APIs editor.Apply(); // applies changes asynchronously on newer APIs }
void SaveInfo() { ISharedPreferences sharePrefs = PreferenceManager.GetDefaultSharedPreferences(context); ISharedPreferencesEditor editor = sharePrefs.Edit(); editor.PutString("username", username); editor.PutString("password", password); editor.PutBoolean("IsSaveInfo", true); editor.PutBoolean("IsSaveSignUp", isSaveState); editor.Apply(); }
private void SetUserPreferences() { //Set preference text to summary instead of preference_value ISharedPreferences settings = PreferenceManager.GetDefaultSharedPreferences(this); ISharedPreferencesEditor editor = settings.Edit(); editor.PutString(GetString(Resource.String.settings_user_name), _userPreference.GetUserFirstName()); editor.PutString(GetString(Resource.String.settings_user_lastname), _userPreference.GetUserLastName()); editor.PutString(GetString(Resource.String.settings_user_phonenumber), _userPreference.GetPhonenumber()); editor.PutBoolean(GetString(Resource.String.settings_notify_email), _userPreference.GetEmailNotification()); editor.PutBoolean(GetString(Resource.String.settings_notify_sms), _userPreference.GetSmsNotification()); editor.Apply(); }
void SaveValues(bool Admin, string User, string Pass) { ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this); ISharedPreferencesEditor editor = prefs.Edit(); editor.PutBoolean("Saved", true); editor.PutBoolean("Administrator", Admin); editor.PutString("User", User); editor.PutString("Password", encryptpass.EncryptString(Pass, "p9JHopIpNQNk6B6YJbLeNxOeqnfK")); editor.Commit(); }
public void SaveState() { localProvedbeniPlanEdit.PutString("datumIzvida_page1", datum.DateTime.ToString()); localProvedbeniPlanEdit.PutInt("vrijemeIzvidaSat_page1", vrijemeSat); localProvedbeniPlanEdit.PutInt("vrijemeIzvidaMinuta_page1", vrijemeMinuta); localProvedbeniPlanEdit.PutBoolean("higijenskoStanje_page1", higijenskoStanjeDobroRBtn.Checked); localProvedbeniPlanEdit.PutString("higijenskoStanjeOpis_page1", higijenskoStanjeLoseInput.Text); localProvedbeniPlanEdit.PutBoolean("gradevinskoStanje_page1", gradevinskoStanjeDobroRBtn.Checked); localProvedbeniPlanEdit.PutString("gradevinskoStanjeOpis_page1", gradevinskoStanjeLoseInput.Text); localProvedbeniPlanEdit.PutBoolean("tehnickaOpremljenost_page1", tehnickaOpremljenostDobroRBtn.Checked); localProvedbeniPlanEdit.PutBoolean("visited_page1", true); localProvedbeniPlanEdit.Commit(); }
public static void PutDebt(this ISharedPreferencesEditor editor, string key, Debt debt) { editor.PutInt(key + IdSuffix, debt.Id); editor.PutContact(key + ContactSuffix, debt.AssosiatedContact); editor.PutMoney(key + MoneySuffix, debt.Money); editor.PutDate(key + CreationDateSuffix, debt.CreationDate); editor.PutBoolean(key + HasPaymentDateSuffix, debt.HasPaymentDate); if (debt.HasPaymentDate) { editor.PutDate(key + PaymentDateSuffix, debt.PaymentDate); } editor.PutString(key + CommentSuffix, debt.Comment); editor.PutBoolean(key + IsPaidSuffix, debt.IsPaid); }
} //CheckUserPreferences() private void CreateUserPreferences() { pref = Application.Context.GetSharedPreferences("UserInfo", FileCreationMode.Private); prefEdit = pref.Edit(); if (pref.Contains("showKMs") == false) { prefEdit.PutBoolean("showKMs", true); prefEdit.PutString("lastSavedTripName", string.Empty); prefEdit.PutBoolean("procedeSave", false); prefEdit.PutString("previousTab", "MainActivity"); prefEdit.Apply(); } }//CreateUserPreferences()
protected override void OnCreate(Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.welcome); prefs = GetPreferences (FileCreationMode.Append); firstTime = prefs.GetBoolean (FIRST, true); if (firstTime) { MakeQuestionDB (); MakeScoreDB (); editor = prefs.Edit (); editor.PutBoolean (FIRST, false); editor.Commit (); } Button button = FindViewById<Button> (Resource.Id.btnStarQuiz); button.Click += delegate { StartActivity (typeof(QuizActivity)); Finish (); }; }
void RadioButtonClick(object sender, EventArgs e) { var radio = sender as RadioButton; switch (radio.Id) { case Resource.Id.rbArrival: radio.Typeface = kalingab; rbDepart.Typeface = kalinga; tSel = false; break; default: radio.Typeface = kalingab; rbArrive.Typeface = kalinga; tSel = true; break; } rbDepart.Checked = tSel; rbArrive.Checked = !tSel; editor = prefs.Edit (); editor.PutBoolean (TIMESEL, tSel); editor.Commit (); }
void Stations_Downloaded(object sender, DownloadStringCompletedEventArgs e) { SaveStations (e.Result); editor = prefs.Edit (); editor.PutBoolean (FIRST, false); editor.Commit (); }