// frmMain.cs
// Copyright (C) 2008 Karel Jordaan karel_jordaan@yahoo.com.au
// 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

using System;
using System.ComponentModel;
using System.Resources;
using System.Windows.Forms;

//using System.Windows.Forms.Application;

namespace ZANZIClient
{
	/// <summary>
	/// Summary description for frmMain.
	/// </summary>
	public class frmMain : Form
	{

		#region Variable declaration 

		protected MainMenu mainMenu1;
		protected MenuItem mnuFile;
		protected MenuItem mnuFileExit;
		protected MenuItem mnuTools;
		protected MenuItem mnuToolsLanguage;
		protected MenuItem mnuToolsUpdate;
		protected MenuItem mnuHelp;
		protected MenuItem mnuHelpAbout;
		protected MenuItem mnuHelpContents;
		internal ResourceManager resources = new ResourceManager(typeof(frmMain));
		private MenuItem menuItem6;
		protected StatusBar statusBar1;
		private MenuItem menuItem2;
		protected MenuItem mnuToolsOptions;
		protected MenuItem mnuFileNew;
		protected MenuItem mnuFileNewSearch;
		protected MenuItem mnuFileOpen;
		protected MenuItem mnuFileClose;
		protected MenuItem mnuFileSave;
        protected MenuItem menuItem3;
		private ContextMenu contextMenu1;
		protected MenuItem menuItem5;
		protected MenuItem menuItem7;
		protected MenuItem menuItem8;
		protected MenuItem mnuEditCut;
		protected MenuItem mnuEditCopy;
		protected MenuItem mnuEditPaste;
		protected MenuItem menuItem9;
		protected MenuItem mnuEditFind;
		protected MenuItem mnuToolsChat;
        protected MenuItem mnuToolsVoice;
		protected MenuItem mnuToolsExchangeRates;
		protected MenuItem mnuToolsCompare;
		private MenuItem mnuObject1;
		protected MenuItem mnuEdit;
        protected MenuItem mnuView;
		protected MenuItem mnuViewSystemLog;
		protected MenuItem mnuViewTransfers;
        protected MenuItem mnuObject;
        protected MenuItem mnuObjectOpen;
        protected MenuItem mnuObjectClose;
        protected MenuItem mnuObjectSave;
        protected MenuItem mnuObjectSaveAs;
        protected MenuItem mnuObjectPrint;
		private MenuItem menuItem20;
		private MenuItem menuItem21;
		private MenuItem menuItem22;
		private MenuItem menuItem23;
		protected MenuItem mnuViewDiscovery;
		protected ImageList imageList1;
		protected MenuItem mnuVeiwHostCache;
        protected MenuItem mnuViewNeighbours;
        private MenuItem menuItem4;
        private MenuItem menuItem1;
        private MenuItem menuItem10;
        private Label label1;
		private IContainer components;

		#endregion

