private void makeRangeSetter(measurementType measurementType) { RangeSetter setter = new RangeSetter(measurementType); setter.MdiParent = this.MdiParent; setter.Show(); }
public JsonResult GetDocsByStation(int idStation) //Obtiene la lista de documentos por estacion para mostrarlos { db.Configuration.ProxyCreationEnabled = false; StationExt result = new StationExt(); result.glacier = new glacier(); result.measurementType = new measurementType(); station aux = db.stations.Include("glacier").Single(x => x.idStation == idStation); glacier gaxu = db.glaciers.Single(i => i.idGlacier == aux.idGlacier); measurementType maxu = db.measurementTypes.Single(i => i.idMeasurementType == aux.idMeasurementType); var docs = db.enteredDatas.Where(x => x.idStation == idStation && x.stateR == true).Select(p => new EnteredDataSimplify { idDoc = p.idEnteredData, idStation = p.idStation, name = p.nameEnteredData, startDate = p.startDate.ToString(), endDate = p.endDate.ToString() }).ToList(); result.docs = docs; result.nameStation = aux.nameStation; result.latitudeStation = aux.latitudeStation; result.longitudeStation = aux.longitudeStation; result.altitudeStation = aux.altitudeStation; result.glacier.nameGlacier = gaxu.nameGlacier; result.measurementType.nameMT = maxu.nameMT; result.location = aux.location; return(Json(result, JsonRequestBehavior.AllowGet)); }
private void makeGraphForm(measurementType measurementType) { int numOfValues = (brojPrikaza.Text == "") ? 0 : numOfValues = Int32.Parse(brojPrikaza.Text); GraphForm graphForm = new GraphForm(measurementType, numOfValues); graphForm.MdiParent = this; this.updatablesChildren.Add(graphForm); graphForm.Show(); }
/* private void send(TextBox textBox,measurementType measurementType) * { * if(textBox.Text != null && FormMain.checkIfDouble(textBox) && checkIfInRange(textBox,measurementType)) * { * value value = new value(double.Parse(textBox.Text), DateTime.Now); * ((FormMain)this.MdiParent).updateChildren(value, measurementType); * } * }*/ private value getValue(TextBox textBox, measurementType measurementType) { if (textBox.Text != null && FormMain.checkIfDouble(textBox) && checkIfInRange(textBox, measurementType)) { return(new value(double.Parse(textBox.Text), DateTime.Now)); } else { return(null); } }
public GraphForm(measurementType measurementType, int numOfValues) { InitializeComponent(); this.numOfValues = numOfValues; this.data = new List <value>(); this.measurementType = measurementType; graphChart.DataSource = data; graphChart.Series[0].Name = measurementType.ToString(); graphChart.Series[0].YValueMembers = "dataValue"; graphChart.DataBind(); }
private bool checkIfInRange(TextBox textBox, measurementType measurementType) { if (graniceChek.Checked == false) { return(true); } if (StandardValues.Instance.isInRange(double.Parse(textBox.Text), measurementType)) { return(true); } else { textBox.Text = null; return(false); } }
private List <value> getMeasurment(measurementType type) { switch (type) { case measurementType.temperatura: return(this.temperature); case measurementType.pritisak: return(this.pressure); case measurementType.vlaznost: return(this.humidity); default: return(null); } }
public RangeSetter(measurementType measurementTypemod) { InitializeComponent(); this.measType = measurementTypemod; this.setLabel.Text += this.measType.ToString(); }