//-------------------------------------------// /// <summary> /// Initialize a compilation constructor for a class. /// </summary> public CompileClass(string name, Action <Type> onCompile, Action <string> onError) { Name = name; _onCompile = new ActionActive <Type>(onCompile); _onError = new ActionActive <string>(onError); Script = new StringBuilder(_classPrefix); }
private void image1_PointerPressed(object sender, PointerRoutedEventArgs e) { if (!Desk.Children.Contains(currentProject)) { Desk.Children.Add(currentProject); } ActionActive.Active(currentProject); }
//-------------------------------------------// public CompileMethod(string name, Action <MethodInfo> onCompile, Action <string> onError) { Name = name; _onCompile = new ActionActive <MethodInfo>(onCompile); _onError = new ActionActive <string>(onError); Script = new StringBuilder(_methodPrefix); Script.Append(Class); Script.Append('{'); }
void mv_PointerPressed(object sender, PointerRoutedEventArgs e) { FrameworkElement item = sender as FrameworkElement; IsMove = true; isMouseCaptured = true; ActionActive.Active(designCanvas.getCanvas()); mouseVerticalPosition = e.GetCurrentPoint(designCanvas.getCanvas()).Position.Y; mouseHorizontalPosition = e.GetCurrentPoint(designCanvas.getCanvas()).Position.X; }
public static void ActiveUserControl(FrameworkElement u) { ActionActive.Active(u); //int max = 0; //Panel p=getDesktopPanel(); //foreach (FrameworkElement f in p.Children) //{ // if (Canvas.GetZIndex(f) > max) // { // max = Canvas.GetZIndex(f); // } //} //Canvas.SetZIndex(u, max++); }
/// <summary> /// Create a compiler instance with the specified callback on compilation errors. /// </summary> public Compile(Action <string> onError) { _onError = onError; Script = new StringBuilder(); }