• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ListType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Select

        public static DataTable Select(ListType ListType, int DepartmentId, int Days, int TechnicianId, int AccountId)
        {
            System.Data.SqlClient.SqlParameter[] sqlParams = {
                new System.Data.SqlClient.SqlParameter("@DId", DBNull.Value),
                new System.Data.SqlClient.SqlParameter("@UId", "-1"),
                new System.Data.SqlClient.SqlParameter("@intAcctId", DBNull.Value),
                new System.Data.SqlClient.SqlParameter("@sintDayAdvance", DBNull.Value),
                new System.Data.SqlClient.SqlParameter("@tintListType", (int)ListType)
            };

            if (DepartmentId > 0) sqlParams[0].SqlValue = DepartmentId;
            if (TechnicianId > 0) sqlParams[1].SqlValue = TechnicianId;
            if (AccountId > 0) sqlParams[2].SqlValue = AccountId;
            if (Days > 0) sqlParams[3].SqlValue = Days;

            return SelectRecords("sp_SelectFollowUpList", sqlParams);
        }
开发者ID:evgeniynet,项目名称:DataLayer,代码行数:17,代码来源:FollowUps.cs


示例17: GetEdFiGridModel

 public virtual EdFiGridModel GetEdFiGridModel(bool displayInteractionMenu, bool displayAddRemoveColumns, int fixedHeight, string name, int? metricVariantId, GridTable gridTable, IList<MetricFootnote> metricFootnotes, string nonPersistedSettings, bool sizeToWindow, string listType, IList<string> legendViewNames, string hrefToUse, bool usePagination, string paginationCallbackUrl, bool allowMaximizeGrid,
     EdFiGridWatchListModel studentWatchList = null, string selectedDemographicOption = null, string selectedSchoolCategoryOption = null, string selectedGradeOption = null, string previousNextSessionPage = null, string exportGridDataUrl = null, ListType gridListType = default(ListType))
 {
     var model = new EdFiGridModel
     {
         DisplayInteractionMenu = displayInteractionMenu,
         DisplayAddRemoveColumns = displayAddRemoveColumns,
         FixedHeight = fixedHeight,
         GridName = name,
         GridTable = gridTable,
         SizeToWindow = sizeToWindow,
         UniqueTableName = name,
         MetricFootnotes = metricFootnotes,
         NonPersistedSettings = nonPersistedSettings,
         EntityList = string.IsNullOrEmpty(listType) ? null :
             new EntityListModel
             {
                 ListType = listType,
                 MetricVariantId =
                     metricVariantId.HasValue
                         ? metricVariantId.Value.ToString(CultureInfo.InvariantCulture)
                         : string.Empty,
                 RowIndexForId = 1
             },
         LegendViewNames = legendViewNames,
         DefaultSortColumn = 1,
         HrefToUse = hrefToUse,
         UsePagination = usePagination,
         PaginationCallbackUrl = paginationCallbackUrl,
         AllowMaximizeGrid = allowMaximizeGrid,
         StudentWatchList = studentWatchList,
         SelectedDemographicOption = selectedDemographicOption,
         SelectedSchoolCategoryOption = selectedSchoolCategoryOption,
         SelectedGradeOption = selectedGradeOption,
         PreviousNextSessionPage = previousNextSessionPage,
         ExportGridDataUrl = exportGridDataUrl,
         ListType = gridListType
     };
     return model;
 }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:40,代码来源:EdFiGridModelProvider.cs


