Advertisement
Guest User

Untitled

a guest
May 24th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.08 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.Xml;
  11. using System.IO;
  12.  
  13. namespace ABD
  14. {
  15.     public partial class Form1 : Form
  16.     {
  17.         public Form1()
  18.         {
  19.             InitializeComponent();
  20.             fbdPOS.SelectedPath = @"C:\Users\nbolton\Desktop\Airborne Direct Tests\Test 1";
  21.             cboSysConfig.DataSource = new BindingSource(IMUAngleDXNRY, null);
  22.             cboSysConfig.DisplayMember = "Key";
  23.             cboSysConfig.ValueMember = "Value";
  24.         }
  25.  
  26.         string pospath;
  27.         string[] posfiles;
  28.         string firstfile;
  29.         string lastfile;
  30.         string mntanglex;
  31.         string mntangley;
  32.         string mntanglez;
  33.  
  34.         Dictionary<string, string> IMUAngleDXNRY = new Dictionary<string, string>()
  35.         {
  36.             {"N/A", "" },
  37.             { "UCE-LN200", "-0.17080,-0.01300,-0.46090,0,0,0" },
  38.             {"UCE-Type 31", "-0.13030,-0.04550,-0.47530,90,0,90" },
  39.             {"UCE-Type 46", "-0.13060,-0.02050,-0.48500,90,0,90" },
  40.             {"UCFp-Type 46", "-0.13060,-0.02050,-0.51310,90,0,90" },
  41.             {"UCFp-Type 52", "-0.14560,-0.02050,-0.51310,90,0,90" },
  42.         };
  43.        
  44.         private void cboSysConfig_SelectedIndexChanged(object sender, EventArgs e)
  45.         {
  46.  
  47.             if (cboSysConfig.SelectedIndex != 0)
  48.             {
  49.                 tbxIMUx.Text = IMUAngleDXNRY[cboSysConfig.SelectedItem.ToString()].Split(',')[0];
  50.                 tbxIMUy.Text = IMUAngleDXNRY[cboSysConfig.SelectedItem.ToString()].Split(',')[1];
  51.                 tbxIMUz.Text = IMUAngleDXNRY[cboSysConfig.SelectedItem.ToString()].Split(',')[2];
  52.                 mntanglex = IMUAngleDXNRY[cboSysConfig.SelectedItem.ToString()].Split(',')[3];
  53.                 mntangley = IMUAngleDXNRY[cboSysConfig.SelectedItem.ToString()].Split(',')[4];
  54.                 mntanglez = IMUAngleDXNRY[cboSysConfig.SelectedItem.ToString()].Split(',')[5];
  55.             }
  56.         }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement