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


C# GroupType.ToString方法代码示例

本文整理汇总了C#中GroupType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# GroupType.ToString方法的具体用法?C# GroupType.ToString怎么用?C# GroupType.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GroupType的用法示例。


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

示例1: Search

        public static Task<Search> Search(string access_token, string q, string fields = "members_count", int country_id = 0, int city_id = 0, byte sort = 0, short count = 1000, short offset = 0, GroupType type = GroupType.all, int future = 0)
        {
            return Task.Run<Search>(() =>
            {
                try
                {
                    //Собираем параметры
                    StringBuilder data = new StringBuilder();
                    data.Append("&sort=" + (sort == 6 ? 0 : sort));
                    data.Append("&offset=" + offset);
                    data.Append("&count=" + count);
                    data.Append("&future=" + future);

                    if (type != GroupType.all)
                        data.Append("&type=" + type.ToString());

                    if (country_id != 0)
                        data.Append("&country_id=" + country_id);

                    if (city_id != 0 && country_id != 0)
                        data.Append("&city_id=" + city_id);

                    if (q != null)
                        data.Append("&q=" + q);

                    if (fields != null)
                        data.Append("&fields=" + fields);

                    if (access_token != null)
                        data.Append("&access_token=" + access_token);
                    else if (VKdata.token != null)
                        data.Append("&access_token=" + VKdata.token);


                    //Получаем json данные
                    string json = Regex.Replace(result.get("groups.search", data.ToString(), true), "^{\"response\":\\[[0-9]+,{\"", "{\"response\":[{\"");

                    //Чистим ресурсы и возвращаем результаты
                    access_token = null; q = null; fields = null; data = null;
                    return JsonConvert.DeserializeObject<Search>(json);
                }
                catch (Newtonsoft.Json.JsonReaderException) { }
                catch { }

                //Ошибка
                access_token = null; q = null; fields = null;
                return new Search();
            });
        }
开发者ID:korner-brazers,项目名称:VK-HashTag,代码行数:49,代码来源:groups.cs

示例2: ShowReadonlyDetails

        /// <summary>
        /// Shows the readonly details.
        /// </summary>
        /// <param name="groupType">The groupType.</param>
        private void ShowReadonlyDetails( GroupType groupType )
        {
            SetEditMode( false );

            if ( groupType != null )
            {
                hfGroupTypeId.SetValue( groupType.Id );
                lReadOnlyTitle.Text = groupType.ToString().FormatAsHtmlTitle();

                lDescription.Text = groupType.Description;

                groupType.LoadAttributes();

                hlType.Text = groupType.GetAttributeValue( "CheckInType" );
                hlType.Visible = true;

                DescriptionList mainDetailsDescList = new DescriptionList();
                DescriptionList leftDetailsDescList = new DescriptionList();
                DescriptionList rightDetailsDescList = new DescriptionList();

                string scheduleList = string.Empty;
                using ( var rockContext = new RockContext() )
                {
                    var descendantGroupTypeIds = new GroupTypeService( rockContext ).GetAllAssociatedDescendents( groupType.Id ).Select( a => a.Id );
                    scheduleList = new GroupLocationService( rockContext )
                        .Queryable().AsNoTracking()
                        .Where( a =>
                            a.Group.GroupType.Id == groupType.Id ||
                            descendantGroupTypeIds.Contains( a.Group.GroupTypeId ) )
                        .SelectMany( a => a.Schedules )
                        .Select( s => s.Name )
                        .Distinct()
                        .OrderBy( s => s )
                        .ToList()
                        .AsDelimited( ", " );
                }

                if ( !string.IsNullOrWhiteSpace( scheduleList ) )
                {
                    mainDetailsDescList.Add( "Scheduled Times", scheduleList );
                }

                groupType.LoadAttributes();

                if ( groupType.AttributeValues.ContainsKey( "core_checkin_CheckInType" ) )
                {
                    leftDetailsDescList.Add( "Check-in Type", groupType.AttributeValues["core_checkin_CheckInType"].ValueFormatted );
                }
                if ( groupType.AttributeValues.ContainsKey( "core_checkin_SecurityCodeLength" ) )
                {
                    leftDetailsDescList.Add( "Security Code Length", groupType.AttributeValues["core_checkin_SecurityCodeLength"].ValueFormatted );
                }
                if ( groupType.AttributeValues.ContainsKey( "core_checkin_SearchType" ) )
                {
                    rightDetailsDescList.Add( "Search Type", groupType.AttributeValues["core_checkin_SearchType"].ValueFormatted );
                }
                if ( groupType.AttributeValues.ContainsKey( "core_checkin_PhoneSearchType" ) )
                {
                    rightDetailsDescList.Add( "Phone Number Compare", groupType.AttributeValues["core_checkin_PhoneSearchType"].ValueFormatted );
                }

                lblMainDetails.Text = mainDetailsDescList.Html;
                lblLeftDetails.Text = leftDetailsDescList.Html;
                lblRightDetails.Text = rightDetailsDescList.Html;
            }
        }