示例18: SpreadRender

    void SpreadRender(Vector2 position, byte distance)
    {
        if (position.y < 0 || position.x < 0 || position.y >= Map.MatrixHeight.GetLength (0) || position.x >= Map.MatrixHeight.GetLength (0))
            return;

        short index = (short)RenderedHexes.FindIndex (x => x.Hex.GetComponent<HexData> ().MapCoords == position);
        if (index == -1)
        {
            Quaternion rot = new Quaternion ();
            ListType hex = new ListType{Hex= Instantiate (Hex, new Vector2 (position.x * 0.96f, position.y * 0.64f + ((position.x % 2) != 0 ? 1 : 0) * 0.32f), rot) as GameObject,InSign= true};
            hex.Hex.GetComponent<HexData> ().MapCoords = position;
            ChooseSprite (hex.Hex, position);
            RenderedHexes.Add (hex);
        }
        else
        {
            if (RenderedHexes [index].InSign)
                return;
            else
                RenderedHexes [index].InSign = true;
        }

        if (distance != 0)
        {
            byte k = (byte)((position.x % 2) != 0 ? 1 : 0); // Учитываем чётность/нечётность ряда хексов

            SignQueue.Enqueue (new QueueType{Position=new Vector2 (position.x - 1, position.y - 1 + k),Distance=(byte)(distance - 1)});

            SignQueue.Enqueue (new QueueType{Position=new Vector2 (position.x - 1, position.y + k),Distance= (byte)(distance - 1)});

            SignQueue.Enqueue (new QueueType{Position=new Vector2 (position.x, position.y - 1), Distance=(byte)(distance - 1)});

            SignQueue.Enqueue (new QueueType{Position=new Vector2 (position.x, position.y + 1), Distance=(byte)(distance - 1)});

            SignQueue.Enqueue (new QueueType{Position=new Vector2 (position.x + 1, position.y - 1 + k),Distance=(byte) (distance - 1)});

            SignQueue.Enqueue (new QueueType{Position=new Vector2 (position.x + 1, position.y + k), Distance=(byte)(distance - 1)});
        }
    }
开发者ID:MadBanny,项目名称:planet-survival,代码行数:39,代码来源:WorldVisualiser.cs


示例19: List

        public List<SmsDeliverMessage> List(ListType type) {
            List<SmsDeliverMessage> result = new List<SmsDeliverMessage>();

            // set format to pdu
            Debug.WriteLine("Asking for PDU format");
            WriteCommandExpectResponse("AT+CMGF=0", "\rOK\r");

            // list storages
            Debug.WriteLine("Asking for storage enumeration");
            string response = WriteCommandExpectResponse("AT+CPMS?", "\rOK\r");
            string[] data = response.Split('\r');
            if (data[1].Substring(0, 7).ToUpper() != "+CPMS: ")
                throw new UnexpectedResponseException("Phone message storages could not be enumerated");

            // walk storages
            string[] storages = data[1].Substring(7).Split(',');
            for (int x = 0; x < storages.Length; x += 3) {
                Debug.WriteLine("Memory " + storages[x] + ": " + storages[x + 1] + " used, " + storages[x + 2] + " total");

                // select storage
                WriteCommandExpectResponse("AT+CPMS=" + storages[x], "\rOK\r");

                // list messages in storage
                response = WriteCommandExpectResponse("AT+CMGL=" + (int)type, "\rOK\r");
                data = response.Split('\r');
                for (int y = 2; y < data.Length - 2; y = y + 2) {
                    try {
                        result.Add(new SmsDeliverMessage(data[y], new MessageLocation(storages[x], int.Parse(data[y - 1].Substring(6, data[y - 1].IndexOf(",", 6) - 6)))));
                    } catch (Exception ex) {
                        Debug.WriteLine("Failed to read message: " + ex.Message + ", " + ex.StackTrace);
                    }
                }
            }

            MergeMultipartMessages(result);
            return result;
        }
开发者ID:jcamelina,项目名称:FJR.SmsSolution,代码行数:37,代码来源:PhoneClient.cs


示例20: 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 fuel;
            cost = s.GetShipCosts(out emptyCost, out fuel);
            TotalMass = s.GetShipMass(out emptyMass, out fuel);

            launchSite = ls;
            buildPoints = bP;
            progress = 0;
            flag = flagURL;
            if (s.shipFacility == EditorFacility.VAB)
                type = ListType.VAB;
            else if (s.shipFacility == EditorFacility.SPH)
                type = ListType.SPH;
            else
                type = ListType.None;
            InventoryParts = new Dictionary<string, int>();
            id = Guid.NewGuid();
            cannotEarnScience = false;
        }
开发者ID:Kerbas-ad-astra,项目名称:KCT,代码行数:24,代码来源:KCT_BuildListVessel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ListUnmarshaller类代码示例发布时间:2022-05-24
下一篇:
C# ListTagsForResourceRequestMarshaller类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap