Esempio n. 1
0
    private void WindowStatus_Load(object sender, EventArgs e)
    {
        indexSettings = new IndexSettings(panel_IndexSettings);
        indexStats    = new IndexStats(indexSettings, panel_IndexStats, btn_EditMode);

        joystickSettings = new JoystickSettings();


        //add all available com port elements to com port combobox
        cmb_comport.Items.AddRange(SerialConnection.GetPortList());
        try { cmb_comport.SelectedIndex = 1; } catch { }                                        //load index 1 (COM5) as default

        //temp, initialize status[0]
        st.status[0] = 1;

        // Load all settings
        graphicsCreator = new GraphicsCreator(pan_graphicsCreator);
        graphicToolbox  = new GraphicToolbox(pan_graphicsCreator, pan_graphicToolbox, rightclickMenu);
        ProgramSaverLoader.Load();

        // Start the st_register send timer
        tim_SendCommandsDelay.Tick += ST_Register.SendCommands;

        //load local IP address into communication tabs ethernet server settings
        txt_comm_serverip.Text   = GetLocalIPAddress();
        txt_comm_serverport.Text = "80";
    }
    public FormSerialConnection()
    {
        InitializeComponent();

        //add all available com port elements to com port combobox
        cmb_port.Items.AddRange(SerialConnection.GetPortList());
        try { cmb_port.SelectedIndex = 1; } catch { }           //load index 1 as default

        cmb_endline.SelectedIndex = 0;
        btn_Connect.BackColor     = colorClosed;

        timerbuffer          = new Timer();
        timerbuffer.Tick    += Timerbuffer_Tick;
        timerbuffer.Interval = 100;
    }
Esempio n. 3
0
 private void cmb_comport_Click(object sender, EventArgs e)
 {
     //add all available com port elements to com port combobox
     cmb_comport.Items.Clear();
     cmb_comport.Items.AddRange(SerialConnection.GetPortList());
 }