Exemple #1
0
        public CRSSecurityPanel() : base()
        {
            this.Name = "Security";
            this.Size = new Size(512, 512);

            _ctlAuthEdit      = new CAuthEditor();
            _ctlAuthEdit.Size = new Size(
                this.Width - Margin.Right - Margin.Left - ControlProperties.ControlSpacing * 2,
                300
                );
            _ctlAuthEdit.Location = new Point(
                ControlProperties.ControlSpacing + BodyLeft,
                ControlProperties.ControlSpacing + HeaderSize
                );
            _ctlAuthEdit.Anchor     = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
            _ctlAuthEdit.IconClose  = (Image)(RsViewEngine.Resources.GetObject("gfx_arrow_down_32x32"));
            _ctlAuthEdit.IconExpand = (Image)(RsViewEngine.Resources.GetObject("gfx_arrow_right_32x32"));
            this.Controls.Add(_ctlAuthEdit);
            RsViewEngine.Locale.AddLocalizedControl(this);

            this.PanelUpdate += new SpecialPanelEventNotify(ehUpdate);

            this.DetermineHeight();
            Collapsed = true;
        }
Exemple #2
0
            public CAuthItem(CAuthEditor aParent)
            {
                _parent = aParent;

                this.TabStop        = true;
                this.DoubleBuffered = true;
                this.Size           = new Size(aParent.Width, __HEIGHT);
                this.Anchor         = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top);
                this.Click         += new EventHandler(ehClick);

                _Del            = new Button();
                _Del.BackColor  = SystemColors.Control;
                _Del.Size       = new Size(128, 32);
                _Del.Location   = new Point(this.Width - (_Del.Width + 8), 8);
                _Del.Text       = "Remove";
                _Del.Click     += new EventHandler(ehClick);
                _Del.GotFocus  += new EventHandler(ehGotFocus);
                _Del.LostFocus += new EventHandler(ehLostFocus);
                _Del.UseVisualStyleBackColor = true;
                _Del.Anchor = (AnchorStyles)(
                    AnchorStyles.Top |
                    AnchorStyles.Right
                    );
                _Del.Click += new EventHandler(ehRemove);

                _Reset            = new Button();
                _Reset.BackColor  = SystemColors.Control;
                _Reset.Size       = new Size(128, 32);
                _Reset.Location   = new Point(this.Width - (_Reset.Width + 8), _Del.Bottom + 4);
                _Reset.Text       = "Reset";
                _Reset.Click     += new EventHandler(ehClick);
                _Reset.GotFocus  += new EventHandler(ehGotFocus);
                _Reset.LostFocus += new EventHandler(ehLostFocus);
                _Reset.UseVisualStyleBackColor = true;
                _Reset.Anchor = (AnchorStyles)(
                    AnchorStyles.Top |
                    AnchorStyles.Right
                    );
                _Reset.Visible = false;
                _Reset.Click  += new EventHandler(ehReset);

                _Apply            = new Button();
                _Apply.BackColor  = SystemColors.Control;
                _Apply.Size       = new Size(128, 32);
                _Apply.Location   = new Point(this.Width - (_Apply.Width + 8), _Reset.Bottom + 4);
                _Apply.Text       = "Apply";
                _Apply.Click     += new EventHandler(ehClick);
                _Apply.GotFocus  += new EventHandler(ehGotFocus);
                _Apply.LostFocus += new EventHandler(ehLostFocus);
                _Apply.UseVisualStyleBackColor = true;
                _Apply.Anchor = (AnchorStyles)(
                    AnchorStyles.Top |
                    AnchorStyles.Right
                    );
                _Apply.Visible = false;
                _Apply.Click  += new EventHandler(ehApply);

                _eUsr            = new TextBox();
                _eUsr.TabStop    = true;
                _eUsr.Size       = new Size(128, 24);
                _eUsr.Location   = new Point(__EDIT_POS, _Del.Bottom + 4);
                _eUsr.GotFocus  += new EventHandler(ehGotFocus);
                _eUsr.LostFocus += new EventHandler(ehLostFocus);
                _eUsr.Visible    = false;

                _ePwd              = new TextBox();
                _ePwd.TabStop      = true;
                _ePwd.Size         = new Size(128, 24);
                _ePwd.Location     = new Point(__EDIT_POS, _eUsr.Bottom + 4);
                _ePwd.PasswordChar = '*';
                _ePwd.GotFocus    += new EventHandler(ehGotFocus);
                _ePwd.LostFocus   += new EventHandler(ehLostFocus);
                _ePwd.Visible      = false;

                _ctlOpenClose           = new PictureBox();
                _ctlOpenClose.TabStop   = true;
                _ctlOpenClose.Size      = new Size(32, 32);
                _ctlOpenClose.BackColor = Color.Transparent;
                _ctlOpenClose.Location  = new Point(4, (this.Height - 32) / 2);
                _ctlOpenClose.Anchor    = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left);
                _ctlOpenClose.Click    += new EventHandler(ehExpand);

                _ctlOpenClose.TabIndex = 0;
                _eUsr.TabIndex         = 1;
                _ePwd.TabIndex         = 2;
                _Del.TabIndex          = 3;
                _Reset.TabIndex        = 4;
                _Apply.TabIndex        = 5;

                this.SuspendLayout();
                this.Controls.Add(_Del);
                this.Controls.Add(_Apply);
                this.Controls.Add(_Reset);
                this.Controls.Add(_ePwd);
                this.Controls.Add(_eUsr);
                this.Controls.Add(_ctlOpenClose);
                this.ResumeLayout();

                this.IconClose    = aParent.IconClose;
                this.IconExpand   = aParent.IconExpand;
                this.ResizeRedraw = true;
            }
