コード例 #1
0
    public void AddNote()
    {
        int Day, Month, Year;

        if ((Day = int.Parse(dayField.text)) < 1 || Day > 31)
        {
            return;
        }
        if ((Month = int.Parse(monthField.text)) < 1 || Month > 12)
        {
            return;
        }
        Year = int.Parse(yearField.text);

        System.DateTime date     = new System.DateTime(Year, Month, Day);
        Vector3         location = new Vector3(float.Parse(xField.text), float.Parse(yField.text), float.Parse(zField.text));

        manager.AddNote(firstField.text, lastField.text, briefField.text,
                        fullField.text, URLField.text, date, location);
    }
コード例 #2
0
    //this calls the routine that adds a new note to the database through the SpatioManager
    public void AddNote()
    {
        int Day, Month, Year;

        if ((Day = int.Parse(dayField.text)) < 1 || Day > 31)
        {
            return;
        }
        if ((Month = int.Parse(monthField.text)) < 1 || Month > 12)
        {
            return;
        }
        Year = int.Parse(yearField.text);

        System.DateTime date     = new System.DateTime(Year, Month, Day);
        Vector3         location = new Vector3(float.Parse(xField.text), float.Parse(yField.text), float.Parse(zField.text));

        manager.AddNote(firstField.text, lastField.text, briefField.text,
                        fullField.text, URLField.text, date, location);

        //trying to erase the temporary location maker used to mark the spot for the note
        //Destroy(LocationMarker);
        //LocationMarker.SetActive(false);
    }