Exemplo n.º 1
0
        public ChangePasswordForm(UserModel user, IMessageInject message)
        {
            InitializeComponent();
            User         = user;
            this.message = message;
            BackColor    = FormBrushes.WindowBackGroundColor;
            ForeColor    = FormBrushes.WindowForegroundColor;
            Font         = FormBrushes.DefaultRegularFont;

            OldPassPanel.BackColor = FormBrushes.WindowBackGroundColor;
            OldPassPanel.ForeColor = FormBrushes.WindowForegroundColor;
            OldPassPanel.Font      = FormBrushes.DefaultRegularFont;

            NewPassPanel.BackColor = FormBrushes.WindowBackGroundColor;
            NewPassPanel.ForeColor = FormBrushes.WindowForegroundColor;
            NewPassPanel.Font      = FormBrushes.DefaultRegularFont;

            ConfPassPanel.BackColor = FormBrushes.WindowBackGroundColor;
            ConfPassPanel.ForeColor = FormBrushes.WindowForegroundColor;
            ConfPassPanel.Font      = FormBrushes.DefaultRegularFont;

            OldPassPanel.SetDefaultColorForChildren();
            NewPassPanel.SetDefaultColorForChildren();
            ConfPassPanel.SetDefaultColorForChildren();

            AcceptButton.SetDefaultColor();
            DeclineButton.SetDefaultColor();

            AcceptButton.Click  += AcceptButtonClick;
            DeclineButton.Click += DeclineButtonClick;
        }
Exemplo n.º 2
0
        public UsersEditView(IKernel kernel, UsersView baseControl, UserModel model) : base(kernel, baseControl)
        {
            this.baseControl = baseControl;
            mapper           = kernel.Get <IMapperInject>();
            message          = kernel.Get <IMessageInject>();

            OldModel  = model;
            positions = new List <PositionModel>();

            InitElements(model);
            UpdatePositionsSource(model);
            ResetModel(model);
            DeclineButton.Click += (s, e) => ResetModel(OldModel);
            SaveButton.Click    += (s, e) => OnSaveMethod(true);
            SaveAndExit.Click   += (s, e) => OnSaveMethod(false);
        }
Exemplo n.º 3
0
        public AuthForm(IKernel kernel) : this()
        {
            AuthDialogResult = false;

            TunellProxy.ServiceAddress = kernel.Get <ISettingsInject>().GetServiceName();
            message = kernel.Get <IMessageInject>();
            mapper  = kernel.Get <IMapperInject>();
            memory  = kernel.Get <IMemoryInject>();

            BackColor = FormBrushes.WindowBackGroundColor;
            ForeColor = FormBrushes.WindowForegroundColor;
            Font      = FormBrushes.DefaultRegularFont;

            AuthorizeButton.SetDefaultColor();
            CancelButton.SetDefaultColor();

            Icon = Resources.main_icon;
            AuthorizeButton.Enabled = false;

#if DEBUG
            LoginTE.Text    = "admin";
            PasswordTE.Text = "admin";
            PasswordTE.Properties.UseSystemPasswordChar = true;
            AuthorizeButton.Enabled = true;
            AuthorizeButton.Select();
#endif

            LoginTE.TextChanged    += TextChangedEvent;
            PasswordTE.TextChanged += TextChangedEvent;

            LoginTE.KeyPress    += KeyEnterPressedEvent;
            PasswordTE.KeyPress += KeyEnterPressedEvent;

            AuthorizeButton.Click += AuthorizeButtonClick;
            MouseDown             += AuthFormMouseDown;
        }