Esempio n. 1
0
 private void buttonFiltration_Click(object sender, EventArgs e)
 {
     FiltrationConfigure.ShowDialog();
 }
Esempio n. 2
0
        public Configure()
        {
            try
            {
                Settings.ReadSettings();
            }
            catch
            {
                if (Settings.StrokeButton == MouseButtons.None || Settings.Pen == null || Settings.Gestures == null || Settings.ActionPackages == null)
                {
                    LoadDefaultSetting();
                }
                else
                {
                    if (Settings.Assemblies == null)
                    {
                        Settings.Assemblies = new List <string>();
                    }

                    if (Settings.Namespaces == null)
                    {
                        Settings.Namespaces = new List <string>();
                    }

                    if (Settings.Filtrations == null)
                    {
                        Settings.Filtrations = new List <string>();
                    }
                }
            }

            InitializeComponent();

            PenConfigure                  = new PenConfigure();
            GestureConfigure              = new GestureConfigure();
            CompileConfigure              = new CompileConfigure();
            FiltrationConfigure           = new FiltrationConfigure();
            ContextMenuStripActionPackage = new ContextMenuStrip();
            ContextMenuStripAction        = new ContextMenuStrip();
            ToolStripMenuItem ToolStripMenuItemAddActionPackage    = new ToolStripMenuItem();
            ToolStripMenuItem ToolStripMenuItemRemoveActionPackage = new ToolStripMenuItem();

            ToolStripMenuItemAddActionPackage.Text    = "添加 [动作包]";
            ToolStripMenuItemRemoveActionPackage.Text = "删除 [动作包]";
            ContextMenuStripActionPackage.Items.Add(ToolStripMenuItemAddActionPackage);
            ContextMenuStripActionPackage.Items.Add(ToolStripMenuItemRemoveActionPackage);
            ToolStripMenuItemAddActionPackage.Click    += ToolStripMenuItemAddActionPackage_Click;
            ToolStripMenuItemRemoveActionPackage.Click += ToolStripMenuItemRemoveActionPackage_Click;
            ToolStripMenuItem ToolStripMenuItemAddAction    = new ToolStripMenuItem();
            ToolStripMenuItem ToolStripMenuItemRemoveAction = new ToolStripMenuItem();

            ToolStripMenuItemAddAction.Text    = "添加 [动作]";
            ToolStripMenuItemRemoveAction.Text = "删除 [动作]";
            ContextMenuStripAction.Items.Add(ToolStripMenuItemAddAction);
            ContextMenuStripAction.Items.Add(ToolStripMenuItemRemoveAction);
            ToolStripMenuItemAddAction.Click    += ToolStripMenuItemAddAction_Click;
            ToolStripMenuItemRemoveAction.Click += ToolStripMenuItemRemoveAction_Click;
            comboBoxGesture.DisplayMember        = "Value";
            comboBoxGesture.ValueMember          = "Key";
            MouseHook.MouseAction += MouseHook_MouseAction;
        }