public void GivenSearchForEvent(string eventName)
        {
            try
            {
                BBCRMHomePage.OpenEventsFA();                // open event functional area
                EventsFunctionalArea.EventSearch(eventName); // search for an event
                EventPanel.OpenTab("Registrations");
                String xRegistrantName = "//input[contains(@id,'_CONSTITUENTNAME_value')]";
                Panel.SetTextField(xRegistrantName, "Crispin"); // search for the Kelli Crispin registrant with the "Crispin" char string
                Panel.GetDisplayedElement(xRegistrantName).SendKeys(Keys.Enter);
                string xSelectedRow;
                xSelectedRow = "//div[contains(@id,'ext-gen')]/div/table/tbody/tr[1]/td[4]/div/a";
                Dialog.WaitClick(xSelectedRow, 15);

                //click on the link to remove a registrant
                Dialog.WaitClick("//button[contains(@class,'linkbutton')]/div[text()='Delete registrant']", 10);
                //click on the link to remove a spouse

                Dialog.Yes();
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not search for the event. " + ex.Message);
            }
        }
Exemplo n.º 2
0
 public void ThenReminderExistsForTask(string reminder, string task)
 {
     if (!EventPanel.ReminderExists(task, reminder))
     {
         throw new ArgumentException(String.Format("Reminder '{0}' does not exist for task '{1}'", reminder, task));
     }
 }
        public void WhenICreateAnInvitation(string eventName)
        {
            string invitationName;
            string xTab;

            eventName += uniqueStamp;
            BBCRMHomePage.OpenEventsFA();

            EventsFunctionalArea.EventSearch(eventName);  //search for an event
            invitationName = "Inv" + eventName;
            string caption = "General";

            EventPanel.OpenTab("Invitations");               //open the invitations tab
            EventPanel.ClickSectionAddButton("Invitations"); // add an invitation
            xTab = getXInnerTab(caption);
            EventPanel.getXTab(xTab);

            string xEmailString;

            xEmailString = Dialog.getXInput("InvitationAddForm", "_NAME_value");
            xTab         = getXInnerTab(caption);
            Dialog.WaitClick(xTab, 10);                                                                           //open the general subtab in the popup
            Dialog.SetTextField(xEmailString, invitationName);                                                    // enter the invitation name
            Dialog.SetTextField("//input[contains(@id, '_MAILDATE_value')]", DateTime.Today.ToShortDateString()); //add in the date
            xEmailString = Dialog.getXInput("PackageSearch", "_NAME_value");

            caption = "Processing Options";
            xTab    = getXInnerTab(caption);
            Dialog.WaitClick(xTab, 10);
            Dialog.SetCheckbox("//input[contains(@id, '_CHANNELCODE_1')]", true);  //set the "send through email" radio button to true
            // enter email package name
            Dialog.SetSearchList(Dialog.getXInput("InvitationAddForm", "_EMAILPACKAGEID_value"), xEmailString, "UDO FY16 Carolina Connection Email Package");
            Dialog.Save();
        }
        public void WhenIAddRegistrantToEvent(string registrant, string eventName, Table registrations)
        {
            try
            {
                registrant += uniqueStamp;                   // the unique stamp is a series of numbers to keep names different from each other
                eventName  += uniqueStamp;                   // the unique stamp is a series of numbers to keep names different from each other
                BBCRMHomePage.OpenEventsFA();                // open event functional area
                Panel.CollapseSection("Event calendar", "CalendarViewForm");
                EventsFunctionalArea.EventSearch(eventName); // search for an event
                EventPanel.AddRegistrant();
                RegistrantDialog.SetRegistrant(registrant);

                foreach (var registrantRow in registrations.Rows)  // find all the registrants in the table
                {
                    if (registrantRow.ContainsKey("Registrant") && !string.IsNullOrEmpty(registrantRow["Registrant"]) &&
                        registrantRow["Registrant"] != "(Unnamed guest)")
                    {
                        registrantRow["Registrant"] += uniqueStamp;                                                        // the unique stamp is a series of numbers to keep names different from each other
                    }
                }

                RegistrantDialog.SetRegistrants(registrations);
                Dialog.Save();
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not add a registrant to an event. " + ex.Message);
            }
        }
