コード例 #1
0
        public RatingViewModel(
            ITimeService timeService,
            ITogglDataSource dataSource,
            IRatingService ratingService,
            IFeedbackService feedbackService,
            IAnalyticsService analyticsService,
            IOnboardingStorage onboardingStorage,
            IMvxNavigationService navigationService)
        {
            Ensure.Argument.IsNotNull(dataSource, nameof(dataSource));
            Ensure.Argument.IsNotNull(timeService, nameof(timeService));
            Ensure.Argument.IsNotNull(ratingService, nameof(ratingService));
            Ensure.Argument.IsNotNull(feedbackService, nameof(feedbackService));
            Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService));
            Ensure.Argument.IsNotNull(onboardingStorage, nameof(onboardingStorage));
            Ensure.Argument.IsNotNull(navigationService, nameof(navigationService));

            this.dataSource        = dataSource;
            this.timeService       = timeService;
            this.ratingService     = ratingService;
            this.feedbackService   = feedbackService;
            this.analyticsService  = analyticsService;
            this.onboardingStorage = onboardingStorage;
            this.navigationService = navigationService;

            Impression     = impressionSubject.AsObservable();
            CtaTitle       = Impression.Select(ctaTitle);
            CtaDescription = Impression.Select(ctaDescription);
            CtaButtonTitle = Impression.Select(ctaButtonTitle);
        }
コード例 #2
0
ファイル: Coordinator.cs プロジェクト: keko950/ADVuPlugin
    public IEnumerator Dequeue()
    {
        for (; ;)
        {
            if (queue.Count > 0)
            {
                Debug.Log("Impressions in queue " + queue.Count);
                Impression imp  = queue.Dequeue();
                WWWForm    form = new WWWForm();
                form.AddField("ip", imp.Ip);
                form.AddField("date", imp.Date.ToString("MM/dd/yyyy HH:mm:ss"));
                Debug.Log(imp.Date.ToString("MM/dd/yyyy HH:mm:ss"));
                form.AddField("apikey", imp.ApiKey);

                UnityWebRequest www = UnityWebRequest.Post(url + add, form);
                www.SetRequestHeader("comeFromUnity", "True");
                yield return(www.SendWebRequest());

                if (www.isNetworkError || www.isHttpError)
                {
                    Debug.Log(www.error);
                }
                yield return(new WaitForSeconds(nextCheckTime));
            }
            else
            {
                yield return(new WaitForSeconds(nextCheckTime));
            }
        }
    }
コード例 #3
0
        static void Main(string[] args)
        {
            ConsoleApp7.ConsoleApp7 v7 = new ConsoleApp7.ConsoleApp7();
            v7.Execute();

            clsClientsWithContact client = new clsClientsWithContact(0, "Cesar Tapia",
                                                                     "0012",
                                                                     "TAMC880934",
                                                                     1, "Scott Yoon",
                                                                     "1234567890", "", "*****@*****.**",
                                                                     "Nordhoff St.", "15942", "",
                                                                     "North Hills", "California", "92343");

            intExits Impression;
            string   chain = Console.ReadLine();

            if (chain == "1")
            {
                Impression = new clsImpression();
            }
            else
            {
                Impression = new clsFiles();
            }
            Impression.PrintClient(client);
        }
コード例 #4
0
        public IHttpActionResult PostImpression(Impression impression)
        {
            lock (syncLock)
            {
                impression.Time = DateTime.Now;

                AppUser currentUser = null;

                foreach (var item in unitOfWork.AppUsers.GetAll())
                {
                    if (item.Email == impression.AppUser.Email)
                    {
                        currentUser = item;
                        break;
                    }
                }

                impression.AppUser = currentUser;

                if (!ModelState.IsValid || currentUser == null)
                {
                    return(BadRequest(ModelState));
                }

                string[] fullComment = impression.Comment.Split('#');

                int serId = int.Parse(fullComment[0]);

                try
                {
                    impression.Comment = fullComment[1];
                }
                catch
                {
                    impression.Comment = "";
                }

                Impression i = unitOfWork.Impressions.GetFirst(impression.AppUser.Id);
                if (i != null)
                {
                    i.Grade = impression.Grade;
                    unitOfWork.Impressions.Update(i);
                    impression.Grade = 0;
                }

                Service ser = unitOfWork.Services.Get(serId);

                if (impression.Comment != "__empty__")
                {
                    ser.Impressions.Add(impression);

                    unitOfWork.Impressions.Add(impression);
                }

                unitOfWork.Complete();

                return(Ok());
                //    return CreatedAtRoute("DefaultApi", new { id = impression.Id }, impression);
            }
        }
