Example #1
0
        private void InteractionClicked(UIElement ui)
        {
            if (QueueOwner == null)
            {
                return;
            }
            UIInteraction item   = (UIInteraction)ui;
            var           itemui = item.ParentEntry;
            var           queue  = QueueOwner.Thread.Queue;

            for (int i = 0; i < queue.Count; i++)
            {
                if (queue[i] == itemui.Interaction)
                {
                    HITVM.Get().PlaySoundEvent(UISounds.QueueDelete);
                    var priority = GetElemPriority(itemui.Interaction, i);
                    if (!(itemui.Interaction.NotifyIdle && priority <= 0))
                    {
                        vm.SendCommand(new VMNetInteractionCancelCmd
                        {
                            ActionUID = itemui.Interaction.UID,
                            ActorUID  = QueueOwner.PersistID
                        });
                    }
                    break;
                }
            }
        }
Example #2
0
 public void GenerateMission(MissionDetails missionDetails, UIInteraction uiInteractions, MainMenueController mainMenueControll, General general = null)
 {
     this.MissionDetails    = missionDetails;
     this.UIInteractions    = uiInteractions;
     this.MainMenueControll = mainMenueControll;
     this.MissionGeneral    = general;
 }
Example #3
0
        void InteractionResult(UIElement ui, bool accepted)
        {
            if (QueueOwner == null)
            {
                return;
            }
            UIInteraction item   = (UIInteraction)ui;
            var           itemui = item.ParentEntry;
            var           queue  = QueueOwner.Thread.Queue;

            for (int i = 0; i < queue.Count; i++)
            {
                if (queue[i] == itemui.Interaction)
                {
                    HITVM.Get.PlaySoundEvent(UISounds.CallSend);
                    if (!(itemui.Interaction.Cancelled && itemui.Interaction.Priority <= 0))
                    {
                        vm.SendCommand(new VMNetInteractionResultCmd
                        {
                            ActionUID = itemui.Interaction.UID,
                            ActorUID  = QueueOwner.PersistID,
                            Accepted  = accepted
                        });
                    }
                    break;
                }
            }
        }
Example #4
0
 public void Reset()
 {
     this.MissionDetails    = null;
     this.UIInteractions    = null;
     this.MainMenueControll = null;
     this.MissionGeneral    = null;
     this.Units             = new List <Unit>();
 }
Example #5
0
    public void Initialize(MissionDetails missionDetails, UIInteraction uiInteractions, General general = null, List <Unit> units = null)
    {
        this.MissionDetails = missionDetails;
        this.MissionGeneral = general;
        this.Units          = units ?? new List <Unit>();

        this.UIInteractions = uiInteractions;
        this.missionQueue   = GameObject.Find("ReferenceShare").GetComponent <ReferenceShare>().MissionQueue;
    }
    private void Awake()
    {
        uiInteraction = GameObject.Find("UI").GetComponent <UIInteraction>();
        player        = GameObject.Find("Player");

        Cursor.lockState = CursorLockMode.Confined;

        screenWidth  = Screen.width;
        screenHeight = Screen.height;
    }
Example #7
0
            private static void displayAllRecs()
            {
                var recs = component.FindEmployee(UIInteraction.GetString("Enter the name or part of the Name to search"));

                foreach (var emp in recs)
                {
                    displayEmpInfo(emp);
                    Console.WriteLine();
                }
            }
Example #8
0
            static void Main(string[] args)
            {
                var    fileName  = args[0];
                bool   @continue = true;
                string menu      = new StreamReader(fileName).ReadToEnd();

                do
                {
                    string choice = UIInteraction.GetString(menu);
                    @continue = processMenu(choice);
                } while (@continue);
            }
Example #9
0
 private static void deleteEmp()
 {
     try
     {
         int id = UIInteraction.GetInteger("Enter an ID to delete");
         component.DeleteEmployee(id);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #10
0
 private static void displayRec()
 {
     try
     {
         var id  = UIInteraction.GetInteger("Enter the ID to search");
         var emp = component.FindEmployee(id);
         displayEmpInfo(emp);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
    // Use this for initialization
    private void Start()
    {
        //boardGrid = new int[5, 5];

        BoardSpaces = GameObject.FindGameObjectsWithTag("BoardSpace");
        UIInt       = GameObject.Find("UI").GetComponent <UIInteraction>();

        foreach (GameObject space in BoardSpaces)
        {
            if (space.GetComponent <BorderSpaceTile>())
            {
                BoardBorderSpaces.Add(space);
            }
        }
    }
Example #12
0
 private static void displayRec()
 {
     try
     {
         string name = UIInteraction.GetString("Enter the name to search");
         var    emp  = component.FindEmployee(name);
         Console.WriteLine("The Name is " + emp.EmployeeName);
         Console.WriteLine("The Address is " + emp.EmployeeAddress);
         Console.WriteLine("The Age is " + emp.Age);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #13
0
 private static void createEmp()
 {
     try
     {
         var emp = new Employee();
         emp.EmployeeID          = UIInteraction.GetInteger("Enter the ID of the Employee");
         emp.EmployeeName        = UIInteraction.GetString("Enter the Name");
         emp.EmployeeAddress     = UIInteraction.GetString("Enter the Address");
         emp.EmployeeDateOfBirth = UIInteraction.GetDate("Enter the date of birth in the format of dd/MM/yyyy");
         component.AddNewEmployee(emp);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #14
0
        private void InteractionClicked(UIElement ui)
        {
            UIInteraction item   = (UIInteraction)ui;
            var           itemui = item.ParentEntry;
            var           queue  = QueueOwner.Thread.Queue;

            for (int i = 0; i < queue.Count; i++)
            {
                if (queue[i] == itemui.Interaction)
                {
                    HITVM.Get().PlaySoundEvent(UISounds.QueueDelete);
                    if (!(itemui.Interaction.Cancelled && itemui.Interaction.Priority <= 0))
                    {
                        vm.SendCommand(new VMNetInteractionCancelCmd
                        {
                            ActionUID = itemui.Interaction.UID,
                            CallerID  = QueueOwner.ObjectID
                        });
                    }
                    break;
                }
            }
        }
 // Use this for initialization
 private void Start()
 {
     UI = GameObject.Find("UI").GetComponent <UIInteraction>();
 }
Example #16
0
        static void Main(string[] args)
        {
            UIInteraction uiInteraction = new UIInteraction();

            uiInteraction.OperateBank();
        }