private void Window_Loaded(object sender, RoutedEventArgs e) { size = new System.Drawing.Size((int)grid.ActualWidth, (int)grid.ActualHeight); windowClose = new windowClose(); //windowClose.ShowInTaskbar = false; windowClose.Top = 0; windowClose.Left = size.Width - windowClose.Width; windowClose._Click += windowClose__Click; windowTree = new windowTree(); //windowTree.Topmost = true; windowTree.ShowInTaskbar = false; windowTree.Height = size.Height - 65; windowTree.Left = 0; windowTree.Top = 0; windowTree._SelectedItemChanged += windowTree__SelectedItemChanged; windowTree._MouseEnter += windowControl__MouseEnter; windowTree._MouseLeave += windowControl__MouseLeave; windowControl = new windowControl(); //windowControl.Topmost = true; windowControl.ShowInTaskbar = false; windowControl.Width = size.Width; windowControl.Left = 0; windowControl.Top = size.Height - 65; windowClose.Owner = this; windowTree.Owner = this; windowControl.Owner = this; windowClose.Show(); windowTree.Show(); windowControl.Show(); if (pageStageList.Count > 0) { LoadPage(pageStageList[0].PageId); } windowTree.treeView.ItemsSource = Globals.treeviewSource; windowControl._MouseEnter += windowControl__MouseEnter; windowControl._MouseLeave += windowControl__MouseLeave; windowControl._ValueChanged += windowControl__ValueChanged; windowControl._PlayStop += windowControl__PlayStop; windowControl._Previous += windowControl__Previous; windowControl._Next += windowControl__Next; windowControl._PlayPause += windowControl__PlayPause; windowControl._ShrinkChanged += windowControl__ShrinkChanged; windowControl._MenuVisibleChanged += windowControl__MenuVisibleChanged; windowControl._VolumeChanged += windowControl__VolumeChanged; }
public void InitPlayer() { size = new System.Drawing.Size((int)grid.ActualWidth, (int)grid.ActualHeight); SetTittle(TittleName); windowTree = new windowTree(); //windowTree.Topmost = true; _SelectedItemChanged += windowTree__SelectedItemChanged; _MouseEnter += windowControl__MouseEnter; _MouseLeave += windowControl__MouseLeave; windowControl = new windowControl(); if (pageStageList.Count > 0) { LoadPage(pageStageList[0].PageId); } treeView.ItemsSource = Globals.treeviewSource; windowControl.Opacity = 0; windowControl.Height = 0; windowControl.Width = 0; windowControl._ValueChanged += windowControl__ValueChanged; windowControl._PlayStop += windowControl__PlayStop; windowControl._Previous += windowControl__Previous; windowControl._Next += windowControl__Next; windowControl._PlayPause += windowControl__PlayPause; windowControl._VolumeChanged += windowControl__VolumeChanged; controlSound.VolumeChanged += windowControl__VolumeChanged; BtnUp.Click += windowControl__Previous; BtnNext.Click += windowControl__Next; windowControl.Show(); }