using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using iTripLog.Edit;
using iTripLog.Map;
using iTripLog.Download;
using iTripLog.Upload;
using iTripLog.WeatherF;
using iTripLog.Date;
using iTripLog.Friends;
using iTripLog.Set;
using iTripLog.Search;
using FlickrNet;

namespace iTripLog
{
    public partial class MainForm :XTransMobile.XTForm
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }


        private void xtImageButton7_Click(object sender, EventArgs e)
        {
            this.EditorForm = new Editor();
            this.EditorForm.Visible = true;
        }

        private void xtImageButton1_Click(object sender, EventArgs e)
        {
            this.DateForm = new DateForm();
            this.DateForm.Visible = true;
        }

        private void xtImageButton2_Click(object sender, EventArgs e)
        {
            iTripLog.WeatherF.startWeather.Start();
        }

        private void xtImageButton3_Click(object sender, EventArgs e)
        {
            this.SearchForm = new SearchForm();
            this.SearchForm.Show();
        }

        private void xtImageButton4_Click(object sender, EventArgs e)
        {
            this.SnapForm = new SnapForm();
            this.SnapForm.Visible = true;
        }

        private void xtImageButton5_Click(object sender, EventArgs e)
        {
            this.MapForm = new iTripLog.Map.MapBGFrom();
            this.MapForm.Visible = true;
        }

        private void xtImageButton6_Click(object sender, EventArgs e)
        {
            this.FriendsForm = new FriendForm();
            this.FriendsForm.Show();
        }

        private void xtImageButton8_Click(object sender, EventArgs e)
        {
            this.flickr = new Flickr("23589c82ce57562f2dbe6f9810b81a99", "529608c61cd85236", "72157622141823959-460ef5327a4ad8d5"); 
            this.DownloadForm = new iTripLog.Download.DownloadForm(this.flickr);
            this.DownloadForm.Show();
        }

        private void xtImageButton9_Click(object sender, EventArgs e)
        {
            this.SetForm = new SetForm();
            this.SetForm.Show();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
           // string s = System.IO.Directory.
             //s += "\\Images\\a_" + (x + 1) + ".gif";
           // Bitmap temp = new Bitmap(s);
           // this.BackgroundImage = ((System.Drawing.Image)(temp));
         //   this.Show();

            x++;
            if (30 == x)
            {
                
                this.MapForm = new iTripLog.Map.MapBGFrom();
                this.MapForm.Show();
              //  this.Visible = false;

            }
        }
    }
}