Пример #1
0
 public Form1.Analysis ShowParametr(Form1.Analysis parametr)
 {
     current_parametr     = parametr;
     textEditName.Text    = parametr.Name;
     spinCountArray.Value = parametr.SizeArray;
     spinEditCMR.Value    = (decimal)parametr.Cmr;
     textEditAddress.Text = parametr.Address.ToString();
     textEditMask.Text    = parametr.Mask.ToString();
     return(parametr);
 }
Пример #2
0
 private Form1.Analysis AddNewParametr()
 {
     Form1.Analysis analysis = new Form1.Analysis();
     analysis.SizeArray = (int)spinCountArray.Value;
     analysis.Name      = textEditName.Text;
     analysis.Cmr       = ConvertToDouble(spinEditCMR.Value.ToString(CultureInfo.InvariantCulture));
     analysis.Mask      = textEditMask.Text.Contains("0x") ? Convert.ToInt32(textEditMask.Text, 16) : Convert.ToInt32(textEditMask.Text);
     analysis.Address   = textEditAddress.Text.Contains("0x") ? Convert.ToInt32(textEditAddress.Text, 16) : Convert.ToInt32(textEditAddress.Text);
     return(analysis);
 }