开发者ID:NewSpring,项目名称:Rock,代码行数:70,代码来源:CheckinTypeDetail.ascx.cs

示例3: ShowEditDetails

        /// <summary>
        /// Shows the edit details.
        /// </summary>
        /// <param name="groupType">The groupType.</param>
        private void ShowEditDetails( GroupType groupType )
        {
            if ( groupType != null )
            {
                if ( groupType.Id == 0 )
                {
                    lReadOnlyTitle.Text = ActionTitle.Add( "Check-in Configuration" ).FormatAsHtmlTitle();
                }
                else
                {
                    lReadOnlyTitle.Text = groupType.ToString().FormatAsHtmlTitle();
                }

                SetEditMode( true );

                tbName.Text = groupType.Name;
                tbDescription.Text = groupType.Description;

                var rockContext = new RockContext();

                groupType.LoadAttributes( rockContext );

                cbAgeRequired.Checked = groupType.GetAttributeValue( "core_checkin_AgeRequired" ).AsBoolean( true );
                cbGradeRequired.Checked = groupType.GetAttributeValue( "core_checkin_GradeRequired" ).AsBoolean( true );
                cbHidePhotos.Checked = groupType.GetAttributeValue( "core_checkin_HidePhotos" ).AsBoolean( true );
                cbPreventDuplicateCheckin.Checked = groupType.GetAttributeValue( "core_checkin_PreventDuplicateCheckin" ).AsBoolean( true );
                cbPreventInactivePeople.Checked = groupType.GetAttributeValue( "core_checkin_PreventInactivePeople" ).AsBoolean( true );
                ddlType.SetValue( groupType.GetAttributeValue( "core_checkin_CheckInType" ) );
                cbDisplayLocCount.Checked = groupType.GetAttributeValue( "core_checkin_DisplayLocationCount" ).AsBoolean( true );
                cbEnableManager.Checked = groupType.GetAttributeValue( "core_checkin_EnableManagerOption" ).AsBoolean( true );
                cbEnableOverride.Checked = groupType.GetAttributeValue( "core_checkin_EnableOverride" ).AsBoolean( true );
                nbMaxPhoneLength.Text = groupType.GetAttributeValue( "core_checkin_MaximumPhoneSearchLength" );
                nbMaxResults.Text = groupType.GetAttributeValue( "core_checkin_MaxSearchResults" );
                nbMinPhoneLength.Text = groupType.GetAttributeValue( "core_checkin_MinimumPhoneSearchLength" );
                cbUseSameOptions.Checked = groupType.GetAttributeValue( "core_checkin_UseSameOptions" ).AsBoolean( false );
                ddlPhoneSearchType.SetValue( groupType.GetAttributeValue( "core_checkin_PhoneSearchType" ) );
                nbRefreshInterval.Text = groupType.GetAttributeValue( "core_checkin_RefreshInterval" );
                tbSearchRegex.Text = groupType.GetAttributeValue( "core_checkin_RegularExpressionFilter" );
                cbReuseCode.Checked = groupType.GetAttributeValue( "core_checkin_ReuseSameCode" ).AsBoolean( false );

                var searchType = DefinedValueCache.Read( groupType.GetAttributeValue( "core_checkin_SearchType" ).AsGuid() );
                if ( searchType != null )
                {
                    ddlSearchType.SetValue( searchType.Id.ToString() );
                }

                nbSecurityCodeLength.Text = groupType.GetAttributeValue( "core_checkin_SecurityCodeLength" );
                nbAutoSelectDaysBack.Text = groupType.GetAttributeValue( "core_checkin_AutoSelectDaysBack" );

                BuildAttributeEdits( groupType, true );

                SetFieldVisibility();
            }
        }
