private bool IsVisibleIon(MatchedFragmentIon mfi) { // Show precursor ions when they are supposed to be shown, regardless of charge // N.B. for fragments, we look at abs value of charge. CONSIDER(bspratt): for small mol libs we may want finer per-adduct control return(mfi.Ordinal > 0 && ShowTypes.Contains(mfi.IonType) && (mfi.IonType == IonType.precursor || ShowCharges.Contains(Math.Abs(mfi.Charge.AdductCharge)))); }
private void PopulateListBoxes() { ShowTypes showTypes = new ShowTypes(_connString); List <ShowTypes> lkpShowTypes; lkpShowTypes = showTypes.GetShow_Types(); lstShowTypes.DataSource = lkpShowTypes; lstShowTypes.DataBind(); ShowYears showYears = new ShowYears(_connString); List <ShowYears> lkpShowYears; lkpShowYears = showYears.GetShow_Years(); lstShowYears.DataSource = lkpShowYears; lstShowYears.DataBind(); }
private void PopulateShowTypes(string val) { ShowTypes showTypes = new ShowTypes(_connString); List <ShowTypes> lkpShowTypes = showTypes.GetShow_Types(); foreach (ShowTypes showType in lkpShowTypes) { ComboBoxItem item = new ComboBoxItem(); item.Text = showType.Description; item.Value = showType.Show_Type_ID; cboShowType.Items.Add(item); if (showType.Show_Type_ID.ToString() == val) { cboShowType.Text = showType.Description; } } }
internal Anime(int id, string title, string english, string japanese, string[] synonyms, int episodes, Dictionary <int, DateTime> airtimes, double score, ShowTypes type, RunningStatuses status, DateTime start, DateTime end, string synopsis, string imageurl, string provider) { _id = id; Title = title; JapaneseTitle = japanese; EnglishTitle = english; Synonyms = synonyms; Episodes = episodes; AirTimes = airtimes; Score = score; StartDate = start; EndDate = end; Type = type; Status = status; Synopsis = synopsis; ImageUrl = imageurl; Provider = provider; }
private bool IsVisibleIon(IonType type, int ordinal, int charge) { // Show precursor ions when they are supposed to be shown, regardless of charge return(ordinal > 0 && ShowTypes.Contains(type) && (type == IonType.precursor || ShowCharges.Contains(charge))); }
private void ShowTypes_Executed(object sender, ExecutedRoutedEventArgs e) { ShowTypes showTypes = new ShowTypes(); showTypes.Show(); }
private void UpdateView(List <DateTime> lst, List <CalendarVo> vos) { _dateTimes = lst; _calendarVos = vos; DateTime curDt = lst[0]; ShowTypes curShowType = curDt.Day < 8 && curDt.Day > 1 ? ShowTypes.Five : ShowTypes.Six; MonthState curState = curDt.Day < 8 && curDt.Day > 1 ? MonthState.Current : MonthState.Previous; if (curState == MonthState.Current) { SetYearAndMonth(curDt); } bool isNextFive = true; for (int i = 0; i < lst.Count; i++) { curDt = lst[i]; if (curDt.Day == 1)//每月第一天 { curState += 1; if (curState == MonthState.Current) { SetYearAndMonth(curDt); } else if (curState == MonthState.Next) { isNextFive = LoveDiaryModel.IsFiveLine(curDt); } } GameObject item = _scrollRect.content.GetChild(i).gameObject; if (curState == MonthState.Previous) { item.transform.Find("Contain").gameObject.Hide(); item.GetComponent <Button>().interactable = false; item.transform.Find("Contain/NextMonth").gameObject.Hide(); } else if (curState == MonthState.Current) { item.transform.Find("Contain").gameObject.Show(); item.GetComponent <Button>().interactable = true; item.transform.Find("Contain/NextMonth").gameObject.Hide(); } else if (curState == MonthState.Next) { if (isNextFive) { item.transform.Find("Contain").gameObject.Hide(); item.GetComponent <Button>().interactable = false; item.transform.Find("Contain/NextMonth").gameObject.Hide(); } else { item.transform.Find("Contain").gameObject.Show(); item.GetComponent <Button>().interactable = true; item.transform.Find("Contain/NextMonth").gameObject.Show(); } } //item.transform.Find("Contain").gameObject.Show(); // item.GetComponent<Button>().interactable = curState == MonthState.Current; bool isShowHasImg = vos.Find(m => { return(m.Year == curDt.Year && m.Month == curDt.Month && m.Day == curDt.Day); }) == null; item.transform.Find("Contain/HasImg").gameObject.SetActive(!isShowHasImg); bool isToday = DateUtil.CheckIsToday(curDt) == 0; item.transform.Find("Contain/TodayBg").gameObject.SetActive(isToday); string numpath = "UIAtlas_LoveDiary_Calendar_Num" + curDt.Day.ToString(); item.transform.Find("Contain/Num").GetComponent <Image>().sprite = AssetManager.Instance.GetSpriteAtlas(numpath); } }