Click here to Skip to main content
15,892,199 members
Articles / Web Development / HTML

Retrieving and Storing Call History

Rate me:
Please Sign up or sign in to vote.
5.00/5 (8 votes)
19 Dec 2007CPOL5 min read 97.7K   1.3K   47  
This article describes how to create a wrapper class for the native Phone API, and then uses it to retrieve and store the call history.
namespace CallHistoryViewer
{
    partial class MainForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        private System.Windows.Forms.MainMenu MainMenuBar;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.MainMenuBar = new System.Windows.Forms.MainMenu();
            this.DatabaseMenu = new System.Windows.Forms.MenuItem();
            this.UpdateMenuItem = new System.Windows.Forms.MenuItem();
            this.WebserviceMenu = new System.Windows.Forms.MenuItem();
            this.LaunchMenuItem = new System.Windows.Forms.MenuItem();
            this.CallList = new System.Windows.Forms.ListView();
            this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
            this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
            this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
            this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
            this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
            this.SuspendLayout();
            // 
            // MainMenuBar
            // 
            this.MainMenuBar.MenuItems.Add(this.DatabaseMenu);
            this.MainMenuBar.MenuItems.Add(this.WebserviceMenu);
            // 
            // DatabaseMenu
            // 
            this.DatabaseMenu.MenuItems.Add(this.UpdateMenuItem);
            this.DatabaseMenu.Text = "Database";
            // 
            // UpdateMenuItem
            // 
            this.UpdateMenuItem.Text = "Update From Phone Call Logs";
            this.UpdateMenuItem.Click += new System.EventHandler(this.UpdateMenuItem_Click);
            // 
            // WebserviceMenu
            // 
            this.WebserviceMenu.MenuItems.Add(this.LaunchMenuItem);
            this.WebserviceMenu.Text = "Web Service";
            // 
            // LaunchMenuItem
            // 
            this.LaunchMenuItem.Text = "Launch";
            this.LaunchMenuItem.Click += new System.EventHandler(this.LaunchMenuItem_Click);
            // 
            // CallList
            // 
            this.CallList.Columns.Add(this.columnHeader1);
            this.CallList.Columns.Add(this.columnHeader2);
            this.CallList.Columns.Add(this.columnHeader3);
            this.CallList.Columns.Add(this.columnHeader4);
            this.CallList.Columns.Add(this.columnHeader5);
            this.CallList.Dock = System.Windows.Forms.DockStyle.Fill;
            this.CallList.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular);
            this.CallList.Location = new System.Drawing.Point(0, 0);
            this.CallList.Name = "CallList";
            this.CallList.Size = new System.Drawing.Size(240, 268);
            this.CallList.TabIndex = 0;
            this.CallList.View = System.Windows.Forms.View.Details;
            // 
            // columnHeader1
            // 
            this.columnHeader1.Text = "Time";
            this.columnHeader1.Width = 100;
            // 
            // columnHeader2
            // 
            this.columnHeader2.Text = "Duration";
            this.columnHeader2.Width = 70;
            // 
            // columnHeader3
            // 
            this.columnHeader3.Text = "Type";
            this.columnHeader3.Width = 33;
            // 
            // columnHeader4
            // 
            this.columnHeader4.Text = "Name";
            this.columnHeader4.Width = 100;
            // 
            // columnHeader5
            // 
            this.columnHeader5.Text = "Number";
            this.columnHeader5.Width = 100;
            // 
            // MainForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.AutoScroll = true;
            this.ClientSize = new System.Drawing.Size(240, 268);
            this.Controls.Add(this.CallList);
            this.KeyPreview = true;
            this.Menu = this.MainMenuBar;
            this.Name = "MainForm";
            this.Text = "SA10 Call History Manager";
            this.Load += new System.EventHandler(this.MainForm_Load);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.MenuItem DatabaseMenu;
        private System.Windows.Forms.MenuItem UpdateMenuItem;
        private System.Windows.Forms.MenuItem WebserviceMenu;
        private System.Windows.Forms.MenuItem LaunchMenuItem;
        private System.Windows.Forms.ListView CallList;
        private System.Windows.Forms.ColumnHeader columnHeader1;
        private System.Windows.Forms.ColumnHeader columnHeader2;
        private System.Windows.Forms.ColumnHeader columnHeader3;
        private System.Windows.Forms.ColumnHeader columnHeader4;
        private System.Windows.Forms.ColumnHeader columnHeader5;
    }
}

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
Other University of Waterloo
Canada Canada
I'm a student at the University of Waterloo in Ontario, Canada. I'm currently pursuing my undergraduate degree in Computer Engineering, and expect to graduate at the end of April 2009. My interests include web development, database-driven applications, and digital hardware design.

Comments and Discussions