{\r
public partial class MainPage : System.Windows.Controls.UserControl\r
{\r
- System.Collections.Generic.IEnumerator<int> main_routine;\r
+ //System.Collections.Generic.IEnumerator<int> main_routine;\r
public System.Windows.Controls.Image master;\r
public PsychlopsMain main;\r
#if DEBUG\r
\r
main = new PsychlopsMain();\r
//main.initialize();\r
- //main_routine = new System.Threading.Thread(ThreadTest2);\r
- //main_routine.Start();\r
- main_routine = main.psychlops_main();\r
+ Main.flag = new System.Threading.AutoResetEvent(false);\r
+ Main.routine = new System.Threading.Thread(main.psychlops_main);\r
+ Main.routine.Start();\r
+ //main_routine = main.psychlops_main();\r
#if DEBUG\r
DebugConsole = new System.Windows.Controls.TextBlock();\r
TotalRoot.Children.Add(DebugConsole);\r
int nextIntervalFrame = 1;\r
private void CompositionTarget_Rendering(object sender, System.EventArgs e)\r
{\r
+ if (Main.canvas != null) Main.canvas.executeFlip();\r
+ Main.flag.Set();\r
nextIntervalFrame--;\r
if (nextIntervalFrame<=0)\r
{\r
- main_routine.MoveNext();\r
- nextIntervalFrame = main_routine.Current;\r
+ //main_routine.MoveNext();\r
+ //nextIntervalFrame = main_routine.Current;\r
}\r
}\r
\r