Пример #1
0
        public MainPageModel()
        {
            LumixManager = new LumixManager(CultureInfo.CurrentCulture.TwoLetterISOLanguageName, network);

            LumixManager.DeviceDiscovered += Lumix_DeviceDiscovered;

            var cameraRefreshTimer = new DispatcherTimer {
                Interval = TimeSpan.FromSeconds(5)
            };

            cameraRefreshTimer.Tick += CameraRefreshTimer_Tick;
            cameraRefreshTimer.Start();

            ConnectableDevices.CollectionChanged += ConnectableDevices_CollectionChanged;
            wifi.AutoconnectAlways = GeneralSettings.WiFiAutoconnectAlways;
            foreach (var ap in GeneralSettings.WiFiAutoconnectAccessPoints.Value)
            {
                wifi.AutoconnectAccessPoints.Add(ap);
            }

            wifi.AutoconnectAlways = GeneralSettings.WiFiAutoconnectAlways;

            wifi.PropertyChanged     += Wifi_PropertyChanged;
            wifi.AccessPointsUpdated += Wifi_AccessPointsUpdated;
            WifiAutoconnectAccessPoints.CollectionChanged += WifiAutoconnectAccessPoints_CollectionChanged;

            WifiAutoconnectAccessPoints.AddRange(GeneralSettings.WiFiAutoconnectAccessPoints.Value);
        }
Пример #2
0
        public MainPageModel()
        {
            wifi.AutoconnectAlways = GeneralSettings.WiFiAutoconnectAlways;
            foreach (var ap in GeneralSettings.WiFiAutoconnectAccessPoints.Value)
            {
                wifi.AutoconnectAccessPoints.Add(ap);
            }

            wifi.AutoconnectAlways = GeneralSettings.WiFiAutoconnectAlways;

            wifi.PropertyChanged     += Wifi_PropertyChanged;
            wifi.AccessPointsUpdated += Wifi_AccessPointsUpdated;
            WifiAutoconnectAccessPoints.CollectionChanged += WifiAutoconnectAccessPoints_CollectionChanged;

            WifiAutoconnectAccessPoints.AddRange(GeneralSettings.WiFiAutoconnectAccessPoints.Value);

            ConnectionsManager = new ConnectionsManager(this, CultureInfo.CurrentUICulture);
        }