コード例 #1
0
        static int _m_RemoveRange(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                System.Collections.Generic.List <string> gen_to_be_invoked = (System.Collections.Generic.List <string>)translator.FastGetCSObj(L, 1);



                {
                    int _index = LuaAPI.xlua_tointeger(L, 2);
                    int _count = LuaAPI.xlua_tointeger(L, 3);

                    gen_to_be_invoked.RemoveRange(
                        _index,
                        _count);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
コード例 #2
0
ファイル: dfRadialSprite.cs プロジェクト: Virobeast2/RCLIENT
 private void makeFirst(System.Collections.Generic.List <Vector3> list, int index)
 {
     if (index != 0)
     {
         System.Collections.Generic.List <Vector3> range = list.GetRange(index, list.Count - index);
         list.RemoveRange(index, list.Count - index);
         list.InsertRange(0, range);
     }
 }
コード例 #3
0
ファイル: Node.cs プロジェクト: samcf111/unityMono5.5.0
        /// <summary>
        /// Matches the header collection against this subtree and uses the matchList
        /// and any new matches to augment the result.  This method calls ProcessSubtree()
        /// but then removes the matches that it adds to the matchList.
        /// </summary>
        /// <param name="header">the header collection to evaluate (invariant)</param>
        /// <param name="result">the result of the match (might be changed if a match is found)</param>
        /// <param name="matchList">the matches to use to do substitutions (invariant)</param>
        /// <returns>true iff this node or one of it's descendants matches</returns>
        internal bool Process(System.Collections.Specialized.NameValueCollection header, nBrowser.Result result,
                              System.Collections.Generic.List <Match> matchList)
        {
            // The real work is done in ProcessSubtree.  This method just ensures that matchList is restored
            // to its original state before returning.
            int  origMatchListCount = matchList.Count;
            bool matched            = ProcessSubtree(header, result, matchList);

            if (matchList.Count > origMatchListCount)
            {
                matchList.RemoveRange(origMatchListCount, matchList.Count - origMatchListCount);
            }
            return(matched);
        }
コード例 #4
0
ファイル: Queue.cs プロジェクト: zoltraks/energy-core-csharp
        /// <summary>
        /// Put element at the end of queue.
        /// If limit is reached, function will return false and element will not be put
        /// at the end of the queue unless Ring option is set.
        /// </summary>
        /// <param name="item">Element</param>
        /// <returns></returns>
        public bool Push(T item)
        {
            bool signal = false;

            try
            {
                lock (_List)
                {
                    if (Limit > 0 && _List.Count >= Limit)
                    {
                        if (Ring)
                        {
                            int count = 1 + Limit - _List.Count;
                            _List.RemoveRange(0, count);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                    _List.Add(item);
                    signal = true;
                    return(true);
                }
            }
            finally
            {
                _PushResetEvent.Set();
                if (signal)
                {
                    if (OnPush != null)
                    {
                        OnPush(this);
                    }
                }
            }
        }
コード例 #5
0
    public void Build(System.Collections.Generic.List <string> scenesToBuild, UnityEditor.BuildTarget buildTarget, UnityEditor.BuildOptions buildOptions)
    {
        Console.WriteLine("ios without bundle PreBuild");
        BuilderHelper.BootSceneFilename = "Assets/Scenes/Boot/PreBoot.unity";
        //Remove all scenes except the first 3 basic ones

        const int basicSceneCount = 7;

        if (scenesToBuild.Count > basicSceneCount)
        {
            scenesToBuild.RemoveRange(basicSceneCount, scenesToBuild.Count - basicSceneCount);
        }
        InJoy.UnityBuildSystem.AutoBuild.UnityBuildPlayer(scenesToBuild, buildTarget, buildOptions);
        Console.WriteLine("ios without bundle PostBuild");
    }
コード例 #6
0
 static public int RemoveRange(IntPtr l)
 {
     try {
         System.Collections.Generic.List <WWWRequest> self = (System.Collections.Generic.List <WWWRequest>)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         self.RemoveRange(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #7
0
 private void btnStop_Click(object sender, EventArgs e)
 {
     service.SetListBox(string.Format("当前连接用户数:{0}", userList.Count));
     service.SetListBox("开始停止服务,并依此使用用户退出");
     service.Send2All(userList, "End,see you next time"); //服务器断开,end
     for (int i = 0; i < userList.Count; i++)
     {
         userList[i].threadReceive.Abort();
         userList[i].client.Close();
     }
     userList.RemoveRange(0, userList.Count);
     myListener.Stop();
     btnStart.Enabled         = true;
     btnStop.Enabled          = false;
     textBoxMaxTables.Enabled = true;
     textBoxMaxUsers.Enabled  = true;
 }
コード例 #8
0
    public void Build(System.Collections.Generic.List <string> scenesToBuild, UnityEditor.BuildTarget buildTarget, UnityEditor.BuildOptions buildOptions)
    {
        Console.WriteLine("ios_binary_with_special_bundle begin");

        BuilderHelper.BootSceneFilename = "Assets/Scenes/Boot/PreBoot.unity";
        const int basicSceneCount = 7;

        if (scenesToBuild.Count > basicSceneCount)
        {
            scenesToBuild.RemoveRange(basicSceneCount, scenesToBuild.Count - basicSceneCount);
        }
        BuilderHelper.CleanStreamingAssets();
        BuilderHelper.Build(ref scenesToBuild, ref buildTarget, ref buildOptions, this, "index", null, false);
        BuilderHelper.CopyToStreamingAssets();

        InJoy.UnityBuildSystem.AutoBuild.UnityBuildPlayer(scenesToBuild, buildTarget, buildOptions);
        Console.WriteLine("ios_binary_with_special_bundle end");
    }
コード例 #9
0
        static int RemoveRange(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            System.Collections.Generic.List <int> __cl_gen_to_be_invoked = (System.Collections.Generic.List <int>)translator.FastGetCSObj(L, 1);


            try {
                {
                    int index = LuaAPI.xlua_tointeger(L, 2);
                    int count = LuaAPI.xlua_tointeger(L, 3);

                    __cl_gen_to_be_invoked.RemoveRange(index, count);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
コード例 #10
0
        private IEnumerable <BFUDetailsRowColumn <TItem> > GetJustifiedColumns(IEnumerable <BFUDetailsRowColumn <TItem> > newColumns, CheckboxVisibility newCheckboxVisibility, SelectionMode newSelectionMode, double viewportWidth, int resizingColumnIndex)
        {
            var    rowCheckWidth      = newSelectionMode != SelectionMode.None && newCheckboxVisibility != CheckboxVisibility.Hidden ? 48 : 0; //DetailsRowCheckbox width
            var    groupExpandedWidth = 0;                                                                                                     //skipping this for now.
            double totalWidth         = 0;
            var    availableWidth     = viewportWidth - (rowCheckWidth + groupExpandedWidth);
            int    count = 0;

            System.Collections.Generic.List <BFUDetailsRowColumn <TItem> > adjustedColumns = new System.Collections.Generic.List <BFUDetailsRowColumn <TItem> >();
            foreach (var col in newColumns)
            {
                adjustedColumns.Add(col);
                col.CalculatedWidth = !double.IsNaN(col.MinWidth) ? col.MinWidth : 100;
                if (_columnOverrides.TryGetValue(col.Key, out var overridenWidth))
                {
                    col.CalculatedWidth = overridenWidth;
                }

                var isFirst = count + resizingColumnIndex == 0;
                totalWidth += GetPaddedWidth(col, isFirst);
            }

            var lastIndex = adjustedColumns.Count() - 1;

            // Shrink or remove collapsable columns.
            while (lastIndex > 0 && totalWidth > availableWidth)
            {
                var col           = adjustedColumns.ElementAt(lastIndex);
                var minWidth      = !double.IsNaN(col.MinWidth) ? col.MinWidth : 100;
                var overflowWidth = totalWidth - availableWidth;

                if (col.CalculatedWidth - minWidth >= overflowWidth || !col.IsCollapsible)
                {
                    var originalWidth = col.CalculatedWidth;
                    col.CalculatedWidth = Math.Max(col.CalculatedWidth - overflowWidth, minWidth);
                    totalWidth         -= originalWidth - col.CalculatedWidth;
                }
                else
                {
                    totalWidth -= GetPaddedWidth(col, false);
                    adjustedColumns.RemoveRange(lastIndex, 1);
                }
                lastIndex--;
            }

            //Then expand columns starting at the beginning, until we've filled the width.
            for (var i = 0; i < adjustedColumns.Count && totalWidth < availableWidth; i++)
            {
                var col          = adjustedColumns[i];
                var isLast       = i == adjustedColumns.Count - 1;
                var hasOverrides = _columnOverrides.TryGetValue(col.Key, out var overrides);
                if (hasOverrides && !isLast)
                {
                    continue;
                }

                var    spaceLeft = availableWidth - totalWidth;
                double increment = 0;
                if (isLast)
                {
                    increment = spaceLeft;
                }
                else
                {
                    var maxWidth = col.MaxWidth;
                    var minWidth = !double.IsNaN(col.MinWidth) ? col.MinWidth : (!double.IsNaN(col.MaxWidth) ? col.MaxWidth : 100);
                    increment = !double.IsNaN(maxWidth) ? Math.Min(spaceLeft, maxWidth - minWidth) : spaceLeft;
                }

                col.CalculatedWidth += increment;
                totalWidth          += increment;
            }

            return(adjustedColumns);
        }
コード例 #11
0
 public void ReisenRemoveRange(int index, int count)
 {
     dieReisen.RemoveRange(index, count);
 }
コード例 #12
0
ファイル: dfRadialSprite.cs プロジェクト: Virobeast2/RCLIENT
    private void buildMeshData(ref System.Collections.Generic.List <Vector3> verts, ref System.Collections.Generic.List <int> indices, ref System.Collections.Generic.List <Vector2> uv)
    {
        System.Collections.Generic.List <Vector3> list = verts = new System.Collections.Generic.List <Vector3>();
        verts.AddRange(baseVerts);
        int num   = 8;
        int index = -1;

        switch (this.fillOrigin)
        {
        case dfPivotPoint.TopLeft:
            num   = 4;
            index = 5;
            list.RemoveAt(6);
            list.RemoveAt(0);
            break;

        case dfPivotPoint.TopCenter:
            num   = 6;
            index = 0;
            break;

        case dfPivotPoint.TopRight:
            num   = 4;
            index = 0;
            list.RemoveAt(2);
            list.RemoveAt(0);
            break;

        case dfPivotPoint.MiddleLeft:
            num   = 6;
            index = 6;
            break;

        case dfPivotPoint.MiddleCenter:
            num = 8;
            list.Add(list[0]);
            list.Insert(0, Vector3.zero);
            index = 0;
            break;

        case dfPivotPoint.MiddleRight:
            num   = 6;
            index = 2;
            break;

        case dfPivotPoint.BottomLeft:
            num   = 4;
            index = 4;
            list.RemoveAt(6);
            list.RemoveAt(4);
            break;

        case dfPivotPoint.BottomCenter:
            num   = 6;
            index = 4;
            break;

        case dfPivotPoint.BottomRight:
            num   = 4;
            index = 2;
            list.RemoveAt(4);
            list.RemoveAt(2);
            break;

        default:
            throw new NotImplementedException();
        }
        this.makeFirst(list, index);
        System.Collections.Generic.List <int> list2 = indices = this.buildTriangles(list);
        float stepSize = 1f / ((float)num);
        float num4     = base.fillAmount.Quantize(stepSize);
        int   num5     = Mathf.CeilToInt(num4 / stepSize) + 1;

        for (int i = num5; i < num; i++)
        {
            if (base.invertFill)
            {
                list2.RemoveRange(0, 3);
            }
            else
            {
                list.RemoveAt(list.Count - 1);
                list2.RemoveRange(list2.Count - 3, 3);
            }
        }
        if (base.fillAmount < 1f)
        {
            int   num7 = list2[!base.invertFill ? (list2.Count - 2) : 2];
            int   num8 = list2[!base.invertFill ? (list2.Count - 1) : 1];
            float t    = (base.FillAmount - num4) / stepSize;
            list[num8] = Vector3.Lerp(list[num7], list[num8], t);
        }
        uv = this.buildUV(list);
        float   num10   = base.PixelsToUnits();
        Vector2 vector  = (Vector2)(num10 * base.size);
        Vector3 vector2 = (Vector3)(base.pivot.TransformToCenter(base.size) * num10);

        for (int j = 0; j < list.Count; j++)
        {
            list[j] = Vector3.Scale(list[j], (Vector3)vector) + vector2;
        }
    }
コード例 #13
0
ファイル: List.cs プロジェクト: sasiit23/smah1
 public void RemoveRange(int index, int count)
 {
     list.RemoveRange(index, count); OnCountChanged();
 }