• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# KeePassLib.PwUuid类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中KeePassLib.PwUuid的典型用法代码示例。如果您正苦于以下问题:C# PwUuid类的具体用法?C# PwUuid怎么用?C# PwUuid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PwUuid类属于KeePassLib命名空间,在下文中一共展示了PwUuid类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetIconDrawable

 public Drawable GetIconDrawable(Resources res, PwDatabase db, PwIcon icon, PwUuid customIconId)
 {
     if (!customIconId.Equals(PwUuid.Zero)) {
         return GetIconDrawable (res, db, customIconId);
     }
     return GetIconDrawable (res, icon);
 }
开发者ID:pythe,项目名称:wristpass,代码行数:7,代码来源:DrawableFactory.cs


示例2: GetConfigEntry

 private PwEntry GetConfigEntry(PwDatabase db)
 {
     var kphe = new KeePassHttpExt();
     var root = db.RootGroup;
     var uuid = new PwUuid(kphe.KEEPASSHTTP_UUID);
     var entry = root.FindEntry(uuid, false);
     return entry;
 }
开发者ID:berrnd,项目名称:keepasshttp,代码行数:8,代码来源:OptionsForm.cs


示例3: OnFormLoad

		private void OnFormLoad(object sender, EventArgs e)
		{
			Debug.Assert(m_pwGroup != null); if(m_pwGroup == null) throw new InvalidOperationException();
			Debug.Assert(m_pwDatabase != null); if(m_pwDatabase == null) throw new InvalidOperationException();

			GlobalWindowManager.AddWindow(this);

			m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width,
				m_bannerImage.Height, BannerStyle.Default,
				Properties.Resources.B48x48_Folder_Txt, KPRes.EditGroup,
				KPRes.EditGroupDesc);
			this.Icon = Properties.Resources.KeePass;

			UIUtil.SetButtonImage(m_btnAutoTypeEdit,
				Properties.Resources.B16x16_Wizard, true);

			m_dtExpires.CustomFormat = DateTimeFormatInfo.CurrentInfo.ShortDatePattern +
				" " + DateTimeFormatInfo.CurrentInfo.LongTimePattern;

			m_pwIconIndex = m_pwGroup.IconId;
			m_pwCustomIconID = m_pwGroup.CustomIconUuid;
			
			m_tbName.Text = m_pwGroup.Name;
			m_tbNotes.Text = m_pwGroup.Notes;

			if(m_pwCustomIconID != PwUuid.Zero)
				UIUtil.SetButtonImage(m_btnIcon, m_pwDatabase.GetCustomIcon(
					m_pwCustomIconID), true);
			else
				UIUtil.SetButtonImage(m_btnIcon, m_ilClientIcons.Images[
					(int)m_pwIconIndex], true);

			if(m_pwGroup.Expires)
			{
				m_dtExpires.Value = m_pwGroup.ExpiryTime;
				m_cbExpires.Checked = true;
			}
			else // Does not expire
			{
				m_dtExpires.Value = DateTime.Now;
				m_cbExpires.Checked = false;
			}

			UIUtil.MakeInheritableBoolComboBox(m_cmbEnableAutoType,
				m_pwGroup.EnableAutoType, m_pwGroup.GetAutoTypeEnabledInherited());
			UIUtil.MakeInheritableBoolComboBox(m_cmbEnableSearching,
				m_pwGroup.EnableSearching, m_pwGroup.GetSearchingEnabledInherited());

			m_tbDefaultAutoTypeSeq.Text = m_pwGroup.GetAutoTypeSequenceInherited();

			if(m_pwGroup.DefaultAutoTypeSequence.Length == 0)
				m_rbAutoTypeInherit.Checked = true;
			else m_rbAutoTypeOverride.Checked = true;

			CustomizeForScreenReader();
			EnableControlsEx();
		}
开发者ID:ComradeP,项目名称:KeePass-2.x,代码行数:57,代码来源:GroupForm.cs


