Example #1
0
 private void btNSpLyToText_Click(object sender, EventArgs e)
 {
     try
     {
         RestoreBeforeSelectLine();
         float        x, y;
         List <float> pix;
         List <int>   sn;
         SpView.GetCursorPosition(out x, out y, out pix, out sn);
         LineDbRecord lr = SpView.SelSpLine;
         if (lr == null)
         {
             MessageBox.Show(MainForm.MForm,
                             Common.MLS.Get(MLSConst, "Нет выбранной спектральной линии"), //"No selected spectr line"),
                             Common.MLS.Get(MLSConst, "Проблема"),                         //"Problem"),
                             MessageBoxButtons.OK,
                             MessageBoxIcon.Warning);
             return;
         }
         InsertText(Math.Round(pix[0], 1) + "-" + Math.Round(lr.Ly, 2) + "   #" + lr.ElementName + " " + lr.IonLevel);
         RestoreBeforeSelectLine();
     }
     catch (Exception ex)
     {
         Common.Log(ex);
     }
 }
Example #2
0
 private void btCursorLyToText_Click(object sender, EventArgs e)
 {
     try
     {
         RestoreBeforeSelectLine();
         float        x, y;
         List <float> pix;
         List <int>   sn;
         SpView.GetCursorPosition(out x, out y, out pix, out sn);
         InsertText(Math.Round(x, 2).ToString());
         RestoreBeforeSelectLine();
     }
     catch (Exception ex)
     {
         Common.Log(ex);
     }
 }
Example #3
0
 private void btCursorNToText2_Click(object sender, EventArgs e)
 {
     try
     {
         RestoreBeforeSelectLine();
         float        x, y;
         List <float> pix;
         List <int>   sn;
         SpView.GetCursorPosition(out x, out y, out pix, out sn);
         if (pix.Count > 1)
         {
             InsertText(Math.Round(pix[1], 1).ToString() + "-");
         }
         RestoreBeforeSelectLine();
     }
     catch (Exception ex)
     {
         Common.Log(ex);
     }
 }