Example #1
0
        protected void btnsendback_Click(object sender, EventArgs e)
        {
            // sendFeedBack();
            string memberno    = Session["usernameJ"].ToString();
            string messagetext = txtfeedback.Text.Trim();

            try
            {
                var     credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
                Portals sup         = new Portals();
                sup.Credentials     = credentials;
                sup.PreAuthenticate = true;
                if (sup.FnFeedback(memberno, messagetext) == true)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "myFunction();", true);
                    //ScriptManager.RegisterStartupScript(this, this.GetType(), "text", "alert('Feedback send succcessfully')", true);
                    Loadfeedback();
                }
            }
            catch (Exception ex)
            {
                //lblError.Text = ex.Message;
                SACCOFactory.ShowAlert(ex.Message);
                return;
            }
        }
Example #2
0
        public void Link(Side side, Location destination)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(nameof(destination));
            }

            if (AwailableSides.HasFlag(side))
            {
                throw new InvalidOperationException($"Location {this} already has portal for {side}");
            }
            if (destination.AwailableSides.HasFlag(GetOpposite(side)))
            {
                throw new InvalidOperationException($"Location {destination} already has portal for {GetOpposite(side)}");
            }

            Portals.Add(side, new Portal()
            {
                Destination = destination
            });
            AwailableSides |= side;

            Side opposite = GetOpposite(side);

            destination.Portals.Add(opposite, new Portal()
            {
                Destination = this
            });
            destination.AwailableSides |= opposite;
        }
Example #3
0
 private void PurgeLists()
 {
     Demons.PurgeNulls();
     Gazebos.PurgeNulls();
     Houses.PurgeNulls();
     Portals.PurgeNulls();
     Gibs.PurgeNulls();
 }
Example #4
0
 private void LoadPortals()
 {
     SpaceDef.Portals.OfType <DictionaryAtom>().ToList().ForEach(portal =>
     {
         var portalId = portal.GetInt("SpacePortalMapID");
         Portals.Add(new PortalDef(portalId, "Portal-" + portalId, portal));
     });
 }
Example #5
0
        private void Load(WZProperty mapNode)
        {
            Portals.Load(mapNode);
            Footholds.Load(mapNode);
            Npcs.Load(mapNode);

            Mobs.Load(mapNode);
            Mobs.DoMobLogic();
        }
Example #6
0
        private void Load(WZObject mapNode)//WzManager wzMan)
        {
            Portals.Load(mapNode);
            Footholds.Load(mapNode);
            Npcs.Load(mapNode);

            Mobs.Load(mapNode);
            Mobs.DoMobLogic();
        }
Example #7
0
    public void AddPortal(Portal portal)
    {
        if (Portals.Contains(portal))
        {
            return;
        }

        Portals.Add(portal);
    }
Example #8
0
    private void OnNewNode(GameObject node)
    {
        Portals tp = node.GetComponent <Portals>();

        if (tp != null && tp.gameObject.GetInstanceID() != gameObject.GetInstanceID() && linked == null)
        {
            linked    = tp;
            tp.linked = this;
        }
    }
Example #9
0
        public List <PacketDefinition> GetMapItems()
        {
            var packets = new List <PacketDefinition>();

            // TODO: Parallelize getting of items of mapinstance
            Portals.ForEach(s => packets.Add(s.GenerateGp()));
            Monsters.ForEach(s => packets.Add(s.GenerateIn()));
            Npcs.ForEach(s => packets.Add(s.GenerateIn()));
            return(packets);
        }
        protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(exporter);

            node.Add("m_PVSData", PVSData.ExportYAML());
            node.Add("m_Scenes", Scenes.ExportYAML(exporter));
            node.Add("m_StaticRenderers", IsReadStaticRenderers(exporter.Platform) ? StaticRenderers.ExportYAML(exporter) : YAMLSequenceNode.Empty);
            node.Add("m_Portals", IsReadStaticRenderers(exporter.Platform) ? Portals.ExportYAML(exporter) : YAMLSequenceNode.Empty);
            return(node);
        }
Example #11
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.Add("m_PVSData", PVSData.ExportYAML());
            node.Add("m_Scenes", Scenes.ExportYAML(container));
            node.Add("m_StaticRenderers", StaticRenderers.ExportYAML(container));
            node.Add("m_Portals", Portals.ExportYAML(container));
            return(node);
        }
Example #12
0
        protected void btnProjEdit_OnClick(object sender, EventArgs e)
        {
            int      projectlength = 0;
            var      usn           = Session["username"].ToString();
            string   projTt        = TextBoxtitle.Text.Trim();
            var      pstartD       = txtDateofStart.Value.Trim();
            DateTime projTDt       = DateTime.Parse(pstartD);
            string   county        = ddlSelCountry.SelectedItem.Text;
            string   constituency  = ddlConstituency.SelectedItem.Text;
            string   urbantarget   = txtAreaTargetSettmnt.Text.Trim();

            string  scale     = ddlEstScale.SelectedItem.Text;
            decimal projCost  = Convert.ToDecimal(TextBoxcost.Text);
            decimal contrib   = Convert.ToDecimal(TextBoxcont.Text);
            decimal kcdffunds = Convert.ToDecimal(TextBoxrequested.Text);
            string  projectNm = lblProjNo.Text;

            if (ddlMonths.SelectedItem.Text == "..Select project Length..")
            {
                KCDFAlert.ShowAlert("Select valid project duration!");
                return;
            }
            else
            {
                projectlength = Convert.ToInt32(ddlMonths.SelectedItem.Text);
            }

            try
            {
                var     credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
                Portals sup         = new Portals();
                sup.Credentials     = credentials;
                sup.PreAuthenticate = true;
                sup.FnEditProject(projectNm, county, constituency, urbantarget,
                                  projectlength, projCost, contrib, kcdffunds, projTDt, scale);

                KCDFAlert.ShowAlert("Data Updated Successfully!");

                TextBoxtitle.Text             = "";
                txtDateofStart.Value          = "";
                ddlSelCountry.SelectedIndex   = 0;
                ddlConstituency.SelectedIndex = 0;
                txtAreaTargetSettmnt.Text     = "";
                ddlMonths.SelectedIndex       = 0;
                ddlEstScale.SelectedIndex     = 0;
                TextBoxcost.Text      = "";
                TextBoxcont.Text      = "";
                TextBoxrequested.Text = "";
            }
            catch (Exception ex)
            {
                KCDFAlert.ShowAlert(ex.Message);
            }
        }
Example #13
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.Add(PVSDataName, PVSData.ExportYAML());
            node.Add(ScenesName, Scenes.ExportYAML(container));
            SetExportData(container);
            node.Add(StaticRenderersName, StaticRenderers.ExportYAML(container));
            node.Add(PortalsName, Portals.ExportYAML(container));
            return(node);
        }
Example #14
0
 public void LoadPortals()
 {
     foreach (PortalDTO portal in DAOFactory.PortalDAO.LoadByMap(Map.MapId))
     {
         Portal p = new Portal(portal)
         {
             SourceMapInstanceId = MapInstanceId
         };
         Portals.Add(p);
     }
 }
Example #15
0
        public override void OnUserEnterPortal(Character c, string sPortalName)
        {
            var portal = Portals.FindPortal(sPortalName);

            if (TryProceed(c, portal?.nIdx ?? 0))
            {
                WarpMap(NextFieldID(), nInstanceID, (byte)NextPortalID(), 0);
            }
            else
            {
                c.Action.Enable();
            }
        }
