public Atom(string name, string symbol, int atomic, int period, int group, double?electroNegativity, Constants.Type atomType) { Name = name; Symbol = symbol; Atomic = atomic; Period = period; Group = group; ElectroNegativity = electroNegativity; AtomType = atomType; }
/// <summary> /// Multiple seasons constructor. /// </summary> /// <param name="seasons"></param> /// <param name="userStatusList"></param> public SeasonEdit(List <Entity.Season> seasons, List <Entity.UserStatus> userStatusList) { InitializeComponent(); this.InitContent(); this.SetStatusInCombo(userStatusList); if (seasons.Count < 1) { return; } this.LoadGroupings(seasons[0].SerieId); // Window title this.Title = String.Format(Lang.Text("editingSeasons"), seasons.Count); this.textbox_Number.AllowEmpty = true; string title = seasons[0].Title; ushort year = seasons[0].Year; byte month = seasons[0].Month; byte day = seasons[0].Day; string grouping = seasons[0].Grouping; ushort number = seasons[0].Number; string cover = seasons[0].Cover; ushort episodesTotal = seasons[0].EpisodesTotal; Constants.Type type = seasons[0].Type; Constants.Source source = seasons[0].Source; Constants.Seasonal seasonal = seasons[0].Seasonal; int studioId = seasons[0].StudioId; int statusId = seasons[0].StatusId; foreach (Entity.Season season in seasons) { // There's at least two different titles if (title != Constants.VARIOUS && title != season.Title) { title = Constants.VARIOUS; } if (year != season.Year) { this.DateInput.Year.Text = Constants.VARIOUS; } if (month != season.Month) { this.DateInput.Month.Text = Constants.VARIOUS; } if (day != season.Day) { this.DateInput.Day.Text = Constants.VARIOUS; } if (grouping != Constants.VARIOUS && grouping != season.Grouping) { grouping = Constants.VARIOUS; } if (number != season.Number) { this.textbox_Number.Text = Constants.VARIOUS; } if (cover != season.Cover) { this.Browse_Cover.Text = Constants.VARIOUS; } if (episodesTotal != season.EpisodesTotal) { this.Textbox_Episodes_Count.Text = Constants.VARIOUS; } if (type != season.Type) { type = Constants.Type.Null; this.AddVariousComboBoxItem(this.ComboBox_Type, type); } if (source != season.Source) { source = Constants.Source.Null; this.AddVariousComboBoxItem(this.ComboBox_Source, source); } if (seasonal != season.Seasonal) { seasonal = Constants.Seasonal.Null; this.AddVariousComboBoxItem(this.DateInput.Seasons, seasonal); } if (studioId != season.StudioId) { studioId = -1; this.AddVariousComboBoxItem(this.ComboBox_Studio, studioId); } if (statusId != season.StatusId) { statusId = (int)Entity.DefaultStatus.Null; this.AddVariousComboBoxItem(this.ComboBox_Status, statusId); } } this.TextBox_Title.Text = title; this.TextBox_Grouping.Text = grouping; this.Radio_Narrow.IsChecked = false; this.Radio_Wide.IsChecked = false; this.Type = type; this.Seasonal = seasonal; this.Source = source; this.StudioId = studioId; this.StatusId = statusId; this.Cover = cover; }