protected virtual void Start() { _entries = FindObjectOfType <EntriesList>(); _dataRepository = FindObjectOfType <EntryDataRepository>(); _fileManager = new FileManager(); _entry.OnMarkedForDestruct += destruct; }
protected void Submit_Click(object sender, EventArgs e) { //the client side validation (browser) done by the validation controls can be re-executed on the server if (Page.IsValid) { //after validating your raw data again, if you have logical validation or business rules to check, they can now be done. //Business Rule: Terms must be checked. if (Terms.Checked) { //accept entry // create an instance of the Entry Entry theEntry = new Entry(); theEntry.FirstName = FirstName.Text; theEntry.LastName = LastName.Text; theEntry.StreetAddress1 = StreetAddress1.Text; theEntry.StreetAddress2 = StreetAddress2.Text; theEntry.City = City.Text; theEntry.Province = Province.SelectedValue; theEntry.PostalCode = PostalCode.Text; theEntry.EmailAddress = EmailAddress.Text; //add the instance to the data collection contestEntries.Add(theEntry); //display the List<Entry> in the GridView EntriesList.DataSource = contestEntries; EntriesList.DataBind(); } else { //reject entry Message.Text = "You did not agree to the contest terms. Entry Rejected."; } } }
public static void Remove(RssUrlEntry entry) { if (entries.ContainsKey(entry.Url)) { entries.Remove(entry.Url); EntriesList.Remove(entry); Save(); } }
public static void Add(RssUrlEntry entry) { lock (entries) { if (!entries.ContainsKey(entry.Url)) { entries.Add(entry.Url, entry); EntriesList.Add(entry); Save(); } } }
public CreateRecipe(string sender, long blockInterval, string recipeId, string cookbookId, string name, string description, CoinInput[] coinInputs, ItemInput[] itemInputs, EntriesList entries, WeightedOutput[] outputs) { Sender = sender; BlockInterval = blockInterval; RecipeId = recipeId; CookbookId = cookbookId; Name = name; Description = description; CoinInputs = coinInputs; ItemInputs = itemInputs; Entries = entries; Outputs = outputs; }
protected override void OnProcessOutputSchema(MutableObject newSchema) { foreach (var entry in EntriesList.GetEntries(newSchema)) { var elementList = EntriesList.GetValue(entry).ToList(); var elementCount = elementList.Count; NumberOfEntriesTarget.SetValue(elementCount, entry); if (elementCount == 0) { throw new Exception("Can't act on an empty list!"); } SingleEntryTarget.SetValue(elementList.First(), entry); } Router.TransmitAllSchema(newSchema); }
public override IEnumerator ReceivePayload(VisualPayload payload) { foreach (var entry in EntriesList.GetEntries(payload.Data)) { var elementList = EntriesList.GetValue(entry).ToList(); var elementCount = elementList.Count; NumberOfEntriesTarget.SetValue(elementCount, entry); foreach (var element in elementList) { SingleEntryTarget.SetValue(element, entry); var iterator = PerEntryState.Transmit(payload); while (iterator.MoveNext()) { yield return(null); } } } }
public PassiveSkill GetPassiveSkillById(string id) => EntriesList.FirstOrDefault(x => x.Id == id);
/// <summary> /// Binds the results. /// </summary> private void BindResults(bool list) { SearchSort sortObject = CatalogEntrySearchCriteria.DefaultSortOrder; //string sort = SortBy.SelectedValue; //if (!String.IsNullOrEmpty(sort)) //{ // if (sort.Equals("name", StringComparison.OrdinalIgnoreCase)) // sortObject = new SearchSort("displayname"); // else if (sort.Equals("plh", StringComparison.OrdinalIgnoreCase)) // sortObject = // new SearchSort(String.Format("saleprice{0}", SiteContext.Current.CurrencyCode).ToLower()); // else if (sort.Equals("phl", StringComparison.OrdinalIgnoreCase)) // sortObject = // new SearchSort(String.Format("saleprice{0}", SiteContext.Current.CurrencyCode).ToLower(), true); //} var group = new CatalogEntryResponseGroup(CatalogEntryResponseGroup.ResponseGroup.CatalogEntryFull); SearchFilterHelper helper = SearchFilterHelper.Current; CatalogEntrySearchCriteria criteria = helper.CreateSearchCriteria("", sortObject); //AddNodesToCriteria(criteria); criteria.RecordsToRetrieve = 25; criteria.StartingRecord = _startRowIndex; criteria.ClassTypes.Add("Product"); var searchManager = new SearchManager(AppContext.Current.ApplicationName); try { var results = searchManager.Search(criteria); if (results == null) { return; } var resultIndexes = results.GetKeyFieldValues <int>(); var entries = CatalogContext.Current.GetCatalogEntries(resultIndexes, group); if (entries.Entry != null) { var ds = CreateDataSource(entries, results.TotalCount); if (!list) { EntriesList.DataSource = ds; EntriesList.DataBind(); EntriesList.Visible = true; listView.Visible = false; } else { listView.DataSource = ds; listView.DataBind(); EntriesList.Visible = false; listView.Visible = true; } if (results.TotalCount < 25) { DataPager3.Visible = false; } } _filters = helper.SelectedFilters; _facets = results.FacetGroups; if (_filters != null && _filters.Length > 0) { ActiveFilterList.DataSource = _filters; ActiveFilterList.DataBind(); ActiveFilterList.Visible = true; } else { ActiveFilterList.Visible = false; } if (_facets != null && _facets.Length > 0) { FilterList.Visible = true; FilterList.DataSource = _facets; FilterList.DataBind(); } else { FilterList.Visible = false; } } catch (Exception ex) { LogManager.GetLogger(GetType()).Error(ex.Message, ex); } }
public PassiveSkill GetPassiveSkillById(string id) { return(EntriesList.FirstOrDefault(x => x.Id == id)); }
public LabyrinthTrial GetLabyrinthTrialByArea(WorldArea area) { return(EntriesList.FirstOrDefault(x => x.Area == area)); }
public LabyrinthTrial GetLabyrinthTrialById(int index) { return(EntriesList.FirstOrDefault(x => x.Id == index)); }
public LabyrinthTrial GetLabyrinthTrialByAreaId(string id) { return(EntriesList.FirstOrDefault(x => x.Area.Id == id)); }
protected virtual void Start() { _entries = FindObjectOfType <EntriesList>(); _entries.OnCountChanged += onCountChanged; }