private void setConnetionParamToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConnectionSettingsDialog connectionDialog = new ConnectionSettingsDialog();

            connectionDialog.ShowDialog();
            CurrentUserData.ServerIpAddress = connectionDialog.ServerIPAddress;
            CurrentUserData.ServerPort      = connectionDialog.ServerPort;
        }
        private void ProjectSettingsMenuItemCallback(object sender, EventArgs e)
        {
            var project = GetSelectedProject() as EnvDTE.Project;
            var storage = GetConnectionSettingsStorage(project);

            if (storage == null)
            {
                return;
            }

            var dialog = new ConnectionSettingsDialog {
                ConnectionSettings = storage.Load(),
                StartPosition      = FormStartPosition.CenterParent,
            };

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                storage.Save(dialog.ConnectionSettings);
                RefreshTasksAsync();
            }
        }
示例#3
0
        /// <summary>
        /// show the connection's settings dialog
        /// and apply the settings provided by the user
        /// </summary>
        private void btnSetupConnection_Click(object sender, EventArgs e)
        {
            if (pool != null)
            {
                return;
            }
            var sets = TradersSettings.ReadSettings();
            var dlg  = new ConnectionSettingsDialog
            {
                MatchingURI = sets.Uri,
                StatusURI   = sets.StatUri
            };

            dlg.ShowDialog();
            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }
            sets.Uri     = dlg.MatchingURI;
            sets.StatUri = dlg.StatusURI;
            sets.SaveSettings();
        }