2 using System.Collections;
3 using System.Collections.Generic;
7 using System.Threading.Tasks;
9 using System.Windows.Media;
10 using System.Windows.Shapes;
21 ArrayList ret =
new ArrayList();
24 ui.
label =
"Triangle";
25 System.Reflection.Assembly myAssembly = System.Reflection.Assembly.GetExecutingAssembly();
26 System.IO.Stream myStream = myAssembly.GetManifestResourceStream(
"ShapeLib.icons.triangle.png");
27 ui.
image =
new System.Drawing.Bitmap(myStream);
46 Polygon myTri =
new Polygon();
50 PointCollection Points =
new PointCollection();
57 myTri.Points =
new PointCollection(Points);
58 myTri.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
59 myTri.VerticalAlignment = VerticalAlignment.Center;
71 PointCollection Points =
new PointCollection();
76 myTri.Points =
new PointCollection(Points);
88 Polyline myTri =
new Polyline();
91 myTri.Stroke =
new SolidColorBrush(System.Windows.Media.Color.FromRgb(255, 255, 0));
92 PointCollection Points =
new PointCollection();
97 myTri.Points =
new PointCollection(Points);
98 myTri.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
99 myTri.VerticalAlignment = VerticalAlignment.Center;
112 PointCollection Points =
new PointCollection();
117 myTri.Points =
new PointCollection(Points);
override void DisplayControlPoints(gView gv, gPath data)
RibbonControlEventHandler click
string belong
判斷按下Button控制項
override System.Collections.ArrayList getMenuItem()
覆寫System.Collections.ArrayList
System.Windows.Point controlBtn4
某一類的形狀.包含UI 的界面,繪製方式.更新方式.新增方式
void myLine_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
void myLine_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
override void DrawShape(gView gv, gPath data, Boolean bfirst)
依data 繪製,如果是第一次畫要新建shape, 更新的話只要更新最後一點
System.Windows.Point controlBtn1
void myLine_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
void btn_Click(object sender, RibbonControlEventArgs e)
UI 點選
System.Drawing.Image image
List< Shape > controlShape