Esempio n. 1
0
        private void mnuNewDirectConnection_Click(object sender, EventArgs e)
        {
            using (CreateDirectConnectionDialog createConnectionDialog = new CreateDirectConnectionDialog(this._model))
            {
                if (createConnectionDialog.ShowDialog() == DialogResult.OK)
                {
                    ConnectionData      connectionData = createConnectionDialog.ResultConnection;
                    ConnectionGroupInfo group          = connectionData.ConnectionGroup;

                    Template selectedTemplate = TemplateNodesLoader.GetTemplateByFile(
                        createConnectionDialog.SelectedTemplateFileFullPath
                        );

                    ConnectionTabControl targetTab = GetTargetTab(
                        group.Name + " {" + group.TemplateFileName + "}"
                        );

                    targetTab.SelectedTemplate = selectedTemplate;

                    targetTab.OpenConnection(group);
                }
            }
        }
Esempio n. 2
0
		private void mnuNewDirectConnection_Click(object sender, EventArgs e)
		{
			using (CreateDirectConnectionDialog createConnectionDialog = new CreateDirectConnectionDialog(this._model))
			{
				if (createConnectionDialog.ShowDialog() == DialogResult.OK)
				{
					ConnectionData      connectionData = createConnectionDialog.ResultConnection;
					ConnectionGroupInfo group          = connectionData.ConnectionGroup;

					Template selectedTemplate = TemplateNodesLoader.GetTemplateByFile(
						createConnectionDialog.SelectedTemplateFileFullPath
					);

					ConnectionTabControl targetTab = GetTargetTab(
						group.Name + " {" + group.TemplateFileName + "}"
					);

					targetTab.SelectedTemplate = selectedTemplate;

					targetTab.OpenConnection(group);
				}
			}
		}