public bool DodelaParametraProcesu(UlazniParametar velicina, IAnalizaProblema problem, ScintillaNET.Scintilla scintilla) { if (velicina != null) { var propertys = from f in problem.GetType().GetFields() where f.GetCustomAttributes(typeof(UlazniParametar), false).Any() select new AnalizaProcesa.PropertyEx() { Field = f, Atr = f.GetCustomAttributes(typeof(UlazniParametar), false).First() as UlazniParametar }; var property = (from p in propertys where p.Atr.Ime == velicina.Ime select p).FirstOrDefault(); if (property != null) { var dialog = new JednaVrednost(); dialog.label2.Text = property.Atr.Labela; if (dialog.ShowDialog() == DialogResult.OK) { property.Field.SetValue(problem, dialog.Vrednost); return(true); } } } return(false); }
private void UnosUniverzalneGasneKonstante() { var dialog = new JednaVrednost(); dialog.label2.Text = "R:"; dialog.lblJedinica.Text = @"[ J/kgK ]"; if (dialog.ShowDialog() == DialogResult.OK) { this.R = dialog.Vrednost; IzvestajBezAnalize(); } }
private void UnosBoltzmannoveKonstante() { var dialog = new JednaVrednost(); dialog.label2.Text = "K:"; dialog.lblJedinica.Text = @""; if (dialog.ShowDialog() == DialogResult.OK) { this.K = dialog.Vrednost; IzvestajBezAnalize(); } }