예제 #1
0
        private void lstStates_MouseClick(object sender, MouseEventArgs e)
        {
            switch (lstStates.SelectedIndex)
            {
            case 0: Status = otc.panels.OTCBlockStatusSignal2S.Green; break;

            case 1: Status = otc.panels.OTCBlockStatusSignal2S.Red; break;

            default: Status = otc.panels.OTCBlockStatusSignal2S.None; break;
            }
            wfes.CloseDropDown();
        }
예제 #2
0
        /// <summary>
        /// Devuelve una instancia de ctlEditSignalStatus2S.
        /// </summary>
        /// <param name="status">Estado seleccionado en la lista.</param>
        public ctlEditSignalStatus2S(otc.panels.OTCBlockStatusSignal2S status)
        {
            InitializeComponent();

            switch (status)
            {
            case otc.panels.OTCBlockStatusSignal2S.Green: this.lstStates.SelectedIndex = 0; break;

            case otc.panels.OTCBlockStatusSignal2S.Red: this.lstStates.SelectedIndex = 1; break;

            default: this.lstStates.SelectedIndex = 2; break;
            }
        }