Esempio n. 1
0
        static void StartPixelCapture()
        {
            var pixelCatcherView = new PixelCatcherView();
            var aboutInformation = new AboutInformation();
            var aboutView        = new AboutView();

            var pixelCatcherPresenter = new PixelCatcherPresenter(aboutView, pixelCatcherView, aboutInformation);

            Application.Run(pixelCatcherView);
        }
Esempio n. 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Intializes the form
            characterForm    = new CharacterGenerationForm();
            aboutInformation = new AboutInformation();
            //Intializes the character
            character = new CharacterPortfolio();

            Application.Run(characterForm);
        }
        public PixelCatcherPresenter(IAboutView aboutView, IPixelCatcherView pixelCatcherView, AboutInformation aboutInformation)
        {
            this.aboutInformation = aboutInformation;
            this.pixelCatcherView = pixelCatcherView;

            singeltonAboutForm = aboutView;

            pixelCatcherView.ShowAboutBox += PixelCatcherView_ShowAboutBox;

            Application.AddMessageFilter(this);

            RegisterGlobalHotkey();
        }
Esempio n. 4
0
        public void EditAboutInformation(AboutInformation newAboutInformation)
        {
            var aboutInformation = _dbContext.AboutInformation.FirstOrDefault();

            if (aboutInformation != null)
            {
                aboutInformation.AboutMe   = newAboutInformation.AboutMe;
                aboutInformation.BirthDate = newAboutInformation.BirthDate;
                aboutInformation.FirstName = newAboutInformation.FirstName;
                aboutInformation.LastName  = newAboutInformation.LastName;
            }
            else
            {
                _dbContext.AboutInformation.Add(new AboutInformation
                {
                    BirthDate = newAboutInformation.BirthDate,
                    FirstName = newAboutInformation.FirstName,
                    LastName  = newAboutInformation.LastName,
                    AboutMe   = newAboutInformation.AboutMe
                });
            }
            _dbContext.SaveChanges();
        }