This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows; | |
using System.Windows.Controls; | |
public class GridDefinitions : UIElement | |
{ | |
#region RowDefinitions | |
public static string GetRows(Grid obj) | |
{ | |
return (string)obj.GetValue(RowsProperty); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root {--dull-red: #c0504d;--blue: #4f81bd;--dark-gray: #808080;} | |
body {text-align: justify;margin: 2%;adobe-hyphenate: none;} | |
div {font-variant: small-caps;text-transform: capitalize;font-weight: bold;} | |
pre {font-size: x-small;} | |
sml {font-size: small;} | |
h1,h2,h3,h4,h5,h6 {font-family: 'Cambria';text-align: center;font-variant: small-caps;text-transform: capitalize;color: var(--dull-red);} | |
hr {background-image: linear-gradient(to right, #00191f2d, #ccc, #00191f2d);border: 0;width: 50vh;height: 2px;} | |
img {display: block;border-radius: 8px;max-width: 90%;max-height: 400px;margin-left: auto;margin-right: auto;} | |
.center {position: absolute;top: 50%; right: 50%;transform: translate(50%, -50%);} | |
.CI {text-align: center;margin-top: 0px;margin-bottom: 0px;padding: 0px;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import pygame | |
import pygame._sdl2 | |
from pygame._sdl2.controller import Controller | |
pygame.init() | |
window = pygame.display.set_mode((1200, 800)) | |
pygame.display.set_caption("Testing controllers") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This code is licensed as CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/legalcode). | |
import sys | |
import pygame as pg | |
class Game(object): | |
""" | |
A single instance of this class is responsible for | |
managing which individual game state is active |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows; | |
using System.Windows.Controls; | |
namespace [InsertNamespaceHere] | |
public class MultiSelectListBox : ListBox | |
{ | |
public MultiSelectListBox() : base() | |
{ | |
SelectionMode = SelectionMode.Extended; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <inheritdoc /> | |
/// <summary> | |
/// Wrapper control around VlcControl. Provides basic UI for video playback. | |
/// </summary> | |
public partial class VideoBox : UserControl | |
{ | |
private static readonly String[] MediaOptions = {":avcodec-hw=dxva2"}; //Should enable GPU acceleration | |
private readonly Dispatcher _dispatcher; | |
private Boolean _isChangingPosition; //Prevents (sometimes) unwanted feedback | |
private Video3D _video; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows.Input; | |
public abstract class CommandBase : ICommand | |
{ | |
public event EventHandler CanExecuteChanged; | |
protected void OnCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty); | |
public virtual bool CanExecute(object parameter) => true; |