// %Singleton% %Adapter% private void buttonPhotos_Click(object sender, EventArgs e) { int photosCount = 0; m_LogicAlbumsSorting = LogicAlbumsSorting.GetInstance(m_LoggedInUser); buttonPhotos.Visible = false; enableLoading(); m_SwitchPhotosAdapter = new SwitchPhotosAdapter() { Adoptee = m_LogicAlbumsSorting, ButtonBack = buttonBack, ButtonNext = buttonNext }; photosCount = m_LogicAlbumsSorting.FetchPhotos(); if (photosCount == 0) { MessageBox.Show("You have no photos in your albums"); this.Close(); } else { m_LogicAlbumsSorting.PhotosData(pictureBox, groupBoxStatistics); } disableLoading(); enableRadioButtons(); buttonNext.Enabled = true; }
public static LogicAlbumsSorting GetInstance(User i_LoggedInUser) { if (s_Instance == null) { s_Instance = new LogicAlbumsSorting(i_LoggedInUser); } return(s_Instance); }