public BattleView() { // This constructor only exists so xaml compiles Field = null !; Actions = null !; _messages = null !; Client = null !; AvaloniaXamlLoader.Load(this); }
public BattleView(BattleClient client) { AvaloniaXamlLoader.Load(this); Client = client; Client.BattleView = this; Field = this.FindControl <FieldView>("Field"); Field.SetBattleView(this); Actions = this.FindControl <ActionsView>("Actions"); Actions.BattleView = this; messages = this.FindControl <MessageView>("Messages"); }
internal BattleView(BattleClient client) { AvaloniaXamlLoader.Load(this); Client = client; Field = this.FindControl <FieldView>("Field"); Field.SetBattleView(this); Actions = this.FindControl <ActionsView>("Actions"); Actions.BattleView = this; _messages = this.FindControl <MessageView>("Messages"); // Messages will be null }
public BattleView(BattleClient client) { AvaloniaXamlLoader.Load(this); Client = client; //Field = this.FindControl<FieldView>("Field"); // Field will be null Field = TemporaryFix <FieldView>("Field"); Field.SetBattleView(this); //Actions = this.FindControl<ActionsView>("Actions"); // Actions will be null Actions = TemporaryFix <ActionsView>("Actions"); Actions.BattleView = this; //messages = this.FindControl<MessageView>("Messages"); // Messages will be null messages = TemporaryFix <MessageView>("Messages"); }