Esempio n. 1
0
 public NewVaultFile(RACParamVaultPlugin _plugin)
 {
     plugin = _plugin;
     InitializeComponent();
     label1.Text = "There is no param file in the Vault for the current MP config/Vehicle BRD_ID\r\n" +
                   "( " + plugin.vehicle_configuration + " / " + MainV2.comPort.MAV.param["BRD_SERIAL_NUM"] + " )\r\n\r\n" +
                   "To save current parameters into the Vault,\r\nenter data and press Save.\r\n" +
                   "To ignore Vault check until next Connect, press Cancel.";
     tbName.Text     = plugin.vehicle_name;
     tbConfig.Text   = plugin.vehicle_configuration;
     tbOperator.Text = plugin.operator_name;
 }
Esempio n. 2
0
        public ParamDiff(RACParamVaultPlugin plugin)
        {
            InitializeComponent();
            this.plugin = plugin;

            foreach (KeyValuePair <string, ParamPair> entry in plugin._diff)
            {
                dgwParams.Rows.Add(entry.Key, entry.Value.inVehicle.ToString(), entry.Value.inVault.ToString());
            }

            this.Height = (dgwParams.PreferredSize.Height + 190) > 600 ? 600 : (dgwParams.PreferredSize.Height + 190);
            Console.WriteLine(this.Height);

            label1.Text = "Parameters stored in the vault for this vehicle " +
                          "are different from current ones.\r\nPlease select how to proceed!\r\n" +
                          "BRD ID:" + MainV2.comPort.MAV.param["BRD_SERIAL_NUM"].Value.ToString() +
                          " Vehicle name:" + plugin.vehicle_name + " Config:" + plugin.vehicle_configuration;
        }