Click here to Skip to main content
12,356,774 members (62,893 online)
Click here to Skip to main content

Stats

109.2K views
2.7K downloads
139 bookmarked
Posted

Windows Mobile Password Safe

, 12 Jan 2009 CPOL
A password safe with a touch screen UI introducing Fluid Controls.
Fluid.dll
passwords.pws
PasswordSafe.exe
PasswordSafe
Fluditity
bin
Classes
vssver2.scc
Controls
enums
vssver2.scc
Events
vssver2.scc
Interfaces
vssver2.scc
vssver2.scc
Fluid.csproj.user
GdiPlus
mssccprj.scc
NativeMethods
vssver2.scc
vssver2.scc
Native
vssver2.scc
obj
Properties
vssver2.scc
vssver2.scc
PasswordSafe
bin
Release
Fluid.dll
passwords.pws
PasswordSafe.exe
Classes
vssver2.scc
Encryption
vssver2.scc
EventArgs
vssver2.scc
ListBoxes
vssver2.scc
PasswordSafe.csproj.user
Properties
vssver2.scc
Resources
lock.bmp
minus.png
props.bmp
save.bmp
saved.bmp
search.bmp
searchd.bmp
undo24.bmp
undo24_d.bmp
Untitled.png
vssver2.scc
security.ico
Templates
vssver2.scc
Themes
vssver2.scc
vssver2.scc
Xml
vssver2.scc
vssver2.scc
using System;

using System.Collections.Generic;
using System.Text;
using Fluid.Controls;
using System.Drawing;
using PasswordSafe.Classes;

namespace PasswordSafe
{
    public class WelcomeScreen:FluidPanel
    {
        protected override void InitControl()
        {
            base.InitControl();
            Bounds = new Rectangle(0,0,240,300);
            BackColor = Color.LightSteelBlue;
            this.GradientFill = true;
            GradientFillOffset = 30;
            ForeColor = Color.White;

            FluidLabel h1 = new FluidLabel("Welcome", 0, 0, 240, 40);
            h1.ShadowColor = Color.Black;
            h1.ForeColor = Color.White;
            h1.Alignment = StringAlignment.Center;
            h1.LineAlignment = StringAlignment.Center;
            h1.Font = new Font(FontFamily.GenericSansSerif,12f,FontStyle.Bold);
            h1.Anchor = AnchorTLR;
            Controls.Add(h1);

            string infoText = "This is the first time you started PasswordSafe and an empty database named passwords.pws is automatically" +
                " generated in the 'MyDevice' folder of your Windows Mobile.\n\n" +
                "As next step, in the Login Screen, you need to give your database a password by tapping the 'Change Password' button.\n" +
                "Notice that your current password is empty.\n\n" +
                "You should backup your database from time to time. If you remove your password.xml, this welcome screen comes again " +
                "to create a new database.\n\n" +
                "If you don't choose a password, your database is readable as xml file.\n";

            FluidLabel infoLabel = new FluidLabel(infoText, 3, 40, 240-6, 220);
            infoLabel.ForeColor = Color.Black;
            infoLabel.Font = new Font(FontFamily.GenericSansSerif, 8f, FontStyle.Regular);
            infoLabel.Alignment = StringAlignment.Near;
            infoLabel.LineAlignment = StringAlignment.Near;
            infoLabel.Format.FormatFlags = 0;
            infoLabel.Anchor = AnchorTLR;
            Controls.Add(infoLabel);

            FluidButton okBtn = new FluidButton("Start", 70, 300 - 40, 100, 32);
            this.okBtn = okBtn;
            okBtn.BackColor = Color.LightSlateGray;           
            okBtn.Click += new EventHandler(okBtn_Click);
            okBtn.ForeColor = Color.White;
            okBtn.Anchor = AnchorBL;
            Controls.Add(okBtn);

        }

        void okBtn_Click(object sender, EventArgs e)
        {
           
            DataReader.CreateDatabase();
            Close();
            if (Continue != null) Continue(this, e);
        }

        private FluidButton okBtn = new FluidButton();

        protected override void OnSizeChanged(Size oldSize, Size newSize)
        {
            base.OnSizeChanged(oldSize, newSize);
            int w = this.Width;
            okBtn.Left = (w - okBtn.Width) / 2;
        }

        public event EventHandler Continue;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Thomas Gerber
Software Developer (Senior)
Germany Germany
MCPD
Enterprise Application Developer 3.5
Windows Developer 3.5
.ASP.NET Developer 3.5
.NET 2.0 Windows Developer
.NET 2.0 Web Developer
.NET 2.0 Enterprise Application Developer


MCTS
.NET 3.5 Windows Forms Applications
.NET 3.5 ASP.NET Applications
.NET 3.5, ADO.NET Application Development
.NET 3.5 WCF
.NET 3.5 WPF
.NET 3.5 WF
Microsoft SQL Server 2008, Database Development
.NET 2.0 Windows Applications
.NET 2.0 Web Applications
.NET 2.0 Distributed Applications
SQL Server 2005
Sharepoint Services 3.0 Application Development
Windows Vista Client Configuration

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 12 Jan 2009
Article Copyright 2009 by Thomas Gerber
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid