Пример #1
0
 /// <summary>
 /// Конструктор.
 /// </summary>
 /// <param name="icon">Иконка.</param>
 /// <param name="engine">Движок.</param>
 public MakabaBoardInfoIcon(MakabaIconReference icon, string engine)
 {
     if (icon == null) throw new ArgumentNullException(nameof(icon));
     if (engine == null) throw new ArgumentNullException(nameof(engine));
     this.icon = icon;
     Icon = new ImageSourceViewModel(new MediaLink() { Engine = engine, IsAbsolute = false, RelativeUri = icon.Url});
     Icon.Load.Start();
 }
Пример #2
0
 /// <summary>
 /// Конструктор.
 /// </summary>
 /// <param name="icon">Иконка.</param>
 /// <param name="engine">Движок.</param>
 public PostingIconElement(MakabaIconReference icon, string engine)
 {
     if (icon == null) throw new ArgumentNullException(nameof(icon));
     if (engine == null) throw new ArgumentNullException(nameof(engine));
     Value = icon.Number;
     Name = icon.Name;
     Image = new ImageSourceViewModel(new MediaLink() { Engine = engine, RelativeUri = icon.Url, IsAbsolute = false });
     Image.Load.Start();
 }