public void Run(Scene scene, SceneOptions options) { var window = new GraphicsWindow(scene); var view = new ElementView(options); scene.Initialize(view); window.Content = view; window.ShowDialog(); }
public MainPage() { InitializeComponent(); var sceneOptions = new SceneOptions("/Images/800x600", 50, 42); _scene = new Scene(sceneOptions); var view = new ElementView(sceneOptions); _scene.Initialize(view); LayoutRoot.Children.Add(view); CompositionTarget.Rendering += new System.EventHandler(CompositionTarget_Rendering); }
public void Run(Scene scene, SceneOptions options) { using (var form = new GraphicsForm(scene)) { var view = new PictureBoxView(options); scene.Initialize(view); form.SetView(view); form.ShowDialog(); } }
public MainPage() { InitializeComponent(); new Uri("pack://application,,,/Images/800x600/BackgroundTile.bmp"); var sceneOptions = new SceneOptions("ms-resource://MyAssembly/Images/800x600", 50, 42); _scene = new Scene(sceneOptions); var view = new ElementView(sceneOptions); _scene.Initialize(view); LayoutRoot.Children.Add(view); CompositionTarget.Rendering += CompositionTarget_Rendering; }
public CustomPaintView(SceneOptions options) { _options = options; InitializeComponent(); SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true); SetStyle( ControlStyles.ContainerControl | ControlStyles.SupportsTransparentBackColor, false); }
public ElementView(SceneOptions sceneOptions) { _sceneOptions = sceneOptions; InitializeComponent(); }
private void Run(IController controller, string directoryName, int tileWidth, int tileHeight) { var exeDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); var imageDirectory = Path.Combine(exeDirectory, "Images", directoryName); var options = new SceneOptions(imageDirectory, tileWidth, tileHeight); var scene = new Scene(options); controller.Run(scene, options); LogResults(controller, scene); }
public PictureBoxView(SceneOptions options) { _options = options; InitializeComponent(); }
public MvvmSprite(ImageSource imageSource, SceneOptions options) { ImageSource = imageSource; _options = options; }
public MvvmView(SceneOptions options) { _options = options; InitializeComponent(); DataContext = _sprites; }
public PictureBoxSprite(PictureBox control, SceneOptions options) { _control = control; _options = options; }