public Menu_Layer(MainWindow mainWindow) { InitializeComponent(); this.mainWindow = mainWindow; this.Height = STATICS.SCREEN_HEIGHT; this.Width = STATICS.SCREEN_WIDTH; this.IsManipulationEnabled = false; this.Background = null; //if (STATICS.ALEX_ACTIVE) //{ // menuBars[0] = new Menu_Container(this); // double x = (STATICS.SCREEN_WIDTH - menuBars[0].Width) / 2; // double y = STATICS.SCREEN_HEIGHT - menuBars[0].Height; // Matrix matrix = new Matrix(1, 0, 0, 1, x, y); // menuBars[0].RenderTransform = new MatrixTransform(matrix); // menuBars[0].IsManipulationEnabled = false; // menuBars[0].IsHitTestVisible = false; // this.Children.Add(menuBars[0]); //} //if (STATICS.BEN_ACTIVE) //{ // menuBars[1] = new Menu_Container(this); // double x = (STATICS.SCREEN_WIDTH + menuBars[1].Width) / 2; // double y = menuBars[0].Height; // Matrix matrix = new Matrix(1, 0, 0, 1, 0, 0); // matrix.Rotate(180); // matrix.Translate(x, y); // menuBars[1].RenderTransform = new MatrixTransform(matrix); // menuBars[1].IsManipulationEnabled = false; // menuBars[1].IsHitTestVisible = false; // this.Children.Add(menuBars[1]); //} if (STATICS.CHRIS_ACTIVE) { menuBars[2] = new Menu_Container(this); double x = menuBars[2].Height; double y = (STATICS.SCREEN_HEIGHT - menuBars[0].Width) / 2; Matrix matrix = new Matrix(1, 0, 0, 1, 0, 0); matrix.Rotate(90); matrix.Translate(x, y); menuBars[2].RenderTransform = new MatrixTransform(matrix); menuBars[2].IsManipulationEnabled = false; menuBars[2].IsHitTestVisible = false; this.Children.Add(menuBars[2]); } if (STATICS.DANNY_ACTIVE) { menuBars[3] = new Menu_Container(this); double x = STATICS.SCREEN_WIDTH - menuBars[3].Height; double y = (STATICS.SCREEN_HEIGHT + menuBars[3].Width) / 2; Matrix matrix = new Matrix(1, 0, 0, 1, 0, 0); matrix.Rotate(-90); matrix.Translate(x, y); menuBars[3].RenderTransform = new MatrixTransform(matrix); menuBars[3].IsManipulationEnabled = false; menuBars[3].IsHitTestVisible = false; this.Children.Add(menuBars[3]); } }
public Menu_Recycle_Bin(Menu_Container menu) { InitializeComponent(); ImageBrush ib = new ImageBrush(); ib.ImageSource = new BitmapImage(new Uri(@"Resource\Image\recycle_bin.png", UriKind.Relative)); this.Background = ib; mc = menu; }
public Menu_Layer(MainWindow mainWindow) { InitializeComponent(); this.mainWindow = mainWindow; this.Height = STATICS.SCREEN_HEIGHT; this.Width = STATICS.SCREEN_WIDTH; this.IsManipulationEnabled = false; this.Background = null; if (STATICS.ALEX_ACTIVE) { menuBars[0] = new Menu_Container(this, "Alex"); menuBars[0].InitializeContainer(); double x = (STATICS.SCREEN_WIDTH - menuBars[0].Width) / 2; double y = STATICS.SCREEN_HEIGHT - menuBars[0].Height; Matrix matrix = new Matrix(1, 0, 0, 1, x, y); menuBars[0].RenderTransform = new MatrixTransform(matrix); menuBars[0].IsManipulationEnabled = false; menuBars[0].IsHitTestVisible = true; this.Children.Add(menuBars[0]); } if (STATICS.BEN_ACTIVE) { menuBars[1] = new Menu_Container(this, "Ben"); menuBars[1].InitializeContainer(); double x = (STATICS.SCREEN_WIDTH + menuBars[1].Width) / 2; double y = menuBars[0].Height; Matrix matrix = new Matrix(1, 0, 0, 1, 0, 0); matrix.Rotate(180); matrix.Translate(x, y); menuBars[1].RenderTransform = new MatrixTransform(matrix); menuBars[1].IsManipulationEnabled = false; menuBars[1].IsHitTestVisible = true; this.Children.Add(menuBars[1]); } if (STATICS.CHRIS_ACTIVE) { menuBars[2] = new Menu_Container(this, "Chris"); menuBars[2].InitializeContainer(); double x = menuBars[2].Height; double y = (STATICS.SCREEN_HEIGHT - menuBars[0].Width) / 2; Matrix matrix = new Matrix(1, 0, 0, 1, 0, 0); matrix.Rotate(90); matrix.Translate(x, y); menuBars[2].RenderTransform = new MatrixTransform(matrix); menuBars[2].IsManipulationEnabled = false; menuBars[2].IsHitTestVisible = true; this.Children.Add(menuBars[2]); } if (STATICS.DANNY_ACTIVE) { menuBars[3] = new Menu_Container(this, "Danny"); menuBars[3].InitializeContainer(); double x = STATICS.SCREEN_WIDTH - menuBars[3].Height; double y = (STATICS.SCREEN_HEIGHT + menuBars[3].Width) / 2; Matrix matrix = new Matrix(1, 0, 0, 1, 0, 0); matrix.Rotate(-90); matrix.Translate(x, y); menuBars[3].RenderTransform = new MatrixTransform(matrix); menuBars[3].IsManipulationEnabled = false; menuBars[3].IsHitTestVisible = true; this.Children.Add(menuBars[3]); } }