示例#1
0
 public void ShowOsd(OsdForm.OsdImage osdimage)
 {
     if (!this.bShowOsd)
     {
         return;
     }
     if (!this.pic.Visible)
     {
         this.pic.Visible = true;
     }
     this.T_value.Visible = false;
     this.pic_bar.Visible = false;
     this.timer1.Stop();
     this.timer2.Stop();
     base.Location   = new System.Drawing.Point(50, 60);
     this.pic.Image  = (Image)Resources.ResourceManager.GetObject(osdimage.ToString());
     this.pic.Width  = this.pic.Image.Width;
     this.pic.Height = this.pic.Image.Height;
     base.Width      = this.pic.Image.Width;
     base.Height     = this.pic.Image.Height;
     base.Invalidate();
     base.Opacity = 0.9;
     CallingVariations.ShowWindow(base.Handle, 4);
     this.timer1.Enabled = true;
 }
示例#2
0
        private void ShowBarOSD(OsdForm.OsdImage osdimage, int value_max, int value, bool showBar, bool showtext, string text)
        {
            if (!this.bShowOsd)
            {
                return;
            }
            this.timer1.Stop();
            this.timer2.Stop();
            base.Location       = new System.Drawing.Point(50, 60);
            this.pic.Image      = (Image)Resources.ResourceManager.GetObject(osdimage.ToString());
            this.pic.Width      = this.pic.Image.Width;
            this.pic.Height     = this.pic.Image.Height;
            this.pic_bar.Height = this.pic.Image.Height;
            this.T_value.Height = this.pic.Image.Height;
            this.T_value.Width  = 69;
            base.Width          = this.pic.Image.Width;
            base.Height         = this.pic.Image.Height;
            this.pic.Visible    = true;
            if (showBar)
            {
                double num = 240.0 / (double)value_max * (double)value;
                if (num < 10.0)
                {
                    num = 8.0;
                }
                else if (num > 230.0)
                {
                    num = 240.0;
                }
                this.pic_bar.Width   = (int)Math.Round(num, 0);
                this.pic_bar.Visible = true;
                if (showtext == true)
                {
                    this.T_value.Text = text;
                }
                else
                {
                    this.T_value.Text = value.ToString() + text;
                }


                this.T_value.Visible = true;
            }
            else
            {
                this.T_value.Visible = false;
                this.pic_bar.Visible = false;
            }
            this.pic_bar.Location = new System.Drawing.Point(107, 0);
            this.T_value.Location = new System.Drawing.Point(360, 0);
            base.Invalidate();
            base.Opacity = 0.9;
            CallingVariations.ShowWindow(base.Handle, 4);
            this.timer1.Enabled = true;
        }
示例#3
0
 private void InitOsd()
 {
     if (this.pic.Visible)
     {
         this.pic.Visible = false;
     }
     this.T_value.Visible = false;
     this.pic_bar.Visible = false;
     this.timer1.Stop();
     this.timer2.Stop();
     base.Opacity  = 0.0;
     base.Location = new System.Drawing.Point(50, 60);
     base.Width    = 429;
     base.Height   = 90;
     base.Invalidate();
     base.Show();
     CallingVariations.ShowWindow(base.Handle, 4);
     this.timer1.Enabled = true;
 }
示例#4
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     base.Opacity -= 0.2;
     if (base.Opacity <= 0.3 && base.Opacity != 0.0)
     {
         this.pic.Image       = (Image)Resources.ResourceManager.GetObject("bg_long");
         this.pic.Visible     = false;
         this.pic_bar.Visible = false;
         this.T_value.Visible = false;
         base.Opacity         = 0.0;
         base.Invalidate();
         CallingVariations.ShowWindow(base.Handle, 4);
         return;
     }
     if (base.Opacity == 0.0)
     {
         this.timer1.Stop();
         this.timer2.Stop();
         this.bInit = false;
         CallingVariations.ShowWindow(base.Handle, 0);
     }
 }
示例#5
0
        private void ShowWpfOsd()
        {
            if (!this.bShowOsd)
            {
                return;
            }
            this.timer1.Stop();
            this.timer2.Stop();
            base.Opacity  = 0.9;
            base.Location = new System.Drawing.Point(50, 60);
            double primaryScreenWidth  = SystemParameters.PrimaryScreenWidth;
            double primaryScreenHeight = SystemParameters.PrimaryScreenHeight;

            base.Width  = 429;
            base.Height = 90;
            if (this.pic.Visible)
            {
                this.pic.Visible = false;
            }
            base.Invalidate();
            CallingVariations.ShowWindow(base.Handle, 4);
            this.timer1.Enabled = true;
        }