开发者ID:NewSpring,项目名称:Rock,代码行数:58,代码来源:CheckinTypeDetail.ascx.cs

示例4: InconsistentConnector

 internal static Exception InconsistentConnector(char ch, GroupType type)
 {
     return new SgmlParseException(String.Format(
         Resources.Resources.Error_InconsistentConnector, ch, type.ToString()));
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:5,代码来源:Error.cs

示例5: ToString

 public static string ToString(GroupType value)
 {
     if( value==GroupType.Person )
         return "person";
     else if( value==GroupType.Animal )
         return "animal";
     else if( value==GroupType.Device )
         return "device";
     else if( value==GroupType.Medication )
         return "medication";
     else if( value==GroupType.Substance )
         return "substance";
     else
         throw new ArgumentException("Unrecognized GroupType value: " + value.ToString());
 }
开发者ID:avontd2868,项目名称:vista-novo-fhir,代码行数:15,代码来源:Group.cs

示例6: GetGroupsByType

 public List<TtGroup> GetGroupsByType(GroupType type)
 {
     StringBuilder sb = new StringBuilder();
     sb.AppendFormat("{0} = '{1}'",
         TwoTrailsSchema.GroupSchema.Type,
         type.ToString());
     List<TtGroup> groups = GetGroups(sb.ToString());
     return groups;
 }
开发者ID:FMSC-Measurements,项目名称:TwoTrailsV2,代码行数:9,代码来源:DataAccessLayer.cs

示例7: SimulateCastSpell

        private void SimulateCastSpell( GroupType groupType, int index )
        {
            Debugger.Log( "SimulateCastSpell(), groupType : " + groupType.ToString() + " spellIndex : " + index );
            EditorShip editorShip = null;
            Part part = null;
            int targetPosition = -1;
            CharactersGroup group = null;

            if( !HasInitBattleScene_ ) {
                UnityEditor.EditorUtility.DisplayDialog( EditorConfig.GUI_NOTICE, EditorConfig.GUI_MSG_NOT_INIT_SCENE, EditorConfig.GUI_MSG_BUTTON_OK );
                return;
            }

            editorShip = groupType == GroupType.Enemy ? SelectedRightCharacter : SelectedLeftCharacter;

            if( editorShip == null ) {
                UnityEditor.EditorUtility.DisplayDialog( EditorConfig.GUI_NOTICE, EditorConfig.GUI_MSG_NOT_LOAD_MODEL, EditorConfig.GUI_MSG_BUTTON_OK );
                return;
            }

            if( index >= editorShip.ship.partList.Length ) {
                UnityEditor.EditorUtility.DisplayDialog( EditorConfig.GUI_NOTICE, string.Format( EditorConfig.GUI_MSG_NOT_EXSIT_SPELL, index + 1 ), EditorConfig.GUI_MSG_BUTTON_OK );
                return;
            }

            part = editorShip.ship.partList[index];
            targetPosition = SelectedRightPosition_;
            group = groupType == GroupType.Enemy ? GroupLeft_ : GroupRight_;

            StartCoroutine( CastSpell( editorShip, part, group, targetPosition ) );
        }
开发者ID:qingsheng1355,项目名称:test,代码行数:31,代码来源:BattleController.cs


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