Beispiel #1
0
        private void OnClear(object sender, RoutedEventArgs e)
        {
            CombinedTransformationTreeEditorItem page = (CombinedTransformationTreeEditorItem)getCombineTransformationTreeEditor().getActivePage();

            if (page == null)
            {
                return;
            }
            List <int>      listTreeToClear = page.EditedObject.getTransformationTreesOids();
            TableActionData tableActionData = new TableActionData();

            tableActionData.oids.AddRange(listTreeToClear);

            GetCombineTransformationTreeService().TransformationTreeService.ClearTreeHandler += updateClearProgress;
            GetCombineTransformationTreeService().TransformationTreeService.ClearTree(tableActionData);
            Mask(true, RunMessageUtil.getMaskStartText(true));
        }
Beispiel #2
0
        private void updateRunProgress(TransformationTreeRunInfo info)
        {
            if (info == null || info.runEnded == true)
            {
                GetCombineTransformationTreeService().TransformationTreeService.RunHandler        -= updateRunProgress;
                GetCombineTransformationTreeService().TransformationTreeService.PowerpointHandler -= loadPowerpoint;
                Mask(false, RunMessageUtil.getMaskEndedText());

                Service.FileService.SaveCurrentFile();
                ApplicationManager.MainWindow.treeDetails.Visibility             = Visibility.Hidden;
                ApplicationManager.MainWindow.ProgressBarTreeContent.Maximum     = 0;
                ApplicationManager.MainWindow.ProgressBarTreeContent.Value       = 0;
                ApplicationManager.MainWindow.statusTextBlockTreeContent.Content = "";
            }
            else
            {
                int rate = info.totalCount != 0 ? (Int32)(info.runedCount * 100 / info.totalCount) : 0;
                if (rate > 100)
                {
                    rate = 100;
                }

                ApplicationManager.MainWindow.ProgressBarTree.Maximum     = info.totalCount;
                ApplicationManager.MainWindow.ProgressBarTree.Value       = info.runedCount;
                ApplicationManager.MainWindow.statusTextBlockTree.Content = "" + rate + " % " + " (" + info.runedCount + " / " + info.totalCount + ")";

                if (info.currentTreeRunInfo != null)
                {
                    rate = info.currentTreeRunInfo.runedCount != 0 ? (Int32)(info.currentTreeRunInfo.runedCount * 100 / info.currentTreeRunInfo.totalCount) : 0;
                    if (rate > 100)
                    {
                        rate = 100;
                    }

                    if (info.currentTreeRunInfo.runedCount != 0)
                    {
                        ApplicationManager.MainWindow.treeDetails.Visibility             = Visibility.Visible;
                        ApplicationManager.MainWindow.ProgressBarTreeContent.Maximum     = info.currentTreeRunInfo.totalCount;
                        ApplicationManager.MainWindow.ProgressBarTreeContent.Value       = info.currentTreeRunInfo.runedCount;
                        ApplicationManager.MainWindow.statusTextBlockTreeContent.Content = "" + info.currentTreeRunInfo.item + " :  " + rate + " %" + " (" + info.currentTreeRunInfo.runedCount + " / " + info.currentTreeRunInfo.totalCount + ")";
                    }
                }
            }
        }
Beispiel #3
0
        private void OnRun(object sender, System.Windows.RoutedEventArgs e)
        {
            if (this.GetBrowser().Form.Grid.SelectedItems.Count == 0)
            {
                return;
            }

            List <int> listTreeToRun = new List <int>(0);

            foreach (object obj in this.GetBrowser().Form.Grid.SelectedItems)
            {
                int oid = ((BrowserData)obj).oid;
                listTreeToRun.AddRange(GetCombineTransformationTreeService().getByOid(oid).getTransformationTreesOids());
            }

            GetCombineTransformationTreeService().TransformationTreeService.RunHandler += updateRunProgress;
            GetCombineTransformationTreeService().TransformationTreeService.Run(listTreeToRun, true);
            Mask(true, RunMessageUtil.getMaskStartText());
        }
Beispiel #4
0
        private void OnRun(object sender, RoutedEventArgs e)
        {
            CombinedTransformationTreeEditorItem page = (CombinedTransformationTreeEditorItem)getCombineTransformationTreeEditor().getActivePage();

            if (page == null)
            {
                return;
            }
            if (!this.IsModify)
            {
                if (Save(getCombineTransformationTreeEditor().getActivePage()) == OperationState.STOP)
                {
                    return;
                }
            }
            List <int> listTreeToRun = page.EditedObject.getTransformationTreesOids();

            GetCombineTransformationTreeService().TransformationTreeService.RunHandler        += updateRunProgress;
            GetCombineTransformationTreeService().TransformationTreeService.PowerpointHandler += loadPowerpoint;
            GetCombineTransformationTreeService().TransformationTreeService.Run(listTreeToRun, true);
            Mask(true, RunMessageUtil.getMaskStartText(), true);
        }