messimmous

MyPasteTitle

May 15th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Drawing;
  7. using System.IO;
  8.  
  9. namespace Песочница_курсовая_ООП
  10. {
  11.     class CShape
  12.     {
  13.        
  14.         private Vector COORDINATES;
  15.         private Color COLOR;
  16.         private bool SELECTED;
  17.         public bool Selected { get { return this.SELECTED; } }
  18.  
  19.         public Vector Coordinates
  20.         {
  21.             get { return COORDINATES; }
  22.             set
  23.             {
  24.  
  25.                 COORDINATES = value;
  26.             }
  27.         }
  28.         public Color color
  29.         {
  30.             get { return COLOR; }
  31.             set
  32.             {
  33.  
  34.                 COLOR = value;
  35.             }
  36.         }
  37.         public bool selected
  38.         {
  39.             get { return SELECTED; }
  40.             set
  41.             {
  42.  
  43.                 SELECTED = value;
  44.             }
  45.         }
  46.  
  47.  
  48.         public virtual void Select()
  49.         {
  50.             selected=!selected;
  51.         }
  52.  
  53.  
  54.         public virtual void ColorChange(Color color)
  55.         {
  56.             this.color = color;
  57.          
  58.         }
  59.  
  60.         public virtual bool Shot(int x, int y)
  61.         {
  62.             return false;
  63.         }
  64.         public virtual void Draw(Graphics e)
  65.         {
  66.             ;
  67.         }
  68.         public virtual bool Check(int Height, int Width)
  69.         {
  70.            
  71.             return false;
  72.         }
  73.  
  74.         public virtual bool FullCheck(int Height, int Width, STORAGE a1, int numb)
  75.         {
  76.             return false;
  77.         }
  78.  
  79.         public virtual void StableMove (Vector delta)
  80.         {
  81.             this.Coordinates += delta;
  82.            /* this.Coordinates.x+=delta.x;
  83.             this.Coordinates.y+=delta.y;*/
  84.            
  85.         }
  86.  
  87.         public virtual void ControlledMove(Vector delta, int Height, int Width, STORAGE a1, int numb)
  88.         {
  89.             this.StableMove(delta);
  90.             if (!this.FullCheck(Height, Width,a1, numb))
  91.             {
  92.                 delta *= (-1);
  93.                 this.StableMove(delta);
  94.             }
  95.  
  96.         }
  97.         public virtual void Resize(double delta)
  98.         {
  99.             ;
  100.         }
  101.         public virtual void ControlledResize(double delta, int Height, int Width)
  102.         {
  103.             this.Resize(delta);
  104.             if(!this.Check(Height, Width))
  105.             {
  106.                 this.Resize(-delta);
  107.             }
  108.         }
  109.         public virtual void Save(ref StreamWriter MyWriter)
  110.         {
  111.             ;
  112.         }
  113.         public virtual void Load(ref StreamReader MyReader)
  114.         {
  115.             ;
  116.         }
  117.  
  118.     }
  119.  
  120.     }
Advertisement
Add Comment
Please, Sign In to add comment