Beispiel #1
0
        private static PassItem ParsePassItem(string[] strArgs)
        {
            var title    = GetArgVal(strArgs, "--title");
            var password = GetArgVal(strArgs, "--password");

            if (title == null || password == null)
            {
                return(null);
            }
            var passItem = new PassItem(title, Encoding.ASCII.GetBytes(password));

            ushort parsedId;

            if (!ushort.TryParse(GetArgVal(strArgs, "--id"), out parsedId))
            {
                passItem.Id = null;
            }
            else
            {
                passItem.Id = parsedId;
            }


            passItem.Login = GetArgVal(strArgs, "--login");

            passItem.EnterWithLogin = strArgs.Contains("--enter-with-login");

            passItem.Description = GetArgVal(strArgs, "--description");

            return(passItem);
        }
Beispiel #2
0
        public void ChangeToCarFightScene(PassItem passData)
        {
            BaseScene scene     = new FightScene(passData);
            FrameCtrl frameCtrl = new FightFrameCtrl(scene);

            ChangeCtrl(frameCtrl);
        }
Beispiel #3
0
        private void DivideAndAdd(PassItem pass)
        {
            var passPart1Bytes = new byte[MaxPassLength];

            _rngCsp.GetBytes(passPart1Bytes);

            var realPassBytes = pass.GetBytes();

            var passPart2Bytes = XORArrays(passPart1Bytes, realPassBytes);

            if (!CheckCorrect(passPart1Bytes, passPart2Bytes, realPassBytes))
            {
                throw new Exception("WTF? Xor worked funny..");
            }

            var part1Pass = pass.GetCopy();

            part1Pass.Pass = passPart1Bytes;
            Part1List.Add(part1Pass.Id.Value, part1Pass);

            var part2Pass = pass.GetCopy();

            part2Pass.Pass = passPart2Bytes;
            Part2List.Add(part2Pass.Id.Value, part2Pass);
        }
Beispiel #4
0
        public void ChangeToCampsiteFightScene(int levelId)
        {
            Debug.Log("Enter Camp Fight " + levelId);
            var levelRes = TableMgr.singleton.LevelTable.GetItemByID(levelId);

            if (levelRes == null)
            {
                return;
            }
            int      passId   = levelRes.passID;
            PassItem passData = Global.gApp.gGameData.PassData.Get(passId);

            if (passData == null)
            {
                return;
            }
            Application.targetFrameRate = 30;
            Global.gApp.gMsgDispatcher.Cleanup();
            TipsMgr.singleton.Clear();
            PlayerDataMgr.singleton.SetStageParam(levelId, true);
            //SceneManager.LoadScene(passData.scene);
            var op = SceneManager.LoadSceneAsync(passData.scene);

            op.completed += (a) =>
            {
                Debug.Log("ChangeToCampsiteFightScene");
                BaseScene scene     = new CampsiteFightScene(levelId, passData);
                FrameCtrl frameCtrl = new FightFrameCtrl(scene);
                ChangeCtrl(frameCtrl);
            };
        }
 private void FillStringsWithoutSensitiveData(PassItem passItem)
 {
     foreach (var str in _kpPassItem.Strings.Where(a => a.Key != PASSWORD && !a.Value.IsProtected))
     {
         passItem.Strings.TryAdd(str.Key, str.Value.ReadString());
     }
 }
Beispiel #6
0
        //private Map m_Map;
        public FightScene(PassItem passData)
        {
            m_TimerMgr         = new TimerMgr();
            m_Ended            = false;
            m_PassData         = passData;
            m_SceneType        = (SceneType)passData.sceneType;
            m_InNormalPassType = (m_SceneType == SceneType.NormalScene);
            GeneralConfigItem initPassIdConfig = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.INIT_PASS_ID);
            int type = passData.id / System.Convert.ToInt32(initPassIdConfig.content);

            if (type == 1)
            {
                if (Global.gApp.gSystemMgr.GetPassMgr().GetCurPassId() != m_PassData.id || Global.gApp.gSystemMgr.GetPassMgr().GetHasPassedMaxPass())
                {
                    m_ModeEnum = ModeEnum.RE_NORMAL;
                }
                else
                {
                    m_ModeEnum = ModeEnum.NORMAL;
                }
            }
            else
            {
                m_ModeEnum = ModeEnum.SPECIAL;
            }
            Global.gApp.gLightCompt.enabled = true;
            //m_Map = new Map(90, 90, m_MainPlayer);
        }
