Exemplo n.º 1
0
        public MainForm()
        {
            // Auto code
            InitializeComponent();

            log = new YLog("JIRA");

            utilities = new Utilities.Utilities();

            LogLine(utilities.testString);

            if (utilities.FtpConnectionStatus == false)
            {
                LogLine("Unable to read xml");
            }
            utilities.MessagerEvent += UtilitiesMessagerEvent;

            DisplayVersion();

            // by default, the form is hidden
            canViewMainForm = false;

            this.components = new System.ComponentModel.Container();

            RegisterHotKeys();

            GenerateIcon();

            //TODO: Testing watcher function
            DirectoryWatcher watcher = new DirectoryWatcher("C:\\Enabler\\log", log);
            // TODO:
            // watcher.EnableWatcher = true;
        }
Exemplo n.º 2
0
        internal DirectoryWatcher(string dirPath, YLog log)
        {
            _dirPath = dirPath;
            this.log = log;

            watchFiles = new Dictionary <FileInfo, long>();

            if (!Directory.Exists(_dirPath))
            {
                return;
            }

            // create decode folder
            if (!Directory.Exists(Path.Combine(_dirPath, decodedDirectory)))
            {
                Directory.CreateDirectory(Path.Combine(_dirPath, decodedDirectory));
            }

            watcher = new FileSystemWatcher(_dirPath);
            watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName;
            watcher.Changed     += Watcher_Changed;
            watcher.Created     += Watcher_Created;
            watcher.Renamed     += Watcher_Renamed;
            watcher.Deleted     += Watcher_Deleted;
        }
Exemplo n.º 3
0
 public MeterCheckForm(string folderName, YLog log)
     : this()
 {
     // Load the folder and analyze the content
     if (Directory.Exists(folderName))
     {
         this.folderName = folderName;
         this.log        = log;
         AnalyzeFolder();
     }
 }
Exemplo n.º 4
0
        public DownloadFormByDataTable(string JIRADirectory, Utilities.Utilities utilities, YLog log)//, FileOperator fileOperator)
        {
            InitializeComponent();
            InitComponents();
            this.CenterToScreen();
            this.utilities     = utilities;
            this.log           = log;
            this.jiraDirectory = JIRADirectory;
            // set form title
            this.Text = JIRADirectory;
            FileList  = new FileList <string>();

            FileList.OnFileChange += FileListChangeEvent;
            LoadFileList(LocalFilePath.SourceFilePath);
            // FTPParameters.LoadServerInfoFromFile();
            FileOperator.OperationEvent += FileOperator_OperationEvent;
        }
Exemplo n.º 5
0
        public DownloadForm(string folder, YLog log)
        {
            InitializeComponent();
            InitComponents();
            this.CenterToScreen();
            this.log               = log;
            this.targetFolder      = folder;
            this.Text              = folder;
            fileList               = new FileList <string>();
            fileList.OnFileChange += fileList_OnFileChange;

            filesToMerge = new FileList <string>();

            LoadFileList(LocalFilePath.SourceFilePath);
            // FTPParameters.LoadServerInfoFromFile();
            FileOperator.OperationEvent += FileOperator_OperationEvent;
        }