コード例 #1
0
ファイル: Target.cs プロジェクト: AlexandrSurkov/PKStudio
 public void ClearAll()
 {
     this.name = "";
     this.num = 0;
     this.tooltype = TOOL_TYPE.ARM_ADS;
     this.options = new TargetOptions();
     this.filesoptions = new List<FileOptions>();
 }
コード例 #2
0
ファイル: Target.cs プロジェクト: schifflee/PKStudio
 public void ClearAll()
 {
     this.name         = "";
     this.num          = 0;
     this.tooltype     = TOOL_TYPE.ARM_ADS;
     this.options      = new TargetOptions();
     this.filesoptions = new List <FileOptions>();
 }
コード例 #3
0
 public DrawPolyline(PointLatLng p1, PointLatLng p2, int zoom, TOOL_TYPE type)
     : base()
 {
     property = new PropertyLine();
     property.LocalPosition = p1;
     property.DefaultZoom   = zoom;
     property.Type          = type;
     Overlay = Global.control.Overlays.Count - 1;
     PointsArray.Add(p1);
     PointsArray.Add(p2);
 }
コード例 #4
0
        public DrawPolygon(int x, int y, int zoom, TOOL_TYPE type)
            : base()
        {
            property               = new PropertyPolygon();
            property.DefaultZoom   = zoom;
            property.LocalPosition = Global.control.FromLocalToLatLng(x, y);
            property.Type          = type;
            Overlay = Global.control.Overlays.Count - 1;

            PointsArray.Add(Global.control.FromLocalToLatLng(x, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + 30, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + 30, y + 30));
            PointsArray.Add(Global.control.FromLocalToLatLng(x, y + 30));
        }
コード例 #5
0
        public DrawPolyline(int x, int y, int zoom, TOOL_TYPE type)
            : base()
        {
            property = new PropertyLine();
            property.LocalPosition = Global.control.FromLocalToLatLng(x, y);
            property.DefaultZoom   = zoom;
            property.Type          = type;

            Overlay = Global.control.Overlays.Count - 1;

            PointLatLng p;

            p = Global.control.FromLocalToLatLng(x, y);
            PointsArray.Add(p);
            p = Global.control.FromLocalToLatLng(x + 15, y + 15);
            PointsArray.Add(p);
        }
コード例 #6
0
ファイル: DrawEllipse.cs プロジェクト: cyberslacking/Fork
        public DrawEllipse(int x, int y,int zoom, TOOL_TYPE type)
            : base()
        {
            property = new PropertyPolygon();
            property.LocalPosition = Global.control.FromLocalToLatLng(x, y);
            property.DefaultZoom = zoom;
            property.Type = type;

            Overlay = Global.control.Overlays.Count - 1;

            Rectangle rect = new Rectangle(x, y, 40, 40);

            PointsArray.Add(Global.control.FromLocalToLatLng(x, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rect.Width, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rect.Width, y + rect.Height));
            PointsArray.Add(Global.control.FromLocalToLatLng(x, y + rect.Height));

            SetRectangle(rect);
        }
コード例 #7
0
ファイル: DrawImage.cs プロジェクト: cyberslacking/Fork
        public DrawImage(int x, int y, int zoom, TOOL_TYPE type)
            : base()
        {
            property               = new PropertyImage();
            property.DefaultZoom   = zoom;
            property.Type          = type;
            property.LocalPosition = Global.control.FromLocalToLatLng(x, y);

            Overlay = Global.control.Overlays.Count - 1;

            Bitmap    bmp  = new Bitmap(property.ImageFile);
            Rectangle rect = new Rectangle(x, y, (int)bmp.Width * 3 / 4, (int)bmp.Height * 3 / 4);

            PointsArray.Add(Global.control.FromLocalToLatLng(x, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rect.Width, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rect.Width, y + rect.Height));
            PointsArray.Add(Global.control.FromLocalToLatLng(x, y + rect.Height));

            SetRectangle(rect);
        }
コード例 #8
0
ファイル: DrawMarker.cs プロジェクト: cyberslacking/Fork
        public DrawMarker(long pid, int x, int y, int zoom, TOOL_TYPE type, MARKER_TYPE markerType)
            : base()
        {
            PointLatLng latlng = Global.control.FromLocalToLatLng(x, y);

            PointsArray.Add(latlng);

            property               = new PropertyMarker();
            property.DefaultZoom   = zoom;
            property.LocalPosition = latlng;
            property.Type          = type;
            property.MarkerType    = markerType;
            if (type == TOOL_TYPE.camera)
            {
                property.ImageFile = @"image\camera_0.ico";
            }
            else if (type == TOOL_TYPE.model)
            {
                property.ImageFile = @"image\model.ico";
            }
            else if (type == TOOL_TYPE.marker)
            {
                if (markerType == MARKER_TYPE.Green)
                {
                    property.ImageFile = @"image\marker_0.ico";
                }
                else if (markerType == MARKER_TYPE.Yellow)
                {
                    property.ImageFile = @"image\marker_2.ico";
                }
                else if (markerType == MARKER_TYPE.Red)
                {
                    property.ImageFile = @"image\marker_1.ico";
                }
                else if (markerType == MARKER_TYPE.Gray)
                {
                    property.ImageFile = @"image\marker_3.ico";
                }
            }
        }
コード例 #9
0
ファイル: DrawText.cs プロジェクト: cyberslacking/Fork
        public DrawText(int x, int y, int zoom, TOOL_TYPE type)
            : base()
        {
            property               = new PropertyText();
            property.DefaultZoom   = zoom;
            property.LocalPosition = Global.control.FromLocalToLatLng(x, y);
            property.Type          = type;

            Overlay = Global.control.Overlays.Count - 1;

            Graphics g    = Graphics.FromImage(new Bitmap(1, 1));
            SizeF    size = g.MeasureString(property.Name, property.Font);

            rectangle = new Rectangle(x, y, (int)(size.Width * 1.5), (int)size.Height);

            PointsArray.Add(Global.control.FromLocalToLatLng(x, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rectangle.Width, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rectangle.Width, y + rectangle.Height));
            PointsArray.Add(Global.control.FromLocalToLatLng(x, y + rectangle.Height));

            //SetRectangle(rectangle);
        }
コード例 #10
0
ファイル: Tool.cs プロジェクト: mattanimation/CreatureCreator
 public Tool()
 {
     this.kind    = TOOL_TYPE.HANDS;
     this.quality = QUALITY.LOW;
 }
コード例 #11
0
 public DrawRectangle(int x, int y, int zoom, TOOL_TYPE type)
     : base(x, y, zoom, type)
 {
     SetRectangle(x, y, 40, 40);
 }