示例#1
0
 private void AlbumPreview_Load(object sender, EventArgs e)
 {
     pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
     ControlsChangeMethods.RoundBorderControl(this);
     ControlsChangeMethods.RoundBorderPanel(this.ContentPanel);
     PdfCreateButton.FlatAppearance.BorderSize = 0;
     //PanelEle
 }
示例#2
0
 private void AddAlbumForm_Load(object sender, EventArgs e)
 {
     WindowSizeChanged(sender, e);
     CoverAlbum.SizeMode = PictureBoxSizeMode.StretchImage;
     this.Location       = new Point((parentForm.Location.X + parentForm.Size.Width / 2) - this.Size.Width / 2, (parentForm.Location.Y + parentForm.Size.Height / 2) - this.Size.Height / 2);
     this.Anchor         = AnchorStyles.None;
     //
     //this.StartPosition = FormStartPosition.CenterParent;
     ControlsChangeMethods.RoundBorderForm(this);
     InitializeData(sender, e);
     Show();
 }
示例#3
0
        public void FilterForm_Load(object sender, EventArgs e)
        {
            WindowSizeChanged(sender, e);
            //

            //
            this.Location = new Point((parentForm.Location.X + parentForm.Size.Width / 2) - this.Size.Width / 2, (parentForm.Location.Y + parentForm.Size.Height / 2) - this.Size.Height / 2);
            this.Anchor   = AnchorStyles.None;
            //
            GenresComboBox.Items.Clear();
            ReleaseYearsComboBox.Items.Clear();
            CarriersComboBox.Items.Clear();
            TypesComboBox.Items.Clear();
            AuthorsComboBox.Items.Clear();
            TracksCountComboBox.Items.Clear();
            ReleasingLabelsComboBox.Items.Clear();
            //
            this.StartPosition = FormStartPosition.CenterParent;
            ControlsChangeMethods.RoundBorderForm(this);
            MusicAlbumsGuideDB context = new MusicAlbumsGuideDB();
            List <Genre>       genres  = context.Genres.ToList();

            GenresComboBox.InitializeItems(new List <object>(genres));
            List <Album>  albums = context.Albums.OrderBy(p => p.ReleaseYear).ToList();
            List <string> years  = new List <string>();

            foreach (var album in albums)
            {
                years.Add(album.ReleaseYear.ToString());
            }
            ReleaseYearsComboBox.InitializeItems(new List <object>(years));
            List <Carrier> carriers = context.Carriers.ToList();

            CarriersComboBox.InitializeItems(new List <object>(carriers));
            List <Database.Models.Type> types = context.Types.ToList();

            TypesComboBox.InitializeItems(new List <object>(types));
            List <Author> authors = context.Authors.ToList();

            AuthorsComboBox.InitializeItems(new List <object>(authors));
            albums = albums.OrderBy(p => p.TrackCount).ToList();
            List <string> trackCounts = new List <string>();

            foreach (var album in albums)
            {
                trackCounts.Add(album.TrackCount.ToString());
            }
            TracksCountComboBox.InitializeItems(new List <object>(trackCounts));
            List <ReleasingLabel> labels = context.ReleasingLabels.ToList();

            ReleasingLabelsComboBox.InitializeItems(new List <object>(labels));
            Show();
        }
示例#4
0
 private void EditAlbumForm_Load(object sender, EventArgs e)
 {
     WindowSizeChanged(sender, e);
     //
     this.Location = new Point((parentForm.Location.X + parentForm.Size.Width / 2) - this.Size.Width / 2, (parentForm.Location.Y + parentForm.Size.Height / 2) - this.Size.Height / 2);
     this.Anchor   = AnchorStyles.None;
     //
     //this.StartPosition = FormStartPosition.CenterParent;
     ControlsChangeMethods.RoundBorderForm(this);
     InitializeData(sender, e);
     EnterDataFromAlbum(AlbumId);
     Show();
 }
示例#5
0
        public void SortForm_Load(object sender, EventArgs e)
        {
            WindowSizeChanged(sender, e);
            //
            ControlsChangeMethods.RoundBorderForm(this);
            //
            this.Location = new Point((parentForm.Location.X + parentForm.Size.Width / 2) - this.Size.Width / 2, (parentForm.Location.Y + parentForm.Size.Height / 2) - this.Size.Height / 2);
            this.Anchor   = AnchorStyles.None;
            //
            this.StartPosition = FormStartPosition.CenterParent;
            ReleaseYearSort.Items.Clear();
            TrackCountSort.Items.Clear();

            ReleaseYearSort.Items.Add("Старые->Новые");
            ReleaseYearSort.Items.Add("Новые->Старые");
            ReleaseYearSort.Items.Add("Отключить");
            TrackCountSort.Items.Add("Меньше->Больше");
            TrackCountSort.Items.Add("Больше->Меньше");
            TrackCountSort.Items.Add("Отключить");
            ReleaseYearSort_Leave(sender, e);
            TrackCountSort_Leave(sender, e);
            Show();
        }