Exemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            Action _action = () =>
            {
                System.Threading.Thread.Sleep(500);
            };

            player._task.ContinueWhenAll(new Task[] { player._task.StartNew(_action) }, (action =>
            {
                this.BeginInvoke(new Action(() =>
                {
                    if (this._index != "1")
                    {
                        foreach (Control item in panel1.Controls)
                        {
                            if (item.Name.StartsWith("b_") && item is TSkin.TBut)
                            {
                                TSkin.TBut f = item as TSkin.TBut;
                                if (item.Tag.ToString() == this._index)
                                {
                                    f.IsActive = true;
                                }
                                else
                                {
                                    f.IsActive = false;
                                }
                            }
                        }
                    }
                    menu_typeCore();
                }));
            }));
        }
Exemplo n.º 2
0
 private void menu_type(object sender, EventArgs e)
 {
     TSkin.TBut f = sender as TSkin.TBut;
     if (_index != f.Tag.ToString())
     {
         foreach (Control item in panel1.Controls)
         {
             if (item.Name.StartsWith("b_") && item is TSkin.TBut)
             {
                 TSkin.TBut fs = item as TSkin.TBut;
                 if (fs != f)
                 {
                     fs.IsActive = false;
                 }
             }
         }
         _index     = f.Tag.ToString();
         f.IsActive = true;
         this.BeginInvoke(new Action(() =>
         {
             //panel3.SuspendLayout();
             menu_typeCore();
             //panel3.ResumeLayout();
         }));
     }
 }
Exemplo n.º 3
0
        private void ChangeVr(object sender, EventArgs e)
        {
            tBut1.IsActive = tBut2.IsActive = tBut3.IsActive = tBut4.IsActive = tBut5.IsActive = tBut6.IsActive = tBut7.IsActive = tBut8.IsActive = false;
            TSkin.TBut but = sender as TSkin.TBut;
            but.IsActive = true;
            int state = Convert.ToInt32(but.Tag);

            SystemSettings.VRMode = state;
            effectSetting.player.player.SetConfig(2402, state.ToString());
            if (state == 0)
            {
                effectSetting.player.isVr = false;
            }
            else
            {
                effectSetting.player.isVr = true;
            }
        }
Exemplo n.º 4
0
        private void TypeChange(object sender, EventArgs e)
        {
            b0.IsActive = b1.IsActive = b2.IsActive = b3.IsActive = b4.IsActive = b5.IsActive = b6.IsActive = false;
            TSkin.TBut f = (TSkin.TBut)sender;
            f.IsActive = true;
            switch (f.Tag.ToString())
            {
            case "0":
                if (p1 == null)
                {
                    p1 = new Frm.EffectSettingP1(this)
                    {
                        Dock = DockStyle.Fill
                    };
                    panel2.Controls.Add(p1);
                }
                p1.BringToFront();
                break;

            case "1":
                if (p2 == null)
                {
                    p2 = new Frm.EffectSettingP2(this)
                    {
                        Dock = DockStyle.Fill
                    };
                    panel2.Controls.Add(p2);
                }
                p2.BringToFront();
                break;

            case "2":
                if (p3 == null)
                {
                    p3 = new Frm.EffectSettingP3(this)
                    {
                        Dock = DockStyle.Fill
                    };
                    panel2.Controls.Add(p3);
                }
                p3.BringToFront();
                break;

            case "3":
                if (p4 == null)
                {
                    p4 = new Frm.EffectSettingP4(this)
                    {
                        Dock = DockStyle.Fill
                    };
                    panel2.Controls.Add(p4);
                }
                p4.BringToFront();
                break;

            case "4":
                if (p5 == null)
                {
                    p5 = new Frm.EffectSettingP5(this)
                    {
                        Dock = DockStyle.Fill
                    };
                    panel2.Controls.Add(p5);
                }
                p5.BringToFront();
                break;

            case "5":
                if (p6 == null)
                {
                    p6 = new Frm.EffectSettingP6(this)
                    {
                        Dock = DockStyle.Fill
                    };
                    panel2.Controls.Add(p6);
                }
                p6.BringToFront();
                break;

            case "6":
                if (p7 == null)
                {
                    p7 = new Frm.EffectSettingP7(this)
                    {
                        Dock = DockStyle.Fill
                    };
                    panel2.Controls.Add(p7);
                }
                p7.BringToFront();
                break;
            }
        }