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

            base.OnStart(args);
        }
        protected override void OnStop()
        {
            if (Server != null)
            {
                Server.Stop();
            }

            Server = null;
            base.OnStop();
        }
Beispiel #3
0
            public TransferInfo(WebDAVServer server, long size)
            {
                Server = server;

                lock (Server.TransferLock)
                {
                    TransferSize = size;
                    Server.TransferTotalBytes += size;
                }

                Update();
            }
        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 OnStop()
        {
            if (Server != null)
            {
                Server.Stop();
            }

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

            base.OnStart(args);
        }
 public PropFindHandler(WebDAVServer server, string request)
     : base(server, request)
 {
 }
 public OptionsHandler(WebDAVServer server, string request)
     : base(server, request)
 {
 }
 public MoveHandler(WebDAVServer server, string request)
     : base(server, request)
 {
 }
 public HeadHandler(WebDAVServer server, string request)
     : base(server, request)
 {
     SendHeaderOnly = true;
 }
 public UnlockHandler(WebDAVServer server, string request)
     : base(server, request)
 {
 }
        public RequestHandler(WebDAVServer server, string request)
        {
            Server = server;
            if (request.Contains(' '))
            {
                request = request.Substring(0, request.IndexOf(' '));
            }

            RequestPath = UnescapeSpecialChars(request);
        }