2 using System.Collections;
3 using System.Collections.Generic;
6 using System.Threading.Tasks;
8 using System.Windows.Media;
9 using System.Windows.Shapes;
20 ArrayList ret =
new ArrayList();
23 ui.
label =
"Rectangle";
25 System.Reflection.Assembly myAssembly = System.Reflection.Assembly.GetExecutingAssembly();
26 System.IO.Stream myStream = myAssembly.GetManifestResourceStream(
"ShapeLib.icons.rectangle.png");
27 ui.
image =
new System.Drawing.Bitmap(myStream);
47 Rectangle myRect =
new Rectangle();
54 myRect.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
55 myRect.VerticalAlignment = VerticalAlignment.Center;
68 Rectangle myRect = (Rectangle)gv.
baseShape[0];
83 Rectangle myRect =
new Rectangle();
84 myRect.Stroke =
new SolidColorBrush(System.Windows.Media.Color.FromRgb(255, 0, 0));
88 myRect.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
89 myRect.VerticalAlignment = VerticalAlignment.Center;
RibbonControlEventHandler click
override System.Collections.ArrayList getMenuItem()
覆寫System.Collections.ArrayList
string belong
判斷按下Button控制項
override void DisplayControlPoints(gView gv, gPath data)
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