public ActionResult Single() { PlaceSection section = WebConfigurationManager.GetWebApplicationSection("customDefaults/places") as PlaceSection; Place defaultPlace = section.Places[section.Default]; return(this.View("~/Views/Home/DisplaySingle.cshtml", (object)string.Format($"The default place is: {defaultPlace.City}"))); }
public ActionResult Index() { Dictionary <string, string> configData = new Dictionary <string, string>(); PlaceSection section = WebConfigurationManager.GetWebApplicationSection("places") as PlaceSection; foreach (Place place in section.Places) { configData.Add(place.Code, $"{place.City} {place.Country}"); } return(View("~/Views/Home/Ccs.cshtml", configData)); }
public static void AddObjectToCurrentEditor(SongObject songObject, ChartEditor editor, bool update = true) { switch (songObject.classID) { case ((int)SongObject.ID.Note): PlaceNote.AddObjectToCurrentChart((Note)songObject, editor, update); break; case ((int)SongObject.ID.Starpower): PlaceStarpower.AddObjectToCurrentChart((Starpower)songObject, editor, update); break; case ((int)SongObject.ID.BPM): PlaceBPM.AddObjectToCurrentSong((BPM)songObject, editor, update); break; case ((int)SongObject.ID.Section): PlaceSection.AddObjectToCurrentSong((Section)songObject, editor, update); break; case ((int)SongObject.ID.TimeSignature): PlaceTimesignature.AddObjectToCurrentSong((TimeSignature)songObject, editor, update); break; case ((int)SongObject.ID.Event): PlaceEvent.AddObjectToCurrentSong((Event)songObject, editor, update); break; case ((int)SongObject.ID.ChartEvent): PlaceChartEvent.AddObjectToCurrentChart((ChartEvent)songObject, editor, update); break; default: break; } }