Esempio n. 1
0
 public ScreenComposer(ImagesScaner imageScaner, System.Drawing.Size layoutSize, System.Drawing.Size imagesSize)
 {
     mImages       = new ImagesLoaderJob(imageScaner, imagesSize.Width, imagesSize.Height);
     mLayoutSize   = layoutSize;
     mImagesScaner = imageScaner;
     mThread       = new Thread(new ThreadStart(doWork));
     mThread.Start();
 }
Esempio n. 2
0
        public Form1(IApplicationController controller, ImagesScaner imagesLoader, Screen screen, Options options)
        {
            InitializeComponent();
            mOptions    = options;
            mScreen     = screen;
            mController = controller;
            Size        = new Size(mScreen.Bounds.Width, mScreen.Bounds.Height);

            mImagesLoader = imagesLoader;
        }
Esempio n. 3
0
        public ImagesLoaderJob(ImagesScaner imagesScanner, int width, int height)
        {
            mImageLoader   = new ImageLoader(width, height);
            mImagesScanner = imagesScanner;
            for (int i = 0; i < 2; ++i)
            {
                var data = new Data();
                mData.Add(data);

                Thread preloader = new Thread(new ParameterizedThreadStart(preloaderWork));
                preloader.Start(data);
                mPreloader.Add(preloader);
            }
        }
Esempio n. 4
0
        public ScreensController(Options options)
        {
            mImagesLoader = new ImagesScaner();

            if (!options.RunOnAllScreens)
            {
                Form1 form = new Form1(this, mImagesLoader, Screen.PrimaryScreen, options);
                form.Show();
                form.Location = new System.Drawing.Point(Screen.PrimaryScreen.Bounds.Left, Screen.PrimaryScreen.Bounds.Top);
                mForms.Add(form);
            }
            else
            {
                foreach (Screen screen in Screen.AllScreens)
                {
                    Form1 form = new Form1(this, mImagesLoader, screen, options);
                    form.Show();
                    form.Location = new System.Drawing.Point(screen.Bounds.Left, screen.Bounds.Top);
                    mForms.Add(form);
                }
            }
        }