Exemple #3
0
        public CRSSecurityPanel()
            : base()
        {
            this.Name = "Security";
            this.Size = new Size(512, 512);

            _ctlAuthEdit = new CAuthEditor();
            _ctlAuthEdit.Size = new Size(
                        this.Width - Margin.Right - Margin.Left - ControlProperties.ControlSpacing * 2,
                        300
                    );
            _ctlAuthEdit.Location = new Point(
                        ControlProperties.ControlSpacing + BodyLeft,
                        ControlProperties.ControlSpacing + HeaderSize
                    );
            _ctlAuthEdit.Anchor = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
            _ctlAuthEdit.IconClose = (Image)(RsViewEngine.Resources.GetObject("gfx_arrow_down_32x32"));
            _ctlAuthEdit.IconExpand = (Image)(RsViewEngine.Resources.GetObject("gfx_arrow_right_32x32"));
            this.Controls.Add(_ctlAuthEdit);
            RsViewEngine.Locale.AddLocalizedControl(this);

            this.PanelUpdate += new SpecialPanelEventNotify(ehUpdate);

            this.DetermineHeight();
            Collapsed = true;
        }
Exemple #4
0
            public CAuthItem(CAuthEditor aParent)
            {
                _parent = aParent;

                this.TabStop = true;
                this.DoubleBuffered = true;
                this.Size = new Size(aParent.Width, __HEIGHT);
                this.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top);
                this.Click += new EventHandler(ehClick);

                _Del = new Button();
                _Del.BackColor = SystemColors.Control;
                _Del.Size = new Size(128, 32);
                _Del.Location = new Point(this.Width - (_Del.Width + 8), 8);
                _Del.Text = "Remove";
                _Del.Click += new EventHandler(ehClick);
                _Del.GotFocus += new EventHandler(ehGotFocus);
                _Del.LostFocus += new EventHandler(ehLostFocus);
                _Del.UseVisualStyleBackColor = true;
                _Del.Anchor = (AnchorStyles)(
                            AnchorStyles.Top |
                            AnchorStyles.Right
                        );
                _Del.Click += new EventHandler(ehRemove);

                _Reset = new Button();
                _Reset.BackColor = SystemColors.Control;
                _Reset.Size = new Size(128, 32);
                _Reset.Location = new Point(this.Width - (_Reset.Width + 8), _Del.Bottom + 4);
                _Reset.Text = "Reset";
                _Reset.Click += new EventHandler(ehClick);
                _Reset.GotFocus += new EventHandler(ehGotFocus);
                _Reset.LostFocus += new EventHandler(ehLostFocus);
                _Reset.UseVisualStyleBackColor = true;
                _Reset.Anchor = (AnchorStyles)(
                            AnchorStyles.Top |
                            AnchorStyles.Right
                        );
                _Reset.Visible = false;
                _Reset.Click += new EventHandler(ehReset);

                _Apply = new Button();
                _Apply.BackColor = SystemColors.Control;
                _Apply.Size = new Size(128, 32);
                _Apply.Location = new Point(this.Width - (_Apply.Width + 8), _Reset.Bottom + 4);
                _Apply.Text = "Apply";
                _Apply.Click += new EventHandler(ehClick);
                _Apply.GotFocus += new EventHandler(ehGotFocus);
                _Apply.LostFocus += new EventHandler(ehLostFocus);
                _Apply.UseVisualStyleBackColor = true;
                _Apply.Anchor = (AnchorStyles)(
                            AnchorStyles.Top |
                            AnchorStyles.Right
                        );
                _Apply.Visible = false;
                _Apply.Click += new EventHandler(ehApply);

                _eUsr = new TextBox();
                _eUsr.TabStop = true;
                _eUsr.Size = new Size(128, 24);
                _eUsr.Location = new Point(__EDIT_POS, _Del.Bottom + 4);
                _eUsr.GotFocus += new EventHandler(ehGotFocus);
                _eUsr.LostFocus += new EventHandler(ehLostFocus);
                _eUsr.Visible = false;

                _ePwd = new TextBox();
                _ePwd.TabStop = true;
                _ePwd.Size = new Size(128, 24);
                _ePwd.Location = new Point(__EDIT_POS, _eUsr.Bottom + 4);
                _ePwd.PasswordChar = '*';
                _ePwd.GotFocus += new EventHandler(ehGotFocus);
                _ePwd.LostFocus += new EventHandler(ehLostFocus);
                _ePwd.Visible = false;

                _ctlOpenClose = new PictureBox();
                _ctlOpenClose.TabStop = true;
                _ctlOpenClose.Size = new Size(32, 32);
                _ctlOpenClose.BackColor = Color.Transparent;
                _ctlOpenClose.Location = new Point(4, (this.Height - 32) / 2);
                _ctlOpenClose.Anchor = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left);
                _ctlOpenClose.Click += new EventHandler(ehExpand);

                _ctlOpenClose.TabIndex = 0;
                _eUsr.TabIndex = 1;
                _ePwd.TabIndex = 2;
                _Del.TabIndex = 3;
                _Reset.TabIndex = 4;
                _Apply.TabIndex = 5;

                this.SuspendLayout();
                this.Controls.Add(_Del);
                this.Controls.Add(_Apply);
                this.Controls.Add(_Reset);
                this.Controls.Add(_ePwd);
                this.Controls.Add(_eUsr);
                this.Controls.Add(_ctlOpenClose);
                this.ResumeLayout();

                this.IconClose = aParent.IconClose;
                this.IconExpand = aParent.IconExpand;
                this.ResizeRedraw = true;
            }