public ChangeRedYellow(MainWindow mn, ChangeLight chgLight) { Thrd = new Thread(this.Run); Thrd.Name = "RYThread"; main = mn; light = chgLight; }
public ChangeYellowGreen(MainWindow mn, ChangeLight chgLight) { Thrd = new Thread(this.Run); Thrd.Name = "YGThread"; main = mn; light = chgLight; }
public ChangeGreenYellow(MainWindow mn, ChangeLight chgLight) { Thrd = new Thread(this.Run); Thrd.Name = "GYThread"; main = mn; light = chgLight; }
public ChangeYellowRed(MainWindow mn, ChangeLight chgLight) { Thrd = new Thread(this.Run); Thrd.Name = "YRThread"; main = mn; light = chgLight; //Thrd.Start(); }
//static ChangeLight chgLight = new ChangeLight(); public ChangeGreenYellow(MainWindow mn) { Thrd = new Thread(this.Run); Thrd.Name = "GYThread"; main = mn; light = new ChangeLight(); //Thrd.Start(); }
public ChangeGreenYellow(MainWindow mn) { Thrd = new Thread(this.Run); Thrd.Name = "GYThread"; main = mn; //ellipse = el; changeLight = new ChangeLight(); }
public ChangeYellowGreen(MainWindow mn) { Thrd = new Thread(this.Run); Thrd.Name = "YGThread"; main = mn; //ellipse = el; changeLight = new ChangeLight(); }
public MainWindow() { InitializeComponent(); def = Green.Fill; changeLight = new ChangeLight(); RY = new ChangeRedYellow(this, changeLight); YG = new ChangeYellowGreen(this, changeLight); GY = new ChangeGreenYellow(this, changeLight); YR = new ChangeYellowRed(this, changeLight); myDelegate = new ChangeColor(ChangeColorMethod); }
void Run(object obj) { while (true) { ChangeLight.mtx.WaitOne(); if (ChangeLight.precessing) { ChangeLight.Change((Ellipse)obj, main); ChangeLight.mtx.ReleaseMutex(); ChangeLight.mtx.WaitOne(); } else { break; } } }
public ChangeYellowRed(MainWindow mn) { Thrd = new Thread(this.Run); Thrd.Name = "YRThread"; main = mn; changeLight = new ChangeLight(); //ellipse = el; }