Ejemplo n.º 1
0
		private void mnuHelpAbout_Click(object sender, System.EventArgs e)
		{
			frmAbout frm = new frmAbout(false);
			frm.ShowDialog(this);
			frm.Dispose();
		}
Ejemplo n.º 2
0
		private void frmMain_Load(object sender, System.EventArgs e)
		{
			this.appSettings.LoadSettings();
			this.ImeMode = ImeMode.On;

			frmAbout frm = new frmAbout(true);
			frm.Show();
			Application.DoEvents();
			System.Threading.Thread.Sleep(3000);
			frm.Close();
			frm.Dispose();

			this.SuspendLayout();
			
			try
			{
				LocalizeControls(this.appSettings.UILanguageFilePath);
			}
			catch(Exception)
			{
				MessageBox.Show(
					this,
					"Cannot load the localization file!",
					Application.ProductName,
					MessageBoxButtons.OK,
					MessageBoxIcon.Warning);
			}

			if(this.appSettings.IsMaximized)
			{
				this.WindowState = FormWindowState.Maximized;
			}
			else
			{
				this.Location = new Point(this.appSettings.Left,this.appSettings.Top);
				this.Size = new Size(this.appSettings.Width,this.appSettings.Height);
				this.CenterToScreen();
			}
			this.splLeft.SplitPosition = this.appSettings.SplitPosition;
			this.UpdateRecentFileList();
			
			this.ResumeLayout();

			lblVersion.Text = Application.ProductVersion;
			
			if(this.modelFilePath == string.Empty)
			{
				this.NewModel();
			}
			else
			{
				string sPath = string.Empty;
				if(this.modelFilePath.EndsWith(Path.DirectorySeparatorChar.ToString()))
				{
					sPath = this.modelFilePath + this.modelFileName;
				}
				else
				{
					sPath = this.modelFilePath + Path.DirectorySeparatorChar + this.modelFileName;
				}
				this.OpenRecentModel(sPath);
				this.appSettings.AddToRecentFileList(sPath);
				this.UpdateRecentFileList();
			}
		}