Inheritance: MonoBehaviour
示例#1
0
 private void Awake()
 {
     temperatureParametersId = Shader.PropertyToID("_TemperatureParameters");
     Instance = this;
     OnResize();
     UpdateState();
 }
示例#2
0
 public InfraredSmall(Infrared ir_device)
 {
     InitializeComponent();
     _smallButtons = new List <Button> {
         button1, button2, button3, button4, button5, button6, button7, button8, button9
     };
     _device = ir_device;
 }
示例#3
0
        private void createDevices()
        {
            //Console.WriteLine("Creating Device Objects...");
            List <Device> new_devices = new List <Device>();

            foreach (var dev in _devices)
            {
                switch (dev.module_type)
                {
                case 0:     //unknown
                    break;

                case 1:     // *** Smartplug ***
                    SmartPlug smartplug = new SmartPlug(dev);
                    new_devices.Add(smartplug);
                    break;

                case 2:     // *** Bluetooth ***
                    Bluetooth bluetooth = new Bluetooth(dev);
                    new_devices.Add(bluetooth);
                    break;

                case 3:     // *** USB ***
                    USB usb = new USB(dev);
                    new_devices.Add(usb);
                    break;

                case 4:     // *** Infrared ***
                    Infrared infrared = new Infrared(dev);
                    new_devices.Add(infrared);
                    break;

                case 5:     // *** Industrial ***
                    Industrial industrial = new Industrial(dev);
                    new_devices.Add(industrial);
                    break;

                case 6:     // *** Multiboard ***
                    Multiboard multiboard = new Multiboard(dev);
                    new_devices.Add(multiboard);
                    break;

                case 7:     // *** Audio ***
                    Audio audio = new Audio(dev);
                    new_devices.Add(audio);
                    break;

                default:
                    break;
                }
            }
            _devices.Clear();
            _devices.AddRange(new_devices);
        }
示例#4
0
 public InfraredLarge(Infrared ir_device)
 {
     InitializeComponent();
     _feedbackNames = new List <Label> {
         feedbackName1, feedbackName2, feedbackName3, feedbackName4
     };
     _feedbackImages = new List <PictureBox> {
         feedbackBox1, feedbackBox2, feedbackBox3, feedbackBox4
     };
     _device = ir_device;
 }
        public void Show_Infrared()
        {
            //Arrange
            FakeOutputShow fakeOutput = new FakeOutputShow();
            var            expected   = $"If you read this text then Show method of IScreen interface works for Infrared Screen\n";
            //Act
            var screen = new Infrared(pixelHeight: 320, pixelWidth: 480, 2.3, 1, fakeOutput);

            screen.Show();
            //Assert
            Assert.AreEqual(expected, fakeOutput.GetOutputAsText());
        }
        public void Touch_Infrared()
        {
            //Arrange
            FakeOutputTouch fakeOutput = new FakeOutputTouch();
            var             expected   = $"This touch was made on Infrared screen\nIsn't it fantastic?\n\n";
            //Act
            var screen = new Infrared(pixelHeight: 320, pixelWidth: 480, 2.3, 1, fakeOutput);

            screen.Touch();
            //Assert
            Assert.AreEqual(expected, fakeOutput.GetOutputAsText());
        }
示例#7
0
 public static void DestroyInstance()
 {
     Instance = null;
 }
示例#8
0
 public Commands(Remote remote)
 {
     Motors   = new Motors(remote);
     Infrared = new Infrared(remote);
     Leds     = new Leds(remote);
 }