예제 #1
0
        void WriteCipher(MainBoss boss)
        {
            var path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) +
                       "\\CRM\\settings";
            var NumberOfRetries = 3;
            var DelayOnRetry    = 1000;

            try
            {
                using (
                    var sw =
                        new StreamWriter(path))
                {
                    for (var i = 0; i <= NumberOfRetries; i++)
                    {
                        sw.Write(Cipher.Encrypt("$" + boss.KullaniciAdi + "ô" + boss.OwnerId + "$",
                                                "Mr. Poopybutthole"));
                    }
                    sw.Close();
                }
            }
            catch (IOException e)
            {
                MessageBox.Show(e.Message);

                Thread.Sleep(DelayOnRetry);
            }
        }
예제 #2
0
 private void Login()
 {
     BossInfo = DBConnection.DbCon.MainBoss.FirstOrDefault(x => x.KullaniciAdi == txtKullanıcıAdı.Text && x.Sifre == txtŞifre.Text);
     if (BossInfo == null)
     {
         MessageBox.Show("Yanlış Kullanıcı Adı veya Şifre", "Hata", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
         return;
     }
     DialogResult = DialogResult.OK;
     Close();
 }
예제 #3
0
    private void Init()
    {
        mainPlane  = Resources.Load <MainPlane>("Prefab/MainPlane");
        mainEnemy  = Resources.Load <MainEnemy>("Prefab/Enemys/Enemy");
        bossPlane  = Resources.Load <MainBoss>("Prefab/Enemys/Boss");
        tankPrefab = Resources.Load <TankEnemy>("Prefab/Enemys/Tank");



        dataVolume = Resources.Load <GameData>("GameData");
        data       = Resources.Load <PlayerData>("PlayerData");
        maxScore   = data.maxScore;
    }
예제 #4
0
        private void frmKullanıcıGiriş_Load(object sender, EventArgs e)
        {
            //Worker wrk = new Worker { KullaniciAdi = "Enes", Sifre = "123456", OwnerId = "1", Statu = Worker.Status.Yönetici };
            //DBConnection.DbCon.Worker.Add(wrk);
            //DBConnection.DbCon.SaveChanges();

            _tempRes = DialogResult.Cancel;
            if (File.Exists(_filePath))
            {
                _bossInformation = ReadCipher();
                if (_bossInformation != null)
                {
                    _okToLogin = true;
                }
                else
                {
                    _bossInformation = BossLogin();
                }
            }
            else
            {
                _bossInformation = BossLogin();
            }
            if (!_okToLogin) //Web Sitesine yönlendirme
            {
                MessageBox.Show("Sunucu girişi başarısız", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Process.Start("www.deletecrm.com");
                Application.Exit();
            }
            else
            {
                if (_bossInformation != null)
                {
                    DataBaseConnectionOptions.OwnerUserId = _bossInformation.OwnerId;
                }
            }
        }
예제 #5
0
 // Use this for initialization
 void Start()
 {
     boss = FindObjectOfType <MainBoss>();
 }
예제 #6
0
    // Use this for initialization
    void Start()
    {
        boss = FindObjectOfType <MainBoss>();

        gm = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <gameMaster>();
    }