hMailServer.Administrator.formMain.SaveWindowSettings C# (CSharp) Method

SaveWindowSettings() private method

private SaveWindowSettings ( ) : void
return void
        private void SaveWindowSettings()
        {
            RegistryKey currentUserKey = Registry.CurrentUser;
            RegistryKey administratorKey = currentUserKey.CreateSubKey("Software\\hMailServer\\Administrator");

            administratorKey.SetValue("WindowState", this.WindowState);

            if (this.WindowState == FormWindowState.Normal)
            {
               administratorKey.SetValue("WindowLeft", this.Left);
               administratorKey.SetValue("WindowTop", this.Top);

               administratorKey.SetValue("WindowWidth", this.Width);
               administratorKey.SetValue("WindowHeight", this.Height);
            }

            administratorKey.SetValue("SplitterDistance", this.splitContainer.SplitterDistance);

            administratorKey.SetValue("Language", _language);
        }