protected override void OnStart(string[] args)
        {
            Server = new WebDAVServer(args);
            Server.Start();

            base.OnStart(args);
        }
        public WebDAVServerForm(string[] arg)
        {
            InitializeComponent();

            /* append version number */
            Text += " v" + WebDAVServer.Version;

            /* register stuff for minimizing etc */
            Resize += new EventHandler(WebDAVServer_Resize);

            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                notifyIcon.MouseClick      += new MouseEventHandler(notifyIcon_MouseClick);
                notifyIcon.ContextMenuStrip = contextMenuToolbar;
                this.notifyIcon.Visible     = true;
            }


            UpdateTimer          = new System.Windows.Forms.Timer();
            UpdateTimer.Interval = 100;
            UpdateTimer.Tick    += new EventHandler(UpdateTimer_Tick);
            UpdateTimer.Start();

            UpdateButtons();

            SessionEnding += new SessionEndingEventHandler(WebDAVServerForm_SessionEnding);

            Server             = new WebDAVServer(arg);
            Server.LogUpdated += new EventHandler(Server_LogUpdated);
            Server.Start(false);


            txtPath.Text         = Server.Settings.Path;
            txtPort.Text         = Server.Settings.Port.ToString();
            txtAuth.Text         = Server.Settings.AuthTokens;
            txtCacheTime.Text    = Server.Settings.CacheTime.ToString();
            txtPrefetch.Text     = Server.Settings.PrefetchCount.ToString();
            chkShowInfos.Checked = Server.Settings.ShowInfos;
            chkShowJpeg.Checked  = Server.Settings.ShowJpeg;
            chkShowFits.Checked  = Server.Settings.ShowFits;
            chkShowDng.Checked   = Server.Settings.ShowDng;
            chkShowWav.Checked   = Server.Settings.ShowWav;

            UpdateDriveLetters();
        }
        public WebDAVServerForm(string[] arg)
        {
            InitializeComponent();

            /* append version number */
            Text += " v" + WebDAVServer.Version;

            /* register stuff for minimizing etc */
            Resize += new EventHandler(WebDAVServer_Resize);

            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                notifyIcon.MouseClick += new MouseEventHandler(notifyIcon_MouseClick);
                notifyIcon.ContextMenuStrip = contextMenuToolbar;
                this.notifyIcon.Visible = true;
            }

            UpdateTimer = new System.Windows.Forms.Timer();
            UpdateTimer.Interval = 100;
            UpdateTimer.Tick += new EventHandler(UpdateTimer_Tick);
            UpdateTimer.Start();

            UpdateButtons();

            SessionEnding += new SessionEndingEventHandler(WebDAVServerForm_SessionEnding);

            Server = new WebDAVServer(arg);
            Server.LogUpdated += new EventHandler(Server_LogUpdated);
            Server.Start(false);

            txtPath.Text = Server.Settings.Path;
            txtPort.Text = Server.Settings.Port.ToString();
            txtAuth.Text = Server.Settings.AuthTokens;
            txtCacheTime.Text = Server.Settings.CacheTime.ToString();
            txtPrefetch.Text = Server.Settings.PrefetchCount.ToString();
            chkShowInfos.Checked = Server.Settings.ShowInfos;
            chkShowJpeg.Checked = Server.Settings.ShowJpeg;
            chkShowFits.Checked = Server.Settings.ShowFits;
            chkShowDng.Checked = Server.Settings.ShowDng;
            chkShowWav.Checked = Server.Settings.ShowWav;

            UpdateDriveLetters();
        }
        protected override void OnStart(string[] args)
        {
            Server = new WebDAVServer(args);
            Server.Start();

            base.OnStart(args);
        }