Exemplo n.º 1
0
        private void btnDeleteUpdate_Click(object sender, EventArgs e)
        {
            updateService.DeleteUpdateById(currentUpdate.Id);
            currentUpdate = new Update();

            populateUpdateSeries(currentSeries);
            populateUpdate(currentUpdate);
            updateUpdates();
        }
Exemplo n.º 2
0
        private void lstUpdate_SelectedIndexChanged(object sender, EventArgs e)
        {
            var update = lstUpdates.SelectedItem as Update;

            if (update != null)
            {
                currentUpdate = updateService.GetUpdateById(update.Id);

                populateUpdate(currentUpdate);
            }
        }
Exemplo n.º 3
0
        public frmSaving(Update cu, List <UploadFileUiModel> fs)
        {
            this.currentUpdate = cu;
            Files = fs;

            thread.WorkerReportsProgress      = true;
            thread.WorkerSupportsCancellation = true;
            thread.DoWork          += new DoWorkEventHandler(thread_DoWork);
            thread.ProgressChanged += new ProgressChangedEventHandler(thread_ProgressChanged);

            InitializeComponent();
        }
Exemplo n.º 4
0
        private void lstUpdateSeries_SelectedIndexChanged(object sender, EventArgs e)
        {
            var selected = lstUpdateSeries.SelectedItem as UpdateSeries;

            if (lstUpdateSeries.SelectedItem != null && loadUpdates)
            {
                currentSeries = updateService.GetUpdateSeriesById(selected.Id);
                currentUpdate = new Update();

                populateUpdateSeries(currentSeries);
                populateUpdate(currentUpdate);
                updateUpdates();
            }
        }
Exemplo n.º 5
0
        private void frmManageUpdates_Load(object sender, EventArgs e)
        {
            this.updateUpdateSeries();
            this.updateUpdates();
            this.updateVersions();

            currentSeries = new UpdateSeries();
            currentUpdate = new Update();

            populateUpdateSeries(currentSeries);
            populateUpdate(currentUpdate);

            this.lstUpdateSeries.SelectedIndex = -1;
            this.lstUpdates.SelectedIndex      = -1;

            this.loadUpdates = true;
        }
Exemplo n.º 6
0
        private void btnUpdateSave_Click(object sender, EventArgs e)
        {
            currentUpdate.Name           = txtUpdateName.Text;
            currentUpdate.Description    = txtUpdateDescription.Text;
            currentUpdate.UpdateType     = getUpdateType();
            currentUpdate.Message        = txtInfoMessage.Text;
            currentUpdate.UpdateSeriesId = (this.lstUpdateSeries.SelectedItem as UpdateSeries).Id;

            currentUpdate = updateService.SaveUpdate(currentUpdate);

            if (currentUpdate.UpdateType.Equals(UpdateType.Hotfix) || currentUpdate.UpdateType.Equals(UpdateType.Update))
            {
                var save = new frmSaving(currentUpdate, currentFiles);
                save.ShowDialog();
            }

            this.updateUpdates();
            this.populateUpdate(currentUpdate);
        }
Exemplo n.º 7
0
        private void populateUpdate(Update u)
        {
            currentFiles = new List <UploadFileUiModel>();
            this.lblUpdateDateCreated.Text  = u.DateCreated.ToShortDateString();
            this.lblUpdateDateModified.Text = u.DateModified.ToShortDateString();
            this.txtUpdateName.Text         = u.Name;
            this.txtUpdateDescription.Text  = u.Description;
            this.txtInfoMessage.Text        = u.Message;

            if (u.UpdateType.Equals(UpdateType.Hotfix))
            {
                currentFiles.AddRange(updateService.GetFilesForUpdate(u.Id).Select(x => new UploadFileUiModel {
                    Id = x.Id, FileName = x.FileName, FilePath = "Uploaded", InstallPath = x.InstallPath
                }));

                updateFileGrid(new BindingSource {
                    DataSource = currentFiles
                });
            }
        }
Exemplo n.º 8
0
 private void btnNewUpdate_Click(object sender, EventArgs e)
 {
     this.currentUpdate = new Update();
     this.populateUpdate(currentUpdate);
 }