Ejemplo n.º 1
0
        private void timAff_Tick(object sender, EventArgs e)
        {
            if (Main.hoverShop != null && (lastShopHover == null || lastShopHover.id != Main.hoverShop.id))
            {
                lastShopHover = Main.hoverShop;
                flowReviewShop.Controls.Clear();

                List <clReview> r = Main.hoverShop.getReviews().OrderBy(X => X.user.name).ToList();

                foreach (var item in r)
                {
                    ucReview ucR = new ucReview();
                    flowReviewShop.Controls.Add(ucR);
                    ucR.init(item, false, true);
                }
            }

            if (Main.hoverUser != null && (lastUserHover == null || lastUserHover.id != Main.hoverUser.id))
            {
                lastUserHover = Main.hoverUser;
                flowReviews.Controls.Clear();

                List <clReview> r = Main.hoverUser.getReviews().OrderBy(X => X.shop.name).ToList();

                foreach (var item in r)
                {
                    ucReview ucR = new ucReview();
                    flowReviews.Controls.Add(ucR);
                    ucR.init(item, true, false);
                }
            }
        }
Ejemplo n.º 2
0
        private void timAff_Tick(object sender, EventArgs e)
        {
            lblResult.Text = Main.lastText;

            if (askLoadReviews)
            {
                flowReviews.Controls.Clear();
                for (int i = 0; i < Main.curReviews.Count; i++)
                {
                    ucReview r = new ucReview();
                    flowReviews.Controls.Add(r);
                    r.init(Main.curReviews[i], true, false);
                }

                butSave.Visible = Main.data.getUserByName(Main.curUser.name) == null;
                askLoadReviews  = false;
            }

            if (Main.askShowInfo != null)
            {
                frmInfo frm = new frmInfo();
                frm.richTextBox1.Text = Main.askShowInfo;
                Main.askShowInfo      = null;
                frm.Show();
            }

            updateUser();
        }