﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BeiDanCi {
    public partial class MainForm : Form {
        public MyWords myWords;
        private FormWindowState fwsPrevious;
        private FloatForm floatWindow;
        public MainForm() {
            InitializeComponent();
        }
        private void MainForm_Load(object sender, EventArgs e) {
            fwsPrevious = this.WindowState;
            floatWindow = new FloatForm(this);
            floatWindow.Show();
            myWords = new MyWords();
            myWords.LoadXml("2015112620160315.xml");
        }
        private void MainForm_SizeChanged(object sender, EventArgs e) {
            if (this.WindowState == FormWindowState.Minimized) {
                this.ShowInTaskbar = false;
            } else if (this.WindowState != fwsPrevious) {
                fwsPrevious = WindowState;
            }
        }
        public void RestoreWindow() {
            this.WindowState = fwsPrevious;
            this.ShowInTaskbar = true;
        }
    }
}
