// Start is called before the first frame update void Start() { sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); timerView = gameObject.GetComponent <Text>(); ecm = userCursor.GetComponent <ExCursorMove>(); trialTime = sm.timeLimit; }
private int EditEmployee(ArchivesEmployeeIdentityDto dto, int record, ArchivesEmployeeIdentityModel empIdentityMdl, ArStudyModel studyMdl, ArTelModel telMdl) { ArStudyModel oldStudyMdl = null; ArTelModel oldTelMdl = null; ArDepartmentChangeLibModel departmentMdl = null; ArPostChangeLibModel postMdl = null; ArchivesEmployeeIdentityModel oldEmpIdentityMdl = new ArchivesEmployeeIdentityModel(); ArchiveEntityMapper.GetStudyDataFrom(dto, oldEmpIdentityMdl, out oldStudyMdl); ArchiveEntityMapper.GetTelDataFrom(dto, oldEmpIdentityMdl, out oldTelMdl); ArchiveEntityMapper.GetDepartmentDataFrom(dto, oldEmpIdentityMdl, out departmentMdl); ArchiveEntityMapper.GetPostDataFrom(dto, oldEmpIdentityMdl, out postMdl); ////添加修改逻辑 record = this.irep.Update(u => u.Id_Key == dto.Id_Key, empIdentityMdl); ////处理外部逻辑 ////1.修改学习信息存储 record += StudyManager.Edit(studyMdl, oldStudyMdl); ////2.修改联系方式信息存储 record += TelManager.Edit(telMdl, oldTelMdl); ////3.修改部门信息存储 record += this.DepartmentMananger.Edit(departmentMdl); ////4.修改岗位信息存储 record += this.PostManager.Edit(postMdl); return(record); }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); judgeAndTimerText = gameObject.GetComponent <Text>(); discoveredTime = 0.0f; judgeAndTimerText.text = ""; }
/// <summary> /// les donnee concernant une salaire /// </summary> public PayrollCard(Payroll payroll) { PayrollGuid = payroll.PayrollGuid; Designation = payroll.Designation; IsPaid = payroll.IsPaid; TotalSalary = 0; Employment employ; using (var db = new EconomatContext()) employ = db.Employments.Find(payroll.EmploymentGuid); var payrollStart = employ.SalaryRecurrence == InstallmentRecurrence.Once ? employ.StartDate.GetValueOrDefault() : payroll.PaycheckDate.GetValueOrDefault().AddMonths(-((int)employ.SalaryRecurrence)); switch (employ.PayType) { case PayType.HoursTaught: TotalSalary = PayrollManager.StaticGetTeachingSalary(employ.StaffGuid, payrollStart, payroll.PaycheckDate, true); RenumerationsCards.Add(new DataCard { Info1 = "Heures Enseignées", Info2 = StudyManager.StaticGetHoursTaught(employ.StaffGuid, payrollStart, payroll.PaycheckDate, true).TotalHoursMins(), Info3 = TotalSalary.ToString("0.##", CultureInfo.CurrentCulture) + " dhs" }); break; //case PayType.HoursWorked: // TotalSalary=(payroll.HoursWorked.TotalMinutes*(employ.HourlyPay/60)); // RenumerationsCards.Add(new DataCard { // Info1="Heures Travaillées", // Info2=payroll.HoursWorked.TotalHoursMins(), // Info3=TotalSalary.ToString("0.##", CultureInfo.CurrentCulture)+" dhs" // }); // break; } foreach (var salary in PayrollManager.StaticGetSalaries(employ.EmploymentGuid, payrollStart, payroll.PaycheckDate)) { RenumerationsCards.Add(new DataCard(salary)); TotalSalary += salary.Remuneration; } if (payroll.PaycheckDate > DateTime.Today) { TotalSalaryString = "Estimation: " + TotalSalary.ToString("0.##", CultureInfo.CurrentCulture) + " dhs"; } else { TotalSalaryString = "Total: " + TotalSalary.ToString("0.##", CultureInfo.CurrentCulture) + " dhs"; } if (!payroll.IsPaid) { return; } TotalSalary = payroll.FinalPaycheck; TotalSalaryString = "Paid: " + TotalSalary.ToString("0.##", CultureInfo.CurrentCulture) + " dhs"; NumeroReference = "Ref: " + payroll.NumeroReference; Observations = "Finance User (" + payroll.DatePaid.GetValueOrDefault().ToShortDateString() + ")"; //+" par "+payroll.PaymentMethode.GetEnumDescription(); YesNoColor = "Blue"; }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); subjectNameField = GameObject.Find("SubjectNameField").GetComponent <InputField>(); itvc = timerPanel.GetComponent <IntervalTimerViewController>(); csp = startPanel.GetComponent <ControlStartPanel>(); it = intervalTimer.GetComponent <IntervalTimer>(); }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); canvasGroup = gameObject.GetComponent <CanvasGroup>(); canvasGroup.alpha = 0; canvasGroup.interactable = false; canvasGroup.blocksRaycasts = false; }
private void Start() { if (Owner.isStudy) { currentAgent.gameObject.SetActive(true); timeTillNextAgent.gameObject.SetActive(true); studyManager = GameObject.Find("StudyManager").GetComponent <StudyManager>(); } }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); AreaSpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); float cx = Screen.width / 2; float cy = Screen.height / 2; AreaSpriteRenderer.transform.position = new Vector3(Camera.main.transform.position.x, Camera.main.transform.position.y, 0); }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); pm = gameObject.GetComponent <PositionManager>(); startscreen = GameObject.Find("StartText").GetComponent <Text>(); t4 = new string[, ] { { "m", "1" }, { "r", "2" }, { "s", "3" }, { "r", "1" }, { "s", "2" }, { "m", "3" } }; linePositions = new List <Vector3>(); sphere = GameObject.Find("Small Sphere"); lr = sphere.AddComponent <LineRenderer>(); lr.material = new Material(Shader.Find("Sprites/Default")); lr.material.SetColor("_Color", Color.green); lr.widthMultiplier = 0.01f; lr.positionCount = 0; //var b = GameObject.Find("targetBuildings"); for (int i = 0; i < modelObjects.transform.childCount; i++) { modelObjects.transform.GetChild(i).gameObject.SetActive(false); targetPlacement.transform.GetChild(i).gameObject.SetActive(false); } for (int i = 0; i < targetPlacementt5.transform.childCount; i++) { targetPlacementt5.transform.GetChild(i).gameObject.SetActive(false); modelObjectst5.transform.GetChild(i).gameObject.SetActive(false); } //text = GameObject.Find("t").GetComponent<Text>(); originalColor = targetPlacementt5.transform.GetChild(0).GetComponent <Renderer>().material.GetColor("_Color"); while (File.Exists("Assets/Logs/participant" + participant + ".txt")) { participant++; } StreamWriter writer = new StreamWriter("Assets/Logs/participant" + participant + ".txt", false); writer.WriteLine("participant,task,subtask,time_since_start,accuracy,accuracyrot,accuracyscale,overall_time,mode,is_end,exited,controller"); writer.Close(); icenter = gameObject.GetComponent <WIM_vive>(); acc = new float[sm.t1_contr.GetLength(1), targetPlacementt5.transform.childCount *2, 3]; times = new float[sm.t1_contr.GetLength(1), targetPlacementt5.transform.childCount *2]; }
protected virtual void Start() { sphere = GameObject.Find("Small Sphere"); tracker = GameObject.Find("Hand2"); controller = GameObject.Find("Hand1"); controllerVis = GameObject.Find("viveC"); tm = gameObject.GetComponent <TaskManager_vive>(); sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); go = tracker; }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); excv = userCursor.GetComponent <ExCursorMove>(); exdc = dummyCursor.GetComponent <ExDummyCreator>(); jatv = judgeAndTimeView.GetComponent <JudgeAndTimeViewer>(); itvc = timerPanel.GetComponent <IntervalTimerViewController>(); timerView = gameObject.GetComponent <Text>(); ctp = trialPanel.GetComponent <ControlTrialPanel>(); intervalTime = sm.sessionIntervalTime;// interval is 3 seconds }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); jatv = judgeAndTimeView.GetComponent <JudgeAndTimeViewer>(); itvc = timerPanel.GetComponent <IntervalTimerViewController>(); it = intervalTimer.GetComponent <IntervalTimer>(); ctp = trialPanel.GetComponent <ControlTrialPanel>(); tv = timerView.GetComponent <TimerView>(); cx = Screen.width / 2; cy = Screen.height / 2; }
void Start() { //print (loadXMLStandalone ("fottiti.xml")); sm = gameObject.GetComponent <StudyManager>(); voice = new SpVoice(); vp = gameObject.GetComponent <VideoPlayer>(); //TextAsset txt = (TextAsset)Resources.Load("readme", typeof(TextAsset)); // TextAsset txt = (TextAsset)Resources.Load("builtIn.xml", typeof(XmlText)); // TextAsset textXML = (TextAsset)Resources.Load("builtIn", typeof(TextAsset)); // BuiltAsset = textXML.text; //TextAsset textAsset = (TextAsset) Resources.Load("builtIn.xml"); plane.SetActive(false); }
public void GetAll_ReturnsAllStudies() { // Arrange var mock = new Mock <IFileLoader>(); mock.Setup(p => p.LoadStudies("./Files")).Returns(studiesTest); StudyManager studyManager = new StudyManager(mock.Object); // Act var result = studyManager.GetAll(); // Assert Assert.AreEqual(2, result.Count()); }
public void GetStudyByGUID_ReturnsStudy() { // Arrange var mock = new Mock <IFileLoader>(); mock.Setup(p => p.LoadStudies("./Files")).Returns(studiesTest); StudyManager studyManager = new StudyManager(mock.Object); // Act var result = studyManager.GetStudyByGUID("study_guid_1"); // Assert Assert.AreEqual(study1, result); }
void Awake() { if (Instance != null) { Destroy(gameObject); return; } DontDestroyOnLoad(this); Instance = this; ParticipantId = "P" + (PlayerPrefs.GetInt("ParticipantId", 0) + 1); BlockId = "B1"; Condition = Conditions.Direct; StudyNumber = StudyEnum.Study1; }
private int AddEmployee(int record, ArchivesEmployeeIdentityModel empIdentityMdl, ArStudyModel studyMdl, ArTelModel telMdl, ArPostChangeLibModel postMdl, ArDepartmentChangeLibModel departmentMdl) { record = this.UpdataEMployee(empIdentityMdl); ////处理外部逻辑 ////1.处理学习信息存储 StudyManager.Insert(studyMdl); ////2.处理联系方式信息 TelManager.Insert(telMdl); //3.初始化岗位信息 PostManager.InitPost(postMdl); //4.初始化部门信息 this.DepartmentMananger.InitDepartment(departmentMdl); //5.初始化班别信息 AttendanceService.ClassTypeSetter.InitClassType(CreateClassTypeModel(empIdentityMdl)); return(record); }
/// <summary> /// Initializes this view with the provided settings. /// </summary> /// <param name="settings">The settings for the view.</param> public override void Init(VisProperties settings) { if (isInitialized) { Reset(); } if (Services.DataManager() == null || Services.DataManager().CurrentStudy == null) { // no study loaded return; // vis is now reset, we return because there is nothing to load } Settings = ParseSettings(settings); // parse the settings from the settings object, also makes a deep copy VisId = Settings.VisId; // set callbacks for UI buttons if (PlayButton) { PlayButton.OnClick.AddListener(TogglePlayback); } if (ReduceSpeedButton) { ReduceSpeedButton.OnClick.AddListener(ReducePlaybackSpeed); } if (IncreaseSpeedButton) { IncreaseSpeedButton.OnClick.AddListener(IncreasePlaybackSpeed); } studyManager = Services.StudyManager(); studyManager.TimelineEventBroadcast.AddListener(TimelineUpdated); studyManager.TimeFilterEventBroadcast.AddListener(TimeFilterUpdated); sliderGestureControl = GetComponentInChildren <TimeSliderGestureControl>(); scale = GetComponentInChildren <TimelineScale>(); sliderGestureControl.OnUpdateEvent.AddListener(UpdatedSlider); filterSliderGestureControl = GetComponentInChildren <TimeFilterSliderGestureControl>(); filterSliderGestureControl.OnUpdateEvent.AddListener(UpdatedFilterSlider); scale.Init(0.9f); isInitialized = true; UpdateView(); UpdateEventVis(settings); }
// Use this for initialization private void Start() { realHMD = Camera.main.transform; simulatedHMD = realHMD.parent; realPrevPos = realHMD.position; simulatedPrevPos = simulatedHMD.position; leftPrevPos = leftController.position; rightPrevPos = rightController.position; realPrevRotation = realHMD.eulerAngles; leftPrevRotation = leftController.eulerAngles; rightPrevRotation = rightController.eulerAngles; studyManager = FindObjectOfType <StudyManager>(); RprevTaskpos = realPrevPos; SprevTaskpos = simulatedPrevPos; }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); MainSpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); ChangeCursorVisual(sm.selectedVisual); }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); spriteRenderer = gameObject.GetComponent <SpriteRenderer>(); ChangeCursorVisual(0); }
private void Awake() { Instance = this; }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); dummies = new GameObject[1]; }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); hpView = gameObject.GetComponent <Text>(); }
// Start is called before the first frame update void Start() { sm = studyManager.GetComponent <StudyManager>(); sessionView = gameObject.GetComponent <Text>(); totalSessionNum = sm.studySessions.Count; }
// Use this for initialization void Start() { txt = GetComponent <Text> (); studyManager = FindObjectOfType <StudyManager>(); record = FindObjectOfType <Recorder>(); }