public EditProfileForm(ProcessModel processModel, Profile profile) { _processModel = processModel; _profile = profile; InitializeComponent(); _updatedProfile = new Profile{FileNames = new List<string>()}; NameTextBox.Text = _profile.Name; SourceTextBox.Text = _profile.SourcePath; DestinationTextBox.Text = _profile.DestinationPath; if (_profile.FileNames.Count == 0) { FileListLabel.Text = "No files in this profile"; } else { FileListLabel.Text = string.Empty; foreach (string fileName in _profile.FileNames) { FileListLabel.Text += string.Format("{0}\n", fileName); _updatedProfile.FileNames.Add(fileName); } } _pendingChanges = false; }
public AssemblyUpdaterForm(ProcessModel processModel) { _processModel = processModel; InitializeComponent(); ProfilesDropDownList.Items.AddRange(_processModel.GetProfilesAsComboBoxItems()); SetDropDownToFirstItemInList(); }
private static void Main() { var profileRepository = new ProfileXmlRepository(); var processModel = new ProcessModel(profileRepository); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new AssemblyUpdaterForm(processModel)); }