vba代码转换为C#代码
Selection.Style=ActiveDocument.Styles("对选中文字加点")Selection.Style=ActiveDocument.Styles...
Selection.Style = ActiveDocument.Styles("对选中文字加点")
Selection.Style = ActiveDocument.Styles("顶端对齐") 展开
Selection.Style = ActiveDocument.Styles("顶端对齐") 展开
4个回答
展开全部
这不是已经是C#代码吗?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
float[]
pts;
float[]
pts_1;
Double
TempX;
Double
TempY;
Single[]
pts;
Single[]
pts_1;
Double
TempR;
TempX
=
Ox
+
(x1
*
10)
TempY
=
Oy
-
(y1
*
10)
TempR
=
r
*
10
c#没有redim
数组直接赋值即可
pts.setValue(Value_R.toString("f2"),Cont_Flag,1);
//如果Value_R是double型的话
double
TempR;
double
TempX;
double
TempY;
double
TempX
=
0;
double
TempY
=
0;
double
TempR
=
0;
TempX
=
Ox
+
(x1
*
10);
TempY
=
Oy
-
(y1
*
10);
TempR
=
r
*
10;
float[,]
pts
=
new
float[Node_Num,
2];
//C#的数组必须从
0
开始
float[,]
pts_1
=
new
float[Node_Num,
2];
//
pts[Count_Flag,
0]
=
float.Parse(string.Format(Value_R,
"###0.00"));
pts[Count_Flag,
1]
=
float.Parse(string.Format(Value_C_Min,
"###0.00"));
另有
ActiveDocument.Shapes[ListBox1.SelectedItem.ToString()].Rotation
=
ConvertNum(TextBox1.Value);//ConvertNum
pts;
float[]
pts_1;
Double
TempX;
Double
TempY;
Single[]
pts;
Single[]
pts_1;
Double
TempR;
TempX
=
Ox
+
(x1
*
10)
TempY
=
Oy
-
(y1
*
10)
TempR
=
r
*
10
c#没有redim
数组直接赋值即可
pts.setValue(Value_R.toString("f2"),Cont_Flag,1);
//如果Value_R是double型的话
double
TempR;
double
TempX;
double
TempY;
double
TempX
=
0;
double
TempY
=
0;
double
TempR
=
0;
TempX
=
Ox
+
(x1
*
10);
TempY
=
Oy
-
(y1
*
10);
TempR
=
r
*
10;
float[,]
pts
=
new
float[Node_Num,
2];
//C#的数组必须从
0
开始
float[,]
pts_1
=
new
float[Node_Num,
2];
//
pts[Count_Flag,
0]
=
float.Parse(string.Format(Value_R,
"###0.00"));
pts[Count_Flag,
1]
=
float.Parse(string.Format(Value_C_Min,
"###0.00"));
另有
ActiveDocument.Shapes[ListBox1.SelectedItem.ToString()].Rotation
=
ConvertNum(TextBox1.Value);//ConvertNum
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
代码不全啊
很难理解
//
float和Single小数点位数也有点对不上
float
arrayPoints
=
new
float[7][2];
arrayPoints
[0][0]
=
sourceX;
arrayPoints[0][1]
=
SourceY;
arrayPoints[1][0]
=
sourceX;
arrayPoints[1][1]
=
SourceY;
arrayPoints[1][1]
=
SourceY;
arrayPoints[2][0]
=
nodeX
-
(targetX
-
sourceX)/4;
arrayPoints[2][1]
=
nodeY
-
(targetY
-
sourceY)
/
4
arrayPoints[3][0]
=
nodeX
;
arrayPoints[3][1]
=
nodeY
;
arrayPoints[4][0]
=
nodeX
+
(targetX
-
sourceX)
/
4
;
arrayPoints[4][1]
=
nodeY
+
(targetY
-
sourceY)
/
4
;
arrayPoints[5][0]
=
targetX
;
arrayPoints[5][1]
=
targetY
;
arrayPoints[6][0]
=
targetX
;
arrayPoints[6][1]
=
targetY
;
//
最后一句话像是画图形?画线段?对应的C#好像没见过这方法
但是有个G.DrawRectangle()方法。
不知道能不能对应上。
很难理解
//
float和Single小数点位数也有点对不上
float
arrayPoints
=
new
float[7][2];
arrayPoints
[0][0]
=
sourceX;
arrayPoints[0][1]
=
SourceY;
arrayPoints[1][0]
=
sourceX;
arrayPoints[1][1]
=
SourceY;
arrayPoints[1][1]
=
SourceY;
arrayPoints[2][0]
=
nodeX
-
(targetX
-
sourceX)/4;
arrayPoints[2][1]
=
nodeY
-
(targetY
-
sourceY)
/
4
arrayPoints[3][0]
=
nodeX
;
arrayPoints[3][1]
=
nodeY
;
arrayPoints[4][0]
=
nodeX
+
(targetX
-
sourceX)
/
4
;
arrayPoints[4][1]
=
nodeY
+
(targetY
-
sourceY)
/
4
;
arrayPoints[5][0]
=
targetX
;
arrayPoints[5][1]
=
targetY
;
arrayPoints[6][0]
=
targetX
;
arrayPoints[6][1]
=
targetY
;
//
最后一句话像是画图形?画线段?对应的C#好像没见过这方法
但是有个G.DrawRectangle()方法。
不知道能不能对应上。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询