Beispiel #1
0
        public ControlForm()
        {
            // don't show in the taskbar
            // for some reason this worked in CF 1.0, but fails in CF 2.0
            OpenNETCF.Win32.Win32Window w = new OpenNETCF.Win32.Win32Window(this.Handle);
            w.ExtendedStyle |= OpenNETCF.Win32.WS_EX.NOANIMATION;

            try
            {
                m_ws = new WebServer();

                m_ws.Configuration.Authentication.AuthenticationCallback = VerifyUsername;

                m_ws.Configuration.Authentication.Users.Add(new OpenNETCF.Web.Configuration.User {
                    Name = "username", Password = "******"
                });
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

            InitializeComponent();

            m_notifyIcon              = new NotifyIcon();
            m_notifyIcon.Icon         = this.Icon;
            m_notifyIcon.Visible      = true;
            m_notifyIcon.Click       += new EventHandler(m_notifyIcon_Click);
            m_notifyIcon.DoubleClick += new EventHandler(m_notifyIcon_DoubleClick);
            this.Visible              = true;
        }
Beispiel #2
0
        public ControlForm()
        {
            // don't show in the taskbar
            // for some reason this worked in CF 1.0, but fails in CF 2.0
            OpenNETCF.Win32.Win32Window w = new OpenNETCF.Win32.Win32Window(this.Handle);
            w.ExtendedStyle |= OpenNETCF.Win32.WS_EX.NOANIMATION;

            m_ws = new WebServer();

            InitializeComponent();

            m_notifyIcon              = new NotifyIcon();
            m_notifyIcon.Icon         = this.Icon;
            m_notifyIcon.Visible      = true;
            m_notifyIcon.Click       += new EventHandler(m_notifyIcon_Click);
            m_notifyIcon.DoubleClick += new EventHandler(m_notifyIcon_DoubleClick);
            this.Visible              = true;
        }