Example #16
0
        protected void GetNotification()
        {
            //int nots = nav.tasks.ToList().Where(n => n.User_Number == Grantees.No).Count();
            int     userType    = Convert.ToInt32(Session["usertype"]);
            var     credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
            Portals sup         = new Portals();

            sup.Credentials     = credentials;
            sup.PreAuthenticate = true;
            int nots = sup.FnCountGrantsNotifications(Session["username"].ToString(), userType);

            lblNots.Text = nots.ToString();
        }
        private GameObject FindPortal(string noun, string adjective)
        {
            var matchingPortals = Portals.Where(m => m.Noun == noun);

            if (adjective != "")
            {
                return(matchingPortals.FirstOrDefault(i => i.Adjective == adjective));
            }
            else
            {
                return(matchingPortals.FirstOrDefault());
            }
        }
Example #18
0
 internal void CreatePortalTemp(Portal portal, int timeInSeconds = 0, bool isTemporary = false)
 {
     portal.SourceMapInstanceId = MapInstanceId;
     Portals.Add(portal);
     Broadcast(portal.GenerateGp());
     if (isTemporary)
     {
         Observable.Timer(TimeSpan.FromSeconds(timeInSeconds)).Subscribe(o =>
         {
             Portals.Remove(portal);
             MapClear();
         });
     }
 }
Example #19
0
        protected void FreeShares()
        {
            var     credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
            Portals fShares     = new Portals();

            fShares.Credentials     = credentials;
            fShares.PreAuthenticate = true;
            fShares.FnFreeShares(Session["username"].ToString());
            Session["Shares"] = fShares.FnFreeShares(Session["username"].ToString());
            var     freeSh = String.Format(Session["Shares"].ToString());
            decimal fshrs  = Convert.ToDecimal(freeSh);

            lblfreeShares.Text = fshrs.ToString();
        }
Example #20
0
        private void LoadBarriers()
        {
            Portals.Where(x => x.Barrier.IsNotNull()).ToList().ForEach(portal =>
            {
                var obj = EntityManager.Create <Barrier>(portal.Barrier.ID, portal.Barrier.DisplayName, portal.Barrier);
                if (obj.IsNull())
                {
                    throw new InstantiationException("Barrier {0} could not be instantiated.", portal.Barrier.ID);
                }

                obj.OnInit(InitializationAtom);
                Barriers.Add(portal.ID, obj);
            });
        }
