private void SetupListView() { ResultListView.Clear(); _ = new ListView.ColumnHeaderCollection(ResultListView) { "Adresse", "Latitude", "Longitude" }; ResultListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); ResultListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }
public void Show() { ResultListView.Clear(); Array.Sort(input); for (int j = 0; j < 100; j++) { int v = input[j]; if (v > 0) { ResultListView.Items.Add(Convert.ToString(input[j])); } } }
public void Even() { ResultListView.Clear(); for (int j = 0; j < i; j++) { int v = input[j]; int x = (Convert.ToInt32(input[j])) % 2; if (x == 0 && v > 0) { ResultListView.Items.Add(input[j].ToString()); } } }
public void PushResults(List <Result> results) { ResultListView.Clear(); if (results.Count > 0) { IsResultViewVisiable = true; ResultListView.AddRange(results); SelectedResultIndex = 0; } else { IsResultViewVisiable = false; } }
private void DisplayList(string filename, List <Accounts> list) { Accounts accounts = new Accounts(); String path = Directory.GetCurrentDirectory(); //and the data in the list is written to the data file string file = filename + ".txt"; string pathString = Path.Combine(path, file); list.Clear(); using (StreamReader SR = new StreamReader(pathString)) // StreamReader to read values from file { int i = 0; Logins logins = new Logins(); String S = SR.ReadLine(); while (S != null) { i++; if (i == 1) { accounts.Type = S; } else if (i == 2) { accounts.Username = S; } else if (i == 3) { accounts.Password = S; list.Add(new Accounts(accounts.Type, accounts.Username, accounts.Password)); i = 0; accounts = new Accounts(); } S = SR.ReadLine(); } } ResultListView.Clear(); ResultListView.Columns.Add("Account", 120); ResultListView.Columns.Add("User ID", 230); for (int i = 0; i < list.Count; i++) { ListViewItem item1 = new ListViewItem(list[i].Type, 0); //Add the list items into the view item1.SubItems.Add(list[i].Username); ResultListView.Items.AddRange(new ListViewItem[] { item1 }); } }
public void Clear() { this.OnPropertyChanged("SystemCommand.ClearEditBox"); ResultListView.Clear(); }