Exemplo n.º 1
0
        private static void UpdateItem(
            DatabaseItem item, string icon)
        {
            var info = (DatabaseInfo)item.Info;

            if (info.HasPassword)
            {
                item.PasswordIcon = ThemeData
                                    .GetImageSource("unlock");
            }
            else
            {
                item.PasswordIcon = null;
            }

            if (!string.IsNullOrEmpty(icon))
            {
                item.UpdatedIcon = ThemeData
                                   .GetImageSource(icon);
            }
            else
            {
                item.UpdatedIcon = null;
            }
        }
Exemplo n.º 2
0
        public Password()
        {
            InitializeComponent();

            _cmdOpen          = AppButton(0);
            _cmdOpen.Text     = Strings.Password_Open;
            AppButton(1).Text = Strings.Clear;

            _wkOpen                     = new BackgroundWorker();
            _wkOpen.DoWork             += _wkOpen_DoWork;
            _wkOpen.RunWorkerCompleted += _wkOpen_RunWorkerCompleted;


            imgWarning.Source     = ThemeData.GetImageSource("information");
            imgWarning.Visibility = GlobalPassHandler.Instance.HasGlobalPass
                ? Visibility.Collapsed : Visibility.Visible;
        }