示例#1
0
        public InitialDataTypingView(IFinancialManager finMgr, IViewHost viewHost)
        {
            InitializeComponent();

            _finMgr   = finMgr;
            _viewHost = viewHost;
        }
        public InitialDataTypingView(IFinancialManager finMgr, IViewHost viewHost)
        {
            InitializeComponent();

            _finMgr = finMgr;
            _viewHost = viewHost;
        }
 public BitmapRenderer(IViewHost <Bitmap> viewHost,
                       GdiMeasureContext measureContext,
                       GdiRenderContext renderContext)
     : this(viewHost, measureContext, renderContext,
            Color.White)
 {
 }
示例#4
0
        // ReSharper disable once UnusedMethodReturnValue.Local
        private IRenderer <Bitmap> Cook(IViewHost <Bitmap> form)
        {
            var renderer = new BitmapRenderer(form,
                                              RenderKit.MeasureContext, RenderKit.RenderContext);
            var _ = new LoopViewUpdater <Bitmap>(form, renderer, RenderKit.RenderContext.LayoutQueue);

            return(renderer);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DocumentViewController"/> class.
        /// </summary>
        /// <param name="viewHost">The view host.</param>
        /// <param name="viewInfos">The sequence of available view info objects.</param>
        /// <param name="dialogParent">The parent object for which dialogs should be shown on top.</param>
        public DocumentViewController(IViewHost viewHost, IEnumerable <ViewInfo> viewInfos, IWin32Window dialogParent)
        {
            this.viewHost     = viewHost;
            this.viewInfos    = viewInfos.ToArray();
            this.dialogParent = dialogParent;

            DefaultViewTypes = new Dictionary <Type, Type>();

            viewHost.ViewClosed += ViewHostOnViewClosed;
        }
示例#6
0
 public View(IViewHost viewHost, int left, int top, int width, int height, ILog logger = null)
 {
     _viewHost = viewHost;
     _top      = top;
     _left     = left;
     _width    = width;
     _height   = height;
     _logger   = logger ?? NullLog.Instance;
     InitBuffer();
     viewHost.AddView(this);
 }
        public LoopViewUpdater(IViewHost <TAsset> viewHost,
                               IRenderer <TAsset> renderer,
                               ILayoutQueue layoutQueue,
                               Int32 maxFramesPerSecond = 60)
            : base(maxFramesPerSecond)
        {
            _viewHost    = viewHost;
            _renderer    = renderer;
            _layoutQueue = layoutQueue;

            _viewHost.HostCreated += OnHostReady;
        }
示例#8
0
 public FramedView(IViewHost viewHost, int left, int top, int width, int height, ILog logger = null)
     : base(viewHost, left + 1, top + 1, width - 2, height - 2, logger)
 {
     _left   = left;
     _top    = top;
     _width  = width;
     _height = height;
     if (_width <= 2 || _height <= 2)
     {
         Hide();
     }
 }
 public DesignViewUpdater(IViewHost <Bitmap> viewHost,
                          IRenderer <Bitmap> renderer,
                          IMeasureContext measureContext,
                          IRenderContext renderContext,
                          Int32 maxFramesPerSecond = 60)
     : base(viewHost, renderer, maxFramesPerSecond)
 {
     MeasureContext      = measureContext;
     RenderContext       = renderContext;
     _viewHost           = viewHost;
     _sbSelected         = new StringBuilder();
     _font               = new Font(10, "Segoe UI", FontStyle.Regular);
     renderer.Rendering += OnRendering;
 }
示例#10
0
        public DynViewTimer(IViewHost Host)
        {
            _pluginHost = Host;

            _timer = new System.Timers.Timer();

            // Callback for the timer
            _timer.Elapsed += _timer_Elapsed;

            _pluginHost.OnShow      += _pluginHost_OnShow;
            _pluginHost.OnHide      += _pluginHost_OnHide;
            _pluginHost.OnClose     += _pluginHost_OnClose;
            _pluginHost.OnGoOffline += _pluginHost_OnGoOffline;
            _pluginHost.OnGoOnline  += _pluginHost_OnGoOnline;

            RunOnlyWhenOnline  = true;
            RunOnlyWhenVisible = true;
            Interval           = 1000;
        }
        public BitmapRenderer(IViewHost <Bitmap> viewHost,
                              GdiMeasureContext measureContext,
                              GdiRenderContext renderContext,
                              Color backgroundColor)
        {
            _eventLock = new Object();

            _lock       = new Object();
            _viewHost   = viewHost;
            _visualHost = viewHost;

            _visualHost.AvailableSizeChanged += OnHostSizeChanged;

            _measureContext = measureContext;
            _renderContext  = renderContext;
            _layoutQueue    = measureContext.LayoutQueue;
            _gdiDevice      = new GdiDevice(backgroundColor,
                                            _viewHost.AvailableSize);

            _renderRect = new Rectangle(0, 0, 1, 1);

            _hostRect = new ValueRectangle(0, 0, viewHost.AvailableSize);
        }
示例#12
0
 public ViewHolder(IViewHost host)
 {
     this._host = host ?? throw new ArgumentNullException(nameof(host));
     this._view = null;
     DidLoad    = false;
 }
示例#13
0
 public ViewHolder(IViewHost host) : this()
 {
     this._host = host ?? throw new ArgumentNullException(nameof(host));
     this._view = null;
 }
示例#14
0
 public Popup(IViewHost host)
 {
     _host = host;
     _view = new FramedView(host, 0, 0, 2, 2);
 }