Example #1
0
 public void PressDownLS()
 {
     if (SessionState == SessionMode.Inspecting)
     {
         if (InspectionState == InspectionMode.LookingAtMainPage)
         {
             InspectionState = InspectionMode.LookingAtLikesAndDislikes;
         }
         else if (InspectionState == InspectionMode.LookingAtLikesAndDislikes)
         {
             curProfilePicIndex = 0;
             InspectionState    = InspectionMode.LookingAtPictures;
         }
         else if (InspectionState == InspectionMode.LookingAtPictures)
         {
             if (numOfPicsInCurProfile > 1)
             {
                 if (curProfilePicIndex < (numOfPicsInCurProfile - 1))
                 {
                     curProfilePicIndex++;
                 }
                 else
                 {
                     InspectionState = InspectionMode.LookingAtMainPage;
                 }
             }
         }
     }
 }
Example #2
0
    public void PressX()
    {
        if (SessionState == SessionMode.Browsing)
        {
            SessionState              = SessionMode.Inspecting;
            InspectionState           = InspectionMode.LookingAtMainPage;
            curProfileInspectionImage = profilePage;

            curProfilePicIndex = 0;
        }
        else if (SessionState == SessionMode.BeingContacted)
        {
            if (curChatButton == acceptChatButton)
            {
            }
            else if (curChatButton == rejectChatButton)
            {
            }
        }
        else if (SessionState == SessionMode.Inspecting)
        {
            if (curProfileInspectionImage == startChatButton && curProfile.StatusIsOnline())
            {
                if (curProfile != null)
                {
                    if (curProfile.member != null)
                    {
                        PlaceStardaterCamInFrontOfMember(curProfile.member);

                        float tempPendingTime = curProfile.GetWaitTimeForPendingChat();

                        if (tempPendingTime == 0f)
                        {
                            chatPendingWaitTime = defaultChatPendingWaitTime;
                        }
                        else
                        {
                            chatPendingWaitTime = tempPendingTime;
                        }

                        chatPendingTextRefTime       = Time.time;
                        chatPendingWaitTimeRef       = Time.time;
                        curChatPendingTextFrameIndex = 0;
                    }
                }

                SessionState = SessionMode.Contacting;

                curProfileInspectionImage = profilePage;
            }
        }
    }
Example #3
0
    public void PressCircle()
    {
        if (SessionState == SessionMode.Browsing)
        {
        }
        else if (SessionState == SessionMode.Inspecting)
        {
            SessionState    = SessionMode.Browsing;
            InspectionState = InspectionMode.LookingAtMainPage;
        }
        else if (SessionState == SessionMode.BeingContacted)
        {
            SessionState = PrevSessionState;
        }
        else if (SessionState == SessionMode.Chatting)
        {
            curChatPendingTextFrameIndex = 0;

            SessionState = SessionMode.Inspecting;
        }
    }
