private void ButtonLabelTask(object o, DoWorkEventArgs e) { // Update the button label with the character name for FFXIV processes Dictionary <Process, Button> buttons = new Dictionary <Process, Button>(); foreach (Button button in ProcessList.Controls) { if (button != null) { Process proc = (button.Tag as Process); if (proc != null) { buttons[proc] = button; } } } LocalOrchestraCheck.Invoke(t => t.Visible = false); multiboxProcesses.Clear(); // Loop through all buttons and set the name while (buttons.Count > 0) { KeyValuePair <Process, Button> proc = buttons.First(); Process process = proc.Key; Button button = proc.Value; buttons.Remove(process); if (process.ProcessName == "ffxiv_dx11") { if (processWorker.CancellationPending) { break; } MultiboxProcess multiboxData = this.FetchProcessMultiboxInfo(process); multiboxData.process = process; // Set button label string name = multiboxData.characterName; if (string.IsNullOrEmpty(name)) { name = string.Format("{0} (?)", process.Id); } else { name = string.Format("{0} ({1})", name, process.Id); } button.Invoke(t => t.Text = name); multiboxProcesses.Add(multiboxData); } } processCancelled.Set(); // FIXME enable this after testing #if DEBUG LocalOrchestraCheck.Invoke(t => t.Visible = true); #else LocalOrchestraCheck.Invoke(t => t.Visible = (multiboxProcesses.Count > 1)); #endif }
public void SetMultiboxProcess(MultiboxProcess mp) { hook.Hook(mp.process, false); hotkeys.LoadKeybindDat(mp.characterId); hotbar.LoadHotbarDat(mp.characterId); //addon.LoadAddonDat(mp.characterId); CharacterName.Text = mp.characterName; }
public BmpLocalPerformer(MultiboxProcess mp = null) { InitializeComponent(); this.ChosenInstrument = this.chosenInstrument; if (mp != null) { SetMultiboxProcess(mp); } chordNotes.NoteEvent += delegate(object o, NoteEvent e) { this.Invoke(t => t.ProcessOnNote(e)); }; }
public BmpLocalPerformer(MultiboxProcess mp) { InitializeComponent(); this.ChosenInstrument = this.chosenInstrument; if (mp != null) { hook.Hook(mp.process, false); hotkeys.LoadKeybindDat(mp.characterId); hotbar.LoadHotbarDat(mp.characterId); CharacterName.Text = mp.characterName; } Scroller.OnScroll += delegate(object o, int scroll) { this.sequencer.Seek(scroll); }; Scroller.OnStatusClick += delegate(object o, EventArgs a) { Scroller.Text = this.sequencer.Position.ToString(); }; }