Exemple #1
0
 public void RemoveStar()
 {
     if (printInfo.GetType() == typeof(StarPrinter))
     {
         printInfo = printInfo.GetInnerInstance();
     }
 }
        void IPrintInfo.UpdateElementVisibility(double horizontalOffset, double viewportWidth, object state)
        {
            IPrintInfo subPrintInfo = this.AsVisual() as IPrintInfo;

            if (subPrintInfo != null)
            {
                subPrintInfo.UpdateElementVisibility(horizontalOffset, viewportWidth, state);
            }
        }
        object IPrintInfo.CreateElementVisibilityState()
        {
            IPrintInfo subPrintInfo = this.AsVisual() as IPrintInfo;

            if (subPrintInfo == null)
            {
                return(null);
            }

            return(subPrintInfo.CreateElementVisibilityState());
        }
        double IPrintInfo.GetPageRightOffset(double horizontalOffset, double viewportWidth)
        {
            IPrintInfo subPrintInfo = this.Content as IPrintInfo;

            if (subPrintInfo != null)
            {
                return(subPrintInfo.GetPageRightOffset(horizontalOffset, viewportWidth));
            }

            return(horizontalOffset + viewportWidth);
        }
Exemple #5
0
 public void AddQ()
 {
     printInfo = new QPrinter(printInfo);
 }
Exemple #6
0
 public void AddStar()
 {
     printInfo = new StarPrinter(printInfo);
 }
Exemple #7
0
 public NewsPaperContext()
 {
     journals    = new List <BaseJournal>();
     subscribers = new List <Subscriber.Subscriber>();
     printInfo   = new NormalPrinter();
 }
Exemple #8
0
 public PrintJob(IPrintInfo printInfo)
 {
     _printInfo = printInfo;
 }
 public PrinterDecorator(IPrintInfo printInfo)
 {
     this.printInfo = printInfo;
 }
Exemple #10
0
 public QPrinter(IPrintInfo printInfo) : base(printInfo)
 {
 }
Exemple #11
0
 public StarPrinter(IPrintInfo printInfo) : base(printInfo)
 {
 }