private async void bAllPhoto_Click(object sender, EventArgs e) { fWork fw = new fWork(); fw.Show(); fList fa = new fList(); fa.Show(); fa.LoadAlbums(await Program.Open(bAllPhoto.Tag.ToString()), true, "Все фото: ", true); fw.Hide(); }
private async void bNext_Click(object sender, EventArgs e, bool All = false) { if (nextWindow != null) { nextWindow.Activate(); return; } fWork fw = new fWork(); fw.Show(); fList fa = new fList(); fa.Show(); fa.LoadAlbums(await Program.Open(bNext.Tag.ToString()), isAlbum, winTitle, All); nextWindow = fa; fw.Hide(); }
public async void Process(string URL, bool IsAlbum, string WinTitle = "", bool All = false, bool Close = false) { //открыть конкретный пункт fWork fw = new fWork(); fw.Show(); try { if (URL.Contains("/photo/")) { fPhoto fp = new fPhoto(); fp.Show(); fp.LoadPhoto(await Program.Open(URL)); if (Close) { fp.Hide(); } } else { fList fap = new fList(); fap.Show(); if (WinTitle == "") { WinTitle = winTitle; } fap.LoadAlbums(await Program.Open(URL), IsAlbum, WinTitle, All); if (Close) { fap.Hide(); } } } catch (Exception ex) { MessageBox.Show("Список по адресу\n" + URL + "\nне открывается. " + ex.Message + "\n" + ex.StackTrace); } fw.Hide(); }