コード例 #1
0
 public BattleView()
 {
     // This constructor only exists so xaml compiles
     Field     = null !;
     Actions   = null !;
     _messages = null !;
     Client    = null !;
     AvaloniaXamlLoader.Load(this);
 }
コード例 #2
0
 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");
 }
コード例 #3
0
        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
        }
コード例 #4
0
        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");
        }