Exemple #1
0
        public static ElementHandler GetHandler(FrameworkElement source, Panel cont)
        {
            ElementHandler handler = null;

            if (source is TextBox)
            {
                handler = new TextBoxHandler() as ElementHandler;
            }
            else if (source is Button)
            {
                handler = new ButtonHandler() as ElementHandler;
            }
            else if (source is CheckBox)
            {
                handler = new CheckBoxHandler() as ElementHandler;
            }
            else if (source is Slider)
            {
                handler = new SliderHandler() as ElementHandler;
            }
            else if (source is ListBox)
            {
                handler = new ListBoxHandler() as ElementHandler;
            }
            else if (source is RssList)
            {
                handler = new RssListHandler() as ElementHandler;
            }
            else if (source is VideoControl)
            {
                handler = new VideoControlHandler() as ElementHandler;
            }
            else
            {
                handler = new ButtonHandler() as ElementHandler;
            }
            handler.Source    = source;
            handler.Container = cont;
            return(handler);
        }
 public static ElementHandler GetHandler(FrameworkElement source, Panel cont)
 {
     ElementHandler handler = null;
     if (source is TextBox)
     {
         handler = new TextBoxHandler() as ElementHandler;
     }
     else if (source is Button)
     {
         handler = new ButtonHandler() as ElementHandler;
     }
     else if (source is CheckBox)
     {
         handler = new CheckBoxHandler() as ElementHandler;
     }
     else if (source is Slider)
     {
         handler = new SliderHandler() as ElementHandler;
     }
     else if (source is ListBox)
     {
         handler = new ListBoxHandler() as ElementHandler;
     }
     else if (source is RssList)
     {
         handler = new RssListHandler() as ElementHandler;
     }
     else if (source is VideoControl)
     {
         handler = new VideoControlHandler() as ElementHandler;
     }
     else
     {
         handler = new ButtonHandler() as ElementHandler;
     }
     handler.Source = source;
     handler.Container = cont;
     return handler;
 }
 public static ElementHandler GetHandler(FrameworkElement source, Panel cont)
 {
     ElementHandler handler = null;
     if (source is SmartArea)
     {
         handler = new SmartAreaHandler() as ElementHandler;
     }
     else if (source is phoneMenu)
     {
         handler = new PhoneMenuHandler() as ElementHandler;
     }
     else if (source is FileBox3)
     {
         handler = new FileBoxHandler() as ElementHandler;
     }
     else if (source is ImageView)
     {
         handler = new ImageViewHandler() as ElementHandler;
     }
     else if (source is PptViewer)
     {
         handler = new PptViewHandler() as ElementHandler;
     }
     else if (source is DocViewer)
     {
         handler = new DocViewHandler() as ElementHandler;
     }
     else if (source is ContactsBox)
     {
         handler = new ContactsBoxHandler() as ElementHandler;
     }
     else if (source is ContactsObject)
     {
         handler = new ContactsObjectHandler() as ElementHandler;
     }
     else if (source is TextBox)
     {
         handler = new TextBoxHandler() as ElementHandler;
     }
     else if (source is Button)
     {
         handler = new ButtonHandler() as ElementHandler;
     }
     else if (source is CheckBox)
     {
         handler = new CheckBoxHandler() as ElementHandler;
     }
     else if (source is Slider)
     {
         handler = new SliderHandler() as ElementHandler;
     }
     else if (source is ListBox)
     {
         handler = new ListBoxHandler() as ElementHandler;
     }
     else if (source is RssList)
     {
         handler = new RssListHandler() as ElementHandler;
     }
     else if (source is VideoControl)
     {
         handler = new VideoControlHandler() as ElementHandler;
     }
     else
     {
         handler = new ButtonHandler() as ElementHandler;
     }
     handler.Source = source;
     handler.Container = cont;
     return handler;
 }
Exemple #4
0
        public static ElementHandler GetHandler(FrameworkElement source, Panel cont)
        {
            ElementHandler handler = null;

            if (source is SmartArea)
            {
                handler = new SmartAreaHandler() as ElementHandler;
            }
            else if (source is phoneMenu)
            {
                handler = new PhoneMenuHandler() as ElementHandler;
            }
            else if (source is FileBox3)
            {
                handler = new FileBoxHandler() as ElementHandler;
            }
            else if (source is ImageView)
            {
                handler = new ImageViewHandler() as ElementHandler;
            }
            else if (source is PptViewer)
            {
                handler = new PptViewHandler() as ElementHandler;
            }
            else if (source is DocViewer)
            {
                handler = new DocViewHandler() as ElementHandler;
            }
            else if (source is ContactsBox)
            {
                handler = new ContactsBoxHandler() as ElementHandler;
            }
            else if (source is ContactsObject)
            {
                handler = new ContactsObjectHandler() as ElementHandler;
            }
            else if (source is TextBox)
            {
                handler = new TextBoxHandler() as ElementHandler;
            }
            else if (source is Button)
            {
                handler = new ButtonHandler() as ElementHandler;
            }
            else if (source is CheckBox)
            {
                handler = new CheckBoxHandler() as ElementHandler;
            }
            else if (source is Slider)
            {
                handler = new SliderHandler() as ElementHandler;
            }
            else if (source is ListBox)
            {
                handler = new ListBoxHandler() as ElementHandler;
            }
            else if (source is RssList)
            {
                handler = new RssListHandler() as ElementHandler;
            }
            else if (source is VideoControl)
            {
                handler = new VideoControlHandler() as ElementHandler;
            }
            else
            {
                handler = new ButtonHandler() as ElementHandler;
            }
            handler.Source    = source;
            handler.Container = cont;
            return(handler);
        }