public void SelectProcess() { using (var p = new ProcessSelector()) { switch (p.Processes.Length) { case 1: CampahStatus.Instance.Process = p.processes[0]; break; case 0: CampahStatus.Instance.Status = "No FFXI Processes Found"; return; default: p.ShowDialog(); break; } if (CampahStatus.Instance.Process == null) { return; } FFACEInstance.Instance = null; //needs to dispose of old FFACEInstance.Instance = new FFACE(CampahStatus.Instance.Process.Id); CampahStatus.SetStatus("Attached to " + CampahStatus.Instance.Process.MainWindowTitle); } }
public void SelectProcess() { using (var p = new ProcessSelector()) { switch (p.Processes.Length) { case 1: CampahStatus.Instance.Process = p.processes[0]; break; case 0: CampahStatus.Instance.Status = "No FFXI Processes Found"; return; default: p.ShowDialog(); break; } if (CampahStatus.Instance.Process == null) { return; } EliteAPIInstance.Instance = null; //needs to dispose of old EliteAPIInstance.Instance = new EliteAPI(CampahStatus.Instance.Process.Id); CampahStatus.SetStatus("Attached to " + CampahStatus.Instance.Process.MainWindowTitle); } }
public void selectProcess() { using (ProcessSelector p = new ProcessSelector()) { //this.Topmost = false; if (p.Processes.Length == 1)// && autoAttach) { CampahStatus.Instance.Process = p.processes[0]; } else if (p.Processes.Length == 0)// && autoAttach) { CampahStatus.Instance.Status = "No FFXI Processes Found"; return; } else p.ShowDialog(); //this.Topmost = (bool)cb_alwaystop.IsChecked; if (CampahStatus.Instance.Process != null) { if (FFACE_INSTANCE.Instance != null) FFACE_INSTANCE.Instance = null; //needs to dispose of old FFACE_INSTANCE.Instance = new FFACE(CampahStatus.Instance.Process.Id); CampahStatus.SetStatus("Attached to " + CampahStatus.Instance.Process.MainWindowTitle); } } }