protected override void Initialize() { NameText.Value = _InitialName; FolderList.Set(Project.Contents.Folders); FolderText.Value = Project.Contents.Folders.DefaultIfEmpty("").FirstOrDefault(); TypeList.Set(new[] { Strings.FileTypeProgram, Strings.FileTypeFunctionBlock, Strings.FileTypeFunction, Strings.FileTypeGlobalVars, Strings.FileTypeDataType, Strings.FileTypeClass, Strings.FileTypeInterface }); LanguageList.Set(new[] { Strings.LanguageIL, Strings.LanguageLD, Strings.LanguageFBD, Strings.LanguageSFC, Strings.LanguageST }); TypeSelectedIndex.Value = 0; // Program LanguageSelectedIndex.Value = 4; // Structured Text }
private void Populate() { List.Set(Project.Contents.Files.Select(x => new ListViewRow { Icon = Images.Pou16, GroupName = x.Folder, Cells = new List <string> { x.Name, x.Type.ToShortString() }, Tag = x })); }
protected override void Initialize() { PouList.Set(_Files.Select(x => new ListViewRow { Icon = Images.Pou16, GroupName = x.Folder, Cells = new List <string> { x.Name, x.Type.ToShortString(), x.Language.ToShortString() }, Tag = x })); NewFolderList.Set(Project.Contents.Folders); NewFolderText.Value = Project.Contents.Folders.DefaultIfEmpty("").FirstOrDefault(); }