当前位置: 首页>>代码示例>>C#>>正文


C# ListType类代码示例

本文整理汇总了C#中ListType的典型用法代码示例。如果您正苦于以下问题:C# ListType类的具体用法?C# ListType怎么用?C# ListType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ListType类属于命名空间,在下文中一共展示了ListType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NamespaceList

 public NamespaceList(string namespaces, string targetNamespace) {
     Debug.Assert(targetNamespace != null);
     this.targetNamespace = targetNamespace;
     namespaces = namespaces.Trim();
     if (namespaces == "##any" || namespaces.Length == 0) {
         type = ListType.Any;
     }
     else if (namespaces == "##other") {
         type = ListType.Other;
     }
     else {
         type = ListType.Set;
         set = new Hashtable();
         string[] splitString = XmlConvert.SplitString(namespaces);
         for (int i = 0; i < splitString.Length; ++i) {
             if (splitString[i] == "##local") {
                 set[string.Empty] = string.Empty;
             } 
             else if (splitString[i] == "##targetNamespace") {
                 set[targetNamespace] = targetNamespace;
             }
             else {
                 XmlConvert.ToUri (splitString[i]); // can throw
                 set[splitString[i]] = splitString[i];
             }
         }
     }
 }
开发者ID:uQr,项目名称:referencesource,代码行数:28,代码来源:NamespaceList.cs

