Esempio n. 1
0
        public MainWindow()
        {
            var kernel = KernelConstructor.GetKernel();

            _main         = kernel.Get <Main.Main>();
            _main.Output += Main_Output;
            _main.ExposureTimeCalculated += _main_ExposureTimeCalculated;

            Arguments = new ApplicationArguments
            {
                MeasurementsNrOfRows    = 7,
                MeasurementsNrOfColumns = 12,
                High                 = byte.MaxValue,
                Low                  = 175,
                LcdWidth             = 2560,
                LcdHeight            = 1440,
                DesiredResistance    = 8820,
                FileType             = ImageFileType.Png.ToString(),
                OriginalExposureTime = 8000
            };

            InitializeComponent();

            var releaseManager = kernel.Get <IReleaseManager>();

            CheckForUpdateComponent = new CheckForUpdate(releaseManager, this);
            CheckForUpdateComponent.PropertyChanged += CheckForUpdateComponent_PropertyChanged;

            Loaded += (sender, args) => CheckForUpdateComponent.Check();
        }
Esempio n. 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            screenManager = new ScreenManager(this, (IUiContentProvider)this);
            mainComponent = new Main.Main <Game1>(this, screenManager, Main.SignedInRequirement.MustSignIn);
            base.Components.Add(screenManager);
            base.Components.Add(mainComponent);

            gamerServices = new GamerServicesComponent(this);
            base.Components.Add(gamerServices);

            base.Initialize();
        }
Esempio n. 3
0
        private void Authapp()
        {
            //foreach (var usercrt in context.user)
            //{
            //    usercrt.Password = Encrypt.EncryptData(usercrt.Password);
            //}
            context.SaveChanges();
            var user = Help.AuthSaveUser();

            if (user != null)
            {
                Main.Main main = new Main.Main(user);
                main.Show();
                MainWindow mainWindow = (MainWindow)Window.GetWindow(this);
                mainWindow.Hide();
            }
        }
Esempio n. 4
0
        private void btnEntry_Click(object sender, EventArgs e)
        {
            int status = loginEngine.LoginControl(txtUserName.Text, txtPassword.Text);

            if (status == 0)
            {
                pnltxtPassword.BackColor = Color.Red;
                pnltxtUsername.BackColor = Color.Red;
                MessageBox.Show("Boş değer girdiniz veya şifreniz 8 Haneden Kısa", "Hatalı Giriş", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (status == 1)
            {
                Main.Main mainForm = new Main.Main();
                mainForm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Kullanıcı adı veya şifre hatalı\nTekrar Deneyiniz...", "Kayıt Bulunamadı...", MessageBoxButtons.OK, MessageBoxIcon.Error);
                pnltxtPassword.BackColor = Color.Red;
                pnltxtUsername.BackColor = Color.Red;
            }
        }
Esempio n. 5
0
 private void LogInSystem(object sender, RoutedEventArgs e)
 {
     if (capch.CapchText == CapchText.Text)
     {
         var user = Help.Auth(Login.Text, Pass.Text);
         if (user != null)
         {
             if (SaveMe.IsChecked.Value)
             {
                 Help.AuthCreateFile(Login.Text, Pass.Text);
             }
             LockHelper.DeleteLock(Login.Text);
             SaveUserLog.SaveUser(user.Login);
             Main.Main main = new Main.Main(user);
             main.Show();
             MainWindow mainWindow = (MainWindow)Window.GetWindow(this);
             mainWindow.Close();
         }
         else
         {
             if (LockHelper.IsUserLock(Login.Text))
             {
                 this.IsEnabled = false;
                 timerLock.Start();
             }
             else
             {
                 LockHelper.IncrementLockUser(Login.Text);
             }
             MsgBoxHelper.Warning("Такого пользователя нет");
         }
     }
     else
     {
         MsgBoxHelper.Warning("Капча введена не верно");
     }
 }