private void ShowEditorForm_Load(object sender, EventArgs e) { currentShowItemType = ShowItemType.Startup; PopulateActions(); PopulateItemList(null); textBoxShowName.Text = ShowData.Name; LoadCurrentTab(); CheckButtons(); }
public List<ShowItem> GetItems(ShowItemType type) { List<ShowItem> items = new List<ShowItem>(); foreach (ShowItem item in Items) { if (type == item.ItemType || type == ShowItemType.All) { items.Add(item); } } return items; }
private void LoadCurrentTab() { if (tabControlShowItems.SelectedTab == tabPageStartup) { currentShowItemType = ShowItemType.Startup; } else if (tabControlShowItems.SelectedTab == tabPageBackground) { currentShowItemType = ShowItemType.Background; } else if (tabControlShowItems.SelectedTab == tabPageSequential) { currentShowItemType = ShowItemType.Sequential; } //else if (tabControlShowItems.SelectedTab == tabPageInput) //{ // currentShowItemType = ShowItemType.Input; //} else if (tabControlShowItems.SelectedTab == tabPageShutdown) { currentShowItemType = ShowItemType.Shutdown; } SetHelpLabel(); LoadSelectedItem(); SetCurrentEditor(""); PopulateItemList(null); CheckButtons(); }
public ShowItem(ShowItemType showType, string itemName, Guid currenShowID) { ItemType = showType; Name = itemName; CurrentShowID = CurrentShowID; }
public ShowItem AddItem(ShowItemType itemType, string itemName) { ShowItem showItem = new ShowItem(itemType, itemName, this.ID); Items.Add(showItem); return showItem; }
private void ShowEditorForm_Load(object sender, EventArgs e) { currentShowItemType = ShowItemType.Startup; PopulateActions(); PopulateItemList(null); textBoxShowName.Text = ShowData.Name; LoadCurrentTab(); CheckButtons(); //tabControlShowItems.TabPages.Remove(tabPageBackground); tabControlShowItems.TabPages.Remove(tabPageInput); }
public void LoadShowSequencesIntoShowItems(ShowItemType type) { //Ensure we only have one copy of each sequence var sequenceFileNames = new Dictionary<string, ISequence>(); foreach (ShowItem item in GetItems(type)) { if (item.Action == ActionType.Sequence && item.Sequence_FileName != null) { if (sequenceFileNames.ContainsKey(item.Sequence_FileName)) { item.Sequence = sequenceFileNames[item.Sequence_FileName]; } else { var sequence = SequenceService.Instance.Load(item.Sequence_FileName); sequenceFileNames[item.Sequence_FileName] = sequence; item.Sequence = sequence; } } } }