public Form_FolderLocker() { GlobalConfig.filterType = FilterAPI.FilterType.FILE_SYSTEM_MONITOR | FilterAPI.FilterType.FILE_SYSTEM_CONTROL | FilterAPI.FilterType.FILE_SYSTEM_ENCRYPTION | FilterAPI.FilterType.FILE_SYSTEM_PROCESS | FilterAPI.FilterType.FILE_SYSTEM_REGISTRY; EventManager.Output = EventOutputType.File; InitializeComponent(); StartPosition = FormStartPosition.CenterScreen; string lastError = string.Empty; if (!FilterWorker.StartService(ref lastError)) { MessageBoxHelper.PrepToCenterMessageBoxOnForm(this); MessageBox.Show("Start service failed with error:" + lastError + ",folder locker service will stop.", "Folder locker Service", MessageBoxButtons.OK, MessageBoxIcon.Error); } InitFolderLockerListView(); InitAccessRightsListView(); InitShareFileListView(); RefreshSharedFilesInClient(); DisplayVersion(); }
private void startLockertoolStripMenuItem_Click(object sender, EventArgs e) { string lastError = string.Empty; if (!FilterWorker.StartService(ref lastError)) { MessageBoxHelper.PrepToCenterMessageBoxOnForm(this); MessageBox.Show("Start service failed with error:" + lastError + ",folder locker service will stop.", "Folder locker Service", MessageBoxButtons.OK, MessageBoxIcon.Error); } }