コード例 #1
0
ファイル: DJsController.cs プロジェクト: houacha/TeamCap
        public IHttpActionResult PostDJ(DJ dJ)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.DJs.Add(dJ);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = dJ.Id }, dJ));
        }
コード例 #2
0
 // Start is called before the first frame update
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #3
0
        static void WithDJ()
        {
            dynamic calc = DJ.New("Calculator");
            var     f1   = calc.Sub(1f / 3f, 1f / 7f);
            var     f2   = calc.Sub(new JPrimitive(1f / 3f), new JPrimitive(1f / 7f)); //In fact I'd like to use JObject
            var     f3   = calc.TestFloat();

            var d1 = calc.DSub(1d / 3d, 1d / 7d);
            var d2 = calc.DSub(new JPrimitive(1d / 3d), new JPrimitive(1d / 7d));
            var d3 = calc.TestDouble();

            Console.WriteLine($"With DJ:\r\n{f1}\t{f2}\t{f3}\t{d1}\t{d2}\t{d3}");
        }
コード例 #4
0
ファイル: DJsController.cs プロジェクト: houacha/TeamCap
        public IHttpActionResult DeleteDJ(int id)
        {
            DJ dJ = db.DJs.Find(id);

            if (dJ == null)
            {
                return(NotFound());
            }

            db.DJs.Remove(dJ);
            db.SaveChanges();

            return(Ok(dJ));
        }
コード例 #5
0
ファイル: DJ.cs プロジェクト: Nylash/Kapla
    private void Awake()
    {
        //temp to remove unity's debug updater which crashes with new input
        GameObject go = GameObject.Find("[Debug Updater]");

        if (go != null)
        {
            DestroyImmediate(go);
        }

        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
        musicSource = GetComponent <AudioSource>();

        Cursor.visible = false;
    }
コード例 #6
0
 // GET: Administador/Delete/5
 public ActionResult Delete(int id)
 {
     DJ.deleteJuego(id);
     return(RedirectToAction("Juegos"));
 }
コード例 #7
0
        //修改党建新闻
        public int NewsDJUpd(DJ j)
        {
            string sql = $"update NewsDJ set Djlei='{j.Djlei}',DjTitle='{j.DjTitle}',Djmiao='{j.Djmiao}',Djimg='{j.Djimg}',DjShiPin='{j.DjShiPin}',Djnei='{j.Djnei}',DjLY='{j.DjLY}',Djurl='{j.Djurl}' where Djid={j.Djid}";

            return(DBHelper.ExecuteNonQuery(sql, System.Data.CommandType.Text));
        }
コード例 #8
0
        //添加党建新闻
        public int NewsDJAdd(DJ j)
        {
            string sql = $"insert into NewsDJ(Djlei,DjTitle,Djmiao,Djimg,DjShiPin,Djnei,DjLY,Djurl) values('{j.Djlei}','{j.DjTitle}','{j.Djmiao}','{j.Djimg}','{j.DjShiPin}','{j.Djnei}','{j.DjLY}','{j.Djurl}')";

            return(DBHelper.ExecuteNonQuery(sql, System.Data.CommandType.Text));
        }
コード例 #9
0
    public static void Instan(int type, AudioClip clip = null, Action onFinish = null,float timeIsPlay = 0f)
    {
        GameObject tmp = GameObject.Find("DJ");
        if (tmp == null)
            tmp = GameObject.Find("DJ(Clone)");
        if (tmp != null)
            instan = tmp.GetComponent<DJ>();

        if (instan == null)
        {
            if (GameObject.Find("DJ"))
                instan = GameObject.Find("DJ").GetComponent<DJ>();
            else
            {
                GameObject inst = Instantiate(Resources.Load("System/DJ", typeof(GameObject))) as GameObject;
                instan = inst.GetComponent<DJ>();
            }
        }
		Fin(type, clip, onFinish,timeIsPlay);
    }