示例#1
0
    public FormMainParams()
    {
        // This call is required by the designer.
        InitializeComponent();

        //Added to support default instance behavour in C#
        if (defaultInstance == null)
        {
            defaultInstance = this;
        }

        //default combobox item selection
        cbxUnits.SelectedIndex = 0;
        cbxN2.SelectedIndex    = 0;
        cbxHelp.SelectedIndex  = 0;
        cbxBeep.SelectedIndex  = 0;

        //refresh station parameters
        _tmr          = new Timer();
        _tmr.Tick    += tmr_Elapsed;
        _tmr.Interval = 1000;         //1 second
        _tmr.Start();
    }
示例#2
0
 static void defaultInstance_FormClosed(object sender, FormClosedEventArgs e)
 {
     defaultInstance = null;
 }