Exemplo n.º 5
0
    public void DrawPreview(EventPanel eventPanel)
    {
        if (currentEventPanel)
        {
            currentEventPanel.SetActive(false);
        }

        currentEventPanel = eventPanel;
        eventPanelController.gameObject.SetActive(true);
        List <Action> actionList = eventPanel.generalEvent.GetChildrenComponents <Action>();

        if (actionList.Count > 0)
        {
            eventPanelController.descriptionText.text = Localization.Instance.GetLocale(eventPanel.generalEvent.description_id);
            eventPanelController.EventActionPanel.DrawActions(actionList, true);
        }
        else
        {
            List <Outcome> outcomList = eventPanel.generalEvent.GetChildrenComponents <Outcome>();
            if (outcomList.Count > 1)
            {
                (eventPanelController.EventActionPanel as EditorActionPanelController).DrawPreview(outcomList);
            }
            else
            {
                DrawPreview(outcomList[0]);
            }
        }

        eventPanel.SetActive(true);
    }
Exemplo n.º 6
0
 public void WhenICopyRegistrationOptionsFromTo(string copyFromEvent, string copyToEvent)
 {
     copyFromEvent += uniqueStamp;
     copyToEvent   += uniqueStamp;
     GetEventPanel(copyToEvent);
     EventPanel.CopyRegistrationOptions(copyFromEvent);
 }
Exemplo n.º 7
0
 public void WhenAddReminderToTaskOnEvent(string taskName, string eventName, Table reminders)
 {
     eventName += uniqueStamp;
     GetEventPanel(eventName);
     EventPanel.EditTask(taskName);
     TaskDialog.SetReminders(reminders);
     Dialog.Save();
 }
Exemplo n.º 8
0
 public void WhenIAddCoordinatorToEvent(string constituentLastName, string eventName)
 {
     constituentLastName += uniqueStamp;
     eventName           += uniqueStamp;
     BBCRMHomePage.OpenEventsFA();
     EventsFunctionalArea.EventSearch(eventName);
     EventPanel.AddCoordinator(constituentLastName);
 }
Exemplo n.º 9
0
 public void WhenIAddARegistrationOptionToEvent(string eventName, Table registrationOptions)
 {
     eventName += uniqueStamp;
     GetEventPanel(eventName);
     foreach (var option in registrationOptions.Rows)
     {
         EventPanel.AddRegistrationOption(option);
     }
 }
Exemplo n.º 10
0
#pragma warning restore 0414

    public void SetInformation(KEvent _event, EventPanel _panel)
    {
        EventInfo e = _event.GetInfo();

        this._event             = _event;
        this.panel              = _panel;
        this.title.text         = TranslationManager.GameLanguage == Language.Portuguese ? e.portugueseExhibitionName : e.englishExhibitionName;
        this.description.text   = TranslationManager.GameLanguage == Language.Portuguese ? e.portugueseDescription : e.englishDescription;
        this.remainingDays.text = e.remainingDays.ToString();
    }
Exemplo n.º 11
0
        public void ThenIsACoordinatorForEvent(string coordinatorName, string eventName)
        {
            coordinatorName += uniqueStamp;
            eventName       += uniqueStamp;

            if (!EventPanel.CoordinatorExists(coordinatorName))
            {
                throw new ArgumentException("Current event panel does not have the coordinator " + coordinatorName);
            }
        }
Exemplo n.º 12
0
    public EventPanel CreatePanel(GeneralEvent generalEvent)
    {
        GameObject item = Instantiate(actionPrefab, content.transform, false) as GameObject;

        item.name = generalEvent.name;
        EventPanel eventPanel = item.GetComponent <EventPanel>();

        eventPanel.generalEvent = generalEvent;
        countItems++;
        return(eventPanel);
    }
