Exemple #1
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            SetteingFile file = SetteingFile.Instance;

            if (WindowState == FormWindowState.Normal)
            {
                file.save("Location", "Height", this.Height.ToString());
                file.save("Location", "Width", this.Width.ToString());
            }
        }
Exemple #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            SetteingFile file = SetteingFile.Instance;

            String h_str = file.load("Location", "Height");
            String w_str = file.load("Location", "Width");

            try
            {
                this.Height = int.Parse(h_str);
                this.Width  = int.Parse(w_str);
            }
            catch
            {
                this.Height = 600;
                this.Width  = 800;
            }
        }