public virtual void Setup() { Transform win = transform.Find("Screen").Find("UI").Find("Canvas").Find("Windows"); Numpad = win.parent.Find("Screen").GetComponentInChildren <NumpadController>(); Sound = GetComponent <ComputerSounds>(); Sound.Setup(this); Login = win.GetComponent <LoginController>(); Login.Setup(this); Desktop = win.GetComponent <DesktopController>(); Desktop.Setup(); SS = win.GetComponent <StudentStress>(); SS.Setup(); Windows = win.GetComponent <ComputerWindows>(); Windows.Setup(this); Calculator = win.GetComponent <CalculatorController>(); Calculator.Setup(); Question = win.GetComponent <QuestionController>(); Question.Setup(); Exam = win.GetComponent <ExamController>(); Text = win.GetComponent <TextController>(); Text.Setup(); Commands = new ComputerCommands(this); }
/// <summary> /// Constracture /// </summary> public MainWindowComputerViewModel() { computers = new MTObservableCollection <string>(); AllComputersButtons = new ObservableCollection <Button>(); _ComputerCommandsviewModel = new ComputerCommands(); ICommandSets(); load(); }