コード例 #1
0
        public SettingsWindow(AudioDevices audioDevices)
        {
            _audioDevices = audioDevices;

            InitializeComponent();

            // Populate the combos
            SpeakersCombo.ItemsSource = _audioDevices.GetOutDeviceInfo();
            SpeakersCombo.SelectedValue = _audioDevices.GetCurWaveOutDeviceName();
            MicrophoneCombo.ItemsSource = _audioDevices.GetInDeviceInfo();
            MicrophoneCombo.SelectedValue = _audioDevices.GetCurWaveInDeviceName();
        }
コード例 #2
0
 public TalkToAxisCamera(string cameraIP, int cameraPort, string username, string password, AudioDevices localAudioDevices)
 {
     _username = username;
     _password = password;
     _cameraIP = cameraIP;
     _cameraPort = cameraPort;
     _localAudioDevices = localAudioDevices;
 }
コード例 #3
0
        public MainWindow()
        {
            InitializeComponent();

            // Log startup
            logger.Info("App Starting ...");

            ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip;
            _controlToReceiveFocus = this.Settings;

            // Get configuration
            using (StreamReader sr = new StreamReader("//macallan/Admin/Config/8DPDevices.json"))
            {
                string jsonData = sr.ReadToEnd();
                _configFileInfo = JsonConvert.DeserializeObject<ConfigFileInfo>(jsonData);
             }

            // Notify icon
            _notifyIcon = new System.Windows.Forms.NotifyIcon();
            Stream iconStream = System.Windows.Application.GetResourceStream(new Uri("pack://*****:*****@"res/locked-large.png", @"res/unlocked-large.png");
            doorClosedImages = new EasyButtonImage(@"res/doorclosed-large.png", @"res/dooropen-large.png");
            doorBellImages = new EasyButtonImage(@"res/doorbell-large-sq.png", @"res/doorbell-large.png");

            // Start getting updates from front door
            _frontDoorControl.StartUpdates();

            // Start update timer for status
            _dTimer.Tick += new EventHandler(dtimer_Tick);
            _dTimer.Interval = new TimeSpan(0, 0, 1);
            _dTimer.Start();

            // Log startup
            logger.Info("App Started");
        }
コード例 #4
0
 public ListenToAxisCamera(string ipAddress, AudioDevices audioDevices)
 {
     _ipAddress = ipAddress;
     _audioDevices = audioDevices;
 }