コード例 #1
0
        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;
        }
コード例 #2
0
        public AssemblyUpdaterForm(ProcessModel processModel)
        {
            _processModel = processModel;

            InitializeComponent();

            ProfilesDropDownList.Items.AddRange(_processModel.GetProfilesAsComboBoxItems());
            SetDropDownToFirstItemInList();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: Zathos/UpdateAssemblies
        private static void Main()
        {
            var profileRepository = new ProfileXmlRepository();
            var processModel = new ProcessModel(profileRepository);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Application.Run(new AssemblyUpdaterForm(processModel));
        }