protected override void OnInitComplete(EventArgs e) { GlobalValues.CurrentYear = 2013; GlobalValues.TrendStartYear = 2006; GlobalValues.OverrideByNavLinksNotPresent(GlobalValues.Grade, nlrGrade, GradeKeys.Combined_PreK_12); GlobalValues.OverrideByNavLinksNotPresent(GlobalValues.SubjectID, nlrSubject, SubjectIDKeys.Reading); GradeCodesActive = getGradeCodeRange(); if (!GradeCodesActive.Contains(GlobalValues.Grade.Value)) { GlobalValues.Grade.Key = GradeKeys.Combined_PreK_12; } nlrGrade.LinkControlAdded += new LinkControlAddedHandler(disableGradeLinks_LinkControlAdded); GlobalValues.OverrideSchoolTypeWhenOrgLevelIsSchool_Complete += PageBaseWI.DisableSchoolType; GlobalValues.CompareTo.Key = CompareToKeys.Current; GlobalValues.Group.Key = GroupKeys.All; QueryMarshaller.gradeCodes.ObeyForceDisAgg = true; QueryMarshaller.WsasSubjectCodes.ObeyForceDisAgg = true; base.OnInitComplete(e); }
public void DropdownValueUpdate(int nr) { _mapIndex = nr; map.text = "Map:" + _mapIndex; GlobalValues.SetMapIndex(_mapIndex); SendMapIndex(_mapIndex, RpcTarget.Others); }
public override void Draw(GameTime gameTime) { LinkedList <Vector2> screenTitle = MyFont.GetWord(GlobalValues.TitleFontScaleSize, "Splash Screen"); Vector2 screenTitlePos = GlobalValues.GetWordCenterPos("Splash Screen", true); if (GlobalValues.ValuesInitialized) { if (spriteBatch != null) { spriteBatch.Begin(); spriteBatch.Draw(myImage, new Vector2(0, 0)); spriteBatch.End(); } if (pb != null) { pb.Begin(PrimitiveType.LineList); DrawLander(); DrawLanderRocket(); DisplayKeys(); pb.End(); } else { pb = GlobalValues.PrimitiveBatch; } } }
/// <summary> /// Assigns a value to a field on this object. /// </summary> /// <param name="field">The field to set</param> /// <param name="newValue">The new value to assign to the field</param> /// <param name="fixLength">Determines if the length should be truncated if too long. When false, an error will be raised if data is too large to be assigned to the field.</param> public virtual void SetValue(Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate.FieldNameConstants field, object newValue, bool fixLength) { if (field == Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate.FieldNameConstants.AddedDate) { this.AddedDate = GlobalValues.SetValueHelperDateTimeNotNullableInternal(newValue, "Field 'AddedDate' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate.FieldNameConstants.Count) { this.Count = GlobalValues.SetValueHelperIntNotNullableInternal(newValue, "Field 'Count' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate.FieldNameConstants.Reason) { this.Reason = GlobalValues.SetValueHelperInternal((string)newValue, fixLength, GetMaxLength(field)); } else if (field == Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate.FieldNameConstants.RepositoryId) { this.RepositoryId = GlobalValues.SetValueHelperIntNotNullableInternal(newValue, "Field 'RepositoryId' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate.FieldNameConstants.RowId) { throw new Exception("Field '" + field.ToString() + "' is a primary key and cannot be set!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.CacheInvalidate.FieldNameConstants.Subkey) { this.Subkey = GlobalValues.SetValueHelperInternal((string)newValue, fixLength, GetMaxLength(field)); } else { throw new Exception("Field '" + field.ToString() + "' not found!"); } }
protected override void OnInitComplete(EventArgs e) { GlobalValues.TrendStartYear = 1997; GlobalValues.CurrentYear = 2010; //Disable CourseType, Other if (GlobalValues.CourseTypeID.Key == CourseTypeIDKeys.Other) { GlobalValues.CourseTypeID.Value = (String)GlobalValues.GetParamDefault(GlobalValues.CourseTypeID.Name); } //Disable School Level if (UserValues.OrgLevel.Key == OrgLevelKeys.School) { GlobalValues.OrgLevel.Value = GlobalValues.OrgLevel.Range[OrgLevelKeys.District]; pnlMessage.Visible = true; } //Disable Compare To State if (UserValues.CompareTo.Key == CompareToKeys.OrgLevel) { GlobalValues.CompareTo.Value = GlobalValues.CompareTo.Range[CompareToKeys.Current]; } nlrCompareTo.LinkRow.LinkControlAdded += new LinkControlAddedHandler(LinkRow_LinkControlAdded); //STYP not supported GlobalValues.OverrideSchoolTypeWhenOrgLevelIsSchool_Complete += PageBaseWI.DisableSchoolType; //View By Group Not Supported GlobalValues.Group.Value = GlobalValues.Group.Range[GroupKeys.All]; GlobalValues.OverrideByNavLinksNotPresent(GlobalValues.WMAS, nlrSubject, WMASKeys.Other); base.OnInitComplete(e); }
string ExtractValueFromSinglePage(ref Variable variable, ISinglePage singlePage, ref string retval) { if (singlePage.IDataNavigator.CurrentRow > -1) { try { var dataRow = singlePage.IDataNavigator.GetDataRow; var item = dataRow.Find(variable.VariableName); if (item != null) { retval = item.Value.ToString(); } else { retval = GlobalValues.UnkownFunctionMessage(variable.VariableName); WriteLogmessage(variable); } return(retval); } catch (Exception e) { Console.WriteLine("Error in FieldReference.ExtractValueFromSinglePage"); Console.WriteLine("IDataNavigator currentrow = {0} count = {1}", singlePage.IDataNavigator.CurrentRow, singlePage.IDataNavigator.Count); throw e; } } return(variable.VariableName); }
/// <summary> /// Encapsulates retrieving paramName Strings for County, Athletic Conf and CESA. /// </summary> /// <returns></returns> public static String GetRegionString(GlobalValues GlobalValues) { string result = string.Empty; if (GlobalValues.SRegion.Key == SRegionKeys.County && !string.IsNullOrEmpty(GlobalValues.SCounty)) { QueryMarshaller qm = GlobalValues.Page.QueryMarshaller; qm.Database = new DALALLAgencies(); result = ((DALALLAgencies)qm.Database).GetCountyNameByID(GlobalValues.SCounty.Trim()); } else if (GlobalValues.SRegion.Key == SRegionKeys.AthleticConf && !string.IsNullOrEmpty(GlobalValues.SAthleticConf)) { QueryMarshaller qm = GlobalValues.Page.QueryMarshaller; qm.Database = new DALAthleticConf(); result = ((DALAthleticConf)qm.Database).GetAthleticConfNameByID(int.Parse(GlobalValues.SAthleticConf)) + " Athletic Conference"; } else if (GlobalValues.SRegion.Key == SRegionKeys.CESA && !string.IsNullOrEmpty(GlobalValues.SCESA)) { result = (new DALALLAgencies()).GetCESANameByID( (GlobalValues.SCESA).Trim()); } else if (GlobalValues.SRegion.Key == SRegionKeys.Statewide) { result = " the State"; } return(result); }
/// <summary> /// Assigns a value to a field on this object. /// </summary> /// <param name="field">The field to set</param> /// <param name="newValue">The new value to assign to the field</param> /// <param name="fixLength">Determines if the length should be truncated if too long. When false, an error will be raised if data is too large to be assigned to the field.</param> public virtual void SetValue(Gravitybox.Datastore.EFDAL.Entity.Housekeeping.FieldNameConstants field, object newValue, bool fixLength) { if (field == Gravitybox.Datastore.EFDAL.Entity.Housekeeping.FieldNameConstants.Data) { if (newValue == null) { throw new Exception("Field 'Data' does not allow null values!"); } else { this.Data = (System.Byte[])newValue; } } else if (field == Gravitybox.Datastore.EFDAL.Entity.Housekeeping.FieldNameConstants.ID) { throw new Exception("Field '" + field.ToString() + "' is a primary key and cannot be set!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.Housekeeping.FieldNameConstants.Type) { this.Type = GlobalValues.SetValueHelperIntNotNullableInternal(newValue, "Field 'Type' does not allow null values!"); } else { throw new Exception("Field '" + field.ToString() + "' not found!"); } }
void RedirectToSimilar_OnRedirectUser() { String qs = UserValues.GetBaseQueryString(); string NavigateUrl = GlobalValues.CreateURL("~/" + GraphFileKeys.StateTestsSimilar, qs); Response.Redirect(NavigateUrl, true); }
/// <summary> /// Load a default style for the charts /// </summary> /// <param name="chartData"></param> /// <param name="highResolution"></param> public static void LoadDefaultChartStyle(ChartData chartData, bool highResolution = false) { //data.ChartStyle.BackGradientStyle = GradientStyle.TopBottom; //data.ChartStyle.BackgroundColor = Color.White; //data.ChartStyle.BackgroundSecondColor = Color.LightBlue; //data.ChartStyle.CopyrightFontSizeDelta = 0.6F; var chartStyle = GlobalValues.DefaultTypography().ChartStyle; if (highResolution) { chartStyle.Width = 4500; chartStyle.Height = 2781; chartStyle.FontSize = 12; } chartStyle.CopyrightFontSizeDelta = 0.6F; chartStyle.BackgroundColor = Color.Transparent; //_chartStyle.AxisLineColor = Color.DarkBlue; // chartData.ChartStyle = chartStyle; chartData.Copyright = "(c) Testfirma"; }
public void OnConnectionLost() { GlobalValues.SetConnected(false); Image img = loadingBtn.GetComponent <Image>(); LeanTween.color(img.rectTransform, new Color32(255, 255, 255, 255), 1); loadingBtn.GetComponent <LoadingBtnController>().SetAsRetryBtn(); LeanTween.moveLocalY(backBtn, backBtn.transform.localPosition.y + 55 + 10, buttonAnimationTime) .setEase(buttonEaseType); LeanTween.moveLocalY(createRoomBtn, createRoomBtn.transform.localPosition.y + 55 + 10, buttonAnimationTime) .setEase(buttonEaseType); loadingBtn.SetActive(true); LeanTween.alpha(loadingBtn.GetComponent <Image>().rectTransform, 1, buttonAnimationTime) .setEase(buttonEaseType); TextMeshProUGUI loadingBtnText = loadingBtn.transform.GetChild(0).GetComponent <TextMeshProUGUI>(); LeanTween.value(loadingBtnText.gameObject, a => { Color32 textColor = loadingBtnText.color; textColor.a = (byte)a; loadingBtnText.color = textColor; }, 0, 255, 0.4f); }
/// <summary> /// Convert a single item, Location is calculated as follows /// </summary> /// <param name="offset"> only Y value is used, gives the offset to Items location.Y </param> /// <param name="item">Item to convert</param> /// <returns></returns> private static void RenderLineItem(BaseReportItem item, Point offset, IExpressionEvaluatorFacade evaluator, ReportPageEventArgs rpea) { Point saveLocation = new Point(item.Location.X, item.Location.Y); PrintHelper.AdjustChildLocation(item, offset); IReportExpression epr = item as IReportExpression; string evaluatedValue = String.Empty; if (epr != null) { try { if (!String.IsNullOrEmpty(epr.Expression)) { evaluatedValue = evaluator.Evaluate(epr.Expression); } else { evaluatedValue = evaluator.Evaluate(epr.Text); } epr.Text = evaluatedValue; } catch (UnknownFunctionException ufe) { epr.Text = GlobalValues.UnkownFunctionMessage(ufe.Message); } } item.Render(rpea); item.Location = saveLocation; }
public override void Run() { reportStructure = new ReportStructure(); customizer.Set("Generator", reportStructure); customizer.Set("ReportLayout", GlobalEnums.ReportLayout.ListLayout); if (GlobalValues.IsValidPrinter() == true) { using (WizardDialog wizard = new WizardDialog("Report Wizard", customizer, WizardPath)) { if (wizard.ShowDialog() == DialogResult.OK) { reportModel = reportStructure.CreateAndFillReportModel(); CreateReportFromModel(reportModel); } else { this.canceled = true; } } } else { MessageService.ShowError(ResourceService.GetString("Sharpreport.Error.NoPrinter")); } }
private void ShowControls() { int yStart = 10 + GlobalValues.FontYSpacer; LinkedList <Vector2> turn = MyFont.GetWord(GlobalValues.FontScaleSize, "Arrow keys or A:D to rotate"); LinkedList <Vector2> thrust = MyFont.GetWord(GlobalValues.FontScaleSize, "W:Space:Up Arrow to thrust"); LinkedList <Vector2> pause = MyFont.GetWord(GlobalValues.FontScaleSize, "P:ESC to pause"); Vector2 turnPosition = new Vector2(GlobalValues.GetWordCenterPos("Arrow keys or A:D to rotate", false).X, yStart); Vector2 thrustPosition = new Vector2(GlobalValues.GetWordCenterPos("W:Space:Up Arrow to thrust", false).X, yStart + GlobalValues.FontYSpacer); Vector2 pausePosition = new Vector2(GlobalValues.GetWordCenterPos("P:ESC to pause", false).X, yStart + (GlobalValues.FontYSpacer * 2)); foreach (Vector2 v2 in turn) { pb.AddVertex(v2 + turnPosition, Color.White); } foreach (Vector2 v2 in thrust) { pb.AddVertex(v2 + thrustPosition, Color.White); } foreach (Vector2 v2 in pause) { pb.AddVertex(v2 + pausePosition, Color.White); } }
protected void RepeaterOptions_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { SettingEntity ThemeSetting = (e.Item.DataItem as SettingEntity).Clone(); KeyValueEntity KeyValue = GlobalValues.Find(r1 => r1.Key == ThemeSetting.Name); if (KeyValue != null && !String.IsNullOrEmpty(KeyValue.Key)) { ThemeSetting.DefaultValue = KeyValue.Value.ToString(); } //构造输入控件 PlaceHolder ThemePH = e.Item.FindControl("ThemePH") as PlaceHolder; #region "创建控件" ControlHelper ctl = new ControlHelper(this); ThemePH.Controls.Add((Control)ctl.ViewControl(ThemeSetting)); #endregion Literal liTitle = e.Item.FindControl("liTitle") as Literal; liTitle.Text = ViewTitleAndHelp(ThemeSetting); if (!String.IsNullOrEmpty(ThemeSetting.Description)) { Literal liHelp = e.Item.FindControl("liHelp") as Literal; liHelp.Text = String.Format("<span class=\"help-block\"><i class=\"fa fa-info-circle\"></i> {0}</span>", ThemeSetting.Description); } } }
private void Start() { globalValues = GameObject.Find("GlobalValues").GetComponent <GlobalValues>(); audioSource = GetComponent <AudioSource>(); globalValues.ForceLoad(); UpdateStats(); }
// Update is called once per frame void Update() { RaycastHit hit; Vector3 rayOriginVector3 = mainCamera.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, 0)); if (Input.GetButtonDown("Fire1")) { if (GlobalValues.Ammo > 0) { GlobalValues.Ammo -= 1; if (Physics.Raycast(rayOriginVector3, mainCamera.transform.forward, out hit, range)) { IDmg dmg = hit.collider.gameObject.GetComponent <IDmg>(); if (dmg != null) { dmg.TakeDamage(damage); } } } else { GlobalValues.Realod(); } } }
/// <summary> /// Assigns a value to a field on this object. /// </summary> /// <param name="field">The field to set</param> /// <param name="newValue">The new value to assign to the field</param> /// <param name="fixLength">Determines if the length should be truncated if too long. When false, an error will be raised if data is too large to be assigned to the field.</param> public virtual void SetValue(Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants field, object newValue, bool fixLength) { if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.Intention) { this.Intention = GlobalValues.SetValueHelperBoolNotNullableInternal(newValue, "Field 'Intention' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.IsRead) { this.IsRead = GlobalValues.SetValueHelperBoolNotNullableInternal(newValue, "Field 'IsRead' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.LockId) { throw new Exception("Field '" + field.ToString() + "' is a primary key and cannot be set!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.LockTime) { this.LockTime = GlobalValues.SetValueHelperDateTimeNotNullableInternal(newValue, "Field 'LockTime' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.MachineId) { this.MachineId = GlobalValues.SetValueHelperIntNotNullableInternal(newValue, "Field 'MachineId' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.LockValue.FieldNameConstants.RepositoryId) { this.RepositoryId = GlobalValues.SetValueHelperIntNotNullableInternal(newValue, "Field 'RepositoryId' does not allow null values!"); } else { throw new Exception("Field '" + field.ToString() + "' not found!"); } }
/// <summary> /// Assigns a value to a field on this object. /// </summary> /// <param name="field">The field to set</param> /// <param name="newValue">The new value to assign to the field</param> /// <param name="fixLength">Determines if the length should be truncated if too long. When false, an error will be raised if data is too large to be assigned to the field.</param> public virtual void SetValue(Gravitybox.Datastore.EFDAL.Entity.ServiceInstance.FieldNameConstants field, object newValue, bool fixLength) { if (field == Gravitybox.Datastore.EFDAL.Entity.ServiceInstance.FieldNameConstants.FirstCommunication) { this.FirstCommunication = GlobalValues.SetValueHelperDateTimeNotNullableInternal(newValue, "Field 'FirstCommunication' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.ServiceInstance.FieldNameConstants.InstanceId) { if (newValue == null) { throw new Exception("Field 'InstanceId' does not allow null values!"); } else { this.InstanceId = (System.Guid)newValue; } } else if (field == Gravitybox.Datastore.EFDAL.Entity.ServiceInstance.FieldNameConstants.LastCommunication) { this.LastCommunication = GlobalValues.SetValueHelperDateTimeNotNullableInternal(newValue, "Field 'LastCommunication' does not allow null values!"); } else if (field == Gravitybox.Datastore.EFDAL.Entity.ServiceInstance.FieldNameConstants.RowId) { throw new Exception("Field '" + field.ToString() + "' is a primary key and cannot be set!"); } else { throw new Exception("Field '" + field.ToString() + "' not found!"); } }
private void Start() { LeanTween.moveLocalX(mainContent, 1236, 0); LeanTween.moveLocalX(mainContent, 0, contentAnimationTime).setEase(contentEaseInType); _myPhotonView = GetComponent <PhotonView>(); UpdatePlayerCounter(); //Setting info panel text playerName.text = GlobalMethods.CleanNickname(PhotonNetwork.NickName); connectionStatus.text = "Connected"; UpdatePlayerCounter(); role.text = GlobalMethods.GetRole(PhotonNetwork.NickName); GlobalValues.SetRole(GlobalMethods.GetRole(PhotonNetwork.NickName)); //Asking for map index photonView.RPC("RPC_RequestMapIndex", RpcTarget.MasterClient, PhotonNetwork.LocalPlayer); foreach (var player in PhotonNetwork.PlayerList) { uiController.AddPlayerToList(player); } }
protected override void OnInit(EventArgs e) { System.Diagnostics.Debug.WriteLine("Entered PageBaseWI.OnInit"); OnCheckPrerequisites += CheckSelectedSchoolOrDistrict; OnRedirectUser += decommissionedPagesRedirect; userValues = new GlobalValues(); globalValues = new GlobalValues(); globalValues.Page = this; //Warning: dependencies between rules dictate order in which they are called InitComplete += GlobalValues.OverrideCompareToWhenOrgLevelIsState; InitComplete += GlobalValues.OverrideSchoolTypeWhenGroupIsGrade; InitComplete += GlobalValues.OverrideSchoolTypeWhenOrgLevelIsSchool; InitComplete += GlobalValues.OverrideGroupWhenSchoolTypeIsAll; InitComplete += GlobalValues.OverrideLowGradeHighGradeForPriorYears; queryMarshaller = new QueryMarshaller(globalValues); titleBuilder = new TitleBuilder(globalValues); base.OnInit(e); //ineligant handling of inelegant extension of CompareTo that is really just the Similar Schools page: if (GlobalValues.CompareTo.Key == CompareToKeys.SimSchools && System.IO.Path.GetFileName(Request.Path) != GraphFileKeys.StateTestsSimilar) { GlobalValues.CompareTo.Key = CompareToKeys.Years; } }
private static ReturnMessageWrapper ResponseClient(MessageWrapper wrapper, string result, string operation) { var eventdata = new Common.DTO.EventDTO(result, wrapper.Clientid, wrapper.Messageid); Common.MessageQueue.EventClient.Instance.RaiseEvent(GlobalValues.GetRouteFunction(operation), eventdata); if (result != null) { return(ReturnMessageWrapper.CreateResult(true, wrapper, new System.Collections.Generic.List <LocalizedString>() { new LocalizedString() { Lang = "en", Text = "OK" } }, result)); } else { return(ReturnMessageWrapper.CreateResult(true, wrapper, new System.Collections.Generic.List <LocalizedString>() { new LocalizedString() { Lang = "en", Text = "Missing rights" } }, result)); } }
protected override void DestroySelf() { if (!isDestroying) { isDestroying = true; GetComponent <Collider2D>().enabled = false;; Vector3 pos = this.transform.position; pos.z -= 1; GameObject exp = Instantiate(Explosion, pos, Quaternion.identity); Destroy(exp, 1); if (isBoss) { pos += new Vector3(1, 1, 0); GameObject exp2 = Instantiate(Explosion, pos, Quaternion.identity); Destroy(exp2, 1); pos += new Vector3(-1, 0, 0); GameObject exp3 = Instantiate(Explosion, pos, Quaternion.identity); Destroy(exp3, 1); pos += new Vector3(-1, -1, 0); GameObject exp4 = Instantiate(Explosion, pos, Quaternion.identity); Destroy(exp4, 1); StartCoroutine(Win()); } else { GlobalValues val = GameObject.Find("GlobalValues").GetComponent <GlobalValues>(); val.Scrap += Scrap; val.UpdateStats(); Destroy(gameObject, 0.1f); } } }
private void CompareToSelectedRedirect() { System.Diagnostics.Debug.WriteLine("CompareToSelectedRedirect()"); string qs = string.Empty; string filedest = string.Empty; OrgLevel ol = GlobalValues.OrgLevel; //hackish escape from redirect:: String magicPageNameString = "ChooseSelected"; /*if (ol.Key == OrgLevelKeys.District) filedest = magicPageNameString + "Districts.aspx"; * else if (ol.Key == OrgLevelKeys.School) filedest = magicPageNameString + "Schools.aspx"; * else throw new Exception("Invalid OrgLevel for Selected Fullkeys Redirect");*/ filedest = magicPageNameString + ".aspx"; // so that the redirect does not get into an endless loop. // and so we can select a different question if (Request.FilePath.Contains(magicPageNameString) || Request.FilePath.Contains("questions.aspx") || Request.FilePath.Contains("performance.aspx") || Request.FilePath.Contains("offerings.aspx") || Request.FilePath.Contains("demographics.aspx") || Request.FilePath.Contains("attendance.aspx") ) { return; } qs = UserValues.GetBaseQueryString(); string NavigateUrl = GlobalValues.CreateURL("~/" + filedest, qs); Response.Redirect(NavigateUrl, true); }
/// <summary> /// Assigns a value to a field on this object. /// </summary> /// <param name="field">The field to set</param> /// <param name="newValue">The new value to assign to the field</param> /// <param name="fixLength">Determines if the length should be truncated if too long. When false, an error will be raised if data is too large to be assigned to the field.</param> public virtual void SetValue(Gravitybox.GeoLocation.EFDAL.Entity.CanadaPostalCode.FieldNameConstants field, object newValue, bool fixLength) { if (field == Gravitybox.GeoLocation.EFDAL.Entity.CanadaPostalCode.FieldNameConstants.City) { this.City = GlobalValues.SetValueHelperInternal((string)newValue, fixLength, GetMaxLength(field)); } else if (field == Gravitybox.GeoLocation.EFDAL.Entity.CanadaPostalCode.FieldNameConstants.Latitude) { this.Latitude = GlobalValues.SetValueHelperDoubleNullableInternal(newValue); } else if (field == Gravitybox.GeoLocation.EFDAL.Entity.CanadaPostalCode.FieldNameConstants.Longitude) { this.Longitude = GlobalValues.SetValueHelperDoubleNullableInternal(newValue); } else if (field == Gravitybox.GeoLocation.EFDAL.Entity.CanadaPostalCode.FieldNameConstants.PostalCode) { this.PostalCode = GlobalValues.SetValueHelperInternal((string)newValue, fixLength, GetMaxLength(field)); } else if (field == Gravitybox.GeoLocation.EFDAL.Entity.CanadaPostalCode.FieldNameConstants.RowId) { throw new Exception("Field '" + field.ToString() + "' is a primary key and cannot be set!"); } else { throw new Exception("Field '" + field.ToString() + "' not found!"); } }
private void ShowConfirmationOptions() { float yStart = (GlobalValues.ScreenCenter.Y - (GlobalValues.FontYSpacer * 5)); LinkedList <Vector2> areYouSure = MyFont.GetWord(GlobalValues.FontScaleSize, $"Are you sure you want to delete {mapNames[oldSelectedItem - 1]}"); LinkedList <Vector2> yesOption = MyFont.GetWord(GlobalValues.FontScaleSize, "Yes"); LinkedList <Vector2> noOption = MyFont.GetWord(GlobalValues.FontScaleSize, "No"); Vector2 areYouSurePos = new Vector2(GlobalValues.GetWordCenterPos($"Are you sure you want to delete {mapNames[oldSelectedItem - 1]}", false).X, yStart); Vector2 yesOptionPos = new Vector2(GlobalValues.GetWordCenterPos("Yes", false).X, yStart + (GlobalValues.FontYSpacer * 5)); Vector2 noOptionPos = new Vector2(GlobalValues.GetWordCenterPos("No", false).X, yStart + (GlobalValues.FontYSpacer * 6)); foreach (Vector2 v2 in areYouSure) { pb.AddVertex(v2 + areYouSurePos, Color.White); } foreach (Vector2 v2 in yesOption) { pb.AddVertex(v2 + yesOptionPos, Color.White); } foreach (Vector2 v2 in noOption) { pb.AddVertex(v2 + noOptionPos, Color.White); } List <Vector2> positions = new List <Vector2>() { yesOptionPos, noOptionPos }; ShowSelectedIcon(positions); }
public void SetPriority() { if (Priority < 0) { Priority = GlobalValues.GetNextRenderQueueSlot(); } }
protected override void OnInitComplete(EventArgs e) { GlobalValues.CurrentYear = 2013; GlobalValues.ForceCurrentYear = true; //Disable "All Tested Subjects" if (GlobalValues.SubjectID.Key == SubjectIDKeys.AllTested) { GlobalValues.SubjectID.Key = SubjectIDKeys.Reading; } nlrSubject.LinkControlAdded += new LinkControlAddedHandler(disableAllSubjects_LinkControlAdded); //View By Group Unsupported. GlobalValues.Group.Key = GroupKeys.All; //SchoolType Unsupported. GlobalValues.OverrideSchoolTypeWhenOrgLevelIsSchool_Complete += PageBaseWI.DisableSchoolType; //Compare To Unsupported. GlobalValues.CompareTo.Key = CompareToKeys.Current; //StateLevel Unsupported. if (GlobalValues.OrgLevel.Key == OrgLevelKeys.State) { GlobalValues.OrgLevel.Key = OrgLevelKeys.District; } GlobalValues.FAYCode.Key = FAYCodeKeys.FAY; GlobalValues.OverrideByNavLinksNotPresent(GlobalValues.SubjectID, nlrSubject, SubjectIDKeys.Reading); GlobalValues.OverrideByNavLinksNotPresent(GlobalValues.Grade, nlrGrade, GradeKeys.Combined_PreK_12); GlobalValues.GradeCodesActive = getGradeCodeRange(this); if (GlobalValues.GradeCodesActive.Count > 0 && !GlobalValues.GradeCodesActive.Contains(GlobalValues.Grade.Value)) { GlobalValues.Grade.Value = GlobalValues.GradeCodesActive[0]; //default to minimum grade } nlrGrade.LinkControlAdded += new LinkControlAddedHandler(disableGradeLinks_LinkControlAdded); GlobalValues.OverrideByNavLinksNotPresent(GlobalValues.Level, nlrLevel, LevelKeys.AdvancedProficient); if (GlobalValues.Level.Key == LevelKeys.All) { GlobalValues.Level.Key = LevelKeys.AdvancedProficient; } nlrLevel.LinkControlAdded += new LinkControlAddedHandler(disableLevels_LinkControlAdded); if (GlobalValues.WOW.Key == WOWKeys.WSASCombined && (GlobalValues.Level.Key == LevelKeys.WAA_ELL || GlobalValues.Level.Key == LevelKeys.WAA_SwD)) { GlobalValues.Level.Key = LevelKeys.NoWSAS; } base.OnInitComplete(e); if (GlobalValues.Grade.Key == GradeKeys.Combined_PreK_12) { DataGrid.Columns.FieldsChanged += new EventHandler(renameEnrolledColumn_FieldsChanged); } nlrLevel.LinkControlAdded += new LinkControlAddedHandler(renameLevelLabels_LinkControlAdded); }
private void Form1_Load(object sender, EventArgs e) { GlobalValues.InitPath();//初始化文件路径 //挂在事件 GlobalValues.log_Helper.eventDispProcess += Log_Helper_eventDispProcess; //主界面Log信息显示事件 }
protected void SchoolScript_OnRedirectUser() { string filedest = "selschool.aspx"; string qs = UserValues.GetBaseQueryString(); string NavigateUrl = GlobalValues.CreateURL("~/" + filedest, qs); Response.Redirect(NavigateUrl, true); }
void Start() { // have to use FindGameObjectWithTag instead of just Find because Unity dies trying to Find from this class... constraints = new ArrayList(); GameObject globalObj = GameObject.FindGameObjectWithTag("GlobalTag"); globalVals = globalObj.GetComponent("GlobalValues") as GlobalValues; graphManager = globalObj.GetComponent("GraphManager") as GraphManager; }
// Use this for initialization void Start() { globalValuesScript = Camera.main.GetComponent<GlobalValues>(); //transform.position = (transform.position - sun.position).normalized * planetSunDistance + sun.position; rotationAroundPlanetSpeed = rotationAroundSunDays / defaultEarthYear; // For reveal light - must follow Planet and retain the same position if(revealingLight != null) { revealingLight.transform.LookAt(transform.position); } }
public Ship(GlobalValues G) { this.G = G; Xrot = 0; Yrot = 0; Zrot = 0; Position = new Vector3(0, 50, 0); Banking = new Vector3(speed, (float)(Math.PI / 2), (float)(Math.PI / 2)); speed = 0; Direction = new Vector3(speed, (float)(Math.PI / 2), (float)(Math.PI / 2));//Straight ahead! speed = 75; scale = 1; XYBank = 0; RotX = new Matrix(); RotY = new Matrix(); RotZ = new Matrix(); RotX = Matrix.CreateTranslation(0, 0, 0); RotY = Matrix.CreateTranslation(0, 0, 0); RotZ = Matrix.CreateTranslation(0, 0, 0); DirectionMatrix = Matrix.CreateTranslation(1, 1, 1); }
// Use this for initialization void Start() { meta = GameObject.Find("Globals").GetComponent("GameMetaManager") as GameMetaManager; globalVals = GameObject.Find("Globals").GetComponent("GlobalValues") as GlobalValues; }
public StrawCube(GlobalValues G) { this.G = G; scale = 1; //The cube int Left=-100; int Right = 100; int Up= 100; int Down=-100; int Front=-100; int Back=100; Vector3 LeftUpFront = new Vector3(Left, Front, Up); Vector3 RightUpFront = new Vector3(Right, Front, Up); Vector3 LeftDownFront = new Vector3(Left, Front, Down); Vector3 RightDownFront = new Vector3(Right, Front, Down); Vector3 LeftUpBack = new Vector3(Left, Back, Up); Vector3 RightUpBack = new Vector3(Right, Back, Up); Vector3 LeftDownBack = new Vector3(Left, Back, Down); Vector3 RightDownBack = new Vector3(Right, Back, Down); Vector3[] V3Array= new Vector3[8]; Vector3 V3ArrayNormal = new Vector3(0, 0, 1); V3Array[0]=LeftUpFront; V3Array[1]=RightUpFront; V3Array[2] = RightDownFront; V3Array[3]=LeftDownFront; V3Array[4]=LeftUpBack; V3Array[5]=RightUpBack; V3Array[6] = RightDownBack; V3Array[7]=LeftDownBack; //VertexPositionColor Points = new VertexPositionColor(); List<VertexPositionColorNormal> pointlist= new List<VertexPositionColorNormal>(); for(int i=0; i<3;i++) { pointlist.Add(new VertexPositionColorNormal(V3Array[i], V3ArrayNormal, Color.White)); pointlist.Add(new VertexPositionColorNormal(V3Array[i+1], V3ArrayNormal, Color.White)); } pointlist.Add(new VertexPositionColorNormal(V3Array[0], V3ArrayNormal, Color.White)); pointlist.Add(new VertexPositionColorNormal(V3Array[3], V3ArrayNormal, Color.White)); for (int i = 4; i < 7; i++) { pointlist.Add(new VertexPositionColorNormal(V3Array[i], V3ArrayNormal, Color.White)); pointlist.Add(new VertexPositionColorNormal(V3Array[i + 1], V3ArrayNormal, Color.White)); } pointlist.Add(new VertexPositionColorNormal(V3Array[4], V3ArrayNormal, Color.White)); pointlist.Add(new VertexPositionColorNormal(V3Array[7], V3ArrayNormal, Color.White)); for (int i = 0; i < 4; i++) { pointlist.Add(new VertexPositionColorNormal(V3Array[i], V3ArrayNormal, Color.White)); pointlist.Add(new VertexPositionColorNormal(V3Array[i + 4], V3ArrayNormal, Color.White)); } //12 for (int i = 0; i < 8;i++ ) { pointlist.Add(new VertexPositionColorNormal(V3Array[i], V3ArrayNormal, Color.White)); pointlist.Add(new VertexPositionColorNormal(new Vector3(0, 0, 0), V3ArrayNormal, Color.White)); } pointlist.Clear();//Screw commenting pointlist.Add(new VertexPositionColorNormal(new Vector3(0,1000,0), V3ArrayNormal, Color.White)); pointlist.Add(new VertexPositionColorNormal(new Vector3(0,-1000,0), V3ArrayNormal, Color.White)); //Then put the pointlist in the array where it belongs G.MaxDrawlines = pointlist.Count / 2;//Set max drawable lines G.drawLines = G.MaxDrawlines; Points = new VertexPositionColorNormal[pointlist.Count]; for (int i = 0; i < pointlist.Count; i++) { Points[i] = pointlist[i]; } //Points[1] = 5; //The cube G.worldMatrix = Matrix.CreateRotationX(0) * Matrix.CreateRotationY(0); G.viewMatrix = Matrix.CreateLookAt(G.CamPos, G.ship.Position, Vector3.Up); G.projectionMatrix= Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(G.Fov), G.aspectRatio, 1.0f, 100000); G.basicEffect = new BasicEffect(G.GD); G.basicEffect.World = G.worldMatrix; G.basicEffect.View = G.viewMatrix; G.basicEffect.Projection = G.projectionMatrix; // primitive color G.basicEffect.AmbientLightColor = new Vector3(0.1f, 0.1f, 0.1f); G.basicEffect.DiffuseColor = new Vector3(1.0f, 1.0f, 1.0f); G.basicEffect.SpecularColor = new Vector3(0.25f, 0.25f, 0.25f); G.basicEffect.SpecularPower = 5.0f; G.basicEffect.Alpha = 1.0f; G.basicEffect.LightingEnabled = false; G.basicEffect.TextureEnabled = false; G.basicEffect.VertexColorEnabled = true; }
public Initialize(GlobalValues G) { // TODO: Complete member initialization this.G = G; }
void Start() { globalGui = GameObject.FindGameObjectWithTag("GlobalTag").GetComponent("GUIManager") as GUIManager; globalVals = GameObject.FindGameObjectWithTag("GlobalTag").GetComponent("GlobalValues") as GlobalValues; }
void Start() { ballCam = Camera.main; guiManager = GameObject.Find("Globals").GetComponent("GUIManager") as GUIManager; globalVals = GameObject.Find("Globals").GetComponent("GlobalValues") as GlobalValues; playerBall = GameObject.Find("Globals").GetComponent("Player_Ball") as Player_Ball; pathManager = GameObject.Find("Globals").GetComponent("ConstraintManager") as ConstraintManager; graphManager = GameObject.Find("Globals").GetComponent("GraphManager") as GraphManager; meta = GameObject.Find("Globals").GetComponent("GameMetaManager") as GameMetaManager; }
void Start() { name = "player_ball"; guiManager = GameObject.FindGameObjectWithTag("GlobalTag").GetComponent("GUIManager") as GUIManager; globalVals = GameObject.FindGameObjectWithTag("GlobalTag").GetComponent("GlobalValues") as GlobalValues; }
void Start() { GameObject globalObj = GameObject.FindGameObjectWithTag("GlobalTag"); lineManager = globalObj.GetComponent("ConstraintManager") as ConstraintManager; graphManager = globalObj.GetComponent("GraphManager") as GraphManager; guiManager = globalObj.GetComponent("GUIManager") as GUIManager; globalVals = globalObj.GetComponent("GlobalValues") as GlobalValues; ballClass = globalObj.GetComponent("Player_Ball") as Player_Ball; endPoint = GameObject.Find("EndPoint"); }
public void Awake() { guiManager = GameObject.FindGameObjectWithTag("GlobalTag").GetComponent("GUIManager") as GUIManager; globalVals = GameObject.FindGameObjectWithTag("GlobalTag").GetComponent("GlobalValues") as GlobalValues; constraintManager = GameObject.FindGameObjectWithTag("GlobalTag").GetComponent("ConstraintManager") as ConstraintManager; }
// hides some GUI elements, sizes and moves GUI based on screen size void Start() { globalsObject = GameObject.Find("Globals"); globalVals = globalsObject.GetComponent("GlobalValues") as GlobalValues; // get ref to club set select button label clubSetSelectLabelProps = clubSetSelectButtonLabel.GetComponent("UILabel") as UILabel; // populate clubButtons arrays heatClubButtons = new ArrayList(); heatClubButtons.Add(clubButtonHeat1); heatClubButtons.Add(clubButtonHeat2); heatClubButtons.Add(clubButtonHeat3); heatClubButtons.Add(clubButtonHeat4); heatClubButtons.Add(clubButtonHeat5); workClubButtons = new ArrayList(); workClubButtons.Add(clubButtonWork1); workClubButtons.Add(clubButtonWork2); workClubButtons.Add(clubButtonWork3); workClubButtons.Add(clubButtonWork4); workClubButtons.Add(clubButtonWork5); // handle screen resolution screenHeight = cam1.pixelHeight + cam2.pixelHeight; screenWidth = cam1.pixelWidth; // scaler needs base value for screen size difference between design and reality directionalDiff.x = screenWidth - 648.0f; directionalDiff.y = screenHeight - 418.0f; //Debug.Log ("height: " + screenHeight.ToString()); //Debug.Log ("width: " + screenWidth.ToString()); //Debug.Log ("dirperc X: " + directionalDiff.x.ToString()); //Debug.Log ("dirperc Y: " + directionalDiff.y.ToString()); // lock club selection to bottom left of screen GameObject clubSetGUI = GameObject.Find ("ClubSetSelectorPanel"); clubSetGUI.transform.position = new Vector3( clubSetGUI.transform.position.x - (directionalDiff.x * scalingPercent), clubSetGUI.transform.position.y - (directionalDiff.y * scalingPercent), clubSetGUI.transform.position.z); GameObject heatclubGUI = GameObject.Find ("HeatClubSelectorPanel"); heatclubGUI.transform.position = new Vector3( heatclubGUI.transform.position.x - (directionalDiff.x * scalingPercent), heatclubGUI.transform.position.y - (directionalDiff.y * scalingPercent), heatclubGUI.transform.position.z); GameObject workclubGUI = GameObject.Find ("WorkClubSelectorPanel"); workclubGUI.transform.position = new Vector3( workclubGUI.transform.position.x - (directionalDiff.x * scalingPercent), workclubGUI.transform.position.y - (directionalDiff.y * scalingPercent), workclubGUI.transform.position.z); // lock move counter to left just below mid GameObject counterGUI = GameObject.Find ("MoveCounterPanel"); counterGUI.transform.position = new Vector3( counterGUI.transform.position.x - (directionalDiff.x * scalingPercent), counterGUI.transform.position.y, counterGUI.transform.position.z); // lock hit area to bottom right GameObject hitGUI = GameObject.Find ("HitRegionPanel"); hitGUI.transform.position = new Vector3( hitGUI.transform.position.x + (directionalDiff.x * scalingPercent), hitGUI.transform.position.y - (directionalDiff.y * (2 * scalingPercent)), hitGUI.transform.position.z); }
// Use this for initialization void Start() { guiManager = GameObject.Find("Globals").GetComponent("GUIManager") as GUIManager; globalVals = GameObject.Find("Globals").GetComponent("GlobalValues") as GlobalValues; ballManager = GameObject.Find("Globals").GetComponent("BallManager") as BallManager; }
public LoadContent(GlobalValues G) { // TODO: Complete member initialization this.G = G; }
void Start() { globalVals = GameObject.Find("Globals").GetComponent("GlobalValues") as GlobalValues; }