Example #21
0
        protected void FinalSubmitApplication(string usname, string refNoPrj)
        {
            try
            {
                var approvedyeah =
                    nav.myConsultations.ToList()
                    .Where(a => a.No == refNoPrj)
                    .Select(ast => ast.Approval_Status)
                    .SingleOrDefault();

                switch (approvedyeah)
                {
                case "Approved":
                    KCDFAlert.ShowAlert("You cannot Submit an Appproved application!!");
                    break;

                case "Declined":
                    KCDFAlert.ShowAlert("Your application was declined!, You cannot submit");
                    break;

                case "Open":
                    var credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"],
                                                            ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
                    Portals sup = new Portals();
                    sup.Credentials     = credentials;
                    sup.PreAuthenticate = true;
                    bool isSubmitted = sup.FnSubmitConsultApp(usname, refNoPrj);

                    switch (isSubmitted)
                    {
                    case true:
                        KCDFAlert.ShowAlert("Your Application is Successfully submitted!" + isSubmitted);
                        LoadmyApplications();
                        SendEmail(usname, refNoPrj);
                        Session.Remove("validOR");
                        break;

                    case false:
                        KCDFAlert.ShowAlert("Your Application could not submitted!" + isSubmitted);
                        Session.Remove("validOR");
                        break;
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                KCDFAlert.ShowAlert("Error Loading!");
            }
        }
        public async Task <List <PortalBriefViewModel> > GetIsePortals()
        {
            // TODO : Return a proper http response code

            var connection = GetIseConnection();

            if (connection == null)
            {
                return(null);
            }

            var portals = await Portals.Get(connection);

            return(portals);
        }
        public async Task <PortalViewModel> GetIsePortal(Guid id)
        {
            // TODO : Return a proper http response code

            var connection = GetIseConnection();

            if (connection == null)
            {
                return(null);
            }

            var portal = await Portals.Get(connection, id);

            return(portal);
        }
Example #24
0
        protected void SaveAttachment(string filName, string extension, string docKind, string callRefNo, string AttachedBLOB)
        {
            var usNo    = nav.myConsultants.ToList().Where(usr => usr.Organization_Username == Session["username"].ToString()).Select(nu => nu.No).SingleOrDefault();
            var usaname = Session["username"].ToString();
            var prjct   = ddlProjectApp.SelectedItem.Text;

            // string fullFPath = Request.PhysicalApplicationPath + "All Uploads\\" + Grantees.No + @"\" + filName;

            string navfilePath = @"D:\All_Portal_Uploaded\" + filName;

            var    credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
            int    granttype   = 2;
            string docType     = "";

            if ((extension == ".jpg") || (extension == ".jpeg") || (extension == ".png"))
            {
                docType = "Picture";
            }
            else
            if ((extension == ".pdf"))
            {
                docType = "PDF";
            }
            if ((extension == ".doc") || (extension == ".docx"))
            {
                docType = "Word Document";
            }
            if (extension == ".xlsx")
            {
                docType = "Excel Document";
            }
            try
            {
                Portals sup = new Portals();
                sup.Credentials     = credentials;
                sup.PreAuthenticate = true;
                if (sup.FnAttachmentConsultant(usNo, docType, navfilePath, filName, granttype, docKind, usaname, prjct, callRefNo, AttachedBLOB) == true)
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itsABitch", "alert('Document: " + filName + " uploaded and Saved successfully!');", true);
                    GetProjects();
                }
            }
            catch (Exception r)
            {
                // KCDFAlert.ShowAlert(r.Message);
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itsABitch", "alert('" + r.Message + " ');", true);
            }
        }
Example #25
0
    void Awake()
    {
        if (instance != null && instance != this)

        {
            Destroy(this.gameObject);

            return;
        }
        else

        {
            instance = this;
        }
        DontDestroyOnLoad(this.gameObject);
    }
Example #26
0
        public static Portal CreatePortal(Portals dbPortal)
        {
            Portal portal = new Portal();

            portal.portal_id        = dbPortal.PortalID;
            portal.target_portal_id = dbPortal.TargetPortalID;
            portal.room_x           = dbPortal.RoomX;
            portal.room_y           = dbPortal.RoomY;
            portal.room_z           = dbPortal.RoomZ;
            portal.room_side        = (MathConstants.eSignedDirection)dbPortal.RoomSide;
            portal.bounding_box.SetPointBounds(
                new Point3d((float)dbPortal.BboxX0, (float)dbPortal.BboxY0, 0F),
                new Point3d((float)dbPortal.BboxX1, (float)dbPortal.BboxY1, 0F));

            return(portal);
        }
Example #27
0
 /// <summary>
 /// Clears all higher and lower object pools.
 /// Field will be ready for disposal and can not be used after this is called.
 /// </summary>
 public void Dispose()
 {
     Users.Dispose();
     Npcs.Dispose();
     Footholds.Dispose();
     Portals.Dispose();
     Mobs.Dispose();
     Reactors.Dispose();
     Drops.Dispose();
     AffectedAreas.Dispose();
     MiniRooms.Dispose();
     Kites.Dispose();
     TownPortals.Dispose();
     OpenGates1.Dispose();
     OpenGates2.Dispose();
     CurrentWeather.Dispose();
 }
Example #28
0
 protected void tblMyProjects_OnRowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     try
     {
         var     del_id      = tblMyProjects.DataKeys[e.RowIndex].Values[0].ToString();
         var     credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
         Portals sup         = new Portals();
         sup.Credentials     = credentials;
         sup.PreAuthenticate = true;
         sup.FnDeleteProject(del_id);
         LoadMyProjects();
         KCDFAlert.ShowAlert("Project Deleted Successfully!");
     }
     catch (Exception ex)
     {
         KCDFAlert.ShowAlert(ex.Message);
     }
 }
