public AutoComplete_Tablet() { addingCountryList(); variableDeclaration(); //countryAutoComplete countryAutoComplete = new SFAutoComplete(); countryAutoComplete.AutoCompleteSource = countryList; countryAutoComplete.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; countryAutoComplete.Watermark = (NSString)"Enter a country name"; countryAutoComplete.MaxDropDownHeight = 90; countryAutoComplete.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; controlView.AddSubview(countryAutoComplete); //jobFieldAutoComplete jobFieldAutoComplete = new SFAutoComplete(); jobFieldAutoComplete.AutoCompleteSource = jobTitle; jobFieldAutoComplete.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; jobFieldAutoComplete.Watermark = (NSString)"Starts with ’S’, ‘M’ or ‘B’"; jobFieldAutoComplete.MaxDropDownHeight = 90; jobFieldAutoComplete.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; controlView.AddSubview(jobFieldAutoComplete); this.AddSubview(controlView); mainPageDesign(); autoHide(); this.loadOptionView(); }
public AutoComplete_Mobile() { mainPageDesign(); //countryAutoComplete countryAutoComplete = new SFAutoComplete(); countryAutoComplete.AutoCompleteSource = countryList; countryAutoComplete.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; countryAutoComplete.Watermark = (NSString)"Enter a country name"; countryAutoComplete.MaxDropDownHeight = 100; countryAutoComplete.TextHighlightMode = OccurrenceMode.FirstOccurrence; countryAutoComplete.HighlightedTextColor = UIColor.Blue; countryAutoComplete.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; //jobFieldAutoComplete jobFieldAutoComplete = new SFAutoComplete(); jobFieldAutoComplete.AutoCompleteSource = jobTitle; jobFieldAutoComplete.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; jobFieldAutoComplete.Watermark = (NSString)"Starts with ’S’, ‘M’ or ‘B’"; jobFieldAutoComplete.MaxDropDownHeight = 90; jobFieldAutoComplete.TextHighlightMode = OccurrenceMode.FirstOccurrence; jobFieldAutoComplete.HighlightedTextColor = UIColor.Blue; jobFieldAutoComplete.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; this.AddSubview(countryAutoComplete); this.AddSubview(jobFieldAutoComplete); loadOptionView(); }
public Diacritics_Sense() { this.addingdiacriticsList(); diacriticsAutoComplete = new SFAutoComplete(); diacriticsAutoComplete.AutoCompleteSource = diacriticsList; diacriticsAutoComplete.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeContains; diacriticsAutoComplete.Watermark = (NSString)"Search Text"; diacriticsAutoComplete.MaxDropDownHeight = 200; diacriticsAutoComplete.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; diacriticsAutoComplete.IgnoreDiacritic = false; this.AddSubview(diacriticsAutoComplete); }
public AutoComplete_Mobile() { //countryAutoComplete countryAutoComplete = new SFAutoComplete(); countryAutoComplete.AutoCompleteSource = countryList; countryAutoComplete.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; countryAutoComplete.Watermark = (NSString)"Enter a country name"; countryAutoComplete.MaxDropDownHeight = 90; countryAutoComplete.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; //jobFieldAutoComplete jobFieldAutoComplete = new SFAutoComplete(); jobFieldAutoComplete.AutoCompleteSource = jobTitle; jobFieldAutoComplete.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; jobFieldAutoComplete.Watermark = (NSString)"Starts with ’S’, ‘M’ or ‘B’"; jobFieldAutoComplete.MaxDropDownHeight = 90; jobFieldAutoComplete.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; this.AddSubview(countryAutoComplete); this.AddSubview(jobFieldAutoComplete); mainPageDesign(); loadOptionView(); }
public AutoComplete () { picker1 = new UIPickerView (); picker2 = new UIPickerView (); PickerModel model = new PickerModel (suggesionmode); picker1.Model = model; PickerModel model1 = new PickerModel (autocompletemd); picker2.Model = model1; PickerModel model2 = new PickerModel (experience); label2 = new UILabel (); label3 = new UILabel (); label4 = new UILabel (); label5 = new UILabel (); label6 = new UILabel (); textbutton = new UIButton (); textbutton1 = new UIButton (); this.title.Add ((NSString)"Banking"); this.title.Add ((NSString)"Software"); this.title.Add ((NSString)"Media"); this.title.Add ((NSString)"Medical"); this.exp.Add ((NSString)"1"); this.exp.Add ((NSString)"2"); label1s = new UILabel (); label2s = new UILabel (); label3s = new UILabel (); label4s = new UILabel (); textbuttons = new UIButton (); autocomplete1 = new SFAutoComplete (); autocomplete2 = new SFAutoComplete (); autocomplete1.AutoCompleteSource = new Countrylist().Country; autocomplete1.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; autocomplete1.Watermark= (NSString)"Enter a country name"; autocomplete1.MaxDropDownHeight=90; autocomplete1.AutoCompleteMode= SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; autocomplete2.AutoCompleteSource = title; autocomplete2.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; autocomplete2.Watermark=(NSString)"Starts with ’S’, ‘M’ or ‘B’"; autocomplete2.MaxDropDownHeight=90; autocomplete2.AutoCompleteMode= SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; label1s.Text = "Job Search"; label1s.TextColor = UIColor.Black; label1s.TextAlignment = UITextAlignment.Left; label1s.Font=UIFont.FromName("Helvetica-Bold", 20f); label2s.Text = "Country"; label2s.TextColor = UIColor.Black; label2s.TextAlignment = UITextAlignment.Left; label2s.Font=UIFont.FromName("Helvetica", 16f); label3s.Text = "Job Title"; label3s.TextColor = UIColor.Black; label3s.TextAlignment = UITextAlignment.Left; label3s.Font=UIFont.FromName("Helvetica", 16f); label4s.Text = "Experience"; label4s.TextColor = UIColor.Black; label4s.TextAlignment = UITextAlignment.Left; label4s.Font=UIFont.FromName("Helvetica", 16f); textbuttons.SetTitle("Search",UIControlState.Normal); textbuttons.SetTitleColor(UIColor.Black,UIControlState.Normal); textbuttons.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbuttons.Layer.CornerRadius = 8; textbuttons.Layer.BorderWidth = 2; textbuttons.Layer.BorderColor =UIColor.FromRGB(246,246,246).CGColor; textbuttons.TouchUpInside += SelectResults; textbutton1s.SetTitle("1", UIControlState.Normal); textbutton1s.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbutton1s.BackgroundColor = UIColor.Clear; textbutton1s.SetTitleColor(UIColor.Black, UIControlState.Normal); textbutton1s.Layer.BorderColor = UIColor.FromRGB(246,246,246).CGColor; textbutton1s.Layer.BorderWidth = 4; textbutton1s.Layer.CornerRadius = 8; textbutton1s.TouchUpInside += ShowPickers; this.AddSubview (textbutton1s); PickerModel models = new PickerModel(this.exp); models.PickerChanged += (sender, e) => { this.selectedTypes = e.SelectedValue; textbutton1s.SetTitle(selectedTypes, UIControlState.Normal); }; pickers.ShowSelectionIndicator = true; pickers.Hidden = true; pickers.Model = model2; pickers.BackgroundColor = UIColor.White; buttons.SetTitle("Done\t", UIControlState.Normal); buttons.HorizontalAlignment = UIControlContentHorizontalAlignment.Right; buttons.BackgroundColor = UIColor.FromRGB(240,240,240); buttons.SetTitleColor(UIColor.Black, UIControlState.Normal); buttons.Hidden = true; buttons.TouchUpInside += HidePickers; this.AddSubview (pickers); this.AddSubview (buttons); this.AddSubview (autocomplete1); this.AddSubview (autocomplete2); this.AddSubview (label1s); this.AddSubview (label2s); this.AddSubview (label3s); this.AddSubview (label4s); this.AddSubview (textbuttons); this.control = this; label2.Text = "SuggestionMode"; label2.TextColor = UIColor.Black; label2.TextAlignment = UITextAlignment.Left; label3.Text = "AutoCompleteMode"; label3.TextColor = UIColor.Black; label3.TextAlignment = UITextAlignment.Left; label4.Text = "Min Prefix Character"; label4.TextColor = UIColor.Black; label4.TextAlignment = UITextAlignment.Left; label4.Font=UIFont.FromName("Helvetica", 14f); label5.Text = "Max DropDownHeight"; label5.TextColor = UIColor.Black; label5.TextAlignment = UITextAlignment.Left; label5.Font=UIFont.FromName("Helvetica", 14f); label6.Text = "Popup Delay"; label6.TextColor = UIColor.Black; label6.TextAlignment = UITextAlignment.Left; label6.Font=UIFont.FromName("Helvetica", 14f); textbutton.SetTitle("StartsWith",UIControlState.Normal); textbutton.SetTitleColor(UIColor.Black,UIControlState.Normal); textbutton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbutton.Layer.CornerRadius = 8; textbutton.Layer.BorderWidth = 2; textbutton.TouchUpInside += ShowPicker1; textbutton.Layer.BorderColor =UIColor.FromRGB(246,246,246).CGColor; text1 = new UITextView (); text2 = new UITextView (); text3 = new UITextView (); text1.Layer.BorderColor = UIColor.Black.CGColor; text2.Layer.BorderColor = UIColor.Black.CGColor; text3.Layer.BorderColor = UIColor.Black.CGColor; text1.BackgroundColor = UIColor.FromRGB(246,246,246); text2.BackgroundColor = UIColor.FromRGB(246,246,246); text3.BackgroundColor = UIColor.FromRGB(246,246,246); text1.KeyboardType = UIKeyboardType.NumberPad; text2.KeyboardType = UIKeyboardType.NumberPad; text3.KeyboardType = UIKeyboardType.NumberPad; text1.Text = "1"; text2.Text = "400"; text3.Text = "100"; text2.Changed+= (object sender, EventArgs e) => { if(text2.Text.Length>0){ autocomplete1.MaxDropDownHeight = double.Parse(text2.Text); autocomplete2.MaxDropDownHeight = double.Parse(text2.Text); } else{ autocomplete1.MaxDropDownHeight = 200; autocomplete2.MaxDropDownHeight = 200; } }; text1.Changed+= (object sender, EventArgs e) => { if(text1.Text.Length>0){ autocomplete1.MinimumPrefixCharacters = int.Parse(text1.Text); autocomplete2.MinimumPrefixCharacters = int.Parse(text1.Text); } else{ autocomplete1.MinimumPrefixCharacters = 1; autocomplete2.MinimumPrefixCharacters = 1; } }; text3.Changed+= (object sender, EventArgs e) => { if(text3.Text.Length>0) { autocomplete1.PopUpDelay = double.Parse(text3.Text); autocomplete2.PopUpDelay = double.Parse(text3.Text); } else { autocomplete1.PopUpDelay = 100; autocomplete2.PopUpDelay = 100; } }; textbutton1.SetTitle("Suggest",UIControlState.Normal); textbutton1.SetTitleColor(UIColor.Black,UIControlState.Normal); textbutton1.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbutton1.Layer.CornerRadius = 8; textbutton1.Layer.BorderWidth = 2; textbutton1.TouchUpInside += ShowPicker2; textbutton1.Layer.BorderColor =UIColor.FromRGB(246,246,246).CGColor; doneButton.SetTitle("Done\t",UIControlState.Normal); doneButton.SetTitleColor(UIColor.Black,UIControlState.Normal); doneButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Right; doneButton.TouchUpInside += HidePicker; doneButton.Hidden = true; doneButton.BackgroundColor = UIColor.FromRGB(246,246,246); model.PickerChanged += SelectedIndexChanged; model1.PickerChanged += SelectedIndexChanged1; model2.PickerChanged += SelectedIndexChanged2; picker1.ShowSelectionIndicator = true; picker1.Hidden = true; picker1.BackgroundColor = UIColor.Gray; picker2.BackgroundColor = UIColor.Gray; picker2.ShowSelectionIndicator = true; picker2.Hidden = true; }
public AutoComplete() { picker1 = new UIPickerView(); picker2 = new UIPickerView(); PickerModel model = new PickerModel(suggesionmode); picker1.Model = model; PickerModel model1 = new PickerModel(autocompletemd); picker2.Model = model1; PickerModel model2 = new PickerModel(experience); label2 = new UILabel(); label3 = new UILabel(); label4 = new UILabel(); label5 = new UILabel(); label6 = new UILabel(); textbutton = new UIButton(); textbutton1 = new UIButton(); this.title.Add((NSString)"Banking"); this.title.Add((NSString)"Software"); this.title.Add((NSString)"Media"); this.title.Add((NSString)"Medical"); this.exp.Add((NSString)"1"); this.exp.Add((NSString)"2"); label1s = new UILabel(); label2s = new UILabel(); label3s = new UILabel(); label4s = new UILabel(); textbuttons = new UIButton(); autocomplete1 = new SFAutoComplete(); autocomplete2 = new SFAutoComplete(); autocomplete1.AutoCompleteSource = new Countrylist().Country; autocomplete1.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; autocomplete1.Watermark = (NSString)"Enter a country name"; autocomplete1.MaxDropDownHeight = 90; autocomplete1.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; autocomplete2.AutoCompleteSource = title; autocomplete2.SuggestionMode = SFAutoCompleteSuggestionMode.SFAutoCompleteSuggestionModeStartsWith; autocomplete2.Watermark = (NSString)"Starts with ’S’, ‘M’ or ‘B’"; autocomplete2.MaxDropDownHeight = 90; autocomplete2.AutoCompleteMode = SFAutoCompleteAutoCompleteMode.SFAutoCompleteAutoCompleteModeSuggest; label1s.Text = "Job Search"; label1s.TextColor = UIColor.Black; label1s.TextAlignment = UITextAlignment.Left; label1s.Font = UIFont.FromName("Helvetica-Bold", 20f); label2s.Text = "Country"; label2s.TextColor = UIColor.Black; label2s.TextAlignment = UITextAlignment.Left; label2s.Font = UIFont.FromName("Helvetica", 16f); label3s.Text = "Job Title"; label3s.TextColor = UIColor.Black; label3s.TextAlignment = UITextAlignment.Left; label3s.Font = UIFont.FromName("Helvetica", 16f); label4s.Text = "Experience"; label4s.TextColor = UIColor.Black; label4s.TextAlignment = UITextAlignment.Left; label4s.Font = UIFont.FromName("Helvetica", 16f); textbuttons.SetTitle("Search", UIControlState.Normal); textbuttons.SetTitleColor(UIColor.Black, UIControlState.Normal); textbuttons.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbuttons.Layer.CornerRadius = 8; textbuttons.Layer.BorderWidth = 2; textbuttons.Layer.BorderColor = UIColor.FromRGB(246, 246, 246).CGColor; textbuttons.TouchUpInside += SelectResults; textbutton1s.SetTitle("1", UIControlState.Normal); textbutton1s.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbutton1s.BackgroundColor = UIColor.Clear; textbutton1s.SetTitleColor(UIColor.Black, UIControlState.Normal); textbutton1s.Layer.BorderColor = UIColor.FromRGB(246, 246, 246).CGColor; textbutton1s.Layer.BorderWidth = 4; textbutton1s.Layer.CornerRadius = 8; textbutton1s.TouchUpInside += ShowPickers; this.AddSubview(textbutton1s); PickerModel models = new PickerModel(this.exp); models.PickerChanged += (sender, e) => { this.selectedTypes = e.SelectedValue; textbutton1s.SetTitle(selectedTypes, UIControlState.Normal); }; pickers.ShowSelectionIndicator = true; pickers.Hidden = true; pickers.Model = model2; pickers.BackgroundColor = UIColor.White; buttons.SetTitle("Done\t", UIControlState.Normal); buttons.HorizontalAlignment = UIControlContentHorizontalAlignment.Right; buttons.BackgroundColor = UIColor.FromRGB(240, 240, 240); buttons.SetTitleColor(UIColor.Black, UIControlState.Normal); buttons.Hidden = true; buttons.TouchUpInside += HidePickers; this.AddSubview(pickers); this.AddSubview(buttons); this.AddSubview(autocomplete1); this.AddSubview(autocomplete2); this.AddSubview(label1s); this.AddSubview(label2s); this.AddSubview(label3s); this.AddSubview(label4s); this.AddSubview(textbuttons); this.control = this; label2.Text = "SuggestionMode"; label2.TextColor = UIColor.Black; label2.TextAlignment = UITextAlignment.Left; label3.Text = "AutoCompleteMode"; label3.TextColor = UIColor.Black; label3.TextAlignment = UITextAlignment.Left; label4.Text = "Min Prefix Character"; label4.TextColor = UIColor.Black; label4.TextAlignment = UITextAlignment.Left; label4.Font = UIFont.FromName("Helvetica", 14f); label5.Text = "Max DropDownHeight"; label5.TextColor = UIColor.Black; label5.TextAlignment = UITextAlignment.Left; label5.Font = UIFont.FromName("Helvetica", 14f); label6.Text = "Popup Delay"; label6.TextColor = UIColor.Black; label6.TextAlignment = UITextAlignment.Left; label6.Font = UIFont.FromName("Helvetica", 14f); textbutton.SetTitle("StartsWith", UIControlState.Normal); textbutton.SetTitleColor(UIColor.Black, UIControlState.Normal); textbutton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbutton.Layer.CornerRadius = 8; textbutton.Layer.BorderWidth = 2; textbutton.TouchUpInside += ShowPicker1; textbutton.Layer.BorderColor = UIColor.FromRGB(246, 246, 246).CGColor; text1 = new UITextView(); text2 = new UITextView(); text3 = new UITextView(); text1.Layer.BorderColor = UIColor.Black.CGColor; text2.Layer.BorderColor = UIColor.Black.CGColor; text3.Layer.BorderColor = UIColor.Black.CGColor; text1.BackgroundColor = UIColor.FromRGB(246, 246, 246); text2.BackgroundColor = UIColor.FromRGB(246, 246, 246); text3.BackgroundColor = UIColor.FromRGB(246, 246, 246); text1.KeyboardType = UIKeyboardType.NumberPad; text2.KeyboardType = UIKeyboardType.NumberPad; text3.KeyboardType = UIKeyboardType.NumberPad; text1.Text = "1"; text2.Text = "400"; text3.Text = "100"; text2.Changed += (object sender, EventArgs e) => { if (text2.Text.Length > 0) { autocomplete1.MaxDropDownHeight = double.Parse(text2.Text); autocomplete2.MaxDropDownHeight = double.Parse(text2.Text); } else { autocomplete1.MaxDropDownHeight = 200; autocomplete2.MaxDropDownHeight = 200; } }; text1.Changed += (object sender, EventArgs e) => { if (text1.Text.Length > 0) { autocomplete1.MinimumPrefixCharacters = int.Parse(text1.Text); autocomplete2.MinimumPrefixCharacters = int.Parse(text1.Text); } else { autocomplete1.MinimumPrefixCharacters = 1; autocomplete2.MinimumPrefixCharacters = 1; } }; text3.Changed += (object sender, EventArgs e) => { if (text3.Text.Length > 0) { autocomplete1.PopUpDelay = double.Parse(text3.Text); autocomplete2.PopUpDelay = double.Parse(text3.Text); } else { autocomplete1.PopUpDelay = 100; autocomplete2.PopUpDelay = 100; } }; textbutton1.SetTitle("Suggest", UIControlState.Normal); textbutton1.SetTitleColor(UIColor.Black, UIControlState.Normal); textbutton1.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; textbutton1.Layer.CornerRadius = 8; textbutton1.Layer.BorderWidth = 2; textbutton1.TouchUpInside += ShowPicker2; textbutton1.Layer.BorderColor = UIColor.FromRGB(246, 246, 246).CGColor; doneButton.SetTitle("Done\t", UIControlState.Normal); doneButton.SetTitleColor(UIColor.Black, UIControlState.Normal); doneButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Right; doneButton.TouchUpInside += HidePicker; doneButton.Hidden = true; doneButton.BackgroundColor = UIColor.FromRGB(246, 246, 246); model.PickerChanged += SelectedIndexChanged; model1.PickerChanged += SelectedIndexChanged1; model2.PickerChanged += SelectedIndexChanged2; picker1.ShowSelectionIndicator = true; picker1.Hidden = true; picker1.BackgroundColor = UIColor.Gray; picker2.BackgroundColor = UIColor.Gray; picker2.ShowSelectionIndicator = true; picker2.Hidden = true; }