X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test4%2FMainPage.xaml.cs;h=e368a540434ea3cc2ebaf674ed7ba08b48736fde;hb=2025e2db455b85eae3dec989bdfd39f3c1292df1;hp=7aa4b92e753551fe4e05e67d5f02a0a982e3d361;hpb=cb8916a7a5cd929f57b3f9edd99209680db90546;p=psychlops%2Fsilverlight.git diff --git a/test4/MainPage.xaml.cs b/test4/MainPage.xaml.cs index 7aa4b92..e368a54 100644 --- a/test4/MainPage.xaml.cs +++ b/test4/MainPage.xaml.cs @@ -1,15 +1,16 @@ using Psychlops; -namespace PsychlopsSilverlight3test +namespace PsychlopsSilverlight4test { public partial class MainPage : System.Windows.Controls.UserControl { //System.Collections.Generic.IEnumerator main_routine; public System.Windows.Controls.Image master; - public PsychlopsMain main; + public PsychlopsSilverlightApp.PsychlopsMain main; #if DEBUG public System.Windows.Controls.TextBlock DebugConsole; #endif + System.Windows.Controls.Image img; public MainPage() { InitializeComponent(); @@ -23,21 +24,35 @@ namespace PsychlopsSilverlight3test System.Windows.Application.Current.Host.Settings.MaxFrameRate = 60; System.Windows.Application.Current.Host.Settings.EnableFrameRateCounter = true; System.Windows.Application.Current.Host.Settings.EnableCacheVisualization = false; + //System.Windows.Application.Current.Host.Settings.EnableGPUAcceleration = false; // System.Windows.Media.CompositionTarget.Rendering += new System.EventHandler(CompositionTarget_Rendering); //main_routine = new System.ComponentModel.BackgroundWorker(); //main_routine.DoWork += new System.ComponentModel.DoWorkEventHandler(psychlops_main); //main_routine.RunWorkerAsync(); - main = new PsychlopsMain(); + main = new PsychlopsSilverlightApp.PsychlopsMain(); +// Psychlops.AppState.statusBar. Psychlops.Internal.Main.routine = new System.Threading.Thread(main.psychlops_main); Psychlops.Internal.Main.routine.Start(); //main.initialize(); //main_routine = main.psychlops_main(); Psychlops.Internal.Main.statusBar = AppStatusBar; - Psychlops.Internal.Main.widgetStack = Controller; - AppStatusBar.Text = System.Windows.Application.Current.Host.Settings.EnableGPUAcceleration.ToString(); + //Psychlops.Internal.Main.widgetStack = Controller; + AppStatusBar.Text = "Now starting Psychlops environment... please wait a minute"; + + /* + var ur = new System.Uri("Resources/Benham.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); + Controller.Children.Add(img); + * */ + + } protected void getFocusMouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { this.Focus(); @@ -45,6 +60,7 @@ namespace PsychlopsSilverlight3test private void CompositionTarget_Rendering(object sender, System.EventArgs e) { + //Controller.Children.Clear(); if (Main.canvas != null) Main.canvas.executeFlip(); //if (nextIntervalFrame-- <= 0) //{