Exemplo n.º 13
0
    public void OnEventPanelClick(EventPanel eventPanel)
    {
        currentContainerController = this;

        if (currentEventPanel != null)
        {
            currentEventPanel.BroadcastMessage("SetRespondable", false);
        }

        DrawPreview(eventPanel);
    }
Exemplo n.º 14
0
 public void ThenEventHasRegistrationOptions(string eventName, Table registrationOptions)
 {
     //GetEventPanel(eventName);  // open event panel
     foreach (var option in registrationOptions.Rows)
     {
         if (!EventPanel.RegistrationOptionExists(option))
         {
             throw new ArgumentException("'" + option +
                                         "' was not found on the Registration options datalist for event " +
                                         eventName + ".");
         }
     }
 }
Exemplo n.º 15
0
 public void WhenIAddExpenseTo(string eventName, Table expenses)
 {
     eventName += uniqueStamp;
     GetEventPanel(eventName);
     foreach (var expense in expenses.Rows)
     {
         if (expense.Keys.Contains("Vendor") && expense["Vendor"] != string.Empty)
         {
             expense["Vendor"] = expense["Vendor"] + uniqueStamp;
         }
         EventPanel.AddExpense(expense);
     }
 }
Exemplo n.º 16
0
 public void Activate(EventPanel panel)
 {
     if (StarCount == 0)
     {
         return;
     }
     panel.SelectedMarker = this;
     if (ResourceHolder.Instance.GetResource(ResourceHolder.ResourceType.Minions) > 0)
     {
         panel.gameObject.SetActive(true);
     }
     SelectionMinions.Instance.TargetMarker = this;
 }
Exemplo n.º 17
0
 public void ThenEventHasAPreferenceWithOptions(string eventName, Table preferences)
 {
     eventName += uniqueStamp;
     GetEventPanel(eventName);
     foreach (var preference in preferences.Rows)
     {
         if (!EventPanel.PreferenceExists(preference))
         {
             throw new ArgumentException(String.Format("'{0}' is not a preference for event '{1}'", preference,
                                                       eventName));
         }
     }
 }
Exemplo n.º 18
0
 public void ThenEventHasRegistrationOption(string eventName, Table registrationOptions)
 {
     eventName += uniqueStamp;  // the unique stamp is a series of numbers to keep names different from each other
     GetEventPanel(eventName);  // open event panel
     foreach (var option in registrationOptions.Rows)
     {
         if (!EventPanel.RegistrationOptionExists(option))
         {
             throw new ArgumentException("'" + option +
                                         "' was not found on the Registration options datalist for event " +
                                         eventName + ".");
         }
     }
 }
Exemplo n.º 19
0
 public void WhenIAddCoordinatorToEvent(string constituentLastName, string eventName)
 {
     try
     {
         constituentLastName += uniqueStamp;             // the unique stamp is a series of numbers to keep names different from each other
         eventName           += uniqueStamp;             // the unique stamp is a series of numbers to keep names different from each other
         BBCRMHomePage.OpenEventsFA();                   // open event functional area
         EventsFunctionalArea.EventSearch(eventName);    // search for an event
         EventPanel.AddCoordinator(constituentLastName); // add a coordinator
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add a coordinator to an event. " + ex.Message);
     }
 }
        public bool CoordinatorExists(string coordinatorName)
        {
            try
            {
                EventPanel.SelectTab("Tasks/Coordinators");

                IDictionary <string, string> rowValues = new Dictionary <string, string>();
                rowValues.Add("Coordinator", coordinatorName);
                return(EventPanel.SectionDatalistRowExists(rowValues, "Coordinators"));
            }
            catch (Exception ex)
            {
                throw new Exception("Error: Could not add a coordinator for an event. " + ex.Message);
            }
        }
 public void WhenIAddATaskToEvent(string eventName, Table tasks)
 {
     eventName += uniqueStamp;
     GetEventPanel(eventName);
     foreach (var task in tasks.Rows)
     {
         if (task.Keys.Contains("Owner") && task["Owner"] != string.Empty)
         {
             task["Owner"] = task["Owner"] + uniqueStamp;
         }
         EventPanel.AddTaskDialog();
         TaskDialog.SetFields(task);
         Dialog.Save();
     }
 }
