public static VkAuth GetVk() { if (Vk == null) { Vk = new VkAuth(); } return(Vk); }
public MemeWindow(Repository repository, Meme meme, VkAuth vkAuth) { _repository = repository; _meme = meme; _vkAuth = vkAuth; InitializeComponent(); _vkAuth.OnAuthorized += Authorized; _vkAuth.CheckAuthorization(); _repository.OnLikesChanged += UpdateLikes; imageMeme.Source = new BitmapImage(new Uri(meme.ImagePath, UriKind.RelativeOrAbsolute)); textBlockDescription.Text = meme.Description; textBlockMemYear.Text = (meme.Year).ToString(); textBlockLikes.Text = (meme.Likes).ToString(); }
public MainWindowViewModel() { // InstalledApps ia = new InstalledApps(); #region Init instance = this; BassHelper = BassHelper ?? new BassNetHelper(); Log = Log ?? new LogsPageViewModel(); Player = Player ?? new PlayerPageViewModel(); Radio = Radio ?? new RadioPageViewModel(); Main = Main ?? new MainPageViewModel(); Settings = Settings ?? new SettingsPageViewModel(); Telegram = Telegram ?? new TelegramAuth(); TwitchPage = TwitchPage ?? new TwitchPageViewModel(); Telebot = Telebot ?? new TelegramBot(); Proxy = Proxy ?? new ProxyHelper(); Internet = Internet ?? new InternetConnection(); Vk = Vk ?? new VkAuth(); #endregion SelectedViewModel = Main; IsAlertOn = "null"; }