public USInfo Info() { SendCommand(Commands.Info, ""); USReply result = waitForReply(100); USInfo info = new USInfo(); info.version = result.Results[0]; info.romPlaying = result.Results[2]; info.flags = result.Results.Skip(3).ToList(); return(info); }
private void USInfo(object sender, RoutedEventArgs e) //内窥数据 { this.stackpanel.Children.Clear(); if (mUsInfo == null) { if (mPipeName != null) { mUsInfo = new USInfo(mPipeName); } else { mUsInfo = new USInfo(mId); } } this.stackpanel.Children.Add(mUsInfo); }
public async Task <USInfo> Info() { SendCommand(Commands.Info, ""); USInfo info = new USInfo(); try { USReply result = await waitForReply(); info.version = result.Results[0]; info.romPlaying = result.Results[2]; info.flags = result.Results.Skip(3).ToList(); } catch (Exception e) { Console.WriteLine(e.Message); } return(info); }