コード例 #1
0
        // Token: 0x060002C4 RID: 708 RVA: 0x001F2A54 File Offset: 0x001F0E54
        public void AddItem(Bitmap img, string Text)
        {
            List <notf.GClass15> items = this.Items;
            List <notf.GClass15> obj   = items;

            lock (obj)
            {
                bool flag = this.Items.Count > 50;
                if (flag)
                {
                    this.Items.RemoveAt(0);
                }
                notf.GClass15 item = new notf.GClass15
                {
                    bitmap_0 = (Bitmap)img.Clone(),
                    string_0 = Text
                };
                this.Items.Add(item);
            }
        }
コード例 #2
0
        // Token: 0x060002C9 RID: 713 RVA: 0x001F2C0C File Offset: 0x001F100C
        public void wrk()
        {
            for (;;)
            {
                Thread.Sleep(50);
                bool flag = this.Items.Count == 0;
                if (flag)
                {
                    this.go();
                }
                else
                {
                    try
                    {
                        Bitmap   bitmap   = new Bitmap(this.p.Width, this.p.Height);
                        Graphics graphics = Graphics.FromImage(bitmap);
                        graphics.Clear(this.p.BackColor);
                        List <notf.GClass15> items = this.Items;
                        List <notf.GClass15> obj   = items;
                        lock (obj)
                        {
                            try
                            {
                                foreach (notf.GClass15 gclass in this.Items)
                                {
                                    flag = (gclass.int_0 <= 2);
                                    if (flag)
                                    {
                                        gclass.int_0 = 2;
                                        notf.GClass15 gclass2 = gclass;
                                        notf.GClass15 gclass3 = gclass2;
                                        gclass3.int_1++;
                                    }
                                    else
                                    {
                                        int count = this.Items.Count;
                                        flag = (count > 30);
                                        if (flag)
                                        {
                                            gclass.int_0 = 2;
                                        }
                                        else
                                        {
                                            flag = (count > 20);
                                            if (flag)
                                            {
                                                notf.GClass15 gclass2 = gclass;
                                                gclass2.int_0 += -20;
                                            }
                                            else
                                            {
                                                flag = (count > 10);
                                                if (flag)
                                                {
                                                    notf.GClass15 gclass2 = gclass;
                                                    gclass2.int_0 += -10;
                                                }
                                                else
                                                {
                                                    notf.GClass15 gclass2 = gclass;
                                                    gclass2.int_0 += -2;
                                                }
                                            }
                                        }
                                        flag = (gclass.int_0 < 2);
                                        if (flag)
                                        {
                                            gclass.int_0 = 2;
                                        }
                                    }
                                    Size size = TextRenderer.MeasureText(gclass.string_0, this.Font);
                                    size.Width   = bitmap.Width;
                                    size.Height += 5;
                                    Rectangle rectangle = new Rectangle(0, gclass.int_0 - 2, this.Width, size.Height);
                                    graphics.FillRectangle(Brushes.Black, rectangle);
                                    rectangle = new Rectangle(0, gclass.int_0 - 2, this.Width, size.Height);
                                    ControlPaint.DrawLockedFrame(graphics, rectangle, false);
                                    object[] array = new object[2];
                                    array[0] = RuntimeHelpers.GetObjectValue(RuntimeHelpers.GetObjectValue(RuntimeHelpers.GetObjectValue(gclass.bitmap_0.Clone())));
                                    Point point = new Point(5, gclass.int_0 - 2);
                                    array[1] = point;
                                    NewLateBinding.LateCall(graphics, null, "DrawImage", array, null, null, null, true);
                                    graphics.DrawString(gclass.string_0, this.Font, Brushes.LightSteelBlue, 5f, (float)gclass.int_0);
                                    flag = (gclass.int_0 > this.Height - 50);
                                    if (flag)
                                    {
                                        break;
                                    }
                                }
                            }
                            finally
                            {
                                List <notf.GClass15> .Enumerator enumerator;
                                ((IDisposable)enumerator).Dispose();
                            }
                            for (;;)
                            {
IL_29E:
                                try
                                {
                                    foreach (notf.GClass15 gclass4 in this.Items)
                                    {
                                        flag = (gclass4.int_1 == 40);
                                        if (flag)
                                        {
                                            this.Items.Remove(gclass4);
                                            goto IL_29E;
                                        }
                                    }
                                }
                                finally
                                {
                                    List <notf.GClass15> .Enumerator enumerator2;
                                    ((IDisposable)enumerator2).Dispose();
                                }
                                break;
                            }
                            flag = (this.Items.Count == 0 & this.bool_0);
                            if (flag)
                            {
                                this.go();
                            }
                            flag = (this.Items.Count > 0 & !this.bool_0);
                            if (flag)
                            {
                                this.back();
                            }
                        }
                        graphics.Flush(FlushIntention.Sync);
                        graphics.Dispose();
                        this.p.Image = bitmap;
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }