private void Button_OpenThisProcess_Click(object sender, RoutedEventArgs e)
 {
     if (ListBox_Processes.SelectedItems.Count == 1)
     {
         var p = ListBox_Processes.SelectedItems[0] as ProcessModel;
         this.SelectedLalaSlot        = FFXIVMemory.GetLalaSlotFromProcess(p.Process);
         this.SelectedLalaSlot.Hooked = true;
         DialogResult = true;
     }
 }
Exemple #2
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;

            TheGame           = new GameLogic();
            TheGame.OnUpdate += delegate(object o, LalaUpdate update)
            {
                this.Dispatcher.Invoke(DispatcherPriority.Send, new Action(() => { UpdateSystem(update); }));
            };

            FFXIVMemory.InitializeMemory();
        }
Exemple #3
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        // Static Accessors
        ///////////////////////////////////////////////////////////////////////////////////////////
        public static void InitializeMemory()
        {
            AllAvailableLalas = new List <LalaSlot>();
            var processes = Process.GetProcesses().Where(p => (p.MainWindowTitle.Length != 0 && p.ProcessName.Contains("ffxiv")));

            foreach (var process in processes)
            {
                string characterName = FFXIVMemory.GetPlayerNameFromProcess(process);
                AllAvailableLalas.Add(new LalaSlot
                {
                    Name    = characterName,
                    Process = process
                });
            }
        }
        ///////////////////////////////////////////////////////////////////////////////////////////
        // Internals
        ///////////////////////////////////////////////////////////////////////////////////////////

        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;

            this.Time              = new TimeSpan(0);
            this.RunTimer          = new Timer();
            this.RunTimer.Interval = 500;
            this.RunTimer.Elapsed += DispatcherTimer_Tick;

            // TODO: Drop-down menu to select game
            TheGame           = new Nutcracker();
            TheGame.OnUpdate += delegate(object o, GameUpdate update)
            {
                this.Dispatcher.Invoke(DispatcherPriority.Send, new Action(() => { UpdateSystem(o, update); }));
            };

            FFXIVMemory.InitializeMemory();
        }
Exemple #5
0
 public void PerformAction(Enums.KeybindAction action)
 {
     Task.Run(() => FFXIVMemory.PerformActionThroughKeybind(this, action));
 }
Exemple #6
0
 public void PerformAction(Enums.KeybindAction action, int kbWaitInMs)
 {
     Task.Run(() => FFXIVMemory.PerformActionThroughKeybind(this, action, kbWaitInMs));
 }