示例#1
0
        public SLImage(IntPtr images, int i)
        {
            this.Kind = (SLImage.Kinds)EaselDLL.GetImageKind(images, i);

            this.End1   = hasEnd1(this.Kind) ? new Point(EaselDLL.GetImageEnd1X(images, i), EaselDLL.GetImageEnd1Y(images, i)) : new Point();
            this.End2   = hasEnd2(this.Kind) ? new Point(EaselDLL.GetImageEnd2X(images, i), EaselDLL.GetImageEnd2Y(images, i)) : new Point();
            this.End3   = hasEnd3(this.Kind) ? new Point(EaselDLL.GetImageEnd3X(images, i), EaselDLL.GetImageEnd3Y(images, i)) : new Point();
            this.Center = hasCenter(this.Kind) ? new Point(EaselDLL.GetImageCenterX(images, i), EaselDLL.GetImageCenterY(images, i)) : new Point();
            this.Radius = hasRadius(this.Kind) ? EaselDLL.GetImageRadius(images, i) : 0;
            this.Height = hasHeight(this.Kind) ? EaselDLL.GetImageHeight(images, i) : 0;
            this.Width  = hasWidth(this.Kind) ? EaselDLL.GetImageWidth(images, i) : 0;
            this.Color  = hasColor(this.Kind) ? Color.FromArgb(EaselDLL.GetImageR(images, i), EaselDLL.GetImageG(images, i), EaselDLL.GetImageB(images, i)) : Color.Black;

            this.Message = "";
            if (hasMessage(this.Kind))
            {
                EaselDLL.GetImageText(images, i, SLInterface.output);
                this.Message = SLInterface.output.ToString();
            }

            this.FileLocation = "";
            if (hasFileLocation(this.Kind))
            {
                EaselDLL.GetGraphicLocation(images, i, SLInterface.output);
                this.FileLocation = SLInterface.output.ToString();
            }
        }
示例#2
0
        public static List <string> getSounds(bool clicked, int x, int y, string keys)
        {
            List <string> retval    = new List <string>();
            StringBuilder inputKeys = new StringBuilder(keys);

            IntPtr sounds = EaselDLL.Sounds(clicked, x, y, inputKeys, state, 0);

            for (int i = 1; i <= EaselDLL.GetSoundCount(sounds); i++)
            {
                EaselDLL.GetSound(sounds, i, output);
                retval.Add(output.ToString());
            }

            EaselDLL.FreeSounds(sounds);

            return(retval);
        }
示例#3
0
        public static List <SLImage> getImages()
        {
            List <SLImage> retval = new List <SLImage>();

            IntPtr images = EaselDLL.Images(state, 0);

            int imagesCount = EaselDLL.GetImageCount(images);

            for (int i = 1; i <= imagesCount; i++)
            {
                retval.Add(new SLImage(images, i));
            }

            EaselDLL.FreeImages(images);

            return(retval);
        }
示例#4
0
 private void bgwEngine_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     EaselDLL.slTerminate();
 }
示例#5
0
        public static void getNewState(bool clicked, int x, int y, string keys)
        {
            StringBuilder inputKeys = new StringBuilder(keys);

            state = EaselDLL.NewState(clicked, x, y, inputKeys, state, 0);
        }
示例#6
0
 public static void getInitialState()
 {
     state = EaselDLL.InitialState(0);
 }