Пример #1
0
        private void button_Stop_Click(object sender, EventArgs e)
        {
            button_Start.Enabled = true;
            button_Stop.Enabled  = false;

            FilterDriverService.StopService();
        }
Пример #2
0
        private void button_Start_Click(object sender, EventArgs e)
        {
            button_Start.Enabled = false;
            button_Stop.Enabled  = true;

            string lastError = string.Empty;

            if (!FilterDriverService.StartFilterService(out lastError))
            {
                isServiceRunning = false;

                MessageBoxHelper.PrepToCenterMessageBoxOnForm(this);
                MessageBox.Show("Start encryption service failed with error:" + lastError + ", auto folder encryption service will stop.", "Auto FileCrypt Service", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #3
0
        public Form_FileCrypt()
        {
            GlobalConfig.filterType = FilterAPI.FilterType.FILE_SYSTEM_CONTROL_ENCRYPTION;

            InitializeComponent();

            StartPosition = FormStartPosition.CenterScreen;

            string lastError = string.Empty;

            if (!FilterDriverService.StartFilterService(out lastError))
            {
                isServiceRunning = false;

                MessageBoxHelper.PrepToCenterMessageBoxOnForm(this);
                MessageBox.Show("Start encryption service failed with error:" + lastError + ", auto folder encryption service will stop.", "Auto FileCrypt Service", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }


            InitializeFileCrypt();
        }