Пример #1
0
        private TRControl BuildControl()
        {
            TRControl control = new TRControl();

            control.Width      = Model.Config.GameWindowConfig.WindowWidth;
            control.Height     = Model.Config.GameWindowConfig.WindowHeight;
            control.GameEnded += (inobj, inargs) => ReasignContent(inobj, inargs);
            return(control);
        }
Пример #2
0
 private void ReasignContent(object obj, EventArgs args)
 {
     trControl    = BuildControl();
     this.Content = trControl;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainWindow"/> class.
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     trControl = BuildControl();
     this.AddChild(trControl);
 }