public CourtView(MatchInformation matchInfomation) { InitializeComponent(); Court1FieldRect = new Rectangle(); Court1FieldRect.Stroke = Brushes.Black; Court1FieldRect.StrokeThickness = 1; Court1FieldRect.VerticalAlignment = VerticalAlignment.Top; Court1LayoutGrid.Children.Add(Court1FieldRect); Court2FieldRect = new Rectangle(); Court2FieldRect.Stroke = Brushes.Black; Court2FieldRect.StrokeThickness = 1; Court2FieldRect.VerticalAlignment = VerticalAlignment.Bottom; Court2LayoutGrid.Children.Add(Court2FieldRect); // Labels if (matchInfomation == null) { CreatePlayerLabel(Court1Player1NameLabel, Court1Player1DescriptionLabel); CreatePlayerLabel(Court1Player2NameLabel, Court1Player2DescriptionLabel); CreatePlayerLabel(Court2Player1NameLabel, Court2Player1DescriptionLabel); CreatePlayerLabel(Court2Player2NameLabel, Court2Player2DescriptionLabel); } else { CreatePlayerLabel(Court1Player1NameLabel, Court1Player1DescriptionLabel, matchInfomation.Team1.player1); CreatePlayerLabel(Court1Player2NameLabel, Court1Player2DescriptionLabel, matchInfomation.Team1.player2); CreatePlayerLabel(Court2Player1NameLabel, Court2Player1DescriptionLabel, matchInfomation.Team2.player1); CreatePlayerLabel(Court2Player2NameLabel, Court2Player2DescriptionLabel, matchInfomation.Team2.player2); } }
public static IList <MatchInformation> LoadFile(string filename, string nameFighter1) { var lines = File.ReadAllLines(filename); var matchInfos = new List <MatchInformation>(); foreach (var line in lines.Skip(1)) { var values = line.Split(';'); if (values.Length < 7) { continue; } var matchInfo = new MatchInformation() { Fighter1 = nameFighter1, Fighter2 = values[0], Result = values[1], Method = values[2], Competition = values[3], WeightClass = values[4], Round = values[5], Year = values[6], }; matchInfos.Add(matchInfo); } return(matchInfos); }
private void SetExpressionResult() { // Clear any source text highlight ClearTextHighlight(); // Show the Status message StatusTextBox.Text = statusFromThread; // Hide the tree (reduce drawing) MatchInformation.Hide(); // Clear the previous Matches MatchInformation.SelectedNode = null; // problem - colorization kept after match MatchInformation.Nodes.Clear(); // Build the Tree and highlight the matches foreach (TreeNode matchNode in matchesFromThread) { MatchInformation.Nodes.Add(matchNode); Region matchRegion = (Region)matchNode.Tag; HighlightTextRegion(matchRegion.Index, matchRegion.Length); } // Expand the Tree MatchInformation.ExpandAll(); // Show the tree again MatchInformation.Show(); // Write the code which produces the expression if (statusFromThread.Length > 0) { string codeExpression = ExpressionString(); if (codeExpression.Length > 0) { StatusTextBox.Text += "\r\n" + codeExpression; } } lastStatusWritten = StatusTextBox.Text; }
public override void JoinMatch(MatchInformation match, string password = null) { this.RaiseOnJoinError(); }
public override void JoinMatch(MatchInformation match, string password = null) { this._networkManager.networkAddress = match.connections[0].publicAddress; this._networkManager.networkPort = match.connections[0].port; this._networkManager.StartClient(); }
/// <summary> /// Called when a match is started. /// </summary> /// <param name="matchInformation">Information about the match.</param> public void MatchStarted(MatchInformation matchInformation) { }
public abstract void JoinMatch(MatchInformation match, string password = null);
public override void JoinMatch(MatchInformation match, string password = null) { this._networkManager.JoinMatch(match.unityNetworkId, password); }