Exemple #1
0
        /// <summary>
        /// Carga la configuración guardada en un XML.
        /// </summary>
        public void UploadConfiguration()
        {
            // Carga de la configuración de la gráfica
            numericUpDown_RefreshRate.Value    = uiConfiguration.UIParams.RefreshRate;
            numericUpDown_RangeY_Minimum.Value = uiConfiguration.UIParams.Range_Y_Minimum;
            numericUpDown_RangeY_Maximum.Value = uiConfiguration.UIParams.Range_Y_Maximum;
            numericUpDown_SamplingTime.Value   = uiConfiguration.UIParams.SamplingTime;

            //Carga la configuración de la UART
            comboBox_EmulatorInterface_Ports.SelectedIndex =
                comboBox_EmulatorInterface_Ports.FindString(uiConfiguration.UartParams.PortName);
            comboBox_EmulatorInterface_BaudRates.SelectedIndex =
                comboBox_EmulatorInterface_BaudRates.FindString(uiConfiguration.UartParams.BaudRate.ToString());
            comboBox_EmulatorInterface_FlowControl.SelectedIndex =
                comboBox_EmulatorInterface_FlowControl.FindString(uiConfiguration.UartParams.FlowControl);
            comboBox_EmulatorInterface_Parity.SelectedIndex =
                comboBox_EmulatorInterface_Parity.FindString(uiConfiguration.UartParams.Parity);
            comboBox_EmulatorInterface_DataBits.SelectedIndex =
                comboBox_EmulatorInterface_DataBits.FindString(uiConfiguration.UartParams.DataBits.ToString());
            comboBox_EmulatorInterface_StopBits.SelectedIndex =
                comboBox_EmulatorInterface_StopBits.FindString(uiConfiguration.UartParams.StopBits);

            //Carga la configuracion del DLL
            dllLinker = new LinkerToUnamangedLibrary(uiConfiguration.dllLinker.ParamsQuantity,
                                                     uiConfiguration.dllLinker.FilePath, uiConfiguration.dllLinker.MethodName);
            dllLinker.AssignValues(uiConfiguration.dllLinker.ParamsValues.ToArray <float>());
            dllLinker.ParamsNames = uiConfiguration.dllLinker.ParamsNames.ToList <string>();

            comboBox_Simulation_OutSignal.DataSource = dllLinker.ParamsNames;
        }
Exemple #2
0
        private void nuevoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            newProject = new Form_NewProject(this);
            newProject.ShowDialog();

            //Se obtiene la informacion de la ventana de nuevo
            if (newProject.OriginalValues != null && newProject.DllFilePath != null && newProject.DllFilePath != "" &&
                newProject.MethodName != null && newProject.MethodName != "" &&
                newProject.ProjectName != null && newProject.ProjectName != "")
            {
                dllLinker = new LinkerToUnamangedLibrary(newProject.OriginalValues.Count,
                                                         newProject.DllFilePath, newProject.MethodName);
                dllLinker.AssignValues(newProject.OriginalValues.Values.ToArray <float>());
                dllLinker.ParamsNames = newProject.OriginalValues.Keys.ToList <string>();
            }
        }