Exemple #1
0
        /// <summary>
        /// Abre un archivo XML con los datos de un proyecto guardado previamente.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void abrirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openDialog = new OpenFileDialog();

            openDialog.Filter = "XML | *.xml";
            openDialog.ShowDialog();

            if (openDialog.FileName != null && openDialog.FileName != "")
            {
                //Se recupera la informacion
                uiConfiguration = fileManagement.OpenXMLProject <UIConfiguration>(openDialog.FileName);
                //Se inicializan las variables
                UploadConfiguration();
            }
        }
Exemple #2
0
        /// <summary>
        /// Obtiene la configuracion de los controles de la interface.
        /// </summary>
        private void SaveConfiguration()
        {
            uiConfiguration = new UIConfiguration();

            //Controles comunes
            uiConfiguration.UIParams.RefreshRate     = (int)numericUpDown_RefreshRate.Value;
            uiConfiguration.UIParams.Range_Y_Minimum = (int)numericUpDown_RangeY_Minimum.Value;
            uiConfiguration.UIParams.Range_Y_Maximum = (int)numericUpDown_RangeY_Maximum.Value;
            uiConfiguration.UIParams.SamplingTime    = (int)numericUpDown_SamplingTime.Value;

            //UART
            uiConfiguration.UartParams.PortName = comboBox_EmulatorInterface_Ports.SelectedItem.ToString();
            uiConfiguration.UartParams.BaudRate =
                Convert.ToInt32(comboBox_EmulatorInterface_BaudRates.SelectedItem.ToString());
            uiConfiguration.UartParams.FlowControl =
                comboBox_EmulatorInterface_FlowControl.SelectedItem.ToString();
            uiConfiguration.UartParams.Parity   = comboBox_EmulatorInterface_Parity.SelectedItem.ToString();
            uiConfiguration.UartParams.DataBits =
                Convert.ToInt32(comboBox_EmulatorInterface_DataBits.SelectedItem.ToString());
            uiConfiguration.UartParams.StopBits = comboBox_EmulatorInterface_StopBits.SelectedItem.ToString();
            uiConfiguration.dllLinker           = dllLinker;
        }