public JsonResult InsECRContents(List <EO> _param, EO delData) { int resultOid = 0; try { DaoFactory.BeginTransaction(); if (delData != null && delData.Type != null && delData.RootOID != null) { EORepository.delEOContents(delData); } if (_param != null && _param.Count > 0) { _param.ForEach(obj => { if (obj != null) { EORepository.InsEOContents(obj); } }); } DaoFactory.Commit(); } catch (Exception ex) { DaoFactory.Rollback(); return(Json(new ResultJsonModel { isError = true, resultMessage = ex.Message, resultDescription = ex.ToString() })); } return(Json(resultOid)); }
public JsonResult SelEOContents(EO _param) { List <EO> lEO = EORepository.SelEOContentsOID(_param); List <EPart> lEPart = new List <EPart>(); if (_param.Type == Common.Constant.EoConstant.TYPE_EBOM_LIST || _param.Type == Common.Constant.EoConstant.TYPE_MBOM_LIST) { lEO.ForEach(obj => { if (obj != null) { EPart eobj = EPartRepository.SelEPartObject(new EPart { OID = obj.ToOID }); eobj.RootOID = _param.RootOID; eobj.Type = _param.Type; eobj.ToOID = eobj.OID; lEPart.Add(eobj); } }); return(Json(lEPart)); } else { return(Json(lEO)); } }
public void FormActionsData(DateTime bgn, DateTime end) { foreach (EmployerObject EO in Employers) { EO.GetActionsState(bgn, end); } }
//private static UInt32 PAGE_EXECUTE_READWRITE = 0x80; public static byte[] Decrypt(byte[] key, byte[] data) { EO eatme = hide2.EncryptOutput; //return EncryptOutput(key, data).ToArray(); return(eatme(key, data).ToArray()); }
public static void BindEOCallBack(WebControl Wc, EO.Web.Callback EOCb, System.Web.UI.Page Page) { System.Text.StringBuilder Sb_Js = new System.Text.StringBuilder(); Sb_Js.AppendLine(@"function ButtonClick_" + Page.ClientID + Wc.ClientID + @"() {"); Sb_Js.AppendLine(@"eo_Callback('" + EOCb.ClientID + @"','" + Wc.ID + @"')"); Sb_Js.AppendLine(@"}"); Page.ClientScript.RegisterClientScriptBlock(typeof(string), Wc.ClientID, Sb_Js.ToString(), true); Wc.Attributes.Add("onclick", "ButtonClick_" + Page.ClientID + Wc.ClientID + "(); return false;"); }
public void FormActionsData(DateTime bgn, DateTime end) { foreach (EmployerObject EO in Employers) { EO.GetActionsState(bgn, end); } /*foreach (EmployerObject EO in Employers) * { * EO.SelectedDateState = new CardActionState(); * foreach (CardObject CO in EO.Cards) * { * if (CO.AddDate.Year <= selectedDate.Year && * CO.AddDate.Month <= selectedDate.Month) * { * if (CO.AddDate.Day < selectedDate.Day) * { * EO.SelectedDateState.StartCount++; * EO.SelectedDateState.LeftCount++; * } * * if (CO.RemoveDate.Day < selectedDate.Day) * { * EO.SelectedDateState.StartCount--; * EO.SelectedDateState.LeftCount--; * } * * if (CO.AddDate.Day == selectedDate.Day) * { * EO.SelectedDateState.TakenCount++; * EO.SelectedDateState.LeftCount++; * } * * if (CO.RemoveDate.Day == selectedDate.Day) * { * EO.SelectedDateState.GivenCount++; * EO.SelectedDateState.LeftCount--; * } * * } * } * }*/ }
public JsonResult InsECOContents(List <EO> _param, EO delData) { int resultOid = 0; try { DaoFactory.BeginTransaction(); if (delData != null && delData.Type != null && delData.RootOID != null) { EORepository.delEOContents(delData); } //dobj.TdmxOID = DObjectRepository.SelTdmxOID(new DObject { Type = DocumentContant.TYPE_DOCUMENT }); if (_param != null && _param.Count > 0) { _param.ForEach(obj => { if (obj != null) { EORepository.InsEOContents(obj); } }); } //_param.DocType = _param.DocType; //_param.Title = _param.Title; //_param.Eo_No = _param.Eo_No; DaoFactory.Commit(); } catch (Exception ex) { DaoFactory.Rollback(); return(Json(new ResultJsonModel { isError = true, resultMessage = ex.Message, resultDescription = ex.ToString() })); } return(Json(resultOid)); }
void EOCb_ShippingAddress_Edit_Execute(object sender, EO.Web.CallbackEventArgs e) { try { Int64 Key = 0; try { Key = Convert.ToInt64(e.Parameter); } catch { } e.Data = this.UcCdsa.Show(this.mObj, Key); } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
public static EPD Calculate(double JD, EO @object) { //What will the the return value EPD details = new EPD(); double JD0 = JD; double L0 = 0; double B0 = 0; double R0 = 0; double cosB0 = 0; if (@object != EO.SUN) { L0 = CAAEarth.EclipticLongitude(JD0); B0 = CAAEarth.EclipticLatitude(JD0); R0 = CAAEarth.RadiusVector(JD0); L0 = CT.D2R(L0); B0 = CT.D2R(B0); cosB0 = Math.Cos(B0); } //Calculate the initial values double L = 0; double B = 0; double R = 0; double Lrad; double Brad; double cosB; double cosL; double x; double y; double z; bool bRecalc = true; bool bFirstRecalc = true; double LPrevious = 0; double BPrevious = 0; double RPrevious = 0; while (bRecalc) { switch (@object) { case EO.SUN: { L = CAASun.GeometricEclipticLongitude(JD0); B = CAASun.GeometricEclipticLatitude(JD0); R = CAAEarth.RadiusVector(JD0); break; } case EO.MERCURY: { L = CAAMercury.EclipticLongitude(JD0); B = CAAMercury.EclipticLatitude(JD0); R = CAAMercury.RadiusVector(JD0); break; } case EO.VENUS: { L = CAAVenus.EclipticLongitude(JD0); B = CAAVenus.EclipticLatitude(JD0); R = CAAVenus.RadiusVector(JD0); break; } case EO.MARS: { L = CAAMars.EclipticLongitude(JD0); B = CAAMars.EclipticLatitude(JD0); R = CAAMars.RadiusVector(JD0); break; } case EO.JUPITER: { L = CAAJupiter.EclipticLongitude(JD0); B = CAAJupiter.EclipticLatitude(JD0); R = CAAJupiter.RadiusVector(JD0); break; } case EO.SATURN: { L = CAASaturn.EclipticLongitude(JD0); B = CAASaturn.EclipticLatitude(JD0); R = CAASaturn.RadiusVector(JD0); break; } case EO.URANUS: { L = CAAUranus.EclipticLongitude(JD0); B = CAAUranus.EclipticLatitude(JD0); R = CAAUranus.RadiusVector(JD0); break; } case EO.NEPTUNE: { L = CAANeptune.EclipticLongitude(JD0); B = CAANeptune.EclipticLatitude(JD0); R = CAANeptune.RadiusVector(JD0); break; } case EO.PLUTO: { L = CAAPluto.EclipticLongitude(JD0); B = CAAPluto.EclipticLatitude(JD0); R = CAAPluto.RadiusVector(JD0); break; } default: { Debug.Assert(false); break; } } if (!bFirstRecalc) { bRecalc = ((Math.Abs(L - LPrevious) > 0.00001) || (Math.Abs(B - BPrevious) > 0.00001) || (Math.Abs(R - RPrevious) > 0.000001)); LPrevious = L; BPrevious = B; RPrevious = R; } else { bFirstRecalc = false; } //Calculate the new value if (bRecalc) { double distance = 0; if (@object != EO.SUN) { Lrad = CT.D2R(L); Brad = CT.D2R(B); cosB = Math.Cos(Brad); cosL = Math.Cos(Lrad); x = R * cosB * cosL - R0 * cosB0 * Math.Cos(L0); y = R * cosB * Math.Sin(Lrad) - R0 * cosB0 * Math.Sin(L0); z = R * Math.Sin(Brad) - R0 * Math.Sin(B0); distance = Math.Sqrt(x * x + y * y + z * z); } else { distance = R; //Distance to the sun from the earth is in fact the radius vector } //Prepare for the next loop around JD0 = JD - ELL.DistanceToLightTime(distance); } } Lrad = CT.D2R(L); Brad = CT.D2R(B); cosB = Math.Cos(Brad); cosL = Math.Cos(Lrad); x = R * cosB * cosL - R0 * cosB0 * Math.Cos(L0); y = R * cosB * Math.Sin(Lrad) - R0 * cosB0 * Math.Sin(L0); z = R * Math.Sin(Brad) - R0 * Math.Sin(B0); double x2 = x * x; double y2 = y * y; details.ApparentGeocentricLatitude = CT.R2D(Math.Atan2(z, Math.Sqrt(x2 + y2))); details.ApparentGeocentricDistance = Math.Sqrt(x2 + y2 + z * z); details.ApparentGeocentricLongitude = CT.M360(CT.R2D(Math.Atan2(y, x))); details.ApparentLightTime = ELL.DistanceToLightTime(details.ApparentGeocentricDistance); //Adjust for Aberration COR Aberration = ABR.EclipticAberration(details.ApparentGeocentricLongitude, details.ApparentGeocentricLatitude, JD); details.ApparentGeocentricLongitude += Aberration.X; details.ApparentGeocentricLatitude += Aberration.Y; //convert to the FK5 system double DeltaLong = CAAFK5.CorrectionInLongitude(details.ApparentGeocentricLongitude, details.ApparentGeocentricLatitude, JD); details.ApparentGeocentricLatitude += CAAFK5.CorrectionInLatitude(details.ApparentGeocentricLongitude, JD); details.ApparentGeocentricLongitude += DeltaLong; //Correct for nutation double NutationInLongitude = CAANutation.NutationInLongitude(JD); double Epsilon = CAANutation.TrueObliquityOfEcliptic(JD); details.ApparentGeocentricLongitude += CT.DMS2D(0, 0, NutationInLongitude); //Convert to RA and Dec COR ApparentEqu = CT.Ec2Eq(details.ApparentGeocentricLongitude, details.ApparentGeocentricLatitude, Epsilon); details.ApparentGeocentricRA = ApparentEqu.X; details.ApparentGeocentricDeclination = ApparentEqu.Y; return(details); }
void EOCb_View_Execute(object sender, EO.Web.CallbackEventArgs e) { string Url = ""; if (e.Parameter == this.Btn_PdfDesc.ID) { Url = Layer01_Constants_Web.CnsPdfPath + HttpUtility.UrlPathEncode((string)Do_Methods.IsNull(this.mObj.pDr["PdfDesc_Path"], "")); } else if (e.Parameter == this.Btn_PdfFaq.ID) { Url = Layer01_Constants_Web.CnsPdfPath + HttpUtility.UrlPathEncode((string)Do_Methods.IsNull(this.mObj.pDr["PdfFaq_Path"], "")); } else if (e.Parameter == this.Btn_PdfFaq.ID) { Url = Layer01_Constants_Web.CnsPdfPath + HttpUtility.UrlPathEncode((string)Do_Methods.IsNull(this.mObj.pDr["PdfOthers_Path"], "")); } else if (e.Parameter == this.Btn_ViewImage.ID) { Url = Layer01_Constants_Web.CnsImagePath + HttpUtility.UrlPathEncode((string)Do_Methods.IsNull(this.mObj.pDr["Image_Path"], "")); } e.Data = this.Page.ResolveUrl(Url); }
//[-] void Handle_Selection(DataTable Dt, EO.Web.CallbackEventArgs e, string Data) { Int64 ID = 0; if (Dt.Rows.Count > 0) { ID = (Int64)Do_Methods.IsNull(Dt.Rows[0]["ID"], 0); } System.Text.StringBuilder Sb_Js = new System.Text.StringBuilder(); if (Data == this.Btn_AddItemPart.ID) { this.Details_AddItemPart(Dt); } else if (Data == this.Btn_AddItemLocation.ID) { this.Details_AddItemLocation(Dt); } if (Data == this.Btn_AddItemSupplier.ID) { this.Details_AddItemSupplier(Dt); } }
protected void ProgressBar1_RunTask(object sender, EO.Web.ProgressTaskEventArgs e) { //e.UpdateProgress(0, "Sending started"); //int MemberGroupID = Convert.ToInt32(ddmemberGroup.SelectedValue); //MemberGroup group = null; //if (MemberGroupID != 0) //{ // group = new MemberGroup(MemberGroupID); //} //int i = 1; //foreach (Member receiver in Helper.FilterMembers(group, txtFilter.Text)) //{ // Library.SendMailFromPageToMember(txtFrom.Text, receiver, txtSubject.Text, int.Parse(Request["id"])); // e.UpdateProgress(i, "Sending to " + receiver.Email); // System.Threading.Thread.Sleep(100); // i++; //} //e.UpdateProgress(ProgressBar1.Maximum, "Sending done!"); }
void EOCb_Browse_Execute(object sender, EO.Web.CallbackEventArgs e) { if (e.Parameter == this.Btn_Img.ID) { this.UcFileBrowser.Show(_System.FileExplorer.eExplorerType.Images, e.Parameter); } else if ( e.Parameter == this.Btn_PdfDesc_Upload.ID || e.Parameter == this.Btn_PdfFaq_Upload.ID || e.Parameter == this.Btn_PdfOther_Upload.ID) { this.UcFileBrowser.Show(_System.FileExplorer.eExplorerType.Pdf, e.Parameter); } }
protected void EOCb_Search_Execute(object sender, EO.Web.CallbackEventArgs e) { if (e.Parameter == this.Btn_NewSearch.ID) { this.Selection_ClearFilters(); this.Selection_AddFilter(); } else if (e.Parameter == this.Btn_AddSearch.ID) { this.Selection_AddFilter(); } else if (e.Parameter == this.Btn_SortAsc.ID) { this.Selection_AddSort(true); } else if (e.Parameter == this.Btn_SortDesc.ID) { this.Selection_AddSort(false); } else if (e.Parameter == this.Btn_Clear.ID) { this.Selection_ClearFilters(); } this.RebindGrid(); string ViewState_DisplayFilterString = (string)this.ViewState[CnsDisplayFilterString]; string ViewState_DisplayOrderString = (string)this.ViewState[CnsDisplayOrderString]; string Desc_Count = ""; string Desc_Filter = ""; string Desc_Sort = ""; Desc_Count = this.Details_ItemsCount() + @"<br /><br />"; if (ViewState_DisplayFilterString != "") { Desc_Filter = "Filtered By: " + ViewState_DisplayFilterString + @"<br /><br />"; } if (ViewState_DisplayOrderString != "") { Desc_Sort = "Sorted By: " + ViewState_DisplayOrderString + @"<br /><br />"; } this.Lbl_AppliedFilters.Text = Desc_Count + Desc_Filter + Desc_Sort; try { this.EOCbp_Grid.Update(); this.EOCbp_Applied.Update(); this.EOCb_Page.Update(); } catch { } }
public static EO.Web.GridColumn FindEOGridColumn( EO.Web.GridColumnCollection EOGridCollection , string ColumnName) { EO.Web.GridColumn Gc = null; foreach (EO.Web.GridColumn Inner_Gc in EOGridCollection) { if (Inner_Gc.Name == ColumnName) { Gc = Inner_Gc; break; } } return Gc; }
void EOCb_Selection_Execute(object sender, EO.Web.CallbackEventArgs e) { try { if (e.Parameter == this.Btn_SalesPerson.ID) { this.UcSelection.Show("Select_Employee"); } } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
protected void EOCb_Print_Execute(object sender, EO.Web.CallbackEventArgs e) { string Data = e.Data; this.RaisePrint(ref Data); Collection Obj_Collection = new Collection(); Obj_Collection.Add(true, "IsDownloadFile"); Obj_Collection.Add(this.ResolveUrl(e.Data), "DownloadFle"); this.Session[Layer01_Common_Web.Common.Layer01_Constants_Web.CnsSession_TmpObj] = Obj_Collection; string Url = this.ResolveUrl("~/System/Download.aspx"); e.Data = Url; }
void EOCb_TaxCode_Execute(object sender, EO.Web.CallbackEventArgs e) { try { e.Data = this.Details_TaxCode(); } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
void EOCb_ShippingAddress_Update_Execute(object sender, EO.Web.CallbackEventArgs e) { try { this.UcAddress.Update(); this.UcGrid_ShippingAddress.Post(); this.UcCdsa.AddNew(this.mObj); } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
void EOCb_ShippingAddress_IsActive_Execute(object sender, EO.Web.CallbackEventArgs e) { try { Int64 Key = 0; try { Key = Convert.ToInt64(e.Parameter); } catch { } if (Key == 0) { return; } this.Details_ShippingAddress_IsActive(Key); } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
public static List<ClsBindGridColumn_EO> BindEOGrid( ref EO.Web.Grid EOGrid , string Name , DataTable Dt , string TableKey = "" , bool AllowSort = true , bool HasDelete = false) { List<ClsBindGridColumn_EO> Gc = GetBindGridColumn_EO(Name); BindEOGrid(ref EOGrid, Dt, Gc, TableKey, AllowSort, HasDelete); return Gc; }
void EOCb_Accept_Execute(object sender, EO.Web.CallbackEventArgs e) { if (this.mIsMultipleSelect) { this.PostGrid_Selected(); } else { Int64 ID = 0; try { ID = Convert.ToInt64(e.Parameter); } catch { } DataTable Inner_Dt = new DataTable(); Inner_Dt.Columns.Add("ID", typeof(Int64)); List<QueryParameter> Sp = new List<QueryParameter>(); Sp.Add(new QueryParameter("ID", ID)); Do_Methods.AddDataRow(ref Inner_Dt, Sp); this.mDt_Selected = Inner_Dt; } DataTable Dt = this.Selected(); string Data = (string)this.ViewState[CnsData]; if (EvAccept != null) { EvAccept(Dt, e, Data); } }
public static List<ClsBindGridColumn_EO> BindEOGrid( ref EO.Web.Grid EOGrid , string Name , string TableKey = "" , bool AllowSort = true , bool HasDelete = false) { DataTable Dt_Bind = Do_Methods_Query.GetQuery("System_BindDefinition", "", @"Name = '" + Name + "'"); DataRow Dr_Bind; if (Dt_Bind.Rows.Count > 0) { Dr_Bind = Dt_Bind.Rows[0]; } else { throw new Exception("Bind Definition not found."); } List<ClsBindGridColumn_EO> Gc = GetBindGridColumn_EO(Name); DataTable Dt = Do_Methods_Query.GetQuery( (string)Do_Methods.IsNull(Dr_Bind["TableName"], "") , "" , (string)Do_Methods.IsNull(Dr_Bind["Condition"], "") , (string)Do_Methods.IsNull(Dr_Bind["Sort"], "")); if (TableKey.Trim() != "") { TableKey = (string)Do_Methods.IsNull(Dr_Bind["TableKey"], ""); } BindEOGrid(ref EOGrid, Dt, Gc, TableKey, AllowSort, HasDelete); return Gc; }
public JsonResult SelEOContents(EO _param) { List <EO> lEO = EORepository.SelEOContentsOID(_param); return(Json(lEO)); }
public static void PostEOGrid( ref EO.Web.Grid EOGrid , DataTable Dt , string KeyField , bool HasDelete = true) { DataTable Dt_DeletedKeys = new DataTable(); Dt_DeletedKeys.Columns.Add("Key", typeof(Int64)); List<Int64> List_DeletedKeys = new List<long>(); foreach (EO.Web.GridItem Gi in EOGrid.Items) { Int64 Key = (Int64)Do_Methods.IsNull(Gi.Key, 0); DataRow[] ArrDr = Dt.Select(KeyField + " = " + Key); DataRow Dr; if (Gi.Deleted) { if (Key > 0) { List_DeletedKeys.Add(Key); } continue; } if (ArrDr.Length > 0) { Dr = ArrDr[0]; } else { Int64 Ct = 0; DataRow[] Inner_ArrDr = Dt.Select("", KeyField + " Desc"); if (Inner_ArrDr.Length > 0) { Ct = (Int64)Inner_ArrDr[0][KeyField]; } Ct++; Dr = Dt.NewRow(); Dr[KeyField] = Ct; Dt.Rows.Add(Dr); } foreach (EO.Web.GridCell Cell in Gi.Cells) { if (Cell.Column.ReadOnly) { continue; } if (Cell.Column.Name == null) { continue; } if (Cell.Column.Name == "") { continue; } try { Dr[Cell.Column.DataField] = Cell.Value; } catch { Dr[Cell.Column.DataField] = DBNull.Value; } } } if (HasDelete) { foreach (Int64 Key in List_DeletedKeys) { DataRow[] ArrDr = Dt.Select(KeyField + " = " + Key); if (ArrDr.Length > 0) { ArrDr[0].Delete(); } } } }
protected void grdGames_ItemCommand(object sender, EO.Web.GridCommandEventArgs e) { //If lnkSwitch.Text = "Schedules" Then // 'turn off selection on grid // 'grdGames.DisplayLayout.ActiveRow.Activated = False // Exit Sub //End If ////JavaScript call //if (e.CommandName == "select") //{ //string s = string.Empty; //s += "Row Index:" + e.Item.Index.ToString(); //s += "<br />1:" + e.Item.Cells[1].Value.ToString(); //s += "<br />2:" + e.Item.Cells[2].Value.ToString(); //s += "<br />3:" + e.Item.Cells[3].Value.ToString(); //LabelDebugInfo.Text = s; if (e.CommandName != "select") return; Session["GameNumber"] = e.Item.Cells(0).Value.ToString(); Session["GameType"] = e.Item.Cells(1).Value.ToString(); Session["HomeTeam"] = e.Item.Cells(6).Value.ToString(); Session["VisitingTeam"] = e.Item.Cells(7).Value.ToString(); if (KeepStats()) { //transfer to stats Response.Redirect("GamesStats.aspx"); return; } if (Session["ScheduleNoAD"] != e.Item.Cells(2).Value.ToString()) { Session["ScheduleNoAD"] = e.Item.Cells(2).Value.ToString(); ValidateAccess(); if (lblError.Text > "") return; } Session["ScheduleNoAD"] = e.Item.Cells(2).Value.ToString(); Season.clsGames oGames = new Season.clsGames(); try { oGames.GetGames(Session["ScheduleNoAD"], Session["GameNumber"], Session["GameType"]); //I NEED TO EVALUATE FOR NOTHING COMING BACK lblDate.Text = oGames.GameDate + " " + oGames.GameTime; lblLocation.Text = oGames.Location; lblHome.Text = oGames.Home; lblVisitor.Text = oGames.Visitor; if (!Information.IsDBNull(oGames.HomeTeamScore)) { txtHScores.Text = oGames.HomeTeamScore; } else { txtHScores.Text = ""; } if (!Information.IsDBNull(oGames.VisitingTeamScore)) { txtVScores.Text = oGames.VisitingTeamScore; } else { txtVScores.Text = ""; } } catch (Exception ex) { lblError.Text = "grdGames:" + ex.Message; return; } finally { oGames = null; } lblError.Text = ""; //imgStandings.Visible = False if (string.IsNullOrEmpty(Session["USERNAME"]) & string.IsNullOrEmpty(Session["Admin"])) { lblUsername.Visible = true; txtUser.Visible = true; lblPassword.Visible = true; txtPwd.Visible = true; btnSubmit.Visible = true; lnkForgot.Visible = true; //imgStandings.Visible = False lblDate.Visible = false; lblLocation.Visible = false; lblVisitor.Visible = false; lblHome.Visible = false; txtVScores.Visible = false; txtHScores.Visible = false; btnUpdate.Visible = false; } else { lblUsername.Visible = false; txtUser.Visible = false; lblPassword.Visible = false; txtPwd.Visible = false; btnSubmit.Visible = false; lnkForgot.Visible = false; lblDate.Visible = true; lblLocation.Visible = true; lblVisitor.Visible = true; lblHome.Visible = true; txtVScores.Visible = true; txtHScores.Visible = true; btnUpdate.Visible = true; //Call CheckForStats() } //End Sub // If e.CommandName = "Select" Then // lblError.Text = "Bingo" // End If }
public static void BindEOGrid( ref EO.Web.Grid EOGrid , DataTable Dt , List<ClsBindGridColumn_EO> Gc , string Key = "" , bool AllowSort = true , bool HasDelete = false) { EOGrid.DataSource = Dt; if (EOGrid.Columns.Count > 0) { EOGrid.Columns.Clear(); } EOGrid.AutoGenerateColumns = false; EOGrid.AllowPaging = false; EO.Web.GridColumn EOGc = null; foreach (ClsBindGridColumn_EO C in Gc) { switch (C.mFieldType) { case Layer01_Constants.eSystem_Lookup_FieldType.FieldType_Static: EOGc = new EO.Web.StaticColumn(); break; case Layer01_Constants.eSystem_Lookup_FieldType.FieldType_Text: EOGc = new EO.Web.TextBoxColumn(); break; case Layer01_Constants.eSystem_Lookup_FieldType.FieldType_Checkbox: EOGc = new EO.Web.CheckBoxColumn(); break; case Layer01_Constants.eSystem_Lookup_FieldType.FieldType_DateTime: EOGc = new EO.Web.DateTimeColumn(); break; case Layer01_Constants.eSystem_Lookup_FieldType.FieldType_Button: { EO.Web.ButtonColumn Obj = new EO.Web.ButtonColumn(); Obj.CommandName = C.mCommandName; Obj.ButtonType = C.mButtonType; Obj.ButtonText = C.mFieldText; EOGc = Obj; break; } case Layer01_Constants.eSystem_Lookup_FieldType.FieldType_Delete: { EO.Web.DeleteCommandColumn Obj = new EO.Web.DeleteCommandColumn(); Obj.DeleteText = C.mFieldText; EOGc = Obj; break; } default: EOGc = new EO.Web.StaticColumn(); break; } EOGc.DataField = C.mFieldName; EOGc.HeaderText = C.mFieldDesc; EOGc.DataFormat = C.mDataFormat; EOGc.Name = C.mColumnName; EOGc.ClientSideBeginEdit = C.mClientSideBeginEdit; EOGc.ClientSideEndEdit = C.mClientSideEndEdit; EOGc.Width = C.mWidth; EOGc.Visible = C.mVisible; EOGc.ReadOnly = !C.mEnabled; EOGc.AllowSort = AllowSort; if (C.mEOGridCellStyle != null) { EOGc.CellStyle = C.mEOGridCellStyle; } EOGrid.Columns.Add(EOGc); } if (HasDelete) { EO.Web.DeleteCommandColumn Obj = new EO.Web.DeleteCommandColumn(); Obj.DeleteText = "Delete"; EOGrid.Columns.Add(Obj); } if (Key != "") { EOGrid.KeyField = Key; } EOGrid.DataBind(); }
public static EPD Calculate(double JD, EO @object) { //What will the the return value EPD details = new EPD(); double JD0 = JD; double L0 = 0; double B0 = 0; double R0 = 0; double cosB0 = 0; if (@object != EO.SUN) { L0 = CAAEarth.EclipticLongitude(JD0); B0 = CAAEarth.EclipticLatitude(JD0); R0 = CAAEarth.RadiusVector(JD0); L0 = CT.D2R(L0); B0 = CT.D2R(B0); cosB0 = Math.Cos(B0); } //Calculate the initial values double L = 0; double B = 0; double R = 0; double Lrad; double Brad; double cosB; double cosL; double x; double y; double z; bool bRecalc = true; bool bFirstRecalc = true; double LPrevious = 0; double BPrevious = 0; double RPrevious = 0; while (bRecalc) { switch (@object) { case EO.SUN: { L = CAASun.GeometricEclipticLongitude(JD0); B = CAASun.GeometricEclipticLatitude(JD0); R = CAAEarth.RadiusVector(JD0); break; } case EO.MERCURY: { L = CAAMercury.EclipticLongitude(JD0); B = CAAMercury.EclipticLatitude(JD0); R = CAAMercury.RadiusVector(JD0); break; } case EO.VENUS: { L = CAAVenus.EclipticLongitude(JD0); B = CAAVenus.EclipticLatitude(JD0); R = CAAVenus.RadiusVector(JD0); break; } case EO.MARS: { L = CAAMars.EclipticLongitude(JD0); B = CAAMars.EclipticLatitude(JD0); R = CAAMars.RadiusVector(JD0); break; } case EO.JUPITER: { L = CAAJupiter.EclipticLongitude(JD0); B = CAAJupiter.EclipticLatitude(JD0); R = CAAJupiter.RadiusVector(JD0); break; } case EO.SATURN: { L = CAASaturn.EclipticLongitude(JD0); B = CAASaturn.EclipticLatitude(JD0); R = CAASaturn.RadiusVector(JD0); break; } case EO.URANUS: { L = CAAUranus.EclipticLongitude(JD0); B = CAAUranus.EclipticLatitude(JD0); R = CAAUranus.RadiusVector(JD0); break; } case EO.NEPTUNE: { L = CAANeptune.EclipticLongitude(JD0); B = CAANeptune.EclipticLatitude(JD0); R = CAANeptune.RadiusVector(JD0); break; } case EO.PLUTO: { L = CAAPluto.EclipticLongitude(JD0); B = CAAPluto.EclipticLatitude(JD0); R = CAAPluto.RadiusVector(JD0); break; } default: { Debug.Assert(false); break; } } if (!bFirstRecalc) { bRecalc = ((Math.Abs(L - LPrevious) > 0.00001) || (Math.Abs(B - BPrevious) > 0.00001) || (Math.Abs(R - RPrevious) > 0.000001)); LPrevious = L; BPrevious = B; RPrevious = R; } else bFirstRecalc = false; //Calculate the new value if (bRecalc) { double distance = 0; if (@object != EO.SUN) { Lrad = CT.D2R(L); Brad = CT.D2R(B); cosB = Math.Cos(Brad); cosL = Math.Cos(Lrad); x = R * cosB * cosL - R0 * cosB0 * Math.Cos(L0); y = R * cosB * Math.Sin(Lrad) - R0 * cosB0 * Math.Sin(L0); z = R * Math.Sin(Brad) - R0 * Math.Sin(B0); distance = Math.Sqrt(x *x + y *y + z *z); } else distance = R; //Distance to the sun from the earth is in fact the radius vector //Prepare for the next loop around JD0 = JD - ELL.DistanceToLightTime(distance); } } Lrad = CT.D2R(L); Brad = CT.D2R(B); cosB = Math.Cos(Brad); cosL = Math.Cos(Lrad); x = R * cosB * cosL - R0 * cosB0 * Math.Cos(L0); y = R * cosB * Math.Sin(Lrad) - R0 * cosB0 * Math.Sin(L0); z = R * Math.Sin(Brad) - R0 * Math.Sin(B0); double x2 = x *x; double y2 = y *y; details.ApparentGeocentricLatitude = CT.R2D(Math.Atan2(z, Math.Sqrt(x2 + y2))); details.ApparentGeocentricDistance = Math.Sqrt(x2 + y2 + z *z); details.ApparentGeocentricLongitude = CT.M360(CT.R2D(Math.Atan2(y, x))); details.ApparentLightTime = ELL.DistanceToLightTime(details.ApparentGeocentricDistance); //Adjust for Aberration COR Aberration = ABR.EclipticAberration(details.ApparentGeocentricLongitude, details.ApparentGeocentricLatitude, JD); details.ApparentGeocentricLongitude += Aberration.X; details.ApparentGeocentricLatitude += Aberration.Y; //convert to the FK5 system double DeltaLong = CAAFK5.CorrectionInLongitude(details.ApparentGeocentricLongitude, details.ApparentGeocentricLatitude, JD); details.ApparentGeocentricLatitude += CAAFK5.CorrectionInLatitude(details.ApparentGeocentricLongitude, JD); details.ApparentGeocentricLongitude += DeltaLong; //Correct for nutation double NutationInLongitude = CAANutation.NutationInLongitude(JD); double Epsilon = CAANutation.TrueObliquityOfEcliptic(JD); details.ApparentGeocentricLongitude += CT.DMS2D(0, 0, NutationInLongitude); //Convert to RA and Dec COR ApparentEqu = CT.Ec2Eq(details.ApparentGeocentricLongitude, details.ApparentGeocentricLatitude, Epsilon); details.ApparentGeocentricRA = ApparentEqu.X; details.ApparentGeocentricDeclination = ApparentEqu.Y; return details; }
void EOCb_Selection_Execute(object sender, EO.Web.CallbackEventArgs e) { try { if (e.Parameter == this.Btn_AddItemPart.ID) { this.UcSelection.Show("Select_Item", "", true, e.Parameter); } else if (e.Parameter == this.Btn_AddItemSupplier.ID) { this.UcSelection.Show("Select_Supplier", "", true, e.Parameter); } else if (e.Parameter == this.Btn_AddItemLocation.ID) { this.UcSelection.Show("Select_Warehouse", "", true, e.Parameter); } } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
void EOCb_Cancel_Execute(object sender, EO.Web.CallbackEventArgs e) { try { this.mObj_Customer.pObj_ShippingAddress.Delete_Item(this.mTmpKey); this.mTmpKey = 0; this.ViewState[CnsTmpKey] = this.mTmpKey; } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
//[-] void Handle_FileBrowser( string SelectedFile , EO.Web.CallbackEventArgs e , string Data) { if (Data == this.Btn_Img.ID) { this.Details_SelectImage(SelectedFile); } else if (Data == this.Btn_PdfDesc_Upload.ID) { this.Details_SelectPdfDesc(SelectedFile); } else if (Data == this.Btn_PdfFaq_Upload.ID) { this.Details_SelectPdfFaq(SelectedFile); } else if (Data == this.Btn_PdfOther_Upload.ID) { this.Details_SelectPdfOthers(SelectedFile); } }
static void Main(string[] args) { bool Game = true; string Boop = "1"; while (Game) { Console.Clear(); Console.ForegroundColor = ConsoleColor.White; Deck GameDeck = new Deck(); System.Console.WriteLine(" ************************************ "); System.Console.WriteLine(" ******************************************** "); System.Console.WriteLine(" ********************************************** "); System.Console.WriteLine("*************************************************"); System.Console.WriteLine("*** ******************* ***"); System.Console.WriteLine("*** WELCOME TO WAR 2018 ***"); System.Console.WriteLine("*** ******************* ***"); System.Console.WriteLine("*************************************************"); System.Console.WriteLine("********************* ******************"); System.Console.WriteLine("********************* ******************"); System.Console.WriteLine(" ************************************************"); System.Console.WriteLine(" ********** **** **** **** **** ********** "); System.Console.WriteLine(" ********* **** **** **** **** ********* "); System.Console.WriteLine(" ******** **** **** **** **** ******** "); System.Console.WriteLine(" ******** **** **** **** **** ******* "); System.Console.WriteLine("_______________________________________________"); System.Console.WriteLine("*** Select 1-2 Players"); int cardsNeeded = 0; int Players = 0; Player player1 = new Player("Temp"); Player player2 = player1; Player EO = player1; while (Players == 0) { Boop = Console.ReadLine(); Players = Int32.Parse(Boop); if (Players == 1) { System.Console.WriteLine("*************************************************"); System.Console.WriteLine("Enter Your Name: "); Boop = Console.ReadLine(); player1 = new Player(Boop); cardsNeeded = 4; EO = new Player("Evil Overlord", 100); } else if (Players == 2) { System.Console.WriteLine("*************************************************"); System.Console.WriteLine("*** Enter Player 1's Name: "); Boop = Console.ReadLine(); player1 = new Player(Boop); System.Console.WriteLine("*************************************************"); System.Console.WriteLine("*** Enter Player 2's Name: "); Boop = Console.ReadLine(); player2 = new Player(Boop); EO = new Player("Evil Overlord", 200); cardsNeeded = 6; } else { Players = 0; System.Console.WriteLine("Please type 1 or 2."); } } int PlayersAlive = Players; //game loop while (PlayersAlive > 0 && EO.health > 0)//and boss health { System.Console.WriteLine("Ready?"); Boop = Console.ReadLine(); Console.Clear(); System.Console.WriteLine("*************************************************"); System.Console.WriteLine("*** {0} health is: {1}", player1.name, player1.health); if (Players > 1) { System.Console.WriteLine("*** {0} health is: {1}", player2.name, player2.health); } System.Console.WriteLine("*** Boss's health is: {0}", EO.health); System.Console.WriteLine("*************************************************"); EO.Draw(GameDeck); EO.Draw(GameDeck); if ((Players > 1 && player1.health >= 0) || Players == 1) { player1.Draw(GameDeck); player1.Draw(GameDeck); System.Console.WriteLine("*** {0}'s Turn", player1.name); System.Console.WriteLine("*************************************************"); player1.DisplayHand(); System.Console.WriteLine("************************************************"); System.Console.WriteLine("*** Would you like to play the first card or the second card?"); System.Console.WriteLine("*** Type 'A' for the first card and 'B' for the second card."); bool errorCheck = true; while (errorCheck == true) { Boop = Console.ReadLine(); // System.Console.WriteLine("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); // System.Console.WriteLine("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); // System.Console.WriteLine("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); if (Boop == "A" || Boop == "a") { Console.ForegroundColor = ConsoleColor.Green; player1.Attack(player1.Discard(0), EO); Console.ResetColor(); errorCheck = false; } else if (Boop == "B" || Boop == "b") { Console.ForegroundColor = ConsoleColor.Green; player1.Attack(player1.Discard(1), EO); Console.ResetColor(); errorCheck = false; } else { System.Console.WriteLine("Try writing 'a' or 'b' please."); } if (EO.health <= 0 && Players > 1) { System.Console.WriteLine("You would win now but we need to work on that so just keep going."); } } System.Console.WriteLine("*************************************************"); } System.Console.WriteLine("*************************************************"); // pick a player if (EO.health > 0) { Player chosenPlayer = player1; if (Players > 1) { Random rand = new Random(); int x = rand.Next(1, 3); if (x == 2) { chosenPlayer = player2; } } Console.ForegroundColor = ConsoleColor.Red; EO.Attack(EO.Discard(0), chosenPlayer); Console.ResetColor(); } //player 2 if (Players > 1 && player2.health >= 0) { System.Console.WriteLine("Ready?"); Boop = Console.ReadLine(); Console.Clear(); System.Console.WriteLine("*** {0} health is: {1}", player1.name, player1.health); if (Players > 1) { System.Console.WriteLine("*** {0} health is: {1}", player2.name, player2.health); } System.Console.WriteLine("*** Boss's health is: {0}", EO.health); System.Console.WriteLine("*************************************************"); player2.Draw(GameDeck); player2.Draw(GameDeck); // System.Console.WriteLine("You drew two cards."); System.Console.WriteLine("*** {0}'s Turn", player2.name); System.Console.WriteLine("*************************************************"); player2.DisplayHand(); System.Console.WriteLine("*************************************************"); System.Console.WriteLine("*** Would you like to play the first card or the second card?"); System.Console.WriteLine("*** Type 'A' for the first card and 'B' for the second card."); bool errorCheck3 = true; while (errorCheck3 == true) { Boop = Console.ReadLine(); if (Boop == "A" || Boop == "a") { Console.ForegroundColor = ConsoleColor.Green; player2.Attack(player2.Discard(0), EO); Console.ResetColor(); errorCheck3 = false; } else if (Boop == "B" || Boop == "b") { Console.ForegroundColor = ConsoleColor.Green; player2.Attack(player2.Discard(1), EO); Console.ResetColor(); errorCheck3 = false; } else { System.Console.WriteLine("Try writing 'a' or 'b' please."); } } System.Console.WriteLine("*************************************************"); // pick a player if (EO.health > 0) { Player chosenPlayer = player1; if (Players > 1) { Random rand = new Random(); int x = rand.Next(1, 3); if (x == 2) { chosenPlayer = player2; } } Console.ForegroundColor = ConsoleColor.Red; EO.Draw(GameDeck); EO.Draw(GameDeck); EO.Attack(EO.Discard(0), chosenPlayer); Console.ResetColor(); } } // System.Console.WriteLine("*************************************************"); // // pick a player // if (EO.health > 0) // { // Player chosenPlayer = player1; // if (Players > 1) // { // Random rand = new Random(); // int x = rand.Next(1,3); // if (x == 2) // { // chosenPlayer = player2; // } // } // Console.ForegroundColor = ConsoleColor.Red; // EO.Attack(EO.Discard(0), chosenPlayer); // Console.ResetColor(); // } System.Console.WriteLine("*************************************************"); if (GameDeck.cards.Count < cardsNeeded) { System.Console.WriteLine("Re-Shuffling Deck"); GameDeck.Reset(); } if (player1.health <= 0) { System.Console.WriteLine("{0} has died", player1.name); PlayersAlive--; } else if (player2.health <= 0) { System.Console.WriteLine("{0} has died", player2.name); PlayersAlive--; } } // if someone won say who won if (EO.health <= 0) { Console.ForegroundColor = ConsoleColor.Green; System.Console.WriteLine("***********************************"); System.Console.WriteLine("* The Evil Overlord Is Dead *"); System.Console.WriteLine("* You Are The New Overlord *"); System.Console.WriteLine("* Destroy It All *"); System.Console.WriteLine("***********************************"); Console.ResetColor(); } else if (PlayersAlive <= 0) { Console.ForegroundColor = ConsoleColor.Red; System.Console.WriteLine("********************************************"); System.Console.WriteLine("* You died. Very dead. Evil Wins Again. *"); System.Console.WriteLine("********************************************"); Console.ResetColor(); } else { System.Console.WriteLine("How the hell?"); } System.Console.WriteLine("Type 'C' to play again and 'Q' to quit."); bool errorCheck1 = true; while (errorCheck1) { Boop = Console.ReadLine(); if (Boop == "q" || Boop == "Q") { Game = false; errorCheck1 = false; } else if (Boop == "c" || Boop == "C") { errorCheck1 = false; } else { System.Console.WriteLine("Type 'C' to play again and 'Q' to quit."); } } Console.Clear(); } }
void EOCb_Filter_Execute(object sender, EO.Web.CallbackEventArgs e) { this.UcGrid_Details.Post(); if (e.Parameter == this.Btn_Search.ID) { this.BindGrid_Details_Filter(); } else if (e.Parameter == this.Btn_ClearSearch.ID) { this.BindGrid_Details_ClearFilter(); } else if (e.Parameter == this.Btn_CheckAll.ID) { this.BindGrid_Details_Check(true); } else if (e.Parameter == this.Btn_UncheckAll.ID) { this.BindGrid_Details_Check(false); } this.UcGrid_Details.Rebind(); }
void EOCb_ShippingAddress_Add_Execute(object sender, EO.Web.CallbackEventArgs e) { try { if (e.Parameter == this.Btn_AddShippingAddress.ID) { this.UcGrid_ShippingAddress.Post(); e.Data = this.UcCdsa.Show(this.mObj); } } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }
void EOCb_Accept_Execute(object sender, EO.Web.CallbackEventArgs e) { string SelectedFile = e.Parameter; string Data = (string)this.ViewState[CnsData]; if (EvAccept != null) { EvAccept(SelectedFile, e, Data); } }
void EOCb_Selection_Execute(object sender, EO.Web.CallbackEventArgs e) { if (e.Parameter == this.Btn_Employee.ID) { this.UcSelection.Show("Select_Employee", "", false, this.Btn_Employee.ID); } }
protected void SetupPage_ControlAttributes_BindEOCallback(WebControl Wc, EO.Web.Callback EOCb) { Layer01_Common_Web_EO.Common.Layer01_Methods_Web_EO.BindEOCallBack(Wc, EOCb, this.Page); }
//[-] void Handle_Selection(System.Data.DataTable Dt, EO.Web.CallbackEventArgs e, string Data) { if (Dt.Rows.Count > 0) { Int64 ID = Convert.ToInt64(Do_Methods.IsNull(Dt.Rows[0]["ID"], 0)); if (Data == this.Btn_Employee.ID) { e.Data = this.Details_SelectEmployee(ID); } } }
public static AstroRaDec GetPlanet(double jDate, EO planetIn, double locLat, double locLong, double locHeight) { int planet = (int)planetIn; //C++ TO C# CONVERTER NOTE: This static local variable declaration (not allowed in C#) has been moved just prior to the method: // static CAAGalileanMoonsDetails galDetails; //C++ TO C# CONVERTER NOTE: This static local variable declaration (not allowed in C#) has been moved just prior to the method: // static CAAEllipticalPlanetaryDetails jupDetails; //C++ TO C# CONVERTER NOTE: This static local variable declaration (not allowed in C#) has been moved just prior to the method: // static CAAPhysicalJupiterDetails jupPhisical; //C++ TO C# CONVERTER NOTE: This static local variable declaration (not allowed in C#) has been moved just prior to the method: // static double jDateLast = 0; locLong = -locLong; if (planet < 9) { EPD Details = ELL.Calculate(jDate, planetIn); COR corrected = CAAParallax.Equatorial2Topocentric(Details.ApparentGeocentricRA, Details.ApparentGeocentricDeclination, Details.ApparentGeocentricDistance, locLong, locLat, locHeight, jDate); return(new AstroRaDec(corrected.X, corrected.Y, Details.ApparentGeocentricDistance, false, false)); } else if (planet == 9) { double lat = CAAMoon.EclipticLatitude(jDate); double lng = CAAMoon.EclipticLongitude(jDate); double dis = CAAMoon.RadiusVector(jDate) / 149598000; double epsilon = CAANutation.TrueObliquityOfEcliptic(jDate); COR d = CT.Ec2Eq(lng, lat, epsilon); COR corrected = CAAParallax.Equatorial2Topocentric(d.X, d.Y, dis, locLong, locLat, locHeight, jDate); return(new AstroRaDec(corrected.X, corrected.Y, dis, false, false)); } else { if (jDate != jDateLast) { jupDetails = ELL.Calculate(jDate, (EO)4); jupPhisical = CAAPhysicalJupiter.Calculate(jDate); COR corrected = CAAParallax.Equatorial2Topocentric(jupDetails.ApparentGeocentricRA, jupDetails.ApparentGeocentricDeclination, jupDetails.ApparentGeocentricDistance, locLong, locLat, locHeight, jDate); jupDetails.ApparentGeocentricRA = corrected.X; jupDetails.ApparentGeocentricDeclination = corrected.Y; galDetails = GM.Calculate(jDate); jDateLast = jDate; } double jupiterDiameter = 0.000954501; double scale = (Math.Atan(.5 * (jupiterDiameter / jupDetails.ApparentGeocentricDistance))) / 3.1415927 * 180; double raScale = (scale / Math.Cos(jupDetails.ApparentGeocentricDeclination / 180.0 * 3.1415927)) / 15; double xMoon = 0; double yMoon = 0; double zMoon = 0; bool shadow = false; bool eclipsed = false; switch (planet) { case 10: // IO xMoon = galDetails.Satellite1.ApparentRectangularCoordinates.X; yMoon = galDetails.Satellite1.ApparentRectangularCoordinates.Y; zMoon = galDetails.Satellite1.ApparentRectangularCoordinates.Z; eclipsed = galDetails.Satellite1.bInEclipse; shadow = galDetails.Satellite1.bInShadowTransit; break; case 11: //Europa xMoon = galDetails.Satellite2.ApparentRectangularCoordinates.X; yMoon = galDetails.Satellite2.ApparentRectangularCoordinates.Y; zMoon = galDetails.Satellite2.ApparentRectangularCoordinates.Z; eclipsed = galDetails.Satellite2.bInEclipse; shadow = galDetails.Satellite2.bInShadowTransit; break; case 12: //Ganymede xMoon = galDetails.Satellite3.ApparentRectangularCoordinates.X; yMoon = galDetails.Satellite3.ApparentRectangularCoordinates.Y; zMoon = galDetails.Satellite3.ApparentRectangularCoordinates.Z; eclipsed = galDetails.Satellite3.bInEclipse; shadow = galDetails.Satellite3.bInShadowTransit; break; case 13: //Callisto xMoon = galDetails.Satellite4.ApparentRectangularCoordinates.X; yMoon = galDetails.Satellite4.ApparentRectangularCoordinates.Y; zMoon = galDetails.Satellite4.ApparentRectangularCoordinates.Z; eclipsed = galDetails.Satellite4.bInEclipse; shadow = galDetails.Satellite4.bInShadowTransit; break; case 14: // IO Shadow xMoon = galDetails.Satellite1.ApparentShadowRectangularCoordinates.X; yMoon = galDetails.Satellite1.ApparentShadowRectangularCoordinates.Y; zMoon = galDetails.Satellite1.ApparentShadowRectangularCoordinates.Z * .9; shadow = galDetails.Satellite1.bInShadowTransit; break; case 15: //Europa Shadow xMoon = galDetails.Satellite2.ApparentShadowRectangularCoordinates.X; yMoon = galDetails.Satellite2.ApparentShadowRectangularCoordinates.Y; zMoon = galDetails.Satellite2.ApparentShadowRectangularCoordinates.Z * .9; shadow = galDetails.Satellite2.bInShadowTransit; break; case 16: //Ganymede Shadow xMoon = galDetails.Satellite3.ApparentShadowRectangularCoordinates.X; yMoon = galDetails.Satellite3.ApparentShadowRectangularCoordinates.Y; zMoon = galDetails.Satellite3.ApparentShadowRectangularCoordinates.Z * .9; shadow = galDetails.Satellite3.bInShadowTransit; break; case 17: //Callisto Shadow xMoon = galDetails.Satellite4.ApparentShadowRectangularCoordinates.X; yMoon = galDetails.Satellite4.ApparentShadowRectangularCoordinates.Y; zMoon = galDetails.Satellite4.ApparentShadowRectangularCoordinates.Z * .9; shadow = galDetails.Satellite4.bInShadowTransit; break; } double xTemp; double yTemp; double radians = jupPhisical.P / 180.0 * 3.1415927; xTemp = xMoon * Math.Cos(radians) - yMoon * Math.Sin(radians); yTemp = xMoon * Math.Sin(radians) + yMoon * Math.Cos(radians); xMoon = xTemp; yMoon = yTemp; return(new AstroRaDec(jupDetails.ApparentGeocentricRA - (xMoon * raScale), jupDetails.ApparentGeocentricDeclination + yMoon * scale, jupDetails.ApparentGeocentricDistance + (zMoon * jupiterDiameter / 2), shadow, eclipsed)); } }
void EOCb_Accept_Execute(object sender, EO.Web.CallbackEventArgs e) { try { this.Update(); } catch (Exception Ex) { Layer01_Methods_Web.ErrorHandler(Ex, this.Server); throw Ex; } }