Exemplo n.º 22
0
    // Use this for initialization
    void Start()
    {
        _compass = 0;
        _shell   = 0;

        //iwiEventPanel = Canvas.transform.Find("InteractionWithIslandEventPanel").gameObject;
        cantInteractPanel     = Canvas.transform.Find("CantParkEventPanel").gameObject;
        changeCamouflagePanel = Canvas.transform.Find("ChangeCamouflagePanel").gameObject;
        beginnerGuide         = Canvas.transform.Find("BeginnerGuide").gameObject;
        //Debug.Log(changeCamouflagePanel);

        //IWIEventPanel = new EventPanel(iwiEventPanel,false);
        CantInteractPanel     = new EventPanel(cantInteractPanel, false);
        ChangeCamouflagePanel = new EventPanel(changeCamouflagePanel, false);
    }
Exemplo n.º 23
0
 public void ThenAnEventExistsWithTheNameStartDateAndLocation(string eventName, string startDate, string location)
 {
     eventName += uniqueStamp;
     if (!EventPanel.IsEventName(eventName))
     {
         throw new ArgumentException("Current event does not have the name " + eventName);
     }
     if (!EventPanel.IsStartDate(startDate))
     {
         throw new ArgumentException("Current event does not have the start date " + startDate);
     }
     if (!EventPanel.IsLocation(location))
     {
         throw new ArgumentException("Current event does not have the location " + location);
     }
 }
Exemplo n.º 24
0
 public void WhenIAddARegistrationOptionToEvent(string eventName, Table registrationOptions)
 {
     try
     {
         eventName += uniqueStamp;  // the unique stamp is a series of numbers to keep names different from each other
         GetEventPanel(eventName);  // open event panel
         foreach (var option in registrationOptions.Rows)
         {
             EventPanel.AddRegistrationOption(option);  //add a registration option
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add a registration option. " + ex.Message);
     }
 }
Exemplo n.º 25
0
 public void WhenIAddRegistrationOptionsToEvent(string eventName, Table registrationOptions)
 {
     try
     {
         foreach (var option in registrationOptions.Rows)
         {
             if (!EventPanel.RegistrationOptionExists(option))
             {
                 EventPanel.AddRegistrationOption(option);  //add a registration option
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add a registration option. " + ex.Message);
     }
 }
Exemplo n.º 26
0
 public void ThenEventHasExpense(string eventName, Table expenses)
 {
     eventName += uniqueStamp;
     GetEventPanel(eventName);
     foreach (var expense in expenses.Rows)
     {
         if (expense.Keys.Contains("Vendor") && expense["Vendor"] != string.Empty)
         {
             expense["Vendor"] = expense["Vendor"] + uniqueStamp;
         }
         if (!EventPanel.ExpenseExists(expense))
         {
             throw new ArgumentException(String.Format("Event '{0}' does not have expense '{1}'", eventName,
                                                       expense));
         }
     }
 }
Exemplo n.º 27
0
 public void WhenIAddATaskToEvent(string eventName, Table tasks)
 {
     eventName += uniqueStamp;
     GetEventPanel(eventName);
     foreach (var task in tasks.Rows)
     {
         if (task.Keys.Contains("Owner") && task["Owner"] != string.Empty)
         {
             task["Owner"] = task["Owner"] + uniqueStamp;
         }
         EventPanel.AddTaskDialog();
         Dialog.SetTextField("//div[contains(@id,'dataformdialog')]//input[contains(@id,'_NAME_value')]", task["Name"]);
         Dialog.SetTextField("//textarea[contains(@id,'_COMMENT_value')]", task["Comment"]);
         Dialog.SetTextField("//input[contains(@id,'_OWNERID_value')]", task["Owner"]);
         Dialog.GetEnabledElement("//input[contains(@id,'_COMPLETEBYDATE_value')]").SendKeys(task["Date due"]);
         Dialog.Save();
     }
 }
Exemplo n.º 28
0
    public virtual List <EventPanel> CreateEventPanel(Transform transform)
    {
        List <EventPanel>     EventPanelList = new List <EventPanel>();
        RandomEventController randomEvent    = transform.GetComponent <RandomEventController>();

        if (randomEvent != null)
        {
            randomEvent.randomEventList.RemoveAll(x => x == null);
            foreach (GeneralEvent generalEvent in randomEvent.randomEventList)
            {
                if (!EventPanels.Exists(x => x.generalEvent == generalEvent))
                {
                    EventPanel eventPanel = CreatePanel(generalEvent);
                    EventPanelList.Add(eventPanel);
                    eventPanel.Draw(generalEvent.transform);
                }
            }
        }
        else
        {
            ActionMGController actionMGController = transform.GetComponent <ActionMGController>();
            if (actionMGController != null)
            {
                GeneralEvent generalEvent = actionMGController.MgComplite;
                if (!EventPanels.Exists(x => x.generalEvent == generalEvent))
                {
                    EventPanel eventPanel = CreatePanel(generalEvent);
                    EventPanelList.Add(eventPanel);
                    eventPanel.Draw(generalEvent.transform);
                }

                generalEvent = actionMGController.MgNotComplite;
                if (!EventPanels.Exists(x => x.generalEvent == generalEvent))
                {
                    EventPanel eventPanel = CreatePanel(generalEvent);
                    EventPanelList.Add(eventPanel);
                    eventPanel.Draw(generalEvent.transform);
                }
            }
        }
        EventPanels.AddRange(EventPanelList);
        return(EventPanelList);
    }
Exemplo n.º 29
0
    public void DrawLineEvent(EditorAction eItem, GeneralEvent generalEvent, bool is_double_event = false)
    {
        EventPanel     ePanel     = EventPanels.Find(x => x.generalEvent == generalEvent);
        EventPanelLine ePanelLine = ePanel.GetComponent <EventPanelLine>();

        if (ePanel != null)
        {
            float scale = (eItem.line_event.position.y - ePanelLine.line_in.position.y) * 0.9965f;
            eItem.line_event.localScale = new Vector3(1, scale, 1);
            int step = 0;
            //print(" --generalEvent = " + generalEvent);
            if (scale > 0)
            {
                if (linesEventPanel.ContainsKey(ePanelLine))
                {
                    step = linesEventPanel[ePanelLine];
                }
                else
                {
                    step = (!is_double_event) ? FindEmptyStep() : eItem.level_line;
                    linesStep.Add(step);
                    linesEventPanel[ePanelLine]   = step;
                    eItem.level_line              = step;
                    ePanelLine.line_in.localScale = new Vector3((step + 1) * 2f, ePanelLine.line_in.localScale.y, 1);
                }
            }
            else
            {
                step             = FindMaxLevel() + 1;
                eItem.level_line = step;
                ePanelLine.line_in.localScale = new Vector3((step + 1) * 2f, ePanelLine.line_in.localScale.y, 1);
            }

            scale = (step + 1) * 2f;
            if (!is_double_event)
            {
                eItem.line_out.localScale = new Vector3(scale * eItem.line_out.localScale.x, 1, 1);
            }
            //print(eItem.line_out.localScale);
            eItem.line_event.localScale = new Vector3(1 / eItem.line_out.localScale.x, eItem.line_event.localScale.y, 1);
        }
    }
Exemplo n.º 30
0
    public void OnEndDrag(PointerEventData eventData)
    {
        if (isDrag)
        {
            isDrag = false;
            EventPanel eventPanel = eventData.pointerEnter.GetComponent <EventPanel>();
            if (eventPanel != null)
            {
                RandomEventController randomEventController = storyTransform.GetComponent <RandomEventController>();
                if (randomEventController == null)
                {
                    randomEventController = storyTransform.gameObject.AddComponent <RandomEventController>();
                }

                randomEventController.randomEventList.Add(eventPanel.generalEvent);
                //ContainerController.current.Draw();
                EditorEventManager.TriggerEvent("Draw_" + ContainerControllerBase.currentContainerController.name);
            }
        }
    }