public UserControl() { InitializeComponent(); diff = new Diffusion(this); medContr = diff.medContr; medContr.usrContr = this; Closing += this.OnWindowClosing; }
public Diffusion(UserControl m) { InitializeComponent(); // Initialisation de la fenetre de diffusion userContr = m; medContr = new mediaControl(TopM, this); v = new VisualBrush(TopM); // creation du pinceau visual brush (copie colle ce qui a dans topm) v.Stretch = Stretch.Uniform; LeftRect.Fill = BotRect.Fill = RightRect.Fill = v; KeyDown += new System.Windows.Input.KeyEventHandler(medContr.OnButtonKeyDown); // Instcription a l'event "pression de touche" Closing += OnWindowClosing; // Inscrption a l'event closing #observer }