Пример #1
0
        //-------------------------------------------//

        /// <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);
        }
Пример #2
0
 private void image1_PointerPressed(object sender, PointerRoutedEventArgs e)
 {
     if (!Desk.Children.Contains(currentProject))
     {
         Desk.Children.Add(currentProject);
     }
     ActionActive.Active(currentProject);
 }
Пример #3
0
        //-------------------------------------------//

        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('{');
        }
Пример #4
0
        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;
        }
Пример #5
0
        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++);
        }
Пример #6
0
 /// <summary>
 /// Create a compiler instance with the specified callback on compilation errors.
 /// </summary>
 public Compile(Action <string> onError)
 {
     _onError = onError;
     Script   = new StringBuilder();
 }