コード例 #1
0
 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
 }
コード例 #2
0
 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
     }));
 }
コード例 #3
0
        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();
        }