コード例 #1
0
ファイル: SplitTests.cs プロジェクト: yiqideren/ilovepdf-net
 public SplitTests()
 {
     TaskParams = new SplitParams(new SplitModeRemovePages("1"))
     {
         OutputFileName = @"result.pdf"
     };
 }
コード例 #2
0
 public DecisionTreeNode()
 {
     this.splitDetails      = null;
     this.classLabel        = null;
     this.firstChildDetails = null;
     this.secondChild       = null;
 }
コード例 #3
0
        public ExecuteTaskResponse Process(SplitParams parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentException("Parameters should not be null", nameof(parameters));
            }

            return(base.Process(parameters));
        }
コード例 #4
0
        protected void SplitParams_RowInserting(PXCache sender, PXRowInsertingEventArgs e)
        {
            FixedAsset sourceAsset = (FixedAsset)PXSelectorAttribute.Select <SplitFilter.assetID>(Filter.Cache, Filter.Current);

            if (sourceAsset != null)
            {
                SplitParams pars = (SplitParams)e.Row;
                PXCache <FixedAsset> .RestoreCopy(pars, sourceAsset);
            }
        }
コード例 #5
0
        public void SplitParams_SplittedQty_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
        {
            SplitParams parms  = (SplitParams)e.Row;
            SplitFilter filter = Filter.Current;

            if (parms == null || filter == null)
            {
                return;
            }

            object rounded = parms.SplittedQty * filter.Cost / filter.Qty;

            sender.RaiseFieldUpdating <SplitParams.cost>(parms, ref rounded);
            parms.Cost = (decimal?)rounded;
            rounded    = parms.SplittedQty * 100 / filter.Qty;
            sender.RaiseFieldUpdating <SplitParams.ratio>(parms, ref rounded);
            parms.Ratio = (decimal?)rounded;
        }
コード例 #6
0
        public void SplitParams_Ratio_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
        {
            SplitParams parms  = (SplitParams)e.Row;
            SplitFilter filter = Filter.Current;

            if (parms == null || filter == null)
            {
                return;
            }

            object rounded;

            if (parms.SplittedQty == null || parms.SplittedQty == 0m)
            {
                rounded = parms.Ratio * filter.Qty / 100;
                sender.RaiseFieldUpdating <SplitParams.splittedQty>(parms, ref rounded);
                parms.SplittedQty = (decimal?)rounded;
            }
            rounded = parms.Ratio * filter.Cost / 100;
            sender.RaiseFieldUpdating <SplitParams.cost>(parms, ref rounded);
            parms.Cost = (decimal?)rounded;
        }
コード例 #7
0
        public void SplitParams_Cost_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
        {
            SplitParams parms  = (SplitParams)e.Row;
            SplitFilter filter = Filter.Current;

            if (parms == null || filter == null)
            {
                return;
            }

            object rounded;

            if (parms.Qty == null || parms.Qty == 0m)
            {
                rounded = parms.Cost * filter.Qty / filter.Cost;
                sender.RaiseFieldUpdating <SplitParams.qty>(parms, ref rounded);
                parms.Qty = (decimal?)rounded;
            }
            rounded = parms.Cost * 100 / filter.Cost;
            sender.RaiseFieldUpdating <SplitParams.ratio>(parms, ref rounded);
            parms.Ratio = (decimal?)rounded;
        }