Пользовательский интерфейс

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Пользовательский интерфейс - Presentation Transcript

    1. Пользовательский интерфейс
    2. Model — View — Controller (MVC)
    3. Windows Forms
    4. Шаблон наблюдатель (О bserver )
      • interface IClickObserver
      • {
      • void Notify(Control a_Control);
      • }
      • interface IMouseDownObserver
      • {
      • void Notify(Control a_Control, int x, int y, int a_MouseButton);
      • }
    5. Шаблон наблюдатель (О bserver )
      • class Button : Control
      • {
      • List<IClickObserver> m_ClickObservers = new List<IClickObserver>();
      • public void Register(IClickObserver a_Observer)
      • {
      • m_ClickObservers.Add(a_Observer);
      • }
      • void OnClick()
      • {
      • foreach (IClickObserver observer in m_ClickObservers)
      • {
      • observer.Notify(this);
      • }
      • }
      • }
    6. События ( events)
      • class Button : Control
      • {
      • public event EventHandler Click;
      • void OnClick(EventArgs e)
      • {
      • if (Click != null)
      • {
      • Click(this, e);
      • }
      • }
      • }
    7. Observer vs Events
      • class Button : Control
      • {
      • List<IClickObserver> m_ClickObservers = new List<IClickObserver>();
      • public void Register(IClickObserver a_Observer)
      • {
      • m_ClickObservers.Add(a_Observer);
      • }
      • void OnClick()
      • {
      • foreach (IClickObserver observer in m_ClickObservers)
      • {
      • observer.Notify(this);
      • }
      • }
      • }
      • class Button : Control
      • {
      • public event EventHandler Click;
      • void OnClick(EventArgs e)
      • {
      • if (Click != null)
      • {
      • Click(this, e);
      • }
      • }
      • }

    + kichikkichik, 5 months ago

    custom

    211 views, 0 favs, 2 embeds more stats

    Лекция Михаила Гуренкова по more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 211
      • 187 on SlideShare
      • 24 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 3
    Most viewed embeds
    • 20 views on http://oop.mainfo.ru
    • 4 views on http://www.oop.mainfo.ru

    more

    All embeds
    • 20 views on http://oop.mainfo.ru
    • 4 views on http://www.oop.mainfo.ru

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories