EaseFilter Demo Project
AutoFileCryptTool/TrayForm.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.Windows.Forms;
19 using System.IO;
20 
22 
23 namespace AutoFileCryptTool
24 {
25  public partial class TrayForm: Form
26  {
27  Form_FileCrypt fileCryptForm = null;
28 
29  public TrayForm()
30  {
31  if (!VerifyPassword())
32  {
33  return;
34  }
35 
36  InitializeComponent();
38 
39  this.Hide();
40 
41  fileCryptForm = new Form_FileCrypt();
42 
43  }
44 
45  private void TrayForm_Load(object sender, EventArgs e)
46  {
47  this.Hide();
48  this.notifyIcon.Visible = true;
49  fileCryptForm.ShowDialog();
50  }
51 
52  private bool VerifyPassword()
53  {
54  if (string.IsNullOrEmpty(GlobalConfig.MasterPassword))
55  {
56  SetupPasswordForm passForm = new SetupPasswordForm();
57  passForm.ShowDialog();
58 
59  return passForm.isPasswordMatched;
60  }
61  else
62  {
63  VerifyPasswordForm verifyForm = new VerifyPasswordForm();
64  verifyForm.ShowDialog();
65 
66  return verifyForm.isPasswordMatched;
67  }
68  }
69 
70  private void consoleToolStripMenuItem_Click(object sender, EventArgs e)
71  {
72  if (!VerifyPassword())
73  {
74  return;
75  }
76 
77  if (!fileCryptForm.Visible)
78  {
79  fileCryptForm.StartPosition = FormStartPosition.CenterScreen;
80  fileCryptForm.ShowDialog();
81  }
82  }
83 
84  private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
85  {
86  SettingsForm settingForm = new SettingsForm();
87  settingForm.StartPosition = FormStartPosition.CenterScreen;
88  settingForm.ShowDialog();
89  }
90 
91 
92  private void reportBugToolStripMenuItem_Click(object sender, EventArgs e)
93  {
94  System.Diagnostics.Process.Start("http://www.easefilter.com/ReportIssue.htm");
95  }
96 
97  private void exitToolStripMenuItem1_Click(object sender, EventArgs e)
98  {
100  fileCryptForm.Close();
101 
102  Application.Exit();
103  }
104 
105  private void sdkToolStripMenuItem_Click(object sender, EventArgs e)
106  {
107  System.Diagnostics.Process.Start("http://www.easefilter.com/info/easefilter_manual.pdf");
108  }
109 
110 
111  private void openProtectorSourceCodeToolStripMenuItem_Click(object sender, EventArgs e)
112  {
113  System.Reflection.Assembly assembly = System.Reflection.Assembly.GetEntryAssembly();
114  string AssemblyPath = Path.Combine(Path.GetDirectoryName(assembly.Location), "Demo");
115  System.Diagnostics.Process.Start("explorer.exe", AssemblyPath);
116  }
117 
118  private void toolStripMenuItemEncryptInfo_Click(object sender, EventArgs e)
119  {
120  System.Diagnostics.Process.Start("http://easefilter.com/Forums_Files/Transparent_Encryption_Filter_Driver.htm");
121  }
122 
123 
124 
125  }
126 }
System.Windows.Forms.NotifyIcon notifyIcon
static void CopyOSPlatformDependentFiles()
Definition: Utils.cs:92

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