Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string LogInp;
            string PasInp;

            try
            {
                LogInp = LoginInp.Text.Substring(0, LoginClass.login.Length);
                PasInp = PassInp.Text.Substring(0, LoginClass.pass.Length);
            }
            catch
            {
                return;
            }

            if (LogInp == login && PasInp == pass)
            {
                if (Rememberme.Checked)
                {
                    ConfigWorksService.ChangeValue("Remembered", "True");
                }

                LoginClass.IsLoged = true;
                this.Hide();
            }
        }
Exemple #2
0
        /// <summary>
        /// Получить площадь по указанной части комнаты
        /// </summary>
        /// <param name="cat">Категория</param>
        /// <returns>Площадь в double</returns>
        public double GetAreaFromCat(WorkTypeClass.Category cat)
        {
            double unit = 1;

            if (ConfigWorksService.getValue(ConfigWorksService.Options.Units) == "sm")
            {
                unit = 0.01;
            }
            switch (cat)
            {
            case WorkTypeClass.Category.walls:
                return(CommonArea * unit);

            case WorkTypeClass.Category.floorPer:
                return(BottomPerimeter * unit);

            case WorkTypeClass.Category.ceiling:
            case WorkTypeClass.Category.floor:
                return(Area * unit);

            case WorkTypeClass.Category.ceilingPer:
            {
                if (Standard)
                {
                    return(Perimeter * unit);
                }
                return(BottomPerimeter * unit);
            }
            }
            return(-1);
        }
 /// <summary>
 /// метод входа
 /// </summary>
 /// <returns></returns>
 public static Form SignIn()
 {
     login = ConfigWorksService.getValue(ConfigWorksService.Options.Login); //считываем логин, пароль
     pass  = ConfigWorksService.getValue(ConfigWorksService.Options.Password);
     return(lf);                                                            //возврат формы логина
 }