private void SettingBy(PotdGetterResult result) { BitmapImage bmp = new BitmapImage(); bmp.BeginInit(); bmp.StreamSource = result.ImageMemoryStream; bmp.EndInit(); Image = bmp; url = result.RemoteInfo.ClickUrl; }
private void SetByResult(PotdGetterResult result) { try { if (result.RemoteInfo.Enable == false) { return; } BitmapImage bmp = new BitmapImage(); bmp.BeginInit(); bmp.StreamSource = result.ImageMemoryStream; bmp.EndInit(); ImgMain.Source = bmp; remoteInfo = result.RemoteInfo; LBtnClose.Visibility = remoteInfo.CanbeClosed == true ? Visibility.Visible : Visibility.Hidden; } catch (Exception e) { Logger.Warn(this, "exception on setting PotdBox", e); } }