Example #4
0
        /// <summary>
        /// Launches an inspection job for this workbook.
        /// </summary>
        public void Inspect(InspectionMode inspectionMode, InspectionType inspectionType)
        {
            // Save a copy of this workbook temporarily
            string workbookFile = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + System.IO.Path.DirectorySeparatorChar + Guid.NewGuid().ToString() + ".xls";

            this.Workbook.SaveCopyAs(workbookFile);

            // Create the rules
            var xmlDoc = new XDocument();

            switch (inspectionMode)
            {
            case InspectionMode.All:
                xmlDoc.Add(this.Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                //TODO add static
                break;

            case InspectionMode.Dynamic:
                xmlDoc.Add(this.Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                break;

            case InspectionMode.Static:
                //TODO change to static
                xmlDoc.Add(this.Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                break;
            }
            ;

            Debug.WriteLine(xmlDoc.ToString());
            var x = xmlDoc.Element(XName.Get("policyList"));
            var a = x.Element(XName.Get("dynamicPolicy"));
            var b = a.Element(XName.Get("spreadsheetFilePath"));

            b.Value = workbookFile;

            xmlDoc.Validate(XMLPartManager.Instance.GetRequestSchema(), null);

            // Enqueue this inspectio
            InspectionEngine.Instance.InspectionQueue.Add(new InspectionJob(this, workbookFile, xmlDoc));
        }
Example #5
0
    // Start is called before the first frame update
    void Start()
    {
        commsPanel   = commsPanel.GetComponent <PanelsBottom>();
        commsControl = FindObjectOfType <CommsController>();
        tedsProfile  = FindObjectOfType <Teddy>().transform.GetComponent <IDCharacter>().stardaterProfile;

        basicInfoTxt.supportRichText = true;
        profileTxt.supportRichText   = true;

        EnableScreen(false);

        curProfileIndex = 0;

        isActivated = false;

        curProfileInspectionImage    = profilePage;
        curChatButton                = acceptChatButton;
        curChatPendingTextFrameIndex = 0;

        SessionState     = SessionMode.Inactive;
        PrevSessionState = SessionMode.Inactive;
        InspectionState  = InspectionMode.LookingAtMainPage;
    }
Example #6
0
        /// <summary>
        /// Launches an inspection job for this workbook.
        /// </summary>
        public void Inspect(InspectionMode inspectionMode)
        {
            // Save a copy of this workbook temporarily
            var workbookFile = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + System.IO.Path.DirectorySeparatorChar + Guid.NewGuid().ToString() + ".xls";
            this.Workbook.SaveCopyAs(workbookFile);

            // Create the rules
            var xmlDoc = new XDocument();
            switch (inspectionMode)
            {
                case InspectionMode.All:
                    xmlDoc.Add(this.Accept(new Sprudel1_2XMLVisitor()) as XElement);
                    //TODO add static
                    break;
                case InspectionMode.Dynamic:
                    xmlDoc.Add(this.Accept(new Sprudel1_2XMLVisitor()) as XElement);
                    break;
                case InspectionMode.Static:
                    //TODO change to static
                    xmlDoc.Add(this.Accept(new Sprudel1_2XMLVisitor()) as XElement);
                    break;
            };

            Debug.WriteLine(xmlDoc.ToString());

            // Enqueue this inspectio
            InspectionEngine.Instance.InspectionQueue.Add(new InspectionJob(this, workbookFile, xmlDoc));
        }
Example #7
0
        /// <summary>
        /// Launches an inspection job for this workbook.
        /// </summary>
        public void Inspect(InspectionMode inspectionMode, InspectionType inspectionType)
        {
            // Save a copy of this workbook temporarily
            string workbookFile = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + System.IO.Path.DirectorySeparatorChar + Guid.NewGuid().ToString() + ".xls";
            this.Workbook.SaveCopyAs(workbookFile);

            // Create the rules
            var xmlDoc = new XDocument();
            switch (inspectionMode)
            {
                case InspectionMode.All:
                    xmlDoc.Add(this.Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                    //TODO add static
                    break;
                case InspectionMode.Dynamic:
                    xmlDoc.Add(this.Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                    break;
                case InspectionMode.Static:
                    //TODO change to static
                    xmlDoc.Add(this.Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                    break;
            };

            Debug.WriteLine(xmlDoc.ToString());
            var x = xmlDoc.Element(XName.Get("policyList"));
            var a = x.Element(XName.Get("dynamicPolicy"));
            var b = a.Element(XName.Get("spreadsheetFilePath"));
            b.Value = workbookFile;

            xmlDoc.Validate(XMLPartManager.Instance.GetRequestSchema(), null);

            // Enqueue this inspectio
            InspectionEngine.Instance.InspectionQueue.Add(new InspectionJob(this, workbookFile, xmlDoc));
        }
Example #8
0
        /// <summary>
        /// Launches an inspection job for this workbook.
        /// </summary>
        public void Inspect(InspectionMode inspectionMode, InspectionType inspectionType)
        {
            Globals.ThisAddIn.Application.StatusBar = Resources.tl_ProcessingScan;
            Globals.Ribbons.Ribbon.scanButton.Enabled = false;
            Globals.Ribbons.Ribbon.scanButton.Label = Resources.tl_NoScanPossible;

            // Save a copy of this workbook temporarily
            string workbookFile = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
                                  System.IO.Path.DirectorySeparatorChar + Guid.NewGuid().ToString() + ".xls";
            Workbook.SaveCopyAs(workbookFile);

            var xmlDoc = new XDocument();

            // Create the rules
            switch (inspectionMode)
            {
                case InspectionMode.All:
                    xmlDoc.Add(Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                    //TODO add static
                    break;
                case InspectionMode.Dynamic:
                    xmlDoc.Add(Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                    break;
                case InspectionMode.Static:
                    //TODO change to static
                    xmlDoc.Add(Accept(new Sprudel1_5XMLVisitor(inspectionType)) as XElement);
                    break;
            }

            var x = xmlDoc.Element(XName.Get("policyList"));
            var a = x.Element(XName.Get("dynamicPolicy"));
            var b = a.Element(XName.Get("spreadsheetFilePath"));
            b.Value = workbookFile;

            xmlDoc.Validate(XMLPartManager.Instance.GetRequestSchema(), null);

            // Enqueue this inspection
            InspectionEngine.Instance.InspectionQueue.Add(new InspectionJob(this, workbookFile, xmlDoc));
        }