Esempio n. 1
0
        public void UpdateDeviceIcon()
        {
            var icon         = DeviceIconManager.LoadIcon(this._Peer.storage.MACAddress);
            var resourceName = icon.Icon.ToResourceName();

//            imgDeviceIcon.Source = (ImageSource)FindResource(resourceName);
            this.lblMACAddress.Content   = Peer.storage.MACAddress;
            this.lblIPAddress.Content    = Peer.storage.IPAddress;
            this.cbIsStatick.IsChecked   = Peer.isSetIP;
            this.imgDeviceIcon.IsEnabled = Peer.isActive;
            lblDisplayName.Text          = Peer.storage.HostName;
        }
Esempio n. 2
0
        private void btnChangeIcon_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new DeviceIconPicker(lblDisplayName.Content.ToString());

            dialog.SelectedIcon = DeviceIconManager.LoadIcon(this.PeerDevice.Peer.storage.MACAddress).Icon;
            dialog.Owner        = this;
            if (dialog.ShowDialog() == true)
            {
                DeviceIconManager.SaveIcon(this.PeerDevice.Peer.storage.MACAddress, dialog.SelectedIcon);
                this.PeerDevice.UpdateDeviceIcon();
                UpdateDisplay();
            }
        }