EaseFilter Demo Project
AccessControlForm.cs
Go to the documentation of this file.
1 //
3 // (C) Copyright 2012 EaseFilter Technologies Inc.
4 // All Rights Reserved
5 //
6 // This software is part of a licensed software product and may
7 // only be used or copied in accordance with the terms of that license.
8 //
10 
11 using System;
12 using System.Collections.Generic;
13 using System.ComponentModel;
14 using System.Data;
15 using System.Drawing;
16 using System.Linq;
17 using System.Text;
18 using System.IO;
19 using System.Windows.Forms;
20 using System.Runtime.InteropServices;
21 
23 
24 namespace SecureAgent
25 {
26  public partial class AccessControlForm : Form
27  {
28 
29  FilterWorker filterWorker = null;
30 
32  {
33  GlobalConfig.filterType = FilterAPI.FilterType.FILE_SYSTEM_EASE_FILTER_ALL;
34 
35  InitializeComponent();
36 
37  filterWorker = new FilterWorker(listView_Info);
38 
39  DisplayInfo();
40 
41  }
42 
43 
44  private void DisplayInfo()
45  {
46  bool retVal = false;
47  string myComputerId = string.Empty;
48  string lastError = string.Empty;
49 
50  retVal = FilterAPI.GetUniqueComputerId(ref myComputerId, ref lastError);
51  string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
52 
53  if (retVal)
54  {
55  this.Text += " ComputerId: " + myComputerId + " Version: " + version;
56  }
57  }
58 
59 
60  private void toolStripButton_StartFilter_Click(object sender, EventArgs e)
61  {
63  }
64 
65  public bool StartFilterService()
66  {
67  string lastError = string.Empty;
68  if (filterWorker.StartService(ref lastError))
69  {
70  toolStripButton_StartFilter.Enabled = false;
71  toolStripButton_Stop.Enabled = true;
72  return true;
73  }
74  else
75  {
76  return false;
77  }
78 
79  }
80 
81  public void StopFilterService()
82  {
83  filterWorker.StopService();
84 
85  toolStripButton_StartFilter.Enabled = true;
86  toolStripButton_Stop.Enabled = false;
87 
88  }
89 
90  private void toolStripButton_Stop_Click(object sender, EventArgs e)
91  {
93  }
94 
95  private void toolStripButton_ClearMessage_Click(object sender, EventArgs e)
96  {
97  filterWorker.ClearMessage();
98  }
99 
100 
101  private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
102  {
103  SettingsForm settingForm = new SettingsForm();
104  settingForm.StartPosition = FormStartPosition.CenterParent;
105  settingForm.ShowDialog();
106  }
107 
108  private void reportAProblemToolStripMenuItem_Click(object sender, EventArgs e)
109  {
110  System.Diagnostics.Process.Start("http://www.easefilter.com/ReportIssue.htm");
111  }
112 
113  private void helpTopicsToolStripMenuItem_Click(object sender, EventArgs e)
114  {
115  System.Diagnostics.Process.Start("http://www.easefilter.com/Forums_Files/FileProtector.htm");
116  }
117 
118  private void toolStripButton1_Click(object sender, EventArgs e)
119  {
121  }
122 
123 
124  private void exitToolStripMenuItem_Click(object sender, EventArgs e)
125  {
126  Close();
127  }
128 
129  private void unInstallFilterDriverToolStripMenuItem_Click(object sender, EventArgs e)
130  {
131  FilterAPI.StopFilter();
132  FilterAPI.UnInstallDriver();
133  }
134 
135  private void createSecureShareFileToolStripMenuItem_Click(object sender, EventArgs e)
136  {
137  ShareFileForm shareFileForm = new ShareFileForm();
138 
140  {
141  AccountForm accountForm = new AccountForm();
142  accountForm.ShowDialog();
143  }
144 
145  shareFileForm.ShowDialog();
146  }
147 
148  private void contactUsToolStripMenuItem_Click(object sender, EventArgs e)
149  {
150  System.Diagnostics.Process.Start("http://www.assurefiles.com/company.htm");
151  }
152 
153  private void onlineManualToolStripMenuItem_Click(object sender, EventArgs e)
154  {
155  System.Diagnostics.Process.Start("http://www.assurefiles.com/Forums_Files/secure_file_sharing.htm");
156  }
157 
158  private void sDKManualToolStripMenuItem_Click(object sender, EventArgs e)
159  {
160  System.Diagnostics.Process.Start("http://www.assurefiles.com/info/easefilter_manual.pdf");
161  }
162 
163  private void toolStripButton_LoadMessage_Click(object sender, EventArgs e)
164  {
166  }
167 
168  }
169 }
static bool isAuthorized
Definition: AccountForm.cs:28
static FilterAPI.FilterType filterType
Definition: GlobalConfig.cs:79
bool StartService(ref string lastError)

Social Network


Services Overview

Architect, implement and test file system filter drivers for a wide range of functionality. We can offer several levels of assistance to meet your specific.

Contact Us

You are welcome to contact us for salse or partnership.

Sales: sales@easefilter.com
Support: support@easefilter.com
Info: info@easefilter.com