Example #1
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();
        }
Example #2
0
 private void displayValidation()
 {
     DescriptionTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
     NameTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
     ImageTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
     TypesComboBox.GetBindingExpression(ComboBox.SelectedValueProperty).UpdateSource();
     EraComboBox.GetBindingExpression(ComboBox.SelectedValueProperty).UpdateSource();
     IconTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
     TouristicComboBox.GetBindingExpression(ComboBox.SelectedValueProperty).UpdateSource();
     IncomeTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
     DateTextBox.GetBindingExpression(Xceed.Wpf.Toolkit.MaskedTextBox.TextProperty).UpdateSource();
     DateComboBox.GetBindingExpression(ComboBox.SelectedValueProperty).UpdateSource();
 }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TypesComboBox.DataSource     = commonSitefinityTypes;
                TypesComboBox.DataTextField  = "Name";
                TypesComboBox.DataValueField = "type";

                ClrTypesBox.DataSource     = commonCLRTypes;
                ClrTypesBox.DataTextField  = "Name";
                ClrTypesBox.DataValueField = "type";

                SubscriberList.DataSource = GetSubscribers();
                SubscriberList.DataBind();

                TypesComboBox.DataBind();
                ClrTypesBox.DataBind();
            }
        }
 private void SelectTypeDialogView_OnLoaded(object sender, RoutedEventArgs e)
 {
     TypesComboBox.Focus();
 }