Example #29
0
        protected void btnValidateInfo_OnClick(object sender, EventArgs e)
        {
            try
            {
                var tobevalidated = Session["edit_id"].ToString();
                //KCDFAlert.ShowAlert(tobevalidated);var prj = ddlAccountType.SelectedItem.Text;
                var     usNM        = Session["username"].ToString();
                var     credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
                Portals sup         = new Portals();
                sup.Credentials     = credentials;
                sup.PreAuthenticate = true;
                bool myValid = sup.FnValidateSubmission(usNM, tobevalidated);
                switch (myValid)
                {
                case true:
                    txtValidate.Text      = "ALL UPLOADS AVAILABLE";
                    txtValidate.ForeColor = Color.GhostWhite;
                    txtValidate.BackColor = Color.ForestGreen;
                    //  btnFinalSubmit.Enabled = true;
                    btnValidateInfo.Enabled = false;
                    hdnTxtValidit.Value     = "isValid";
                    KCDFAlert.ShowAlert("All Uploads available, you can submit your application: " + hdnTxtValidit.Value);
                    break;

                case false:
                    txtValidate.Text      = "PLEASE COMPLETE THE APPLICATION FIRST";
                    txtValidate.BackColor = Color.Red;
                    txtValidate.ForeColor = Color.GhostWhite;
                    //  btnFinalSubmit.Enabled = false;
                    hdnTxtValidit.Value = "isInValid";
                    sup.FnChangeSubmitStatus(tobevalidated, usNM);
                    KCDFAlert.ShowAlert("No uploads yet!, you cannot submit anything: " + hdnTxtValidit.Value);
                    break;
                }
            }
            catch (Exception ex)
            {
                KCDFAlert.ShowAlert(ex.Message);
                txtValidate.Text      = "PLEASE UPLOAD ALL DOCUMENTS";
                txtValidate.BackColor = Color.Red;
                txtValidate.ForeColor = Color.GhostWhite;
                //btnFinalSubmit.Enabled = false;
            }
        }
Example #30
0
        protected void gridViewUploads_OnRowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            try
            {
                var delId = gridViewUploads.DataKeys[e.RowIndex].Values[0].ToString();
                Session["delMeID"] = delId;

                var     credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
                Portals sup         = new Portals();
                sup.Credentials     = credentials;
                sup.PreAuthenticate = true;

                var uploadsGrantNo =
                    nav.myConsultsUploads.ToList()
                    .Where(rU => rU.Id == Session["delMeID"].ToString() &&
                           rU.Username == Session["username"].ToString())
                    .Select(gN => gN.Scholarship_No).SingleOrDefault();
                bool confirmsubmit =
                    nav.myConsultations.ToList()
                    .Where(ri => ri.No == uploadsGrantNo)
                    .Select(sb => Convert.ToBoolean(sb.Application_Submitted))
                    .SingleOrDefault();
                switch (confirmsubmit)
                {
                case true:
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itsABitch", "alert('You CANT delete Upload for a submitted project, Replace it by Uploading again!');", true);
                    break;

                case false:
                    if (sup.FnDeleteUploadConsult(Session["delMeID"].ToString()) == true)
                    {
                        KCDFAlert.ShowAlert("Deleted Successfully!" + uploadsGrantNo + " &&" + delId);
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itsABitch", "alert('Deleted Successfully!" + uploadsGrantNo + " &&" + delId + "');", true);
                        LoadUploads();
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                //KCDFAlert.ShowAlert(ex.Message);
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itsABitch", "alert('" + ex.Message + "');", true);
            }
        }