Beispiel #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;
 }
Beispiel #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;
        }