Ejemplo n.º 1
0
        /// <summary>
        /// Refresh Process list
        /// </summary>
        private void RefreshProcessList()
        {
            this.comboProcessList.Items.Clear();
            this.comboProcessList.Items.Add("Automatic");
            IList <Process> fFXIVProcessList = FFXIVProcessHelper.GetFFXIVProcessList();

            foreach (Process current in fFXIVProcessList)
            {
                this.comboProcessList.Items.Add(current.Id.ToString());
            }
        }
Ejemplo n.º 2
0
        public void changeProcessId(int processId)
        {
            lock (_lock)
            {
                Process p = null;

                if (Config.FollowFFXIVPlugin)
                {
                    if (FFXIVPluginHelper.Instance != null)
                    {
                        p = FFXIVPluginHelper.GetFFXIVProcess;
                    }
                }
                else
                {
                    p = FFXIVProcessHelper.GetFFXIVProcess(processId);
                }

                if ((_memory == null && p != null) ||
                    (_memory != null && p != null && p.Id != _memory.process.Id))
                {
                    try
                    {
                        _memory = new FFXIVMemory(this, p);
                    }
                    catch (Exception ex)
                    {
                        LogError(ex.Message);
                        suppress_log = true;
                        _memory      = null;
                    }
                }
                else if (_memory != null && p == null)
                {
                    _memory.Dispose();
                    _memory = null;
                }
            }
        }