Exemple #1
0
            public void Run()
            {
                if (NumberOfImagesToExport <= 5)
                {
                    BlockingOperation.Run(delegate { Export(null); });
                    Complete();
                }
                else
                {
                    ItemsToExport.ForEach(delegate(IClipboardItem item) { item.Lock(); });

                    BackgroundTask task = new BackgroundTask(Export, true)
                    {
                        ThreadUICulture = Application.CurrentUICulture
                    };

                    ProgressDialogComponent progressComponent = new ProgressDialogComponent(task, true, ProgressBarStyle.Blocks);

                    _progressComponentShelf = LaunchAsShelf(DesktopWindow, progressComponent,
                                                            SR.TitleExportingImages, "ExportingImages",
                                                            ShelfDisplayHint.DockFloat);

                    _progressComponentShelf.Closed += delegate
                    {
                        Complete();
                        task.Dispose();
                    };
                }
            }
Exemple #2
0
            private void Complete()
            {
                if (IsAsynchronous)
                {
                    ItemsToExport.ForEach(delegate(IClipboardItem item) { item.Unlock(); });
                }

                _progressComponentShelf = null;

                //notify the owner that we're done.
                _exportComponent.OnMultipleImageExportComplete(_error);
                _error = null;

                _taskContext = null;
            }
Exemple #3
0
 public String ExportTo(dtoEvaluationsFilters filters, SummaryType summaryType, ItemsToExport itemsToExport, ExportData xdata, lm.Comol.Core.DomainModel.Helpers.Export.ExportFileType fileType, Dictionary <lm.Comol.Modules.CallForPapers.Domain.Evaluation.EvaluationTranslations, String> translations, Dictionary <lm.Comol.Modules.CallForPapers.Domain.Evaluation.EvaluationStatus, String> status)
 {
     return(Service.ExportSummaryStatistics(ServiceCall.GetDtoCall(View.IdCall), filters, View.AnonymousDisplayname, View.UnknownDisplayname, summaryType, itemsToExport, xdata, fileType, translations, status, View.CurrentIdCommittee));
 }
Exemple #4
0
 public String GetFileName(String filename, SummaryType summaryType, ItemsToExport items, ExportData xdata)
 {
     return(Service.GetStatisticFileName(View.IdCall, ServiceCall.GetCallName(View.IdCall), Service.GetCommitteeDisplayOrder(View.CurrentIdCommittee), Service.GetCommitteeName(View.CurrentIdCommittee), filename, summaryType, items, xdata));
 }
        public String ExportTo(
            dtoEvaluationsFilters filters,
            SummaryType summaryType,
            ItemsToExport itemsToExport,
            ExportData xdata,
            lm.Comol.Core.DomainModel.Helpers.Export.ExportFileType fileType,
            Dictionary <lm.Comol.Modules.CallForPapers.Domain.Evaluation.EvaluationTranslations, String> translations,
            Dictionary <lm.Comol.Modules.CallForPapers.Domain.Evaluation.EvaluationStatus, String> status)
        {
            dtoCall call = ServiceCall.GetDtoCall(View.IdCall);

            //NOTA: CALL.EVALUATIONTYPE NON SERVE A NULLA!!!

            //List<dtoEvaluationSummaryItem> items = ServiceCall.GetEvaluationsList(
            //    call.Id,
            //      View.IdCallAdvCommission,
            //      call.EvaluationType,
            //      filters,
            //      View.AnonymousDisplayname,
            //      View.UnknownDisplayname);


            List <dtoEvaluationSummaryItem> items =
                call.AdvacedEvaluation ?
                ServiceCall.GetEvaluationsList(call.Id, View.IdCallAdvCommission, call.EvaluationType, filters, View.AnonymousDisplayname, View.UnknownDisplayname) :
                Service.GetEvaluationsList(call.Id, call.EvaluationType, filters, View.AnonymousDisplayname, View.UnknownDisplayname, true);

            //"#"; "Domanda di"; "Tipo domanda"; "Punti"; "N. valutazioni"; "Completate"; "In valutazione"; "Non iniziate"


            //TODO: RECUPERARE IL VALORE CORRETTO!!!
            EvaluationType CurrentEvalType = View.CurrentEvaluationType;// EvaluationType.Average;


            string output = call.Name + "\r\n\r\n";


            //Header
            output += "#;";
            output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleSubmissionOwner] + ";";
            output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleSubmitterType] + ";";

            if (CurrentEvalType == EvaluationType.Average)
            {
                output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleAverage] + ";";
            }
            else
            {
                output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleSum] + ";";
            }

            output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleEvaluationsCount] + ";";

            output += "Confermate;";
            output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleEvaluationsEvaluated] + ";";
            output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleEvaluationsEvaluating] + ";";
            output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleEvaluationsNotStarted] + ";";
            //output += translations[Domain.Evaluation.EvaluationTranslations.CellTitleEvaluationsNotStarted] + ";";

            output += "\r\n";

            foreach (dtoEvaluationSummaryItem itm in items.OrderBy(it => it.Position))
            {
                //"#";
                output += itm.Position + ";";

                //"Domanda di";
                output += itm.DisplayName + ";";

                //"Tipo domanda";
                output += itm.SubmitterType + ";";

                //"Punti";
                output += ((CurrentEvalType == EvaluationType.Average) ? itm.AverageRating : itm.SumRating) + ";";

                //"N. valutazioni";
                output += itm.Evaluations.Count() + ";";

                //"Confermate"
                output += itm.GetEvaluationsCount(EvaluationStatus.Confirmed) + ";";

                //"Completate";
                output += itm.GetEvaluationsCount(EvaluationStatus.Evaluated) + ";";

                //"In valutazione";
                output += itm.GetEvaluationsCount(EvaluationStatus.Evaluating) + ";";

                //"Non iniziate"
                output += itm.GetEvaluationsCount(EvaluationStatus.None) + ";";

                output += "\r\n";
            }

            return(output);

            //return Service.ExportSummaryStatistics(ServiceCall.GetDtoCall(View.IdCall), filters, View.AnonymousDisplayname, View.UnknownDisplayname, summaryType, itemsToExport, xdata, fileType, translations, status);
        }
 public String GetFileName(String filename, ItemsToExport items, ExportData xdata)
 {
     return(Service.GetStatisticFileName(View.IdCall, ServiceCall.GetCallName(View.IdCall), filename, SummaryType.Evaluations, items, xdata));
 }