Esempio n. 1
0
 public EntryDisplayControl(PassEntry passEntry)
 {
     InitializeComponent();
     tbPassword.Text   = passEntry.EncryptedValue;
     lblEntryName.Text = passEntry.Name;
     _passEntry        = passEntry;
 }
Esempio n. 2
0
        private void AddEntryControlToPanel(PassEntry passEntry)
        {
            EntryDisplayControl c = new EntryDisplayControl(passEntry);

            flpEntriesSet.Controls.Add(c);
            c.Dock = DockStyle.Top;
            c.Show();
        }
Esempio n. 3
0
 //Echange l'input de mail avec celui de password, et ensuite affiche le menu. (Animation)
 void ShowNext(object sender, EventArgs e)
 {
     if (EmailEntry.IsVisible)
     {
         EmailEntry.FadeTo(0, 300, Easing.SinIn);
         EmailEntry.IsVisible = false;
         PassEntry.IsVisible  = true;
         PassEntry.FadeTo(1, 300, Easing.SinOut);
         PassEntry.Focus();
     }
     else
     {
         Navigation.PushAsync(new MenuPage());
     }
 }
Esempio n. 4
0
        public static PwEntry GetKeepassEntry(PassEntry entry, GetPassword getPassword, ICollection <string> protect)
        {
            var resultidx = new PwEntryIndexer(new PwEntry(true, true), protect);
            var fields    = new Dictionary <string, string>();
            var notes     = ParseNotes(entry.notes ?? "", fields);

            foreach (var field in fields)
            {
                resultidx[field.Key] = field.Value;
            }

            var pw = getPassword(entry);

            if (!pw.Equals(EmptyPassword))
            {
                resultidx[PwDefs.PasswordField] = pw;
            }

            if (!entry.name.Equals(EmptyUsername))
            {
                resultidx[PwDefs.UserNameField] = entry.name;
            }

            if (!entry.revision.Equals(""))
            {
                resultidx[RevisionField] = entry.revision;
            }

            if (entry.site.Equals(EmptyUrl))
            {
                resultidx[PwDefs.TitleField] = entry.name;
            }
            else
            {
                resultidx[PwDefs.TitleField] = entry.site;
                resultidx[PwDefs.UrlField]   = entry.site;
            }

            notes = notes.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", "\r\n").Trim();

            if (!notes.Equals(""))
            {
                resultidx[PwDefs.NotesField] = notes;
            }

            return(resultidx.entry);
        }
Esempio n. 5
0
        async void AuthButtonClicked(object sender, EventArgs e)
        {
            await btnAuthenticate.FadeTo(0, App.AnimationSpeed, Easing.SinIn);

            btnAuthenticate.IsVisible = false;

            LoadingIndicator.IsVisible = true;
            LoadingIndicator.IsRunning = true;
            LodingLabel.IsVisible      = true;

            if (LabPicker.SelectedIndex == App.labs.Count - 1)
            {
                JsonRequests.labID = 99;
            }
            else
            {
                JsonRequests.labID = LabPicker.SelectedIndex;
            }

            JsonRequests.password = PassEntry.Text;

            if (!await JsonRequests.getUsers())
            {
                System.Diagnostics.Debug.WriteLine("Connection Error!");
                LoadingIndicator.IsVisible = false;
                LoadingIndicator.IsRunning = false;
                LodingLabel.IsVisible      = false;

                btnAuthenticate.IsVisible = true;
                await btnAuthenticate.FadeTo(1, App.AnimationSpeed, Easing.SinIn);

                return;
            }

            LoadingIndicator.IsVisible = false;
            LoadingIndicator.IsRunning = false;
            LodingLabel.IsVisible      = false;

            await label1.FadeTo(0, App.AnimationSpeed, Easing.SinIn);

            await LabPicker.FadeTo(0, App.AnimationSpeed, Easing.SinIn);

            await PassEntry.FadeTo(0, App.AnimationSpeed, Easing.SinIn);


            await Navigation.PushAsync(new MainPage());
        }
Esempio n. 6
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();

            await JsonRequests.getTables();

            Initialize();

            await Task.Delay(App.DelaySpeed);

            await label1.ScaleTo(1, App.AnimationSpeed, Easing.SinIn);

            await LabPicker.ScaleTo(1, App.AnimationSpeed, Easing.SinIn);

            await PassEntry.ScaleTo(1, App.AnimationSpeed, Easing.SinIn);

            await buttonStack.ScaleTo(1, App.AnimationSpeed, Easing.SinIn);
        }
Esempio n. 7
0
 public AddNewEntryWindow()
 {
     InitializeComponent();
     Result = new PassEntry();
 }
Esempio n. 8
0
 private void PassEntry_Click(object sender, EventArgs e)
 {
     PassEntry.SelectAll();
 }