コード例 #1
0
        public static bool showOverlay(Point p)
        {
            if (ConfigFile.DisableOverlay)
            {
                Log.Write("Overlay has been forced off, it will not show", Color.Gray);
                return(false);
            }

            overlay = new Overlay {
                Location = new Point(p.X, p.Y)
            };
            overlay.Show();
            shown = true;
            return(shown);
        }
コード例 #2
0
        //protected override void OnPaintBackground(PaintEventArgs pevent)
        //{
        //    //do not allow the background to be painted
        //}

        //protected override void OnPaint(PaintEventArgs e)
        //{
        //    var rect = new Rectangle(439, 190, Width, Height);
        //    var b = new SolidBrush(Color.FromArgb(100, Color.Black));
        //    e.Graphics.FillRectangle(b, rect);

        //    b.Dispose();
        //}

        public static void ShowOverlay()
        {
            try
            {
                var p = new Point(ConfigFile.ReadValue <int>("Overlay", "X"), ConfigFile.ReadValue <int>("Overlay", "Y"));
                Log.Write($"Showing overlay at X = {p.X}, Y = {p.Y}");
                overlay = new Overlay {
                    Location = p
                };
                overlay.Show();

                overlay.MouseDown += Overlay_MouseDown;
            }
            catch (Exception ex)
            {
                Log.Write(ex.Message, Color.Red);
            }
        }
コード例 #3
0
        public static bool showOverlay(Point p)
        {
            if (ConfigFile.DisableOverlay)
            {
                Log.Write("Overlay has been forced off, it will not show", Color.Gray);
                return false;
            }

            overlay = new Overlay {Location = new Point(p.X, p.Y)};
            overlay.Show();
            shown = true;
            return shown;
        }