示例2: NamespaceList

 public NamespaceList(string namespaces, string targetNamespace)
 {
     this.targetNamespace = targetNamespace;
     namespaces = namespaces.Trim();
     if ((namespaces == "##any") || (namespaces.Length == 0))
     {
         this.type = ListType.Any;
     }
     else if (namespaces == "##other")
     {
         this.type = ListType.Other;
     }
     else
     {
         this.type = ListType.Set;
         this.set = new Hashtable();
         string[] strArray = XmlConvert.SplitString(namespaces);
         for (int i = 0; i < strArray.Length; i++)
         {
             if (strArray[i] == "##local")
             {
                 this.set[string.Empty] = string.Empty;
             }
             else if (strArray[i] == "##targetNamespace")
             {
                 this.set[targetNamespace] = targetNamespace;
             }
             else
             {
                 XmlConvert.ToUri(strArray[i]);
                 this.set[strArray[i]] = strArray[i];
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:35,代码来源:NamespaceList.cs

示例3: KCT_BuildListVessel

        public KCT_BuildListVessel(ShipConstruct s, String ls, double bP, String flagURL)
        {
            ship = s;
            shipNode = s.SaveShip();
            shipName = s.shipName;
            //Get total ship cost
            float dry, fuel;
            s.GetShipCosts(out dry, out fuel);
            cost = dry + fuel;
            TotalMass = 0;
            foreach (Part p in s.Parts)
            {
                TotalMass += p.mass;
                TotalMass += p.GetResourceMass();
            }

            launchSite = ls;
            buildPoints = bP;
            progress = 0;
            flag = flagURL;
            if (launchSite == "LaunchPad")
                type = ListType.VAB;
            else
                type = ListType.SPH;
            InventoryParts = new Dictionary<string, int>();
            id = Guid.NewGuid();
            cannotEarnScience = false;
        }
开发者ID:fingerboxes,项目名称:KCT,代码行数:28,代码来源:KCT_BuildListVessel.cs

示例4: ImportListFile

 public static List<string> ImportListFile(string fileName, ListType type)
 {
     using (var sr = File.OpenText(fileName))
     {
         switch (type)
         {
             case ListType.M3U8:
                 {
                     var line = sr.ReadLine().ToUpper();
                     if (!line.Contains("#EXTM3U"))
                         return null;
                     line = sr.ReadLine();
                     var temp = new List<string>();
                     while (!string.IsNullOrWhiteSpace(line))
                     {
                         if (line[0] == '#')
                         {
                             line = sr.ReadLine();
                             continue;
                         }
                         temp.Add(line);
                         line = sr.ReadLine();
                     }
                     return temp;
                 }
             default: return null;
         }
     }
 }
开发者ID:Satroki,项目名称:MusicWPF,代码行数:29,代码来源:Methods.cs

示例5: ConvertListTypeToString

        private static string ConvertListTypeToString(ListType type)
        {
            string s;
            switch (type)
            {
                case ListType.RECOMMENDED:
                    s = "recommended";
                    break;
                case ListType.LIKED:
                    s = "liked";
                    break;
                case ListType.LISTEN_LATER:
                    s = "listen_later";
                    break;
                case ListType.FEED:
                    s = "feed";
                    break;
                case ListType.PUBLISHED:
                    s = "dj";
                    break;
                case ListType.HISTORY:
                    s = "listened";
                    break;
                default:
                    throw new System.ArgumentException("Invalid ListType argument passed");
            }

            return s;
        }
开发者ID:Pradyumna91,项目名称:8tracksWin,代码行数:29,代码来源:MixSearch.cs

示例6: MainForm

        public MainForm(string path, bool loadNames, bool loadBrstms, bool groupSongs)
        {
            InitializeComponent();

            loadNamesFromInfopacToolStripMenuItem.Checked = songPanel1.LoadNames = loadNames;
            loadBRSTMPlayerToolStripMenuItem.Checked = songPanel1.LoadBrstms = loadBrstms;
            groupSongsByStageToolStripMenuItem.Checked = groupSongs;
            listType = groupSongs ? ListType.GroupByStage : ListType.FilesInDir;

            // Later commands to change the titlebar assume there is a hypen in the title somewhere
            this.Text += " -";

            loadNames = loadNamesFromInfopacToolStripMenuItem.Checked;
            loadBrstms = loadBRSTMPlayerToolStripMenuItem.Checked;

            RightControl = chooseLabel;

            // Drag and drop for the left and right sides of the window. The dragEnter and dragDrop methods will check which panel the file is dropped onto.
            listBox1.AllowDrop = true;
            listBox1.DragEnter += dragEnter;
            listBox1.DragDrop += dragDrop;

            this.FormClosing += closing;
            this.FormClosed += closed;

            changeDirectory(path);
        }
开发者ID:liddictm,项目名称:BrawlManagers,代码行数:27,代码来源:MainForm.cs

示例7: NamespaceList

 public NamespaceList(string namespaces, string targetNamespace) {
     Debug.Assert(targetNamespace != null);
     this.targetNamespace = targetNamespace;
     namespaces = namespaces.Trim();
     if (namespaces == "##any" || namespaces.Length == 0) {
         type = ListType.Any;
     }
     else if (namespaces == "##other") {
         type = ListType.Other;
     }
     else {
         type = ListType.Set;
         set = new Hashtable();
         foreach(string ns in XmlConvert.SplitString(namespaces)) {
             if (ns == "##local") {
                 set[string.Empty] = string.Empty;
             } 
             else if (ns == "##targetNamespace") {
                 set[targetNamespace] = targetNamespace;
             }
             else {
                 XmlConvert.ToUri (ns); // can throw
                 set[ns] = ns;
             }
         }
     }
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:27,代码来源:namespacelist.cs

示例8: ListMenu

        public ListMenu(string DataPath, AppsModules Modul, ListType Type, string ModLabel)
        {
            InitializeComponent();

            //Set Label Format
            Lbl_List.Foreground = new SolidColorBrush(FontColor);
            Lbl_List.FontFamily = TitleFont;
            //Set Title
            Lbl_List.Content = ModLabel;

            //Search for the Files or Directories
            if (Type == ListType.Folder)
            {
                //Search all Directories
                DirectoryPaths = Directory.GetDirectories(DataPath).ToList();
            }
            else if (Type == ListType.None)
            {
                //Dummy
            }
            else
            {
                DirectoryPaths = new List<string>();
                //Search all Files in diferents formats
                for(int x=0; x < FileMgr.GetFileFormats(Type).Length; x++)
                    DirectoryPaths.AddRange(Directory.GetFiles(DataPath, FileMgr.GetFileFormats(Type)[x]).ToList());
            }

            //Copy the Option Information
            CurrentModul = Modul;
            SelModul = 0;

            myType = Type;
        }
开发者ID:virucho,项目名称:TouchInfoPoint,代码行数:34,代码来源:ListMenu.xaml.cs

示例9: GetFileFormats

        /// <summary>
        /// Get file formats for each kind of App
        /// </summary>
        public static string[] GetFileFormats(ListType type)
        {
            string[] Formats;

            switch (type)
            {
                case ListType.PDF:
                    Formats = new string[] { "*.pdf" };
                    break;
                case ListType.Video:
                    Formats = new string[] { "*.avi", "*.wmv", "*.flv", "*.mp4", "*.mpg"};
                    break;
                case ListType.Maps:
                    Formats = new string[] { "*.png", "*.jpg" };
                    break;
                case ListType.Web:
                    Formats = new string[] { "*.txt" };
                    break;
                case ListType.Voting:
                    Formats = new string[] { "*.xml" };
                    break;
                default:
                    Formats = new string[] { "*.*" };
                    break;
            }

            return Formats;
        }
开发者ID:virucho,项目名称:TouchInfoPoint,代码行数:31,代码来源:Tools.cs

示例10:

        /// <summary>
        /// Constructor for the GroupEnumeratorHelper.  At construction
        /// time, you specify the GroupingCollection to use, and the type
        /// of enumerator you wish to get.
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <owner>DavidLe</owner>
        /// <param name="groupingCollection"></param>
        /// <param name="type"></param>
        /// <returns>IEnumerator</returns>
        internal GroupEnumeratorHelper
            (
                GroupingCollection groupingCollection,
                ListType type
            )
        {
            error.VerifyThrow(groupingCollection != null, "GroupingCollection is null");

            this.groupingCollection = groupingCollection;
            this.type = type;
        }
开发者ID:nikson,项目名称:msbuild,代码行数:22,代码来源:GroupEnumeratorHelper.cs

示例11: GetListId

        public virtual int GetListId(ListType listType, SchoolCategory schoolCategory)
        {
            switch(schoolCategory)
            {
                case SchoolCategory.None:
                case SchoolCategory.Ungraded:
                    schoolCategory = SchoolCategory.HighSchool;
                    break;
            }

            return GetListId(listType.ToString(), schoolCategory);
        }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:12,代码来源:DatabaseMetadataListIdResolver.cs

示例12: CloseList

 public static string CloseList(ListType type)
 {
     switch (type)
     {
         case ListType.Bulletted:
             return CloseBulletedList();
         case ListType.Numbered:
             return CloseNumberedList();
         default:
             return CloseNumberedList();
     }
 }
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:12,代码来源:Xhtml.cs

示例13: GetLayoutForType

 public static int GetLayoutForType(ListType type)
 {
     switch (type)
     {
         case ListType.Regular:
             return Resource.Layout.sino_droid_md_listitem;
         case ListType.Single:
             return Resource.Layout.sino_droid_md_listitem_singlechoice;
         case ListType.Multi:
             return Resource.Layout.sino_droid_md_listitem_multichoice;
         default:
             throw new InvalidOperationException("Not a valid list type");
     }
 }
开发者ID:devxiaruwei,项目名称:MaterialDialogs,代码行数:14,代码来源:ListType.cs

示例14: GetTagName

 private static string GetTagName(ListType listType)
 {
     switch (listType)
     {
         case ListType.BulletedList:
             return "ul";
         
         case ListType.NumberedList:
             return "ol";
         
         default:
             throw new ArgumentOutOfRangeException("listType");
     }
 }
开发者ID:kostrse,项目名称:MayMart.Wiki,代码行数:14,代码来源:ListElement.cs

示例15: KCT_BuildListVessel

 public KCT_BuildListVessel(String name, String ls, double bP, String flagURL, float spentFunds)
 {
     ship = new ShipConstruct();
     launchSite = ls;
     shipName = name;
     buildPoints = bP;
     progress = 0;
     flag = flagURL;
     if (launchSite == "LaunchPad")
         type = ListType.VAB;
     else
         type = ListType.SPH;
     InventoryParts = new List<string>();
     cannotEarnScience = false;
     cost = spentFunds;
 }
开发者ID:ntwest,项目名称:KCT,代码行数:16,代码来源:KCT_BuildListVessel.cs


注:本文中的ListType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。