コード例 #5
0
ファイル: Player.cs プロジェクト: keko950/ADVuPlugin
    // Update is called once per frame
    void Update()
    {
        if (!this.isEnabled)
        {
            center = this.GetComponent <Transform>().position;
            Collider[] hitColliders = Physics.OverlapSphere(center, radius);
            foreach (Collider collider in hitColliders)
            {
                GameObject go = collider.gameObject;
                if (go.GetComponent <Advertisement>())
                {
                    if (go.GetComponent <Renderer>().isVisible)
                    {
                        RaycastHit hit;

                        if (Physics.Raycast(transform.position, transform.forward, out hit, maxDistance) &&
                            hit.collider.gameObject.GetComponent <Advertisement>())

                        {
                            Impression impression = new Impression(this.playerIp, this.apiKey);
                            coordinator.pushImpression(impression);
                            this.isEnabled = true;
                            StartCoroutine(wait5Minutes());
                        }
                    }
                }
            }
        }
    }
コード例 #6
0
ファイル: Program.cs プロジェクト: Cesar88Tapia/CSharpBasics
        static void Main(string[] args)
        {
            ConsoleApp8.ConsoleApp8 v8 = new ConsoleApp8.ConsoleApp8();
            v8.Execute();

            clsClientsWithContact client = new clsClientsWithContact(0, "Cesar Tapia",
                                                                     "0012",
                                                                     "TAMC880934",
                                                                     1, "Scott Yoon",
                                                                     "1234567890", "", "*****@*****.**",
                                                                     "Nordhoff St.", "15942", "",
                                                                     "North Hills", "California", "92343");

            intExits Impression;
            string   chain = Console.ReadLine();

            if (chain == "1")
            {
                Impression = new clsImpression();
            }
            else
            {
                Impression = new clsFiles();
            }
            try
            {
                Impression.PrintClient(client);
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occured: " + e.Message);
                Console.ReadKey();
            }
        }
コード例 #7
0
    /// <summary>
    /// 添加新的角色好感信息
    /// </summary>
    /// <param name="name">角色名</param>
    /// <param name="process">好感度</param>
    public void addImpression(string name, int process)
    {
        Impression impression = new Impression();

        impression.Name    = name;
        impression.Process = process;
        Impressions.Add(impression);
    }
コード例 #8
0
        private void BtnImprimerTablTresorerie_Click(object sender, EventArgs e)
        {
            string titre = "Tableau de trésorerie du "
                           + dtpDebut.Value.ToShortDateString()
                           + " au " + dtpFin.Value.ToShortDateString();

            Impression.ImprimerTableau(titre, dgvTableauTresorerie);
        }
コード例 #9
0
        //  IMPRESSION DES TABLEAUX
        private void BtnImprimerCpteResultat_Click(object sender, EventArgs e)
        {
            string titre = "Compte de résultats du "
                           + dtpDebut.Value.ToShortDateString()
                           + " au " + dtpFin.Value.ToShortDateString();

            Impression.ImprimerTableau(titre, dgvCpteResultats);
        }
コード例 #10
0
 protected override void OnExecute()
 {
     var today = DateTime.Now;
     foreach (var serviceId in ServiceIds)
     {
         var impression = new Impression { ServiceId = serviceId, IP = this.IP, UserName = Context.User, Date = today };
         Session.Save(impression);
     }
 }
コード例 #11
0
 public ActionResult Contact([Bind(Include = "ImpressionId,Nom,Email,Titre,Message")] Impression impression)
 {
     if (ModelState.IsValid)
     {
         db.Impressions.Add(impression);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(impression));
 }
コード例 #12
0
        public IHttpActionResult GetImpression(int id)
        {
            Impression impression = unitOfWork.Impressions.Get(id);

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

            return(Ok(impression));
        }
コード例 #13
0
        protected override void OnExecute()
        {
            var today = DateTime.Now;

            foreach (var serviceId in ServiceIds)
            {
                var impression = new Impression {
                    ServiceId = serviceId, IP = this.IP, UserName = Context.User, Date = today
                };
                Session.Save(impression);
            }
        }
コード例 #14
0
 private dynamic SaveDisplayedBanner(dynamic arg)
 {
     foreach (var Banner in arg)
     {
         var Impression = new Impression()
         {
             BannerId = Banner.Id
         };
         this.SiteDatabase.UpsertRecord("Impression", Impression);
     }
     return(true);
 }
コード例 #15
0
 private void Track(Impression impression)
 {
     if (_shutdownInitiated.Get())
     {
         Logger.Error("Cannot track impression because client shutdown is already initiated.");
     }
     else
     {
         _flagInvocationMetricHandler.Handle(impression);
         _impressionsEventHandler.Handle(impression);
     }
 }
