コード例 #1
0
        //
        // API
        //

        public void Clear()
        {
            colorPool = new ColorPool();

            // The first color is white, skip it
            colorPool.GetColorForId("MultiSessionView1");

            DeleteSessions(sessions.ToArray());
        }
コード例 #2
0
 private void Awake()
 {
     if (Instance != null)
     {
         return;
     }
     Instance = this;
     DontDestroyOnLoad(gameObject);
     _poolMaterialsMinions  = new Dictionary <Color, Material>();
     _poolMaterialsFragment = new Dictionary <Color, Material>();
 }
コード例 #3
0
        /// <summary>
        /// 필드 행 꾸미기
        /// </summary>
        private void DecorateFieldRow(Excel.Worksheet worksheet, Schema flatSchema)
        {
            if (flatSchema.FieldCount == 0 || !ColorPool.Any())
            {
                return;
            }

            Excel.Range sheetCells   = worksheet.Cells;
            int         colorPoolIdx = 0;
            int         nameRowIdx   = MarginRowCount + 1;
            int         colStartIdx  = MarginColumnCount + 1;
            int         colEndIdx    = MarginColumnCount + flatSchema.FieldCount;

            Excel.Range nameRange = sheetCells.Range[sheetCells[nameRowIdx, colStartIdx], sheetCells[nameRowIdx, colEndIdx]];
            nameRange.Cells.Interior.ColorIndex = 0;

            // 이름 위치에 컬럼 검색 필터 적용
            nameRange.AutoFilter(1, VisibleDropDown: true);

            // 이름 너비로 컬럼 크기 맞춤
            nameRange.Columns.AutoFit();

            Schema schema = linker.GetSchema(flatSchema.Name);

            int fieldColStartIdx = colStartIdx;

            // 색칠
            foreach (Field field in schema.Fields)
            {
                int count          = GetFieldCellCount(field);
                int fieldColEndIdx = fieldColStartIdx + count - 1;

                if (count > 1)
                {
                    if (ColorPool.Length > 0)
                    {
                        Excel.Range range = sheetCells.Range[sheetCells[nameRowIdx, fieldColStartIdx], sheetCells[nameRowIdx, fieldColEndIdx]];
                        range.Interior.Color = ColorPool[colorPoolIdx];
                        colorPoolIdx         = (colorPoolIdx + 1) % ColorPool.Length;
                    }
                }

                fieldColStartIdx = fieldColEndIdx + 1;
            }
        }
コード例 #4
0
ファイル: MultiSessionView.cs プロジェクト: SayHalou/ospy
        //
        // API
        //

        public void Clear()
        {
            colorPool = new ColorPool();

            // The first color is white, skip it
            colorPool.GetColorForId("MultiSessionView1");

            DeleteSessions(sessions.ToArray());
        }