Example #1
0
 public AttachDialog(TfsSettings settings, TeamFoundationServer tfs)
 {
     InitializeComponent();
     this.settings = settings;
     if (tfs != null)
     {
         this.TFS = tfs;
     }
     else
     {
         if (!String.IsNullOrEmpty(settings.TeamServer))
         {
             TFS = new TeamFoundationServer(
                 settings.TeamServer);
             TFS.EnsureAuthenticated();
         }
     }
     if (!String.IsNullOrEmpty(settings.TeamProject))
     {
         TeamProject = settings.TeamProject;
         if (!String.IsNullOrEmpty(settings.WorkItemType))
         {
             cmbWorkItemType.Enabled      = true;
             cmbWorkItemType.SelectedItem = settings.WorkItemType;
         }
     }
     txtImageName.Text           = settings.DefaultImageName;
     txtAttachmentComment.Text   = settings.DefaultAttachmentComment;
     txtImageEditor.Text         = settings.ImageEditor;
     cbOpenImageInEditor.Checked = settings.OpenImageInEditor;
 }
Example #2
0
        public OptionsForm(TfsSettings settings)
        {
            InitializeComponent();

            this.settings = settings;
            if (!String.IsNullOrEmpty(settings.TeamServer))
            {
                TFS = new TeamFoundationServer(settings.TeamServer);
                TFS.EnsureAuthenticated();
                if (!String.IsNullOrEmpty(settings.TeamProject))
                {
                    TeamProject = settings.TeamProject;
                    if (!String.IsNullOrEmpty(settings.WorkItemType))
                    {
                        cmbWorkItemType.Enabled      = true;
                        cmbWorkItemType.SelectedItem = settings.WorkItemType;
                    }
                }
            }
            txtDefaultImageName.Text         = settings.DefaultImageName;
            cmbImageFormat.SelectedItem      = settings.DefaultImageFormat;
            txtDefaultAttachmentComment.Text = settings.DefaultAttachmentComment;
            txtImageEditor.Text         = settings.ImageEditor;
            cbOpenImageInEditor.Checked = settings.OpenImageInEditor;
            SelectedImageFormatChanged(null, null);
            HandleQualitySliderValueChanged(null, null);
        }