Beispiel #7
0
        public void ChangeToFightScene(int levelId)
        {
            var levelRes = TableMgr.singleton.LevelTable.GetItemByID(levelId);

            if (levelRes == null)
            {
                return;
            }
            int passId = levelRes.passID;

            Application.targetFrameRate = 30;
            Global.gApp.gMsgDispatcher.Cleanup();
            TipsMgr.singleton.Clear();

            //PassData passData = Global.gApp.gGameData.GetPassData().First(l => l.id == passId);
            PassItem passData = Global.gApp.gGameData.PassData.Get(passId);
            var      op       = SceneManager.LoadSceneAsync(passData.scene);

            op.completed += (a) =>
            {
                Debug.Log("ChangeToFightScene");
                if ((SceneType)passData.sceneType == SceneType.NormalScene)
                {
                    ChangeToNormalFightScene(passData);
                }
                else
                {
                    ChangeToNormalFightScene(passData);
                }
            };
            //SceneManager.LoadScene(passData.scene);
        }
Beispiel #8
0
        public async Task InsertAsync(PassItem newPassItem)
        {
            await throwPassItemIfNotExistAsync(newPassItem.UserId, newPassItem.Name);

            _context.PassItems.Add(newPassItem);
            await _context.SaveChangesAsync();
        }
Beispiel #9
0
        private void Start()
        {
            PassItem passData = Global.gApp.CurScene.GetPassData();

            if (passData != null)
            {
                Global.gApp.gAudioSource.PlayOneShot(HittedEnemyClip);
                if ((PassType)passData.passType == PassType.MainPass)
                {
                    HpPram = passData.hpParam;
                }
                else
                {
                    PassItem passItem = Global.gApp.gSystemMgr.GetPassMgr().GetPassItem();
                    if (passItem != null)
                    {
                        HpPram = passItem.hpParam * passData.hpParam;
                    }
                    else
                    {
                        HpPram = passData.hpParam;
                    }
                }
            }
        }
