예제 #1
0
 public My_Line(bool creation, Schematix.FSM.Constructor_Core core)
 {
     this.core = core;
     if (creation == true)
     {
         draw       = DrawCreateNew;
         mouse_move = MouseMoveCreateNew;
         mouse_down = MouseDownCreateNew;
         mouse_up   = MouseUpCreateNew;
     }
     else
     {
         draw       = Draw;
         mouse_move = MouseMove;
         mouse_down = MouseDown;
         mouse_up   = MouseUp;
     }
     color_mark = new Color[2];
     UpdateBitmapColors();
     this.name       = "L" + core.Graph.Lines.Count.ToString();
     condition       = "";
     this.priority   = 0;
     label_condition = new My_Label(condition, color, core, this);
     selected        = false;
     selected_mark   = 0;
     creation_pt1    = new Point();
     creation_pt2    = new Point();
     color           = Color.Black;
 }
예제 #2
0
        public My_Signal(Schematix.FSM.Constructor_Core core)
        {
            Color = Color.Yellow;
            if (core.Graph.Language == FSM_Language.VHDL)
            {
                this.Type = "Std_Logic";
            }
            if (core.Graph.Language == FSM_Language.Verilog)
            {
                this.Type = "reg";
            }
            this.name          = ("Variable" + core.Graph.Signals.Count.ToString());
            this.Default_Value = "'0'";
            this.center_point  = new Point(0, 0);
            this.core          = core;

            Type_inf.avaliable = false;
            Type_inf.range1    = "";
            Type_inf.range2    = "";

            mouse_move = MouseMoveCreateNew;
            mouse_up   = MouseUpCreateNew;
            mouse_down = MouseDownCreateNew;
            draw       = Draw;

            UpdateBitmapColors();
            label_name = new My_Label(name, Color, core, this);
        }
예제 #3
0
        public My_Label(My_Label item)
        {
            this.Color        = item.Color;
            this.Text         = item.Text;
            this.core         = item.core;
            this.center_point = item.center_point;

            mouse_down = MouseDown;
            mouse_move = MouseMove;
            mouse_up   = MouseUp;
            draw       = Draw;

            UpdateBitmapColors();
        }
예제 #4
0
 public My_State(Constructor_Core core, Rectangle rect, bool isDraggedState)
 {
     this.core   = core;
     this.rect   = rect;
     color       = Color.Orange;
     color_name  = Color.Black;
     name        = ("S" + core.Graph.States.Count.ToString());
     label_name  = new My_Label(name, color, core, this);
     mouse_move  = MouseMove;
     mouse_up    = MouseUp;
     mouse_down  = MouseDown;
     draw        = Draw;
     color_marks = new Color[8];
     UpdateBitmapColors();
 }
예제 #5
0
 public My_Signal(My_Signal item)
 {
     this.Color            = item.Color;
     this.core             = item.core;
     this.name             = item.name;
     this.Default_Value    = item.Default_Value;
     this.center_point     = item.center_point;
     this.Type             = item.Type;
     this.Type_inf         = item.Type_inf;
     this.label_name       = new My_Label(item.label_name);
     this.label_name.Owner = this;
     mouse_move            = MouseMove;
     mouse_up   = MouseUp;
     mouse_down = MouseDown;
     draw       = Draw;
     UpdateBitmapColors();
 }
예제 #6
0
        public My_Line(My_Line line)
        {
            this.color     = line.color;
            this.condition = line.condition;
            this.core      = line.core;
            this.name      = line.name;
            this.priority  = line.priority;

            this.label_condition       = new My_Label(line.label_condition);
            this.label_condition.Owner = this;

            this.color_mark = new Color[2];
            UpdateBitmapColors();
            mouse_move = MouseMove;
            mouse_down = MouseDown;
            mouse_up   = MouseUp;
            draw       = Draw;
        }
예제 #7
0
        public My_Line(My_State s1, My_State s2, string name, string condition, Schematix.FSM.Constructor_Core core)
        {
            this.core        = core;
            this.state_begin = s1;
            this.state_end   = s2;
            this.name        = name;
            this.condition   = condition;
            this.color       = Color.Black;
            this.priority    = 0;
            selected         = false;
            selected_mark    = 0;

            creation_pt1 = new Point();
            creation_pt2 = new Point();

            this.label_condition       = new My_Label(condition, color, core, this);
            this.label_condition.Owner = this;

            color_mark = new Color[2];
            UpdateBitmapColors();

            /*
             * if ((s1.CenterPoint.X == s2.CenterPoint.X) && (s1.CenterPoint.Y == s2.CenterPoint.Y))
             * {
             *  angle1 = s1.rect.Location;
             *  angle2 = new Point(s1.rect.Location.X, s1.rect.Location.Y + s1.rect.Height);
             * }
             * else
             * {
             *  int deltax = (state_end.CenterPoint.X - state_begin.CenterPoint.X) / 2;
             *  int deltay = (state_end.CenterPoint.Y - state_begin.CenterPoint.Y) / 2;
             *
             *  angle1 = new Point((state_begin.CenterPoint.X + deltax), (state_begin.CenterPoint.Y + deltay));
             *  angle2 = new Point((state_end.CenterPoint.X - deltax), (state_end.CenterPoint.Y - deltay));
             * }
             */
            CreateLine(s1, s2);

            mouse_move = MouseMove;
            mouse_down = MouseDown;
            mouse_up   = MouseUp;
            draw       = Draw;
        }
예제 #8
0
 public My_State(My_State item)
 {
     this.color            = item.color;
     this.color_name       = item.color_name;
     this.condition        = item.condition;
     this.ActivityInput    = item.ActivityInput;
     this.ActivityExit     = item.ActivityExit;
     this.color_state      = item.color_state;
     this.core             = item.core;
     this.name             = item.name;
     this.rect             = item.rect;
     this.label_name       = new My_Label(item.label_name);
     this.label_name.Owner = this;
     mouse_move            = MouseMove;
     mouse_up    = MouseUp;
     mouse_down  = MouseDown;
     draw        = Draw;
     color_marks = new Color[8];
     UpdateBitmapColors();
 }
예제 #9
0
 public My_State(Rectangle rect, string name, string condition, Schematix.FSM.Constructor_Core core)
 {
     this.core          = core;
     this.rect          = rect;
     this.name          = name;
     this.condition     = condition;
     this.ActivityInput = "";
     this.ActivityExit  = "";
     mouse_move         = MouseMoveCreateNew;
     mouse_up           = MouseUpCreateNew;
     mouse_down         = MouseDownCreateNew;
     draw          = Draw;
     selected_mark = 0;
     color_marks   = new Color[8];
     UpdateBitmapColors();
     color         = Color.Orange;
     color_name    = Color.Black;
     label_name    = new My_Label(name, color, core, this);
     creation_flag = true;
 }
예제 #10
0
        public My_Signal(string name, string Type, string Default_Value, Point center_point, Schematix.FSM.Constructor_Core core)
        {
            Color              = Color.Yellow;
            this.Type          = Type;
            this.name          = name;
            this.Default_Value = Default_Value;
            this.center_point  = center_point;
            this.core          = core;

            Type_inf.avaliable = false;
            Type_inf.range1    = "";
            Type_inf.range2    = "";

            mouse_move = MouseMove;
            mouse_up   = MouseUp;
            mouse_down = MouseDown;
            draw       = Draw;

            UpdateBitmapColors();
            label_name = new My_Label(name, Color, core, this);
        }