		#region Functions
		/// <summary>Main entry for frmMain</summary>
		/// <returns>Takes no variables and returns nothing</returns>
		public frmMain()
		{
			//
			// Required for Windows Form Designer support
			//
			
			InitializeComponent();
			
			
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		/// <summary>
		/// The main entry point for the ZANZI application.
		/// </summary>
		[STAThread]
		static void Main() 
		{

			//ZANZI.Upgrade.clsUpgrade cls = new ZANZI.Upgrade.clsUpgrade();
			//get this parameter value from settings to detemine
			//auto download update true
			//cls.CheckUpgrade(true);

			//auto download update false //does not work as expected
			//cls.CheckUpgrade(false);

			//Application.Run(new ZANZIClient.clsMain());
			//Application.DoEvents();

			clsStartupManager clsupd = new clsStartupManager();
		}



		#endregion

		#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.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
            this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
            this.mnuFile = new System.Windows.Forms.MenuItem();
            this.mnuFileNew = new System.Windows.Forms.MenuItem();
            this.mnuFileNewSearch = new System.Windows.Forms.MenuItem();
            this.menuItem3 = new System.Windows.Forms.MenuItem();
            this.mnuFileOpen = new System.Windows.Forms.MenuItem();
            this.mnuFileClose = new System.Windows.Forms.MenuItem();
            this.mnuFileSave = new System.Windows.Forms.MenuItem();
            this.menuItem6 = new System.Windows.Forms.MenuItem();
            this.mnuFileExit = new System.Windows.Forms.MenuItem();
            this.mnuEdit = new System.Windows.Forms.MenuItem();
            this.mnuEditCut = new System.Windows.Forms.MenuItem();
            this.mnuEditCopy = new System.Windows.Forms.MenuItem();
            this.mnuEditPaste = new System.Windows.Forms.MenuItem();
            this.menuItem9 = new System.Windows.Forms.MenuItem();
            this.mnuEditFind = new System.Windows.Forms.MenuItem();
            this.mnuView = new System.Windows.Forms.MenuItem();
            this.mnuViewTransfers = new System.Windows.Forms.MenuItem();
            this.mnuViewDiscovery = new System.Windows.Forms.MenuItem();
            this.mnuViewSystemLog = new System.Windows.Forms.MenuItem();
            this.mnuVeiwHostCache = new System.Windows.Forms.MenuItem();
            this.mnuViewNeighbours = new System.Windows.Forms.MenuItem();
            this.mnuTools = new System.Windows.Forms.MenuItem();
            this.mnuToolsChat = new System.Windows.Forms.MenuItem();
            this.mnuToolsVoice = new System.Windows.Forms.MenuItem();
            this.mnuToolsExchangeRates = new System.Windows.Forms.MenuItem();
            this.mnuToolsCompare = new System.Windows.Forms.MenuItem();
            this.mnuObject1 = new System.Windows.Forms.MenuItem();
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.mnuToolsLanguage = new System.Windows.Forms.MenuItem();
            this.mnuToolsUpdate = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.mnuToolsOptions = new System.Windows.Forms.MenuItem();
            this.mnuObject = new System.Windows.Forms.MenuItem();
            this.mnuObjectOpen = new System.Windows.Forms.MenuItem();
            this.mnuObjectClose = new System.Windows.Forms.MenuItem();
            this.menuItem4 = new System.Windows.Forms.MenuItem();
            this.mnuObjectSave = new System.Windows.Forms.MenuItem();
            this.mnuObjectSaveAs = new System.Windows.Forms.MenuItem();
            this.menuItem10 = new System.Windows.Forms.MenuItem();
            this.mnuObjectPrint = new System.Windows.Forms.MenuItem();
            this.menuItem20 = new System.Windows.Forms.MenuItem();
            this.menuItem21 = new System.Windows.Forms.MenuItem();
            this.menuItem22 = new System.Windows.Forms.MenuItem();
            this.menuItem23 = new System.Windows.Forms.MenuItem();
            this.mnuHelp = new System.Windows.Forms.MenuItem();
            this.mnuHelpAbout = new System.Windows.Forms.MenuItem();
            this.mnuHelpContents = new System.Windows.Forms.MenuItem();
            this.statusBar1 = new System.Windows.Forms.StatusBar();
            this.contextMenu1 = new System.Windows.Forms.ContextMenu();
            this.menuItem5 = new System.Windows.Forms.MenuItem();
            this.menuItem7 = new System.Windows.Forms.MenuItem();
            this.menuItem8 = new System.Windows.Forms.MenuItem();
            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
            this.label1 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // mainMenu1
            // 
            this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuFile,
            this.mnuEdit,
            this.mnuView,
            this.mnuTools,
            this.mnuObject,
            this.mnuHelp});
            resources.ApplyResources(this.mainMenu1, "mainMenu1");
            // 
            // mnuFile
            // 
            resources.ApplyResources(this.mnuFile, "mnuFile");
            this.mnuFile.Index = 0;
            this.mnuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuFileNew,
            this.menuItem3,
            this.mnuFileOpen,
            this.mnuFileClose,
            this.mnuFileSave,
            this.menuItem6,
            this.mnuFileExit});
            // 
            // mnuFileNew
            // 
            resources.ApplyResources(this.mnuFileNew, "mnuFileNew");
            this.mnuFileNew.Index = 0;
            this.mnuFileNew.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuFileNewSearch});
            // 
            // mnuFileNewSearch
            // 
            resources.ApplyResources(this.mnuFileNewSearch, "mnuFileNewSearch");
            this.mnuFileNewSearch.Index = 0;
            this.mnuFileNewSearch.Click += new System.EventHandler(this.mnuFileNewSearch_Click);
            // 
            // menuItem3
            // 
            resources.ApplyResources(this.menuItem3, "menuItem3");
            this.menuItem3.Index = 1;
            // 
            // mnuFileOpen
            // 
            resources.ApplyResources(this.mnuFileOpen, "mnuFileOpen");
            this.mnuFileOpen.Index = 2;
            // 
            // mnuFileClose
            // 
            resources.ApplyResources(this.mnuFileClose, "mnuFileClose");
            this.mnuFileClose.Index = 3;
            // 
            // mnuFileSave
            // 
            resources.ApplyResources(this.mnuFileSave, "mnuFileSave");
            this.mnuFileSave.Index = 4;
            // 
            // menuItem6
            // 
            resources.ApplyResources(this.menuItem6, "menuItem6");
            this.menuItem6.Index = 5;
            // 
            // mnuFileExit
            // 
            resources.ApplyResources(this.mnuFileExit, "mnuFileExit");
            this.mnuFileExit.Index = 6;
            this.mnuFileExit.Click += new System.EventHandler(this.mnuFileExit_Click);
            // 
            // mnuEdit
            // 
            resources.ApplyResources(this.mnuEdit, "mnuEdit");
            this.mnuEdit.Index = 1;
            this.mnuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuEditCut,
            this.mnuEditCopy,
            this.mnuEditPaste,
            this.menuItem9,
            this.mnuEditFind});
            // 
            // mnuEditCut
            // 
            resources.ApplyResources(this.mnuEditCut, "mnuEditCut");
            this.mnuEditCut.Index = 0;
            // 
            // mnuEditCopy
            // 
            resources.ApplyResources(this.mnuEditCopy, "mnuEditCopy");
            this.mnuEditCopy.Index = 1;
            // 
            // mnuEditPaste
            // 
            resources.ApplyResources(this.mnuEditPaste, "mnuEditPaste");
            this.mnuEditPaste.Index = 2;
            // 
            // menuItem9
            // 
            resources.ApplyResources(this.menuItem9, "menuItem9");
            this.menuItem9.Index = 3;
            // 
            // mnuEditFind
            // 
            resources.ApplyResources(this.mnuEditFind, "mnuEditFind");
            this.mnuEditFind.Index = 4;
            // 
            // mnuView
            // 
            resources.ApplyResources(this.mnuView, "mnuView");
            this.mnuView.Index = 2;
            this.mnuView.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuViewTransfers,
            this.mnuViewDiscovery,
            this.mnuViewSystemLog,
            this.mnuVeiwHostCache,
            this.mnuViewNeighbours});
            // 
            // mnuViewTransfers
            // 
            resources.ApplyResources(this.mnuViewTransfers, "mnuViewTransfers");
            this.mnuViewTransfers.Index = 0;
            // 
            // mnuViewDiscovery
            // 
            resources.ApplyResources(this.mnuViewDiscovery, "mnuViewDiscovery");
            this.mnuViewDiscovery.Index = 1;
            // 
            // mnuViewSystemLog
            // 
            resources.ApplyResources(this.mnuViewSystemLog, "mnuViewSystemLog");
            this.mnuViewSystemLog.Index = 2;
            // 
            // mnuVeiwHostCache
            // 
            resources.ApplyResources(this.mnuVeiwHostCache, "mnuVeiwHostCache");
            this.mnuVeiwHostCache.Index = 3;
            // 
            // mnuViewNeighbours
            // 
            resources.ApplyResources(this.mnuViewNeighbours, "mnuViewNeighbours");
            this.mnuViewNeighbours.Index = 4;
            // 
            // mnuTools
            // 
            resources.ApplyResources(this.mnuTools, "mnuTools");
            this.mnuTools.Index = 3;
            this.mnuTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuToolsChat,
            this.mnuToolsVoice,
            this.mnuToolsExchangeRates,
            this.mnuToolsCompare,
            this.menuItem1,
            this.mnuToolsLanguage,
            this.mnuToolsUpdate,
            this.menuItem2,
            this.mnuToolsOptions});
            // 
            // mnuToolsChat
            // 
            resources.ApplyResources(this.mnuToolsChat, "mnuToolsChat");
            this.mnuToolsChat.Index = 0;
            // 
            // mnuToolsVoice
            // 
            resources.ApplyResources(this.mnuToolsVoice, "mnuToolsVoice");
            this.mnuToolsVoice.Index = 1;
            // 
            // mnuToolsExchangeRates
            // 
            resources.ApplyResources(this.mnuToolsExchangeRates, "mnuToolsExchangeRates");
            this.mnuToolsExchangeRates.Index = 2;
            // 
            // mnuToolsCompare
            // 
            resources.ApplyResources(this.mnuToolsCompare, "mnuToolsCompare");
            this.mnuToolsCompare.Index = 3;
            this.mnuToolsCompare.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuObject1});
            // 
            // mnuObject1
            // 
            resources.ApplyResources(this.mnuObject1, "mnuObject1");
            this.mnuObject1.Index = 0;
            // 
            // menuItem1
            // 
            resources.ApplyResources(this.menuItem1, "menuItem1");
            this.menuItem1.Index = 4;
            // 
            // mnuToolsLanguage
            // 
            resources.ApplyResources(this.mnuToolsLanguage, "mnuToolsLanguage");
            this.mnuToolsLanguage.Index = 5;
            // 
            // mnuToolsUpdate
            // 
            resources.ApplyResources(this.mnuToolsUpdate, "mnuToolsUpdate");
            this.mnuToolsUpdate.Index = 6;
            // 
            // menuItem2
            // 
            resources.ApplyResources(this.menuItem2, "menuItem2");
            this.menuItem2.Index = 7;
            // 
            // mnuToolsOptions
            // 
            resources.ApplyResources(this.mnuToolsOptions, "mnuToolsOptions");
            this.mnuToolsOptions.Index = 8;
            // 
            // mnuObject
            // 
            resources.ApplyResources(this.mnuObject, "mnuObject");
            this.mnuObject.Index = 4;
            this.mnuObject.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuObjectOpen,
            this.mnuObjectClose,
            this.menuItem4,
            this.mnuObjectSave,
            this.mnuObjectSaveAs,
            this.menuItem10,
            this.mnuObjectPrint,
            this.menuItem20,
            this.menuItem21,
            this.menuItem22,
            this.menuItem23});
            // 
            // mnuObjectOpen
            // 
            resources.ApplyResources(this.mnuObjectOpen, "mnuObjectOpen");
            this.mnuObjectOpen.Index = 0;
            // 
            // mnuObjectClose
            // 
            resources.ApplyResources(this.mnuObjectClose, "mnuObjectClose");
            this.mnuObjectClose.Index = 1;
            // 
            // menuItem4
            // 
            resources.ApplyResources(this.menuItem4, "menuItem4");
            this.menuItem4.Index = 2;
            // 
            // mnuObjectSave
            // 
            resources.ApplyResources(this.mnuObjectSave, "mnuObjectSave");
            this.mnuObjectSave.Index = 3;
            // 
            // mnuObjectSaveAs
            // 
            resources.ApplyResources(this.mnuObjectSaveAs, "mnuObjectSaveAs");
            this.mnuObjectSaveAs.Index = 4;
            // 
            // menuItem10
            // 
            resources.ApplyResources(this.menuItem10, "menuItem10");
            this.menuItem10.Index = 5;
            // 
            // mnuObjectPrint
            // 
            resources.ApplyResources(this.mnuObjectPrint, "mnuObjectPrint");
            this.mnuObjectPrint.Index = 6;
            // 
            // menuItem20
            // 
            resources.ApplyResources(this.menuItem20, "menuItem20");
            this.menuItem20.Index = 7;
            // 
            // menuItem21
            // 
            resources.ApplyResources(this.menuItem21, "menuItem21");
            this.menuItem21.Index = 8;
            // 
            // menuItem22
            // 
            resources.ApplyResources(this.menuItem22, "menuItem22");
            this.menuItem22.Index = 9;
            // 
            // menuItem23
            // 
            resources.ApplyResources(this.menuItem23, "menuItem23");
            this.menuItem23.Index = 10;
            // 
            // mnuHelp
            // 
            resources.ApplyResources(this.mnuHelp, "mnuHelp");
            this.mnuHelp.Index = 5;
            this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.mnuHelpAbout,
            this.mnuHelpContents});
            // 
            // mnuHelpAbout
            // 
            resources.ApplyResources(this.mnuHelpAbout, "mnuHelpAbout");
            this.mnuHelpAbout.Index = 0;
            // 
            // mnuHelpContents
            // 
            resources.ApplyResources(this.mnuHelpContents, "mnuHelpContents");
            this.mnuHelpContents.Index = 1;
            // 
            // statusBar1
            // 
            this.statusBar1.AccessibleDescription = null;
            this.statusBar1.AccessibleName = null;
            resources.ApplyResources(this.statusBar1, "statusBar1");
            this.statusBar1.BackgroundImage = null;
            this.statusBar1.Font = null;
            this.statusBar1.Name = "statusBar1";
            this.statusBar1.ShowPanels = true;
            // 
            // contextMenu1
            // 
            this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem5,
            this.menuItem7,
            this.menuItem8});
            resources.ApplyResources(this.contextMenu1, "contextMenu1");
            // 
            // menuItem5
            // 
            resources.ApplyResources(this.menuItem5, "menuItem5");
            this.menuItem5.Index = 0;
            // 
            // menuItem7
            // 
            resources.ApplyResources(this.menuItem7, "menuItem7");
            this.menuItem7.Index = 1;
            // 
            // menuItem8
            // 
            resources.ApplyResources(this.menuItem8, "menuItem8");
            this.menuItem8.Index = 2;
            // 
            // imageList1
            // 
            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
            this.imageList1.Images.SetKeyName(0, "");
            this.imageList1.Images.SetKeyName(1, "");
            this.imageList1.Images.SetKeyName(2, "");
            this.imageList1.Images.SetKeyName(3, "");
            this.imageList1.Images.SetKeyName(4, "");
            this.imageList1.Images.SetKeyName(5, "");
            this.imageList1.Images.SetKeyName(6, "");
            this.imageList1.Images.SetKeyName(7, "");
            // 
            // label1
            // 
            this.label1.AccessibleDescription = null;
            this.label1.AccessibleName = null;
            resources.ApplyResources(this.label1, "label1");
            this.label1.Font = null;
            this.label1.Name = "label1";
            // 
            // frmMain
            // 
            this.AccessibleDescription = null;
            this.AccessibleName = null;
            resources.ApplyResources(this, "$this");
            this.BackgroundImage = null;
            this.Controls.Add(this.label1);
            this.Controls.Add(this.statusBar1);
            this.Font = null;
            this.Icon = null;
            this.Menu = this.mainMenu1;
            this.Name = "frmMain";
            this.Closing += new System.ComponentModel.CancelEventHandler(this.frmMain_Closing);
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion

		private void notifyIcon1_MouseDown(object sender, MouseEventArgs e)
		{
		
		}

		private void frmMain_Closing(object sender, CancelEventArgs e)
		{
            //zzoi 9 mrt 2009 removed until after beta version
			//notifyIcon1.Dispose();
		}

        private void mnuFileExit_Click(object sender, EventArgs e)
        {
            //this.Cursor = Cursors.WaitCursor;
        }

        private void mnuFileNewSearch_Click(object sender, EventArgs e)
        {

        }


    

  




	




	

	











	}
}
