Exemple #1
0
        public void testChangeID()
        {
            change c = new change();

            c.changeID = 999;
            Assert.AreEqual(999, c.changeID);
        }
Exemple #2
0
        public void testChangeSummary()
        {
            change c = new change();

            c.changeSummary = "test";
            Assert.AreEqual("test", c.changeSummary);
        }
Exemple #3
0
        public void testProjectID()
        {
            change c = new change();

            c.projectID = 999;
            Assert.AreEqual(999, c.projectID);
        }
    public static void Main()
    {
        change c = new change();

        int [] myarray = new int[3] {
            1, 2, 3
        };

        Console.WriteLine("----  modifyメソッド実行前  ----");
        int i = 0;

        foreach (int x in myarray)
        {
            Console.WriteLine("myarray[{0}] = {1}", i, x);
            i++;
        }

        c.modify(myarray);

        Console.WriteLine("----  modifyメソッド実行前  ----");
        i = 0;
        foreach (int x in myarray)
        {
            Console.WriteLine("myarray[{0}] = {1}", i, x);
            i++;
        }
    }
Exemple #5
0
 // Update is called once per frame
 void Update()
 {
     filter_set        = filter.GetComponent <filter> ();
     change_music      = filter.GetComponent <change> ();
     this.acceleration = Input.acceleration;
     this.compass      = Input.compass;
     this.gyro         = Input.gyro.attitude;
 }
Exemple #6
0
        public void testDateCreated()
        {
            change   c  = new change();
            DateTime dt = DateTime.Now;

            c.dateCreated = dt;
            Assert.IsNotNull(dt);
            Assert.AreEqual(dt, c.dateCreated);
        }
Exemple #7
0
        public ShowFormInfo(Form formToHide, Form formToShow, int step, int sleepTime)
        {
            this.formToHide = formToHide;
            this.formToShow = formToShow;
            this.step       = step;
            this.sleepTime  = sleepTime;

            changeHide = new change(setStepHide);
            changeShow = new change(setStepShow);
        }
        public static void addToHistory(int uID, int pID, string CSUM)
        {
            DateTime now        = System.DateTime.Now;
            change   tempChange = new change()
            {
                projectID     = pID,
                userID        = uID,
                changeSummary = CSUM,
                dateCreated   = now,
            };
            Entities db = new Entities();

            db.changes.Add(tempChange);
            db.SaveChanges();
        }
Exemple #9
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Z) && Undo.Count != 0)
        {
            change c = Undo[Undo.Count - 1];
            if (c.action == Act.Place)
            {
                Undo.Remove(c);
                c.obj.SetActive(false);
                Redo.Add(c);
            }
            if (c.action == Act.Edit)
            {
                Undo.Remove(c);
                Vector3    tmpPos;
                Quaternion tmpRot;
                tmpPos = c.obj.transform.position;
                tmpRot = c.obj.transform.rotation;
                c.obj.transform.position = c.position;
                c.obj.transform.rotation = c.rotation;
                c.rotation = tmpRot;
                c.position = tmpPos;
                Redo.Add(c);
            }
            if (c.action == Act.Delete)
            {
                c.obj.transform.position = c.position;
                c.obj.transform.rotation = c.rotation;
                c.obj.SetActive(true);
                Undo.Remove(c);
                Redo.Add(c);
            }

            GameObject.Find("Grid").GetComponent <Grid>().update = true;
        }
        else if (Input.GetKeyDown(KeyCode.Y) && Redo.Count != 0)
        {
            change c = Redo[Redo.Count - 1];
            if (c.action == Act.Place)
            {
                Redo.Remove(c);
                c.obj.SetActive(true);
                Undo.Add(c);
            }
            if (c.action == Act.Edit)
            {
                Redo.Remove(c);
                Vector3    tmpPos;
                Quaternion tmpRot;
                tmpPos = c.obj.transform.position;
                tmpRot = c.obj.transform.rotation;
                c.obj.transform.position = c.position;
                c.obj.transform.rotation = c.rotation;
                c.rotation = tmpRot;
                c.position = tmpPos;
                Undo.Add(c);
            }
            if (c.action == Act.Delete)
            {
                c.obj.SetActive(false);
                Redo.Remove(c);
                Undo.Add(c);
            }
        }
    }
Exemple #10
0
 public void addChange(change c)
 {
     Undo.Add(c);
     Redo.Clear();
 }
 var (change, cell, runs) = args;