public SolutionPackagerControl(Type pluginType)
        {
            this.pluginType = pluginType;
            InitializeComponent();

            pluginViewModel        = new PluginViewModel();
            asyncWorkQueue         = new AsyncWorkQueue(this, pluginViewModel);
            coreToolsDownloader    = new CoreToolsDownloader(asyncWorkQueue, pluginViewModel);
            solutionPackagerCaller = new SolutionPackagerCaller(this, asyncWorkQueue, txtOutput);
            crmSolutionManager     = new CrmSolutionManager(this, asyncWorkQueue, solutionPackagerCaller, cmbCrmSolutions);

            localOrCrm.DataBindings.Add(nameof(localOrCrm.Enabled), pluginViewModel, nameof(pluginViewModel.HasConnection));
            grpExportSolution.DataBindings.Add(nameof(grpExportSolution.Visible), pluginViewModel, nameof(pluginViewModel.LocalOrCrm));

            btnRefreshSolutions.DataBindings.Add(nameof(btnRefreshSolutions.Enabled), pluginViewModel, nameof(pluginViewModel.LocalOrCrm));
            tabsExtractOrPack.DataBindings.Add(nameof(tabsExtractOrPack.Enabled), pluginViewModel, nameof(pluginViewModel.AllowRequests));

            txtCoreTools.DataBindings.Add(nameof(txtCoreTools.Text), pluginViewModel, nameof(pluginViewModel.SolutionPackagerVersion));

            pluginViewModel.PropertyChanged += PluginViewModel_PropertyChanged;

            cmbLanguage.Items.AddRange(new object[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("it") });
            cmbLanguage.SelectedIndex            = 0;
            cmbPackageTypeExtract.SelectedIndex  = 0;
            cmbSourceLocaleExtract.SelectedIndex = 0;
            cmbErrorLevelExtract.SelectedIndex   = 0;
            cmbPackageTypePack.SelectedIndex     = 0;
            cmbErrorLevelPack.SelectedIndex      = 0;
        }
예제 #2
0
 public Job(AsyncWorkQueue queue, WorkAsyncInfo work)
 {
     this.queue                 = queue ?? throw new ArgumentNullException(nameof(queue));
     this.Work                  = work ?? throw new ArgumentNullException(nameof(work));
     this.postWorkCallBack      = work.PostWorkCallBack;
     this.Work.PostWorkCallBack = PostWorkCallBack;
 }
 public CrmSolutionManager(SolutionPackagerControl solutionPackagerControl, AsyncWorkQueue asyncWorkQueue, SolutionPackagerCaller solutionPackagerCaller, ComboBox cmbCrmSolutions)
 {
     this.solutionPackagerControl = solutionPackagerControl ?? throw new ArgumentNullException(nameof(solutionPackagerControl));
     this.asyncWorkQueue          = asyncWorkQueue ?? throw new ArgumentNullException(nameof(asyncWorkQueue));
     this.solutionPackagerCaller  = solutionPackagerCaller ?? throw new ArgumentNullException(nameof(solutionPackagerCaller));
     this.cmbCrmSolutions         = cmbCrmSolutions ?? throw new ArgumentNullException(nameof(cmbCrmSolutions));
 }
예제 #4
0
        public SolutionPackagerControl()
        {
            InitializeComponent();

            pluginViewModel        = new PluginViewModel();
            asyncWorkQueue         = new AsyncWorkQueue(this, pluginViewModel);
            coreToolsDownloader    = new CoreToolsDownloader(asyncWorkQueue, txtCoreTools);
            solutionPackagerCaller = new SolutionPackagerCaller(asyncWorkQueue, txtOutput);
            crmSolutionManager     = new CrmSolutionManager(this, asyncWorkQueue, solutionPackagerCaller, cmbCrmSolutions);

            localOrCrm.DataBindings.Add(nameof(localOrCrm.Enabled), pluginViewModel, nameof(pluginViewModel.HasConnection));
            grpExportSolution.DataBindings.Add(nameof(grpExportSolution.Visible), pluginViewModel, nameof(pluginViewModel.LocalOrCrm));

            btnRefreshSolutions.DataBindings.Add(nameof(btnRefreshSolutions.Enabled), pluginViewModel, nameof(pluginViewModel.LocalOrCrm));
            tabsExtractOrPack.DataBindings.Add(nameof(tabsExtractOrPack.Enabled), pluginViewModel, nameof(pluginViewModel.AllowRequests));
        }
 public SolutionPackagerCaller(AsyncWorkQueue asyncWorkQueue, RichTextBox txtOutput)
 {
     this.asyncWorkQueue = asyncWorkQueue ?? throw new ArgumentNullException(nameof(asyncWorkQueue));
     this.txtOutput      = txtOutput ?? throw new ArgumentNullException(nameof(txtOutput));
 }
예제 #6
0
 public CoreToolsDownloader(AsyncWorkQueue workQueue, RichTextBox txtCoreTools)
 {
     this.workQueue    = workQueue ?? throw new ArgumentNullException(nameof(workQueue));
     this.txtCoreTools = txtCoreTools ?? throw new ArgumentNullException(nameof(txtCoreTools));
 }
 public CoreToolsDownloader(AsyncWorkQueue workQueue, PluginViewModel pluginViewModel)
 {
     this.workQueue = workQueue ?? throw new ArgumentNullException(nameof(workQueue));
     this.pluginViewModel = pluginViewModel ?? throw new ArgumentNullException(nameof(pluginViewModel));
 }