Beispiel #10
0
        private bool EnterBranchPassImp(int passId)
        {
            int branchPassCount = m_Data.branchPass.Count;

            if (branchPassCount > 0 && m_Data.branchPass.Remove(passId))
            {
                m_EnterBranchPassId = passId;
                PassItem passItem = GetPassItem();
                if (passItem != null)
                {
                    SceneItem sceneItem = Global.gApp.gGameData.SceneDate.Get(passItem.sceneID);
                    if (branchPassCount == sceneItem.missionLimit)
                    {
                        m_Data.recordTime = DateTimeUtil.GetMills(DateTime.Now);
                    }
                    SaveData();
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            return(false);
        }
Beispiel #11
0
 public FightWinCondition(PassItem passData, FightScene scene)
 {
     m_PassData   = passData;
     m_FightScene = scene;
     //m_GameType = (GameWinType)m_PassData.winCondition[0];
     RegisterListener();
 }
Beispiel #12
0
        public Wave(int waveId, WaveMgr waveMgr, PassItem passData, GameObject player, int guid)
        {
            m_WaveId              = waveId;
            m_StartWave           = false;
            m_Guid                = guid;
            m_CreateInfo          = new List <MonsterItem>();
            m_RoundRoleCreateInfo = new List <MonsterItem>();
            m_BornNodeList        = new List <GameObject>();
            m_RoundRoleBornNodes  = (Global.gApp.CurScene as FightScene).GetBornNodes();
            m_NormalScene         = Global.gApp.CurScene.IsNormalPass();
            m_WaveMgr             = waveMgr;
            //m_WaveData = Global.gApp.gGameData.GetWaveData().Find(l => l.id == waveId);
            m_WaveData   = Global.gApp.gGameData.WaveData.Get(waveId);
            m_PassData   = passData;
            m_MainPlayer = player;
            m_Monsters   = new List <Monster>();

            m_TriggerType   = (TriggerType)m_WaveData.trigMode[0];
            m_DtCreateCount = Mathf.Max(m_DtCreateCount, m_WaveData.NumTime);
            if (m_WaveData.enemyNum.Length == 1 && m_WaveData.enemyID.Length > 1)
            {
                m_RandomType = RandomType.RandMonster;
            }
            else
            {
                m_RandomType = RandomType.RandCreateInfo;
            }
            InitMonsterInfo();
            RegisterListeners();
            StartWave();
        }
Beispiel #13
0
        public async Task <IActionResult> Create(PassItem newPassItem)
        {
            ModelState.Remove(nameof(newPassItem.UserId));

            if (ModelState.IsValid)
            {
                try
                {
                    IdentityUser user = await _userManager.GetUserAsync(HttpContext.User);

                    newPassItem.UserId = user.Id;
                    newPassItem.User   = user;

                    await _passItemRepository.InsertAsync(newPassItem);

                    return(RedirectToAction(nameof(Index)));
                }
                catch (InvalidOperationException ex)
                {
                    ModelState.AddModelError(ex.Data[PassItemRepository.ItemPropertyKey]?.ToString() ?? "", $"Unable to save changes. {ex.Message}.");
                }
            }

            return(View(newPassItem));
        }
Beispiel #14
0
        private void EndAction()
        {
            if (m_CurTime > m_ChangeFightTime)
            {
                if (Global.gApp.gSystemMgr.GetMiscMgr().FirstMain == 0 && Global.gApp.gSystemMgr.GetPassMgr().GetPassSerial() == 1)
                {
                    Global.gApp.gUiMgr.OpenPanel(Wndid.RewardEffectUi);
                    Global.gApp.gUiMgr.OpenPanel(Wndid.CommonPanel);
                    Global.gApp.gUiMgr.OpenPanel(Wndid.TokenUI);
                    Global.gApp.gUiMgr.ClosePanel(Wndid.LogoPanel);
                    //string[] consumeItemStr = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.GAME_CONSUME_ITEMS).contents;
                    //bool result = GameItemFactory.GetInstance().ReduceItem(consumeItemStr, BehaviorTypeConstVal.OPT_GAME_CONSUME);
                    PassItem passItem = Global.gApp.gSystemMgr.GetPassMgr().GetCurPassItem();
                    if (passItem != null)
                    {
                        Global.gApp.gSystemMgr.GetPassMgr().EnterPass();
                        Global.gApp.gUiMgr.ClossAllPanel();
                        Global.gApp.gGameCtrl.ChangeToFightScene(passItem.id);
                    }
                    return;
                }
            }
            if (m_CurTime > m_ChangeTime)
            {
                Global.gApp.gUiMgr.OpenPanel(Wndid.RewardEffectUi);
                Global.gApp.gUiMgr.ClosePanel(Wndid.LogoPanel);
                Global.gApp.gUiMgr.CachePanel(Wndid.ShopPanel);
                Global.gApp.gUiMgr.OpenPanel(Wndid.HomeUI);
                Global.gApp.gUiMgr.OpenPanel(Wndid.CommonPanel);
                Global.gApp.gUiMgr.OpenPanel(Wndid.TokenUI);

                //InfoCLogUtil.instance.SendClickLog(ClickEnum.BOTTOM_MAIN);
            }
        }
Beispiel #15
0
        public TaskModeMgr(Transform mapTsf, GameObject player, PassItem passItem)
        {
            m_TaskModeNode = mapTsf.Find("TaskNode");
            if (m_TaskModeNode == null)
            {
                Debug.Log(" waning   no task Mode ");
                return;
            }
            m_TaskModes = new List <BaseTaskMode>(m_TaskModeNode.GetComponentsInChildren <BaseTaskMode>());
            if (m_TaskModes.Count == 0)
            {
                Debug.Log(" waning   no tasks ");
                return;
            }
            m_TaskModes.Sort();
            int index = 0;

            foreach (BaseTaskMode taskMode in m_TaskModes)
            {
                index++;
                taskMode.SetOrderIndex(index);
                taskMode.Init(this, player);
            }
            m_CurPassItem = passItem;
            InitChipDropMode();
            InitNormalSourceDropMode();
        }
Beispiel #16
0
        private void InitBg()
        {
            PassItem passItem = Global.gApp.gSystemMgr.GetPassMgr().GetCurPassItem();

            if (passItem != null)
            {
                Bg.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(passItem.mainUIbg);
                //if (passItem.mainUIbg.EndsWith("bg1"))
                //{
                //    UI_fire_1.gameObject.SetActive(true);
                //    //UI_fire_2.gameObject.SetActive(false);
                //} else
                //{
                //    UI_fire_1.gameObject.SetActive(false);
                //    //UI_fire_2.gameObject.SetActive(true);
                //}

                if (passItem.mainUIeffect != null && !passItem.mainUIeffect.Equals(GameConstVal.EmepyStr))
                {
                    GameObject effect = Global.gApp.gResMgr.InstantiateObj(passItem.mainUIeffect);
                    effect.transform.SetParent(Bgeffect.rectTransform, false);
                }
            }
            else
            {
                Bg.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>("UI/bg/bg1");
            }
        }
Beispiel #17
0
        public async Task DeleteAsync(int id)
        {
            PassItem passItemDb = await GetPassItemAsync(id);

            _context.PassItems.Remove(passItemDb);
            await _context.SaveChangesAsync();
        }
Beispiel #18
0
        public static IItem GetCustomItem(Item item)
        {
            IItem _item = new StandardItem(item);

            switch (item.Name)
            {
            case "Aged Brie":
                _item = new AgedItem(item);
                break;

            case "Sulfuras, Hand of Ragnaros":
                _item = new LegendaryItem(item);
                break;

            case "Backstage passes to a TAFKAL80ETC concert":
                _item = new PassItem(item);
                break;

            case "Conjured Mana Cake":
                _item = new ConjuredItem(item);
                break;

            default:
                break;
            }

            return(_item);
        }
Beispiel #19
0
        private bool CheckCanAddProp(string propName)
        {
            PassItem curPass   = Global.gApp.gSystemMgr.GetPassMgr().GetPassItem();
            PassItem fightPass = Global.gApp.CurScene.GetPassData();

            // 非当前关卡
            if (curPass.id != fightPass.id || Global.gApp.gSystemMgr.GetPassMgr().GetHasPassedMaxPass())
            {
                if (propName.Contains("Camp_Npc_"))
                {
                    if (m_CanDropCampNpc)
                    {
                        int    newRate = UnityEngine.Random.Range(0, 10001);
                        string rateStr = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.REPASS_NPCFALL).content;
                        int    rateInt = int.Parse(rateStr);
                        return(rateInt >= newRate);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (propName.Contains("Camp_"))
                {
                    if (m_CanDropCampRes)
                    {
                        int    newRate = UnityEngine.Random.Range(0, 10001);
                        string rateStr = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.REPASS_SOURCEFALL).content;
                        int    rateInt = int.Parse(rateStr);
                        return(rateInt >= newRate);
                    }
                    else
                    {
                        return(false);
                    }
                }
                if (propName.Contains("WeaponChipProp"))
                {
                    int    newRate = UnityEngine.Random.Range(0, 10001);
                    string rateStr = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.REPASS_WEAPONFALL).content;
                    int    rateInt = int.Parse(rateStr);
                    return(rateInt >= newRate);
                }
            }
            else
            {
                if (propName.Contains("Camp_Npc_"))
                {
                    return(m_CanDropCampNpc);
                }
                else if (propName.Contains("Camp_"))
                {
                    return(m_CanDropCampRes);
                }
            }
            return(true);
        }
Beispiel #20
0
        public PassItem GetPassItem()
        {
            PassItem passItem = GetCurPassItem();

            if (passItem == null)
            {
                passItem = GetPrePassItem();
            }
            return(passItem);
        }
        internal PassItem ConvertToPSD()
        {
            PassItem passItem = new PassItem();

            passItem.UUID = _kpPassItem.Uuid.ToHexString();
            passItem.Tags = _kpPassItem.Tags.ToArray();
            passItem.SetPassFromString(_kpPassItem.Strings.GetSafe(PASSWORD).ReadString());
            FillStringsWithoutSensitiveData(passItem);
            return(passItem);
        }
Beispiel #22
0
        private void StartGame(int selectPassId)
        {
            PassItem newPassItem = Global.gApp.gSystemMgr.GetPassMgr().GetPassItemById(selectPassId);

            if (newPassItem != null)
            {
                Global.gApp.gUiMgr.ClossAllPanel();
                Global.gApp.gGameCtrl.ChangeToFightScene(newPassItem.id);
                return;
            }
        }
Beispiel #23
0
        public async Task <IActionResult> Edit(int id)
        {
            PassItem passItem = await GetPassItem(id);

            if (passItem == null)
            {
                return(NotFound());
            }

            return(View(passItem));
        }
Beispiel #24
0
        private void SetPassIcon(RectTransform passUI, PassItem passItem, int curPassId)
        {
            bool isBoss = passItem.bossLevel > 0;

            passUI.GetChild(0).gameObject.SetActive(!isBoss && passItem.id < curPassId);
            passUI.GetChild(1).gameObject.SetActive(!isBoss && passItem.id == curPassId);
            passUI.GetChild(2).gameObject.SetActive(!isBoss && passItem.id > curPassId);

            passUI.GetChild(3).gameObject.SetActive(isBoss && passItem.id < curPassId);
            passUI.GetChild(4).gameObject.SetActive(isBoss && passItem.id == curPassId);
            passUI.GetChild(5).gameObject.SetActive(isBoss && passItem.id > curPassId);
        }
Beispiel #25
0
        public async Task <PassItem> GetPassItem(int id)
        {
            if (id == 0)
            {
                return(null);
            }

            throwIfNotAuthenticated();
            PassItem passItem = await _passItemRepository.GetPassItemAsync(id);

            return(passItem);
        }
Beispiel #26
0
 public void GetPasses(PassItems passes)
 {
     var passNodes = _config.SelectNodes("playpass/passes/pass");
     if (passNodes == null)
         return;
     foreach (XmlNode passNode in passNodes)
     {
         var pass = new PassItem(
             Util.GetNodeAttributeValue(passNode, "description"),
             (Util.GetNodeAttributeValue(passNode, "enabled", "1") == "1")
             );
         GetPassActions(pass.Actions, passNode);
         passes.Add(pass);
     }
 }
Beispiel #27
0
        private void SetPassIcon(RectTransform_Image_Container passUI, int passId, int curPassId, int initId)
        {
            PassItem passItem = Global.gApp.gGameData.PassData.Get(passId);
            bool     isBoss   = passItem.bossLevel > 0;

            passUI.rectTransform.GetChild(0).gameObject.SetActive(!isBoss && passId < curPassId);
            passUI.rectTransform.GetChild(1).gameObject.SetActive(!isBoss && passId == curPassId);
            passUI.rectTransform.GetChild(2).gameObject.SetActive(!isBoss && passId > curPassId);

            passUI.rectTransform.GetChild(3).gameObject.SetActive(isBoss && passId < curPassId);
            passUI.rectTransform.GetChild(4).gameObject.SetActive(isBoss && passId == curPassId);
            passUI.rectTransform.GetChild(5).gameObject.SetActive(isBoss && passId > curPassId);

            passUI.rectTransform.GetChild(6).GetComponent <Text>().text = (passId % initId).ToString();
        }
Beispiel #28
0
 public void AddProp(Vector3 position, int[] dropIds, PassItem passItem)
 {
     if (dropIds != null && dropIds.Length > 0)
     {
         foreach (int dropId in dropIds)
         {
             float ex           = GetExRate(dropId, passItem.dropID, passItem.dropRate);
             bool  isDropSucess = AddProp(position, dropId, ex);
             if (isDropSucess)
             {
                 return;
             }
         }
     }
 }
        public override void Init <T>(string name, UIInfo info, T arg)
        {
            base.Init(name, info, arg);
            RegisterListeners();

            m_Pass = arg as PassItem;

            GeneralConfigItem initPassIdConfig = Global.gApp.gGameData.GeneralConfigData.Get(GeneralConfigConstVal.INIT_PASS_ID);

            confirmtxt.text.text = string.Format(Global.gApp.gGameData.GetTipsInCurLanguage(4260), m_Pass.id % Convert.ToInt32(initPassIdConfig.content));

            Btn1.button.onClick.AddListener(TouchClose);
            Btn2.button.onClick.AddListener(OnStartGame);

            base.ChangeLanguage();
        }
Beispiel #30
0
        public WaveMgr(PassItem passData, GameObject player)
        {
            m_PassData   = passData;
            m_MainPlayer = player;
            m_Wave       = new Dictionary <int, Wave>();
            m_DynamicCalMonsterCountMgr = new DynamicCalMst(this);
            m_TimerMgr     = new TimerMgr();
            m_PlayerMgr    = Global.gApp.CurScene.GetPlayerMgr();
            m_InNormalPass = Global.gApp.CurScene.IsNormalPass();

            ResetFremeCreateCount();
            CreateWaves();
            //CacheSpecialEnemy(3004);
            CacheMonster();
            //m_TimerMgr.AddTimer(30, 5, CreateSpecialWave);
        }
Beispiel #31
0
        private void OnStartGame(int passId)
        {
            Debug.Log("OnStartGame passId = " + passId);
            if (passId > Global.gApp.gSystemMgr.GetPassMgr().GetCurPassId())
            {
                Global.gApp.gMsgDispatcher.Broadcast(MsgIds.ShowGameTipsByID, 1004);
                return;
            }
            PassItem newPassItem = Global.gApp.gSystemMgr.GetPassMgr().GetPassItemById(passId);

            if (newPassItem != null)
            {
                Global.gApp.gUiMgr.OpenPanel(Wndid.ConfirmEnterPassUI, newPassItem);
                return;
            }
        }
Beispiel #32
0
 /// <summary>
 ///     Processes all of the actions in a pass
 /// </summary>
 public void ProcessPass(PassItem pass)
 {
     PlayOnItem currentItem = _playOn.GetCatalog();
     if (!pass.Enabled)
         _logManager.Log("Skipping pass \"{0}\".", pass.Description);
     else
     {
         _logManager.Log("Processing pass \"{0}\"...", pass.Description);
         try
         {
             ProcessActions(currentItem, pass.Actions);
         }
         catch (Exception ex)
         {
             _logManager.LogException(ex);
         }
         _logManager.Log("Finished processing pass \"{0}\"...", pass.Description);
     }
 }
Beispiel #33
0
        private void btnAddPass_Click(object sender, EventArgs e)
        {
            var selectedIndex = lstPasses.SelectedIndex;

            var newPassword = new PassItem();

            if (!EditPassword(newPassword))
                return;

            _rootPassGroup.AddPass(newPassword);
            if (selectedIndex != -1 && selectedIndex != lstPasses.Items.Count - 1)
            {
                while (newPassword.Id > ((PassItem)lstPasses.SelectedItem).Id)
                {
                    _rootPassGroup.Passwords.MoveUp(newPassword);
                }
                _rootPassGroup.Passwords.MoveDown(newPassword);
            }
            RegisterChange();
            RefillPasswordsList();
        }
Beispiel #34
0
 private bool EditPassword(PassItem password)
 {
     do
     {
         var editPassForm = new EditPasswordForm(password);
         editPassForm.ShowDialog();
         if (!editPassForm.Confirmed)
             return false; //was cancelled
     } while (!CheckPassword(password));
     return true;
 }
Beispiel #35
0
 private bool Contains(PassItem pass)
 {
     return _connections.PcBase.Base.PassGroup.Any(a => a.Id == pass.Id && a != pass);
 }
Beispiel #36
0
        private bool CheckPassword(PassItem pass)
        {
            if (Contains(pass))
            {
                MessageBox.Show("Contains this id");
                return false;
            }

            if (string.IsNullOrWhiteSpace(pass.Title))
            {
                MessageBox.Show("Title is empty");
                return false;
            }

            if (string.IsNullOrWhiteSpace(pass.Login) && pass.EnterWithLogin)
            {
                MessageBox.Show("No login set to \"Enter with login\"");
                return false;
            }

            /*  if (string.IsNullOrWhiteSpace(pass.Pass))
              {
                  MessageBox.Show("Password is empty");
                  return false;
              }
              */

            /* if (string.IsNullOrWhiteSpace(pass.Description))
             {
                 MessageBox.Show("Description is empty");
                 return false;
             }*/
            return true;
        }