コード例 #16
0
        public IHttpActionResult DeleteImpression(int id)
        {
            Impression impression = unitOfWork.Impressions.Get(id);

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

            unitOfWork.Impressions.Remove(impression);
            unitOfWork.Complete();

            return(Ok(impression));
        }
コード例 #17
0
        internal static Android.CommerceBinding.Impression ConvertToMpImpression(Impression impression)
        {
            var bindingImpression = new Android.CommerceBinding.Impression(impression.ImpressionListName, null);

            if (impression.Products != null)
            {
                foreach (var product in impression.Products)
                {
                    bindingImpression.AddProduct(ConvertToMpProduct(product));
                }
            }

            return(bindingImpression);
        }
コード例 #18
0
 private void BtnImprimerTablStocks_Click(object sender, EventArgs e)
 {
     if (rbtnMatieresPremieres.Checked)
     {
         Impression.ImprimerTableau("Stock de matières premières et emballages", dgvTableauAffichageStocks);
     }
     else if (rbtnProduitsSemiFinis.Checked)
     {
         Impression.ImprimerTableau("Stock de produits semi finis", dgvTableauAffichageStocks);
     }
     else
     {
         Impression.ImprimerTableau("Stock de produits finis", dgvTableauAffichageStocks);
     }
 }
コード例 #19
0
        internal AndroidJavaObject ConvertToMpImpression(Impression impression)
        {
            AndroidJavaObject javaImpression = new AndroidJavaObject("com.mparticle.commerce.Impression", impression.ImpressionListName, null);

            if (impression.Products != null)
            {
                foreach (Product product in impression.Products)
                {
                    javaImpression.Call <AndroidJavaObject>(
                        "addProduct",
                        new object[] { ConvertToMpProduct(product) }
                        );
                }
            }

            return(javaImpression);
        }
コード例 #20
0
        public IHttpActionResult PutImpression(Impression impression)
        {
            lock (syncLock)
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                Impression i = null;
                if (impression.Grade == 0)
                {
                    i = unitOfWork.Impressions.GetFirst(impression.AppUser.Id);
                }
                else
                {
                    i = unitOfWork.Impressions.GetFirstWithoutGrade(impression.AppUser.Id);
                }

                if (i == null)
                {
                    return(StatusCode(HttpStatusCode.NoContent));
                }

                i.Grade = impression.Grade;

                try
                {
                    unitOfWork.Impressions.Update(i);
                    unitOfWork.Complete();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ImpressionExists(i.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }

                return(StatusCode(HttpStatusCode.NoContent));
            }
        }
コード例 #21
0
 private void BtnImprimerFicheStock_Click(object sender, EventArgs e)
 {
     Impression.ImprimerFicheDeStock(listBox1, dgvJournalStocksMatieresPremieres);
 }
コード例 #22
0
 public virtual void OnImpression()
 {
     Impression?.Invoke(this, EventArgs.Empty);
 }
コード例 #23
0
 public virtual void OnImpression()
 {
     Impression?.Invoke(this, EventArgs.Empty);
     Debug.WriteLine("FACEBOOK ADS Impression");
 }
コード例 #24
0
 private void btnImprimerJournal_Click(object sender, EventArgs e)
 {
     Impression.ImprimerTableau("Journal des approvisionnements", dgvJournalApprovisionnements);
 }
コード例 #25
0
 private void BtnImprimerTableau_Click(object sender, EventArgs e)
 {
     Impression.ImprimerDetailsTransactionsClient(lbxListeClients, dgvDetailsClient);
 }
コード例 #26
0
 private void BtnImprimerFicheStock_Click(object sender, EventArgs e)
 {
     Impression.ImprimerTableau("Journal des dépenses", adgvJournalDepenses);
 }
コード例 #27
0
 private void BtnImprimerFicheStock_Click(object sender, EventArgs e)
 {
     Impression.ImprimerFicheDeStock(lbxListeProduitsSemiFinis, dgvJournalStocksProduitsSemiFinis);
 }
コード例 #28
0
 private void BtnImprimerJournal_Click(object sender, EventArgs e)
 {
     Impression.ImprimerTableau("Journal des ventes", dgvJournalVentes);
 }
コード例 #29
0
 public static string ImpressionToJSON(Impression impression)
 {
     return("");
 }
コード例 #30
0
 private void BtnImprimerTableau_Click(object sender, EventArgs e)
 {
     Impression.ImprimerTableauTransactions(lbxListeFournisseursDettes, dataGridView1);
 }
コード例 #31
0
 private void BtnImprimerJournal_Click(object sender, EventArgs e)
 {
     Impression.ImprimerJournalTresorerie(listBox1, dgvJournalTresorerieDetails);
 }