Click here to Skip to main content
15,894,720 members
Articles / Mobile Apps

Windows Mobile Password Safe

Rate me:
Please Sign up or sign in to vote.
4.87/5 (58 votes)
12 Jan 2009CPOL16 min read 161.2K   3.1K   139  
A password safe with a touch screen UI introducing Fluid Controls.
using System;

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

namespace PasswordSafe
{
    public class CategoriesPanel:FluidPanel
    {
        private FluidHeader header = new FluidHeader();
        private CategoryListBox listBox = new CategoryListBox();

        protected override void InitControl()
        {
            base.InitControl();
            Bounds = new Rectangle(0, 0, 240, 300);
            BackColor = Color.Green;
            Anchor = AnchorAll;
            const int h = 32;
            header.Bounds = new Rectangle(0, 0, 240, h);
            listBox.Bounds = new Rectangle(0, h, 240, 300 - h);
            header.Anchor = AnchorTLR;
            listBox.Anchor = AnchorAll;
            header.BackButton.Shape = ButtonShape.Rounded;
            header.BackButton.Visible = true;
            header.BackButton.Text = "OK";
            header.Title = "Choose Categories";
            header.BackButton.Click += new EventHandler(BackButton_Click);


            Controls.Add(header);
            Controls.Add(listBox);
        }


        public List<CategoryListBoxItem> Categories { get { return listBox.Categories; } }

        void BackButton_Click(object sender, EventArgs e)
        {
            ListBuilder.Instance.AddCategories(Categories);
            Close();
        }

        private static CategoriesPanel instance;

        public static CategoriesPanel Instance
        {
            get
            {
                if (instance == null) instance = new CategoriesPanel();
                return instance;
            }
        }


        public override void Focus()
        {
            listBox.Focus();
        }


        internal void UpdateData()
        {
            listBox.UpdateData();
        }
    }
}

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)


Written By
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

Comments and Discussions