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); }
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)); } } }
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); }
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); } }
// 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()); } } } } } }
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(); } }
/// <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); }
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); }
// 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); }
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); } }
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)); }
public IHttpActionResult GetImpression(int id) { Impression impression = unitOfWork.Impressions.Get(id); if (impression == null) { return(NotFound()); } return(Ok(impression)); }
private dynamic SaveDisplayedBanner(dynamic arg) { foreach (var Banner in arg) { var Impression = new Impression() { BannerId = Banner.Id }; this.SiteDatabase.UpsertRecord("Impression", Impression); } return(true); }
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); } }
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)); }
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); }
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); } }
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); }
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)); } }
private void BtnImprimerFicheStock_Click(object sender, EventArgs e) { Impression.ImprimerFicheDeStock(listBox1, dgvJournalStocksMatieresPremieres); }
public virtual void OnImpression() { Impression?.Invoke(this, EventArgs.Empty); }
public virtual void OnImpression() { Impression?.Invoke(this, EventArgs.Empty); Debug.WriteLine("FACEBOOK ADS Impression"); }
private void btnImprimerJournal_Click(object sender, EventArgs e) { Impression.ImprimerTableau("Journal des approvisionnements", dgvJournalApprovisionnements); }
private void BtnImprimerTableau_Click(object sender, EventArgs e) { Impression.ImprimerDetailsTransactionsClient(lbxListeClients, dgvDetailsClient); }
private void BtnImprimerFicheStock_Click(object sender, EventArgs e) { Impression.ImprimerTableau("Journal des dépenses", adgvJournalDepenses); }
private void BtnImprimerFicheStock_Click(object sender, EventArgs e) { Impression.ImprimerFicheDeStock(lbxListeProduitsSemiFinis, dgvJournalStocksProduitsSemiFinis); }
private void BtnImprimerJournal_Click(object sender, EventArgs e) { Impression.ImprimerTableau("Journal des ventes", dgvJournalVentes); }
public static string ImpressionToJSON(Impression impression) { return(""); }
private void BtnImprimerTableau_Click(object sender, EventArgs e) { Impression.ImprimerTableauTransactions(lbxListeFournisseursDettes, dataGridView1); }
private void BtnImprimerJournal_Click(object sender, EventArgs e) { Impression.ImprimerJournalTresorerie(listBox1, dgvJournalTresorerieDetails); }