Ejemplo n.º 1
0
        private void FmMain_Load(object sender, EventArgs e)
        {
            // Load position.
            var mfwt = Settings.Default.MainFormWindowTop;
            var mfwl = Settings.Default.MainFormWindowLeft;
            var mfww = Settings.Default.MainFormWindowWidth;
            var mfwh = Settings.Default.MainFormWindowHeight;

            if (mfwt != -99 && mfwl != -99)
            {
                this.Location = new Point(mfwl, mfwt);
            }

            if (mfww > 0 && mfwh > 0)
            {
                this.Size = new Size(mfww, mfwh);
            }

            this.WindowState = (FormWindowState)Settings.Default.MainFormWindowState;

            // Load config.
            this.ReloadConfig();

            // Set tree view as active control.
            this.tvConnections.Focus();

            // Do we need to popup config?
            if (string.IsNullOrWhiteSpace(Settings.Default.MSSMSExec))
            {
                using (var dlg = new fmSettings()) {
                    dlg.ShowDialog(this);
                }
            }
        }
Ejemplo n.º 2
0
 private void BtSettings_Click(object sender, EventArgs e)
 {
     using (var dlg = new fmSettings()) {
         dlg.ShowDialog(this);
     }
 }