示例4: InitEx

		public void InitEx(ImageList ilIcons, uint uNumberOfStandardIcons,
			PwDatabase pwDatabase, uint uDefaultIcon, PwUuid pwCustomIconUuid)
		{
			m_ilIcons = ilIcons;
			m_uNumberOfStandardIcons = uNumberOfStandardIcons;
			m_pwDatabase = pwDatabase;
			m_uDefaultIcon = uDefaultIcon;
			m_pwDefaultCustomIcon = pwCustomIconUuid;
		}
开发者ID:ComradeP,项目名称:KeePass-2.x,代码行数:9,代码来源:IconPickerForm.cs


示例5: Find

		public EcasEventType Find(PwUuid uuid)
		{
			if(uuid == null) throw new ArgumentNullException("uuid");

			foreach(EcasEventType t in m_events)
			{
				if(t.Type.Equals(uuid)) return t;
			}

			return null;
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:11,代码来源:EcasEventProvider.cs


示例6: getIcon

 public static Image getIcon(PwDatabase db, ImageList imageList, PwUuid customIconId, PwIcon iconId)
 {
     if (!PwUuid.Zero.Equals(customIconId))
     {
         return db.GetCustomIcon(customIconId, 16, 16);
     }
     else
     {
         return imageList.Images[(int)iconId];
     }
 }
开发者ID:nein23,项目名称:KeePassContext,代码行数:11,代码来源:Util.cs


示例7: Find

        public EcasActionType Find(PwUuid uuid)
        {
            if(uuid == null) throw new ArgumentNullException("uuid");

            foreach(EcasActionType t in m_actions)
            {
                if(t.Type.EqualsValue(uuid)) return t;
            }

            return null;
        }
开发者ID:eis,项目名称:keepass-eis-flavored,代码行数:11,代码来源:EcasActionProvider.cs


示例8: IsSupported

		public bool IsSupported(PwUuid uuidType)
		{
			if(uuidType == null) throw new ArgumentNullException("uuidType");

			foreach(EcasEventType t in m_events)
			{
				if(t.Type.Equals(uuidType))
					return true;
			}

			return false;
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:12,代码来源:EcasEventProvider.cs


示例9: IsSupported

		public bool IsSupported(PwUuid uuidType)
		{
			if(uuidType == null) throw new ArgumentNullException("uuidType");

			foreach(EcasConditionType t in m_conditions)
			{
				if(t.Type.EqualsValue(uuidType))
					return true;
			}

			return false;
		}
开发者ID:ComradeP,项目名称:KeePass-2.x,代码行数:12,代码来源:EcasConditionProvider.cs


示例10: EditGroup

        public EditGroup(Context ctx, IKp2aApp app, String name, PwIcon iconid, PwUuid customIconId, PwGroup group, OnFinish finish)
            : base(finish)
        {
            _ctx = ctx;
            _name = name;
            _iconId = iconid;
            Group = group;
            _customIconId = customIconId;
            _app = app;

            _onFinishToRun = new AfterEdit(this, OnFinishToRun);
        }
开发者ID:pythe,项目名称:wristpass,代码行数:12,代码来源:EditGroup.cs


示例11: RemoveFactory

        public static bool RemoveFactory(PwUuid u)
        {
            if(u == null) { Debug.Assert(false); return false; }

            List<TsrFactory> l = TsrPool.Factories;
            int cInitial = l.Count;

            for(int i = l.Count - 1; i >= g_nStdFac; --i)
            {
                if(u.Equals(l[i].Uuid)) l.RemoveAt(i);
            }

            return (l.Count != cInitial);
        }
开发者ID:Stoom,项目名称:KeePass,代码行数:14,代码来源:TsrPool.cs


示例12: EcasEventType

        public EcasEventType(PwUuid uuidType, string strName, PwIcon pwIcon,
            EcasParameter[] vParams, EcasEventCompare f)
        {
            if((uuidType == null) || (uuidType.EqualsValue(PwUuid.Zero)))
                throw new ArgumentNullException("uuidType");
            if(strName == null) throw new ArgumentNullException("strName");
            // if(vParams == null) throw new ArgumentNullException("vParams");
            // if(f == null) throw new ArgumentNullException("f");

            m_type = uuidType;
            m_strName = strName;
            m_pwIcon = pwIcon;
            m_vParams = (vParams ?? EcasParameter.EmptyArray);
            m_fn = (f ?? EcasEventCompareTrue);
        }
开发者ID:ashwingj,项目名称:keepass2,代码行数:15,代码来源:EcasEventType.cs


示例13: EcasConditionType

		public EcasConditionType(PwUuid uuidType, string strName, PwIcon pwIcon,
			EcasParameter[] vParams, EcasConditionEvaluate f)
		{
			if((uuidType == null) || PwUuid.Zero.Equals(uuidType))
				throw new ArgumentNullException("uuidType");
			if(strName == null) throw new ArgumentNullException("strName");
			// if(vParams == null) throw new ArgumentNullException("vParams");
			// if(f == null) throw new ArgumentNullException("f");

			m_type = uuidType;
			m_strName = strName;
			m_pwIcon = pwIcon;
			m_vParams = (vParams ?? EcasParameter.EmptyArray);
			m_fn = (f ?? EcasConditionEvaluateTrue);
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:15,代码来源:EcasConditionType.cs


示例14: GetCacheDirectory

		public static string GetCacheDirectory(PwUuid pwPluginUuid, bool bEnsureExists)
		{
			string strPlgID = Convert.ToBase64String(pwPluginUuid.UuidBytes,
				Base64FormattingOptions.None);
			strPlgID = StrUtil.AlphaNumericOnly(strPlgID);
			if(strPlgID.Length > 16) strPlgID = strPlgID.Substring(0, 16);

			string strDir = GetCacheRoot() + Path.DirectorySeparatorChar +
				strPlgID + "_" + GetAppID();

			if(bEnsureExists && !Directory.Exists(strDir))
				Directory.CreateDirectory(strDir);

			return strDir;
		}
开发者ID:ComradeP,项目名称:KeePass-2.x,代码行数:15,代码来源:PlgxCache.cs


示例15: GetConfigEntry

        private PwEntry GetConfigEntry(PwDatabase db)
        {
            var kphe = new KeePassHttpExt();
            var root = db.RootGroup;

            // Get stored RootGroup from config if any
            if (_config.RootGroup != "")
            {
                var GroupUuid = new PwUuid(StringToByteArray(_config.RootGroupUuid));
                root = root.FindGroup(GroupUuid, true);
            }

            var uuid = new PwUuid(kphe.KEEPASSHTTP_UUID);
            var entry = root.FindEntry(uuid, false);
            return entry;
        }
开发者ID:JasperAlgra,项目名称:keepasshttp,代码行数:16,代码来源:OptionsForm.cs


示例16: get_template_title_to_field_dict

 public static Dictionary<String, String> get_template_title_to_field_dict(IPluginHost m_host, String template_uuid)
 {
     Dictionary<String, String> ret = new Dictionary<string, string>();
     PwUuid par_uuid = new PwUuid(KeePassLib.Utility.MemUtil.HexStringToByteArray(template_uuid));
     PwEntry par_template = m_host.Database.RootGroup.FindEntry(par_uuid, true);
     if (par_template == null)
         return ret;
     if (par_template.Strings.Get("_etm_template") == null)
         return ret;
     List<EntryTemplate> cur = parse_entry(par_template.Strings);
     foreach (EntryTemplate tmp in cur) {
         if (tmp.type == "Divider")
             continue;
         if (tmp.fieldName.Length < 1 || tmp.fieldName[0] == '@')
             continue;
         ret[tmp.title] = tmp.fieldName;
     }
     return ret;
 }
开发者ID:mitchcapper,项目名称:KPEntryTemplates,代码行数:19,代码来源:EntryTemplateManager.ChildViewer.cs


示例17: PwCustomIcon

        public PwCustomIcon(PwUuid pwUuid, byte[] pbImageDataPng)
        {
            Debug.Assert(pwUuid != null);
            if(pwUuid == null) throw new ArgumentNullException("pwUuid");
            Debug.Assert(pwUuid != PwUuid.Zero);
            if(pwUuid == PwUuid.Zero) throw new ArgumentException("pwUuid == 0");

            Debug.Assert(pbImageDataPng != null);
            if(pbImageDataPng == null) throw new ArgumentNullException("pbImageDataPng");

            m_pwUuid = pwUuid;
            m_pbImageDataPng = pbImageDataPng;

            #if !KeePassLibSD
            MemoryStream ms = new MemoryStream(m_pbImageDataPng, false);
            m_pCachedImage = Image.FromStream(ms);
            ms.Close();
            #else
            m_pCachedImage = null;
            #endif
        }
开发者ID:elitak,项目名称:keepass,代码行数:21,代码来源:PwCustomIcon.cs


示例18: PwCustomIcon

        public PwCustomIcon(PwUuid pwUuid, byte[] pbImageDataPng)
        {
            Debug.Assert(pwUuid != null);
            if(pwUuid == null) throw new ArgumentNullException("pwUuid");
            Debug.Assert(!pwUuid.Equals(PwUuid.Zero));
            if(pwUuid.Equals(PwUuid.Zero)) throw new ArgumentException("pwUuid == 0.");
            Debug.Assert(pbImageDataPng != null);
            if(pbImageDataPng == null) throw new ArgumentNullException("pbImageDataPng");

            m_pwUuid = pwUuid;
            m_pbImageDataPng = pbImageDataPng;

            // MemoryStream ms = new MemoryStream(m_pbImageDataPng, false);
            // m_imgOrg = Image.FromStream(ms);
            // ms.Close();
            try { m_imgOrg = GfxUtil.LoadImage(m_pbImageDataPng); }
            catch(Exception) { Debug.Assert(false); }

            if(m_imgOrg != null)
                m_dImageCache[GetID(m_imgOrg.Width, m_imgOrg.Height)] =
                    m_imgOrg;
        }
开发者ID:Stoom,项目名称:KeePass,代码行数:22,代码来源:PwCustomIcon.cs


示例19: OpenEntryUrl

        private static void OpenEntryUrl(IpcParamEx ip, MainForm mf)
        {
            string strUuid = ip.Param0;
            if(string.IsNullOrEmpty(strUuid)) return; // No assert (user data)

            byte[] pbUuid = MemUtil.HexStringToByteArray(strUuid);
            if((pbUuid == null) || (pbUuid.Length != PwUuid.UuidSize)) return;
            PwUuid pwUuid = new PwUuid(pbUuid);

            List<PwDocument> lDocs = new List<PwDocument>(mf.DocumentManager.Documents);
            PwDocument pwDocActive = mf.DocumentManager.ActiveDocument;
            for(int i = 1; i < lDocs.Count; ++i)
            {
                if(object.ReferenceEquals(lDocs[i], pwDocActive))
                {
                    lDocs.RemoveAt(i);
                    lDocs.Insert(0, pwDocActive);
                    break;
                }
            }

            foreach(PwDocument pwDoc in lDocs)
            {
                if(pwDoc == null) { Debug.Assert(false); continue; }

                PwDatabase pdb = pwDoc.Database;
                if((pdb == null) || !pdb.IsOpen) continue;

                PwEntry pe = pdb.RootGroup.FindEntry(pwUuid, true);
                if(pe == null) continue;

                mf.PerformDefaultUrlAction(new PwEntry[]{ pe }, true);
                break;
            }
        }
开发者ID:saadware,项目名称:kpn,代码行数:35,代码来源:IpcUtilEx.cs


示例20: SaveChosenIcon

		private bool SaveChosenIcon()
		{
			if(m_radioStandard.Checked)
			{
				ListView.SelectedIndexCollection lvsi = m_lvIcons.SelectedIndices;
				if(lvsi.Count != 1) return false;

				m_uChosenImageID = (uint)lvsi[0];
			}
			else // Custom icon
			{
				ListView.SelectedListViewItemCollection lvsic = m_lvCustomIcons.SelectedItems;
				if(lvsic.Count != 1) return false;

				m_pwChosenCustomImageUuid = (PwUuid)lvsic[0].Tag;
			}

			return true;
		}
开发者ID:ComradeP,项目名称:KeePass-2.x,代码行数:19,代码来源:IconPickerForm.cs



注:本文中的KeePassLib.PwUuid类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PasswordGenerator.PwProfile类代码示例发布时间:2022-05-26
下一篇:
C# KeePassLib.PwDatabase类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap