Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Applications » Downloads
 
Add your own
alternative version

CooksMate

, 21 Jan 2008 GPL3
A simple program to help get the timing of a roast dinner
cooksmate-bin-mono.zip
cooksmate-bin-mono
CooksMate
mono
cooksmate.exe
cooksmate.exe.mdb
cooksmate.sh
log4net.dll
uk.org.aspellclark.common.dll
uk.org.aspellclark.common.gui.dll
cooksmate-bin-net.zip
cooksmate-bin-net
CooksMate
bin
Debug
cooksmate.exe
cooksmate.log
log4net.dll
uk.org.aspellclark.common.dll
uk.org.aspellclark.common.gui.dll
cooksmate-src.zip
cooksmate-src
Common
common.build
Properties
src
main
csharp
NotImplementedDlg.resources
CommonFile
common.file.build
CommonGui
common.gui.build
CooksMate
cooksmate.build
cooksmate.sh
cooksmate_norm.png
DlgAction.resources
DlgEditRecipe.resources
MainForm.resources
libs
mono
log4net.dll
Mono.GetOptions.dll
sqlite-3.5.4.so
net
log4net.dll
Mono.GetOptions.dll
sqlite3.def
sqlite3.dll
/*
 * Created by SharpDevelop.
 * User: andy
 * Date: 21/12/2007
 * Time: 18:41
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;
using log4net;

using uk.org.aspellclark.common;

namespace uk.org.aspellclark.braille
{
    /// <summary>
    ///   <name>MainForm</name>
    ///   <namespace>uk.org.aspellclark.todolist</namespace>
    ///   <version>1.0</version>
    ///   <author>Andy Aspell-Clark</author>
    ///   <description>This is the main form of the todolist application
    ///   </description>
    ///   <history>
    ///     <historyitem> 1 Jan 2008  1.0 ARAC  Initial Version.</historyitem>
    ///   </history>
    /// </summary>
	public class MainForm : Form
	{
		#region members

		// Create a logger for use in this class
		private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
		
		private PreferencesXml prefs = null;

		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.MenuItem mnuFile;
		private System.Windows.Forms.MenuItem mnuHelpAbout;
		private System.Windows.Forms.MenuItem mnuHelp;
		private System.Windows.Forms.MenuItem mnuFileExit;
		private System.Windows.Forms.MainMenu mainMenu1;
        
		private HabitList habitList = new HabitList();
		#endregion      
		
		
		/// <summary>
		/// main form constructor
		/// </summary>
		public MainForm(PreferencesXml prefs)
		{
			log.Info("Constructing");
			this.prefs = prefs;
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			log.Info("Environment Os ["+SystemInfo.OsVersion+"]");
			log.Info("Environment Host ["+SystemInfo.OsHostname+"]");
			
			log.Info("Application Version Number ["+AppVersion.VersionString+"]");
		}
		
		
		#region Windows Forms Designer generated code
		/// <summary>
		/// This method is required for Windows Forms designer support.
		/// Do not change the method contents inside the source code editor. The Forms designer might
		/// not be able to load this method if it was changed manually.
		/// </summary>
		private void InitializeComponent() {
			this.components = new System.ComponentModel.Container();
			this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
			this.mnuFile = new System.Windows.Forms.MenuItem();
			this.mnuFileExit = new System.Windows.Forms.MenuItem();
			this.mnuHelp = new System.Windows.Forms.MenuItem();
			this.mnuHelpAbout = new System.Windows.Forms.MenuItem();
			this.statusStrip1 = new System.Windows.Forms.StatusStrip();
			this.SuspendLayout();
			// 
			// mainMenu1
			// 
			this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
									this.mnuFile,
									this.mnuHelp});
			// 
			// mnuFile
			// 
			this.mnuFile.Index = 0;
			this.mnuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
									this.mnuFileExit});
			this.mnuFile.Text = "File";
			// 
			// mnuFileExit
			// 
			this.mnuFileExit.Index = 0;
			this.mnuFileExit.Text = "Exit";
			this.mnuFileExit.Click += new System.EventHandler(this.MnuFileExitClick);
			// 
			// mnuHelp
			// 
			this.mnuHelp.Index = 1;
			this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
									this.mnuHelpAbout});
			this.mnuHelp.Text = "Help";
			// 
			// mnuHelpAbout
			// 
			this.mnuHelpAbout.Index = 0;
			this.mnuHelpAbout.Text = "About";
			this.mnuHelpAbout.Click += new System.EventHandler(this.MnuHelpAboutClick);
			// 
			// statusStrip1
			// 
			this.statusStrip1.Location = new System.Drawing.Point(0, 249);
			this.statusStrip1.Name = "statusStrip1";
			this.statusStrip1.Size = new System.Drawing.Size(499, 22);
			this.statusStrip1.TabIndex = 3;
			this.statusStrip1.Text = "statusStrip1";
			// 
			// MainForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(499, 271);
			this.Controls.Add(this.statusStrip1);
			this.Menu = this.mainMenu1;
			this.MinimumSize = new System.Drawing.Size(507, 298);
			this.Name = "MainForm";
			this.Text = "habit Forming";
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		private System.Windows.Forms.StatusStrip statusStrip1;
		#endregion
		
		#region File Menu Callbacks
		
		void MnuFileExitClick(object sender, System.EventArgs e)
		{
			log.Info("Shutting Down");
			Close();
		}
		#endregion
		
		#region Help Menu Callbacks
		void MnuHelpAboutClick(object sender, System.EventArgs e)
		{
			log.Info("Showing about box");
			common.gui.AboutBox about = new common.gui.AboutBox();
			about.ApplicationName = "HabitForming";
			about.ApplicationVersion = AppVersion.VersionString;
			about.ShowDialog();
		}
		#endregion
	
		
		
		
		void BntAddhabitClick(object sender, EventArgs e)
		{
			if (txtNewhabitName.Text.Length>0)
			{
				habitList.Add(new Habit(txtNewhabitName.Text));
				UpdatehabitList();
			}
			SaveHabitsToFile();
		}
		private void SaveHabitsToFile()
		{
			
		}

		
		private void UpdatehabitList()
		{
			//tablehabits.ro
		}
		
		
	}//class
}//namespace

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 GNU General Public License (GPLv3)

Share

About the Author

Andy Aspell-Clark
Software Developer (Senior) Airbus Defense and Space
United Kingdom United Kingdom
No Biography provided
Follow on   Twitter   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150414.1 | Last Updated 21 Jan 2008
Article Copyright 2007 by Andy Aspell-Clark
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid