// Constructor public DisplayButton() { textcolor = ColorIndex.ControlNormalText; base.FlatStyle = FlatStyle.Flat; corners = new CornerImagesProvider(); corners.ScaleFixedWidth = true; localenabled = true; clicksound = "207"; // short subtile beep clickable = true; normalcolor = ColorIndex.ControlNormal; releasetimer = new Timer(); releasetimer.Interval = 100; releasetimer.Tick += releasetimer_Tick; }
// Constructor public DisplayBar() { corners = new CornerImagesProvider(); normalcolor = ColorIndex.ControlNormal; blockmouseinput = true; }
// Constructor public DisplayCorner() { backcolor = ColorIndex.WindowBackground; curvedetail = 10; }
// Constructor public DisplayFrame() { backcolor = ColorIndex.WindowBackground; }
// This sets a color by index public void SetNormalColor(ColorIndex index, Color c) { normalcolors[(int)index] = c; }
// This returns a color by index public Color GetNormalColor(ColorIndex index) { return normalcolors[(int)index]; }
public Color this[ColorIndex colorindex] { get { return currentcolors[(int)colorindex]; } }
/// <summary> /// 单元格背景色及填充方式 /// </summary> /// <param name="startRow">起始行</param> /// <param name="startColumn">起始列</param> /// <param name="endRow">结束行</param> /// <param name="endColumn">结束列</param> /// <param name="color">颜色索引</param> /// <param name="pattern">填充方式</param> public void CellsBackColor(int startRow, int startColumn, int endRow, int endColumn, ColorIndex color, Pattern pattern) { Excel.Range range = myExcel.get_Range(myExcel.Cells[startRow, startColumn], myExcel.Cells[endRow, endColumn]); range.Interior.ColorIndex = color; range.Interior.Pattern = pattern; }
// Constructor public DisplayLabel() { backcolor = ColorIndex.WindowBackground; forecolor = ColorIndex.WindowText; }
/// <summary> /// 单元格背景色及填充方式 /// </summary> /// <param name="startRow">起始行</param> /// <param name="startColumn">起始列</param> /// <param name="endRow">结束行</param> /// <param name="endColumn">结束列</param> /// <param name="color">颜色索引</param> public void SetCellsBackColor(int startRow, int startColumn, int endRow, int endColumn, ColorIndex color) { Excel.Range range = excelApp.get_Range(excelApp.Cells[startRow, startColumn], excelApp.Cells[endRow, endColumn]); range.Interior.ColorIndex = color; }
// Constructor public DisplayArrow() { color = ColorIndex.ControlColor1; direction = 0; }
/// <summary> /// 字体颜色 /// </summary> /// <param name="startRow">起始行</param> /// <param name="startColumn">起始列</param> /// <param name="endRow">结束行</param> /// <param name="endColumn">结束列</param> /// <param name="color">颜色索引</param> public void FontColor(int startRow, int startColumn, int endRow, int endColumn, ColorIndex color) { Excel.Range range = myExcel.get_Range(myExcel.Cells[startRow, startColumn], myExcel.Cells[endRow, endColumn]); range.Font.ColorIndex = color; }
/// <summary> /// 绘制指定单元格的边框 /// </summary> /// <param name="startRow">起始行</param> /// <param name="startColumn">起始列</param> /// <param name="endRow">结束行</param> /// <param name="endColumn">结束列</param> /// <param name="isDrawTop">是否画上外框</param> /// <param name="isDrawBottom">是否画下外框</param> /// <param name="isDrawLeft">是否画左外框</param> /// <param name="isDrawRight">是否画右外框</param> /// <param name="isDrawHInside">是否画水平内框</param> /// <param name="isDrawVInside">是否画垂直内框</param> /// <param name="isDrawDown">是否画斜向下线</param> /// <param name="isDrawUp">是否画斜向上线</param> /// <param name="lineStyle">线类型</param> /// <param name="borderWeight">线粗细</param> /// <param name="color">线颜色</param> public void CellsDrawFrame(int startRow, int startColumn, int endRow, int endColumn, bool isDrawTop, bool isDrawBottom, bool isDrawLeft, bool isDrawRight, bool isDrawHInside, bool isDrawVInside, bool isDrawDiagonalDown, bool isDrawDiagonalUp, LineStyle lineStyle, BorderWeight borderWeight, ColorIndex color) { //获取画边框的单元格 Excel.Range range = myExcel.get_Range(myExcel.Cells[startRow, startColumn], myExcel.Cells[endRow, endColumn]); //清除所有边框 range.Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = LineStyle.无; range.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = LineStyle.无; range.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = LineStyle.无; range.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = LineStyle.无; range.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = LineStyle.无; range.Borders[Excel.XlBordersIndex.xlInsideVertical].LineStyle = LineStyle.无; range.Borders[Excel.XlBordersIndex.xlDiagonalDown].LineStyle = LineStyle.无; range.Borders[Excel.XlBordersIndex.xlDiagonalUp].LineStyle = LineStyle.无; //以下是按参数画边框 if (isDrawTop) { range.Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlEdgeTop].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlEdgeTop].ColorIndex = color; } if (isDrawBottom) { range.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlEdgeBottom].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlEdgeBottom].ColorIndex = color; } if (isDrawLeft) { range.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlEdgeLeft].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlEdgeLeft].ColorIndex = color; } if (isDrawRight) { range.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlEdgeRight].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlEdgeRight].ColorIndex = color; } if (isDrawVInside) { range.Borders[Excel.XlBordersIndex.xlInsideVertical].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlInsideVertical].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlInsideVertical].ColorIndex = color; } if (isDrawHInside) { range.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlInsideHorizontal].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlInsideHorizontal].ColorIndex = color; } if (isDrawDiagonalDown) { range.Borders[Excel.XlBordersIndex.xlDiagonalDown].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlDiagonalDown].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlDiagonalDown].ColorIndex = color; } if (isDrawDiagonalUp) { range.Borders[Excel.XlBordersIndex.xlDiagonalUp].LineStyle = lineStyle; range.Borders[Excel.XlBordersIndex.xlDiagonalUp].Weight = borderWeight; range.Borders[Excel.XlBordersIndex.xlDiagonalUp].ColorIndex = color; } }
private void TokenInfoParsed(Token token, TokenType type, ColorIndex color) { TokenInfo info = new TokenInfo(token.Start.Index, token.End.Index - 1, type); info.Color = (TokenColor)color; scannedTokens.Enqueue(info); }
public void SetDamageNum(ColorIndex color, int tValue, float tSize) { //////Debug.log("SetDamageNum(tValue:"+tValue+", tSize:"+tSize+", tKind:"+tKind+")"); Destroy(gameObject, 0.3f); int i; float startPos; if(Texture_Num_Damage[0] == null) { strBuffer.Remove(0, strBuffer.Length); switch (color) { case ColorIndex.RED: { strBuffer.Append("Images/Number/num_red_"); } break; case ColorIndex.BLUE: { strBuffer.Append("Images/Number/num_blue_"); } break; case ColorIndex.YELLOW: { strBuffer.Append("Images/Number/num_yellow_"); } break; } if (string.IsNullOrEmpty(strBuffer.ToString()) == true) { return; } for(i=0;i<Texture_Num_Damage.Length;i++) { strBuffer.Append(i.ToString()); Texture_Num_Damage[i] = Resources.Load(strBuffer.ToString()) as Texture; strBuffer.Remove(strBuffer.Length - 1, 1); } } if(Script_DamageCount == null) { Script_DamageCount = transform.GetComponent<Code_DamageCount>(); } length = 0; for(i=0;i<numArray.Length;i++) { numArray[i] = tValue%10; length++; tValue/=10; if(tValue == 0) break; } startPos = -(tSize*0.8f*length)/2f; for(i=0;i<child.Length;i++) { child[i] = transform.FindChild(""+i).gameObject; child[i].transform.localScale = new Vector3(tSize,tSize,tSize); child[i].transform.localPosition = new Vector3(startPos + (i * (tSize * 0.8f)), child[i].transform.localPosition.y + 1.1f, child[i].transform.localPosition.z - 0.1f); if(i < length) { child[i].SetActive(true); child[i].renderer.material.mainTexture = Texture_Num_Damage[numArray[length - 1 - i]]; child[i].renderer.material.shader = Shader.Find("Unlit/Transparent Colored"); /* if(tKind == 0) child[i].renderer.material.mainTexture = Texture_Num_Damage[numArray[length-1-i]]; else if(tKind == 1) child[i].renderer.material.mainTexture = Texture_Num_CriticalDamage[numArray[length-1-i]]; else //if(tKind == 2) child[i].renderer.material.mainTexture = Texture_Num_SkillDamage[numArray[length-1-i]];*/ } else { child[i].SetActive(false); } } }
public void BorderAround(LineStyle? linestyle = null, BorderWeight? borderweight = null, ColorIndex? colourindex = null) { InternalObject.GetType().InvokeMember("BorderAround", System.Reflection.BindingFlags.InvokeMethod, null, InternalObject, new object[] {linestyle, borderweight, colourindex }); }