public RDPConnectionItem(AdvancedConnectPluginExt plugin, PwEntry keepassEntry, Boolean rdpConsoleSession)
 {
     this.plugin             = plugin;
     this.keepassDatabase    = this.plugin.keepassHost.Database;
     this.keepassEntry       = keepassEntry;
     this.rdpConsoleSession  = rdpConsoleSession;
     this.rdpCustomParameter = this.plugin.settings.rdpCustomParameter;
 }
Beispiel #2
0
 public CustomConnectionItem(AdvancedConnectPluginExt plugin, ApplicationItem application, PwEntry keepassEntry)
 {
     this.plugin                  = plugin;
     this.keepassDatabase         = this.plugin.keepassHost.Database;
     this.application             = application;
     this.keepassEntry            = keepassEntry;
     this.customConnectionOptions = this.application.options;
 }
 public RDPConnectionItem(AdvancedConnectPluginExt plugin, PwEntry keepassEntry, Boolean rdpConsoleSession)
 {
     this.plugin              = plugin;
     this.keepassDatabase     = this.plugin.keepassHost.Database;
     this.keepassEntry        = keepassEntry;
     this.rdpConsoleSession   = rdpConsoleSession;
     this.enableRDPFullScreen = this.plugin.settings.enableRDPFullScreen;
     this.rdpWidth            = this.plugin.settings.rdpWidth;
     this.rdpHeight           = this.plugin.settings.rdpHeight;
     this.srv = this.keepassEntry.Strings.ReadSafe(this.plugin.settings.connectionMethodField).Substring(6);
 }
Beispiel #4
0
        public About(AdvancedConnectPluginExt plugin)
        {
            this.plugin = plugin;

            InitializeComponent();

            //Customize GUI from Designer
            this.Icon            = (System.Drawing.Icon) this.plugin.pluginIcon;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox     = false;
            this.MinimizeBox     = false;

            this.labelTitle.Text     = ((AssemblyTitleAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyTitleAttribute), false)).Title;
            this.labelVersion.Text   = "Version " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
            this.labelCopyright.Text = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false)).Copyright + " " + ((AssemblyCompanyAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCompanyAttribute), false)).Company;
        }
        public CustomConnectionItem(AdvancedConnectPluginExt plugin, ApplicationItem application, PwEntry keepassEntry)
        {
            this.plugin          = plugin;
            this.keepassDatabase = this.plugin.keepassHost.Database;
            this.application     = application;
            this.keepassEntry    = keepassEntry;

            String options = this.application.options;

            // Support optional some OPT like: [ string value |default value ], if string value is null, it will set OPT value to default value.
            if (Regex.IsMatch(options, @"\[\|"))
            {
                options = Regex.Replace(options, @"\[\|", "");
                options = Regex.Replace(options, @"\]", "");
            }
            else
            {
                options = Regex.Replace(options, @"\|.*\]", "");
                options = Regex.Replace(options, @"\[", "");
            }


            this.customConnectionOptions = options;
        }
 public Settings(AdvancedConnectPluginExt plugin) : this()
 {
     this.plugin = plugin;
 }
        public Options(AdvancedConnectPluginExt plugin)
        {
            this.plugin = plugin;

            InitializeComponent();

            //Customize GUI from designer
            this.Icon = (System.Drawing.Icon) this.plugin.pluginIcon;

            //Add empty values to text-, ceck- and comboboxes
            this.comboBoxConnectionMethod.Items.Add(String.Empty);
            this.comboBoxConncectionOptions.Items.Add(String.Empty);
            this.checkBoxEnableBuiltinRDP.Checked = true;
            this.comboBoxRDPConncectionAddress.Items.Add(String.Empty);
            this.textBoxRDPConnectionMethod.Text = String.Empty;
            this.textBoxRDPCustomParameter.Text  = String.Empty;

            //Load connection mapping from config
            this.comboBoxConnectionMethod.Text      = plugin.settings.connectionMethodField;
            this.comboBoxConncectionOptions.Text    = plugin.settings.connectionOptionsField;
            this.checkBoxEnableBuiltinRDP.Checked   = plugin.settings.enableBuiltinRDP;
            this.comboBoxRDPConncectionAddress.Text = plugin.settings.rdpConnectionAddressField;
            this.textBoxRDPConnectionMethod.Text    = plugin.settings.rdpConnectionMethod;
            this.textBoxRDPCustomParameter.Text     = plugin.settings.rdpCustomParameter;

            //Check if database is open to load the custom values from db
            //(Lock configuration items if databse is closed)
            if (this.plugin.keepassHost.Database != null && this.plugin.keepassHost.Database.IsOpen)
            {
                this.dbFields = getDBFields();
                foreach (var field in dbFields)
                {
                    this.comboBoxConnectionMethod.Items.Add(field);
                    this.comboBoxConncectionOptions.Items.Add(field);
                    this.comboBoxRDPConncectionAddress.Items.Add(field);
                }
            }
            else
            {
                this.comboBoxConnectionMethod.Enabled      = false;
                this.comboBoxConncectionOptions.Enabled    = false;
                this.comboBoxRDPConncectionAddress.Enabled = false;
            }

            //Building GridView with BindingList as source
            this.dataGridViewApplications.DataSource = plugin.settings.applicationsBindingList;

            this.dataGridViewApplications.Columns["name"].HeaderText   = "Application Name";
            this.dataGridViewApplications.Columns["name"].MinimumWidth = 100;
            this.dataGridViewApplications.Columns["name"].Width        = 100;
            this.dataGridViewApplications.Columns["name"].DisplayIndex = 0;

            this.dataGridViewApplications.Columns["method"].HeaderText   = "Method / Protocol";
            this.dataGridViewApplications.Columns["method"].Width        = 70;
            this.dataGridViewApplications.Columns["method"].MinimumWidth = 70;
            this.dataGridViewApplications.Columns["method"].DisplayIndex = 1;

            this.dataGridViewApplications.Columns["path"].HeaderText   = "Path";
            this.dataGridViewApplications.Columns["path"].Width        = 120;
            this.dataGridViewApplications.Columns["path"].MinimumWidth = 120;
            this.dataGridViewApplications.Columns["path"].DisplayIndex = 2;

            this.dataGridViewApplications.Columns["options"].HeaderText   = "Commandline Options";
            this.dataGridViewApplications.Columns["options"].Width        = 100;
            this.dataGridViewApplications.Columns["options"].MinimumWidth = 100;
            this.dataGridViewApplications.Columns["options"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.dataGridViewApplications.Columns["options"].DisplayIndex = 3;

            //Sort columns initial by name
            this.dataGridViewApplications.Sort(this.dataGridViewApplications.Columns["name"], ListSortDirection.Ascending);
        }
Beispiel #8
0
 public ToolsMenuExtension(AdvancedConnectPluginExt plugin)
 {
     this.plugin = plugin;
 }
Beispiel #9
0
 public ContextMenuExtension(AdvancedConnectPluginExt plugin)
 {
     this.plugin           = plugin;
     this.entryContextMenu = this.plugin.keepassHost.MainWindow.EntryContextMenu;
 }