Esempio n. 1
0
        // GET: Expense/Delete/5
        public ActionResult Delete(int id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            expenses dep = expService.GetById(id);
            exp      p   = new exp()
            {
                DateExpense   = dep.DateExpense,
                NatureDepense = (NatureVM)dep.NatureDepense,
                nbNuitete     = dep.nbNuitete,
                moyTransport  = (MoyeneVM)dep.moyTransport,
                distance      = dep.distance,
                Justificatif  = dep.Justificatif,
                MontantTotal  = dep.MontantTotal,
                commentaire   = dep.commentaire,
                mm_id_mission = dep.mm_id_mission
            };

            if (dep == null)
            {
                return(HttpNotFound());
            }
            expService.Delete(dep);
            expService.Commit();
            return(View(p));
        }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     target = GameObject.FindGameObjectWithTag("Player").transform;
     forref = FindObjectOfType <forallbullets>();
     enemyh = 200;
     refexp = FindObjectOfType <exp>();
 }
Esempio n. 3
0
 // Update is called once per frame
 void Update()
 {
     if (refPlayerStatus)
     {
         exp  tmpExp  = refPlayerStatus.GetComponent <status> ().expArray [(int)expType];
         Text tmpText = GetComponent <Text> ();
         if (tmpText)
         {
             tmpText.text  = caption;
             tmpText.text += " ";
             tmpText.text += tmpExp.level.ToString();
             tmpText.text += "  [ ";
             tmpText.text += tmpExp.sub.ToString();
             tmpText.text += " / ";
             tmpText.text += tmpExp.next.ToString();
             tmpText.text += " ]";
         }
     }
     if (0.0f < displayTime)
     {
         displayTime -= Time.deltaTime;
         this.GetComponent <CanvasRenderer> ().SetAlpha(1.0f);
     }
     if (displayTime <= 0.0f)
     {
         this.GetComponent <CanvasRenderer> ().SetAlpha(0.0f);
     }
 }
Esempio n. 4
0
 void Start()
 {
     setsonic   = FindObjectOfType <setactive>();
     bullscropt = FindObjectOfType <BulletShooting>();
     playermov  = FindObjectOfType <Playermovement>();
     drawpowref = FindObjectOfType <bullettypes>();
     expref     = FindObjectOfType <exp>();
 }
Esempio n. 5
0
    public static void Main()
    {
        exp    e  = new exp();
        Thread t1 = new Thread(new ThreadStart(e.show));
        Thread t2 = new Thread(new ThreadStart(e.show));

        t1.Name = "First Thread";
        t2.Name = "Second Thread";
        t1.Start();
        t2.Start();
    }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        istrue  = false;
        this.rb = GetComponent <Rigidbody>();

        scene          = SceneManager.GetActiveScene();
        cam            = FindObjectOfType <Camera>();
        nht            = health.maxValue = 100;
        exprefforscore = FindObjectOfType <exp>();

        canvaselement.SetActive(false);
        gameover.text = PlayerPrefs.GetInt("HighScore").ToString();
    }
Esempio n. 7
0
    void Start()
    {
        bulletlist = new List <GameObject>();
        target     = GameObject.FindGameObjectWithTag("Player").transform;
        forref     = FindObjectOfType <forallbullets>();
        enemyh     = 40000;
        refexp     = FindObjectOfType <exp>();

        //------------pooling------------//
        for (int i = 0; i < 3; i++)
        {
            var newbul = (GameObject)Instantiate(projectile);
            newbul.SetActive(false);
            bulletlist.Add(newbul);
        }
    }
Esempio n. 8
0
    // Use this for initialization
    void Start()
    {
        vital      = 3.0f;
        magicPower = 100.0f;
        bulletNum  = 100;

        this.expArray = new exp[(int)item.eExpType.Max];
        for (int i = 0; i < expArray.Length; i++)
        {
            expArray [i] = new exp();
        }

        mLastKillExp = item.eExpType.None;

        GetSEAudio = gameObject.GetComponent <AudioSource>();
    }
