protected override void initEditor()
        {
            EnumSetting      enumSetting         = (EnumSetting)setting;
            IComboBoxAdapter enumComboBoxAdapter = new EnumComboBoxAdapter <Enum>(enumSetting.EnumType, enumSetting.Translations, enumSetting.NullTranslation);

            dropDown.SetAdapterAsDataSource(enumComboBoxAdapter);
        }
Beispiel #2
0
        private void initDropDowns()
        {
            // Routers
            routerAdropDown.CreateAdapterAsDataSource(RouterDatabase.Instance, null, true, "(not associated)");
            routerBdropDown.CreateAdapterAsDataSource(RouterDatabase.Instance, null, true, "(not associated)");
            routerAdropDown.SelectedIndexChanged += selectedRouterChangedHandler;
            routerBdropDown.SelectedIndexChanged += selectedRouterChangedHandler;
            // Synchronization mode
            EnumComboBoxAdapter <RouterMirrorSynchronizationMode> synchronizationBaseDropDownAdapter = new EnumComboBoxAdapter <RouterMirrorSynchronizationMode>(routerSynchronizationModeTranslations);

            synchronizationModeDropDown.SetAdapterAsDataSource(synchronizationBaseDropDownAdapter);
        }
Beispiel #3
0
        private void initDropDowns()
        {
            string[] availableSerialPorts = System.IO.Ports.SerialPort.GetPortNames();
            portNameDropDown.CreateAdapterAsDataSource(availableSerialPorts, port => port, true, "(not connected)");

            IComboBoxAdapter stopBitsDropDownEnumAdapter = new EnumComboBoxAdapter <System.IO.Ports.StopBits>();

            stopBitsDropDown.SetAdapterAsDataSource(stopBitsDropDownEnumAdapter);

            IComboBoxAdapter parityDropDownEnumAdapter = new EnumComboBoxAdapter <System.IO.Ports.Parity>();

            parityDropDowm.SetAdapterAsDataSource(parityDropDownEnumAdapter);
        }