X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test4%2FMainPage.xaml.cs;h=a125451311ae46e74e9bd51ae4ee47673ed55730;hb=31576ff22c345dea6ef3a1f6d24b031a08a3a62f;hp=3925f7b678e7bbdf8457e5175c4bc3226413873f;hpb=06a470a0e79a283223a73d8c5f6e43ef76174d97;p=psychlops%2Fsilverlight.git diff --git a/test4/MainPage.xaml.cs b/test4/MainPage.xaml.cs index 3925f7b..a125451 100644 --- a/test4/MainPage.xaml.cs +++ b/test4/MainPage.xaml.cs @@ -1,4 +1,10 @@ using Psychlops; +using System; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Effects; +using System.Windows.Media.Media3D; + namespace PsychlopsSilverlight4test { @@ -10,6 +16,7 @@ namespace PsychlopsSilverlight4test #if DEBUG public System.Windows.Controls.TextBlock DebugConsole; #endif + System.Windows.Controls.Image img; public MainPage() { InitializeComponent(); @@ -38,25 +45,29 @@ namespace PsychlopsSilverlight4test //main_routine = main.psychlops_main(); Psychlops.Internal.Main.statusBar = AppStatusBar; + Psychlops.Internal.Main.layoutRoot = LayoutRoot; //Psychlops.Internal.Main.widgetStack = Controller; AppStatusBar.Text = "Now starting Psychlops environment... please wait a minute"; - var ur = new System.Uri("Resources/logo.png", System.UriKind.RelativeOrAbsolute); - var bitmap = new System.Windows.Media.Imaging.BitmapImage(ur); - var img = new System.Windows.Controls.Image(); - img.Source = bitmap; - System.Windows.Controls.Canvas.SetLeft(img, 100); - System.Windows.Controls.Canvas.SetTop(img, 100); - LayoutRoot.Children.Add(img); - +//eff__ = new Psychlops.Shader.GaborProgram(); +//rect__ = new System.Windows.Shapes.Rectangle(); +//rect__.Width = 200; +//rect__.Height = 200; +//rect__.Effect = eff__; +//rect__.Fill = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Blue); } protected void getFocusMouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { this.Focus(); +//if(!b) { LayoutRoot.Children.Add(rect__); b = true; } } +//System.Windows.Shapes.Rectangle rect__; +//Psychlops.Shader.GaborProgram eff__; +//bool b = false; private void CompositionTarget_Rendering(object sender, System.EventArgs e) { + //Controller.Children.Clear(); if (Main.canvas != null) Main.canvas.executeFlip(); //if (nextIntervalFrame-- <= 0) //{ @@ -66,5 +77,8 @@ namespace PsychlopsSilverlight4test } } + + + }