Пример #1
0
 public BulkUpdaterVM(UpdaterModel model)
 {
     this.model       = model;
     bulkUpdateFields = new List <string> {
         string.Empty, "MAP", "UOM", "Unpublish", "Weight"
     };
 }
Пример #2
0
 private void UpdateDataSource(UpdaterModel model)
 {
     updaterModelBindingSource.SuspendBinding();
     updaterModelBindingSource.DataSource = model;
     PopulateOldFiles();
     PopulateNewFiles();
     updaterModelBindingSource.ResumeBinding();
     updaterModelBindingSource.ResetBindings(true);
 }
Пример #3
0
        private void LocaliseControls()
        {
            _logger.LogDebug("{0}: Localising controls", nameof(MainForm));
#pragma warning disable S1854 // Dead stores should be removed
            var dummy = new UpdaterModel();
#pragma warning restore S1854 // Dead stores should be removed

            this.Text              = "Livestock Tracker";
            labelInstallPath.Text  = nameof(dummy.InstallPath).SplitCamelCase();
            labelNewVersion.Text   = nameof(dummy.NewVersionString).SplitCamelCase().Replace("String", "");
            labelOldVersion.Text   = nameof(dummy.OldVersion).SplitCamelCase();
            labelOldFiles.Text     = nameof(dummy.OldFiles).SplitCamelCase();
            labelNewFiles.Text     = nameof(dummy.NewFiles).SplitCamelCase();
            labelStatus.Text       = "Ready";
            buttonInstallPath.Text = "&Browse";
            buttonCancel.Text      = _downloading || _updating ? "&Cancel" : "&Close";
            buttonOk.Text          = "&Update";
            buttonDownload.Text    = "&Download";
        }
Пример #4
0
 public BulkUpdater(UpdaterModel model)
 {
     InitializeComponent();
     DataContext = new VM.BulkUpdaterVM(model);
 }
Пример #5
0
 public UpdaterVM(UpdaterModel model)
 {
     this.model   = model;
     SearchOption = "SKU";
 }