Example #1
0
        public void __start_up(ExecuteArgs __args)
        {
            this.__args = __args;

            try
            {
                __send_eof      = __args.__send_eof;
                __debug_mode    = __args.__debug_mode;
                __auto_truncate = __args.__auto_truncate;

                using (__listener = new motFileSystemListener(__args.__directory, __args.__gateway_address, __args.__gateway_port, __args.__file_type, __args.__auto_truncate, __args.__send_eof, __args.__debug_mode))
                {
                    __listener.UpdateEventUI += __update_ui_event;
                    __listener.UpdateErrorUI += __update_ui_error;

                    __worker      = new Thread(() => __listener.watchDirectory(__args.__directory, __args.__gateway_address, __args.__gateway_port));
                    __worker.Name = "filesystem listener";
                    __worker.Start();

                    __show_common_event("Started listening to directory: " + __args.__directory + " and sending to gateway at: " + __args.__gateway_address + "/" + __args.__gateway_port);
                }
            }
            catch (Exception ex)
            {
                __show_error_event(ex.Message);
            }
        }
Example #2
0
 public void startWatching()
 {
     __fsw = new motFileSystemListener("C:/MOT_IO", "127.0.0.1", "24042");
 }