Esempio n. 9
0
        static int Eval(exp e)
        {
            if (e.zero != null)
            {
                return(0);
            }
            var s = e.succ;

            if (s != null)
            {
                return(Eval(s.exp) + 1);
            }
            var a = e.add;

            if (a != null)
            {
                return(Eval(a.exp[0]) + Eval(a.exp[1]));
            }
            throw new InvalidOperationException();
        }
Esempio n. 10
0
 public ActionResult Delete(int id, exp evt)
 {
     try
     {
         if (ModelState.IsValid)
         {
             if (id == null)
             {
                 return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
             }
             expenses dep = expService.GetById(id);
             evt = new exp()
             {
                 DateExpense   = dep.DateExpense,
                 NatureDepense = (NatureVM)dep.NatureDepense,
                 nbNuitete     = dep.nbNuitete,
                 moyTransport  = (MoyeneVM)dep.moyTransport,
                 distance      = dep.distance,
                 Justificatif  = dep.Justificatif,
                 MontantTotal  = dep.MontantTotal,
                 commentaire   = dep.commentaire,
                 mm_id_mission = dep.mm_id_mission
             };
             if (dep == null)
             {
                 return(HttpNotFound());
             }
             Console.WriteLine("Deleted");
             expService.Delete(dep);
             expService.Commit();
             // Service.Dispose();
             return(RedirectToAction("Index"));
         }
         // TODO: Add delete logic here
         return(View(evt));
     }
     catch
     {
         return(View());
     }
 }
 private void btnAddExpCopy_Click(object sender, EventArgs e)
 {
     try
     {
         var maxExpNum     = db.exps.Where(u => u.exp_name == lstExperiments.SelectedItem.ToString()).Select(u => u.exp_num).Max();
         var newExperiment = new exp()
         {
             exp_name = lstExperiments.SelectedItem.ToString(),
             exp_num  = maxExpNum + 1,
             lab_name = cmbLab.Text
         };
         db.exps.Add(newExperiment);
         db.SaveChanges();
         lstExperimentsNum.DataSource = db.exps.Where(u => u.exp_name == lstExperiments.SelectedItem.ToString()).Select(u => u.exp_num).ToList();
         GetExperimentsNum();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 12
0
 private void btnAddExperiment_Click(object sender, EventArgs e)
 {
     if (txtExperiment.Text == string.Empty)
     {
         MessageBox.Show("أدخل اسم التجربة", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     try
     {
         var newExperiment = new exp()
         {
             exp_name = txtExperiment.Text,
             exp_num  = 1,
             lab_name = lab
         };
         db.exps.Add(newExperiment);
         db.SaveChanges();
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 13
0
 // Use this for initialization
 void Start()
 {
     _exp = PlayerObject.GetComponent <exp> ();
 }
Esempio n. 14
0
 foreach (var(exp, value) in exps)
Esempio n. 15
0
 private void getExpData()
 {
     for (int i=0; i<expJson.Count; i++){
         exp goData=new exp();
         goData.level=int.Parse(expJson [i] ["level"].ToString());
         goData.thisExp=int.Parse(expJson [i] ["exp"].ToString());
         goData.totalExp=int.Parse(expJson [i] ["totalExp"].ToString());
         expData.Add(goData);
     }
 }
 OnExceptionReceived(exp, properties.ToDictionary(item => item.key, item => item.value));
Esempio n. 17
0
 static int Eval(exp e)
 {
     if (e.zero != null) return 0;
     var s = e.succ;
     if (s != null) return Eval(s.exp) + 1;
     var a = e.add;
     if (a != null) return Eval(a.exp[0]) + Eval(a.exp[1]);
     throw new InvalidOperationException();
 }
Esempio n. 18
0
 foreach (var(exp, alias) in exps)
 AssertRecordizationFromExpression(exp, getRecord);
Esempio n. 20
0
 => (Evaluate(exp, environment) is Environment env) ?