public void button1_Click(object sender, EventArgs e) // wyswietlanie wszystkich pojazdow { currentFilterType = filterType.all; if (currentViewType.Equals(viewType.treeView)) { TreeNode newNode = null; this.treeView1.Nodes.Clear(); for (int i = 0; i < this.carManager.GetCarList().Count; i++) { newNode = (this.carManager.GetCarList())[i].CreateTreeNode(); this.treeView1.Nodes.Add(newNode); } } else if (currentViewType.Equals(viewType.listView)) { ListViewItem newItem = null; this.listView1.Items.Clear(); for (int i = 0; i < this.carManager.GetCarList().Count; i++) { newItem = (this.carManager.GetCarList())[i].CreateListViewItem(); this.listView1.Items.Add(newItem); } } else if (currentViewType.Equals(viewType.noView)) { } UpdateStatusStrip(); }
public Document() { InitializeComponent(); listView.Parent = this; currentViewType = viewType.noView; currentFilterType = filterType.all; this.listView1.Visible = false; this.treeView1.Visible = false; listView.Show(); }
private void button3_Click(object sender, EventArgs e) // wyswietlanie pojazdow o predkosci mniejszej niz 100 km/h { currentFilterType = filterType.slowerThan100; if (currentViewType.Equals(viewType.treeView)) { TreeNode newNode = null; this.treeView1.Nodes.Clear(); for (int i = 0; i < this.carManager.GetCarList().Count; i++) { if ((this.carManager.GetCarList())[i].GetMaximalSpeed() < 100) { newNode = (this.carManager.GetCarList())[i].CreateTreeNode(); this.treeView1.Nodes.Add(newNode); } } } else if (currentViewType.Equals(viewType.listView)) { ListViewItem newItem = null; this.listView1.Items.Clear(); for (int i = 0; i < this.carManager.GetCarList().Count; i++) { if ((this.carManager.GetCarList())[i].GetMaximalSpeed() < 100) { newItem = (this.carManager.GetCarList())[i].CreateListViewItem(); this.listView1.Items.Add(newItem); } } } else if (currentViewType.Equals(viewType.noView)) { } UpdateStatusStrip(); }
public filter() { this.type = filterType.and; }
public void updateFilterType(filterType f) { curType = f; if (f == filterType.LP) { filters[0].mf.LP = true; filters[1].mf.LP = true; filters[0].SetFrequency(frequency[0]); filters[1].SetFrequency(frequency[0]); } else if (f == filterType.LP_long) { filters[0].mf.LP = true; filters[1].mf.LP = true; filters[0].SetFrequency(frequency[1]); filters[1].SetFrequency(frequency[1]); } else if (f == filterType.HP) { filters[0].mf.LP = false; filters[1].mf.LP = false; filters[0].SetFrequency(frequency[1]); filters[1].SetFrequency(frequency[1]); } else if (f == filterType.HP_long) { filters[0].mf.LP = false; filters[1].mf.LP = false; filters[0].SetFrequency(frequency[0]); filters[1].SetFrequency(frequency[0]); } else if (f == filterType.Notch) { filters[0].mf.LP = true; filters[1].mf.LP = true; filters[2].mf.LP = false; filters[3].mf.LP = false; filters[0].SetFrequency(frequency[0]); filters[1].SetFrequency(frequency[0]); filters[2].SetFrequency(frequency[1]); filters[3].SetFrequency(frequency[1]); } else if (f == filterType.BP) { filters[0].mf.LP = true; filters[1].mf.LP = true; filters[2].mf.LP = false; filters[3].mf.LP = false; filters[0].SetFrequency(frequency[1]); filters[1].SetFrequency(frequency[1]); filters[2].SetFrequency(frequency[0]); filters[3].SetFrequency(frequency[0]); } }
public filter() { this.typeField = filterType.and; }
public filter() { this.type = filterType.and; }
public filterOption(String text, filterType type) { this.type = type; this.text = text; }
public filter() { this.typeField = filterType.and; }
public JObject Introspect(bool getdescriptions = false, bool getmetadata = false, bool filterbytransport = false, filterType filter = null) { var jArgs = new JObject(); if (getdescriptions != null) { var jpropgetdescriptions = JToken.FromObject(getdescriptions, _client.Serializer); jArgs.Add(new JProperty("getdescriptions", jpropgetdescriptions)); } if (getmetadata != null) { var jpropgetmetadata = JToken.FromObject(getmetadata, _client.Serializer); jArgs.Add(new JProperty("getmetadata", jpropgetmetadata)); } if (filterbytransport != null) { var jpropfilterbytransport = JToken.FromObject(filterbytransport, _client.Serializer); jArgs.Add(new JProperty("filterbytransport", jpropfilterbytransport)); } if (filter != null) { var jpropfilter = JToken.FromObject(filter, _client.Serializer); jArgs.Add(new JProperty("filter", jpropfilter)); } var jRet = _client.GetData <JObject>("JSONRPC.Introspect", jArgs); return(jRet); }