当前位置: 首页>>代码示例>>C#>>正文


C# PwUuid.Equals方法代码示例

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


在下文中一共展示了PwUuid.Equals方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;

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

示例3: 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

示例4: 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

示例5: 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);

            string strTitle = (m_bCreatingNew ? KPRes.AddGroup : KPRes.EditGroup);
            BannerFactory.CreateBannerEx(this, m_bannerImage,
                Properties.Resources.B48x48_Folder_Txt, strTitle,
                (m_bCreatingNew ? KPRes.AddGroupDesc : KPRes.EditGroupDesc));
            this.Icon = Properties.Resources.KeePass;
            this.Text = strTitle;

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

            m_pwIconIndex = m_pwGroup.IconId;
            m_pwCustomIconID = m_pwGroup.CustomIconUuid;

            m_tbName.Text = m_pwGroup.Name;
            UIUtil.SetMultilineText(m_tbNotes, m_pwGroup.Notes);

            if(!m_pwCustomIconID.Equals(PwUuid.Zero))
                UIUtil.SetButtonImage(m_btnIcon, DpiUtil.GetIcon(
                    m_pwDatabase, 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.Date;
                m_cbExpires.Checked = false;
            }
            m_cgExpiry.Attach(m_cbExpires, m_dtExpires);

            PwGroup pgParent = m_pwGroup.ParentGroup;
            bool bParentAutoType = ((pgParent != null) ?
                pgParent.GetAutoTypeEnabledInherited() :
                PwGroup.DefaultAutoTypeEnabled);
            UIUtil.MakeInheritableBoolComboBox(m_cmbEnableAutoType,
                m_pwGroup.EnableAutoType, bParentAutoType);
            bool bParentSearching = ((pgParent != null) ?
                pgParent.GetSearchingEnabledInherited() :
                PwGroup.DefaultSearchingEnabled);
            UIUtil.MakeInheritableBoolComboBox(m_cmbEnableSearching,
                m_pwGroup.EnableSearching, bParentSearching);

            m_tbDefaultAutoTypeSeq.Text = m_pwGroup.GetAutoTypeSequenceInherited();

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

            CustomizeForScreenReader();
            EnableControlsEx();
            UIUtil.SetFocus(m_tbName, this);
        }
开发者ID:haro-freezd,项目名称:KeePass,代码行数:64,代码来源:GroupForm.cs

示例6: InitEntryTab

        private void InitEntryTab()
        {
            m_pwEntryIcon = m_pwEntry.IconId;
            m_pwCustomIconID = m_pwEntry.CustomIconUuid;

            if(!m_pwCustomIconID.Equals(PwUuid.Zero))
            {
                // int nInx = (int)PwIcon.Count + m_pwDatabase.GetCustomIconIndex(m_pwCustomIconID);
                // if((nInx > -1) && (nInx < m_ilIcons.Images.Count))
                //	m_btnIcon.Image = m_ilIcons.Images[nInx];
                // else m_btnIcon.Image = m_ilIcons.Images[(int)m_pwEntryIcon];

                Image imgCustom = m_pwDatabase.GetCustomIcon(m_pwCustomIconID);
                // m_btnIcon.Image = (imgCustom ?? m_ilIcons.Images[(int)m_pwEntryIcon]);
                UIUtil.SetButtonImage(m_btnIcon, (imgCustom ?? m_ilIcons.Images[
                    (int)m_pwEntryIcon]), true);
            }
            else
            {
                // m_btnIcon.Image = m_ilIcons.Images[(int)m_pwEntryIcon];
                UIUtil.SetButtonImage(m_btnIcon, m_ilIcons.Images[
                    (int)m_pwEntryIcon], true);
            }

            bool bHideInitial = m_cbHidePassword.Checked;
            m_icgPassword.Attach(m_tbPassword, m_cbHidePassword, m_lblPasswordRepeat,
                m_tbRepeatPassword, m_lblQuality, m_pbQuality, m_lblQualityInfo,
                m_ttRect, this, bHideInitial, false);

            if(m_pwEntry.Expires)
            {
                m_dtExpireDateTime.Value = m_pwEntry.ExpiryTime;
                m_cbExpires.Checked = true;
            }
            else // Does not expire
            {
                m_dtExpireDateTime.Value = DateTime.Now.Date;
                m_cbExpires.Checked = false;
            }
            m_cgExpiry.Attach(m_cbExpires, m_dtExpireDateTime);

            if(m_pwEditMode == PwEditMode.ViewReadOnlyEntry)
            {
                m_tbTitle.ReadOnly = m_tbUserName.ReadOnly = m_tbPassword.ReadOnly =
                    m_tbRepeatPassword.ReadOnly = m_tbUrl.ReadOnly =
                    m_rtNotes.ReadOnly = true;

                m_btnIcon.Enabled = m_btnGenPw.Enabled = m_cbExpires.Enabled =
                    m_dtExpireDateTime.Enabled =
                    m_btnStandardExpires.Enabled = false;

                m_rtNotes.SelectAll();
                m_rtNotes.BackColor = m_rtNotes.SelectionBackColor =
                    AppDefs.ColorControlDisabled;
                m_rtNotes.DeselectAll();

                m_ctxToolsUrlSelApp.Enabled = m_ctxToolsUrlSelDoc.Enabled = false;
                m_ctxToolsFieldRefsInTitle.Enabled = m_ctxToolsFieldRefsInUserName.Enabled =
                    m_ctxToolsFieldRefsInPassword.Enabled = m_ctxToolsFieldRefsInUrl.Enabled =
                    m_ctxToolsFieldRefsInNotes.Enabled = false;
                m_ctxToolsFieldRefs.Enabled = false;

                m_btnOK.Enabled = false;
            }

            // Show URL in blue, if it's black in the current visual theme
            if(m_tbUrl.ForeColor.ToArgb() == Color.Black.ToArgb())
                m_tbUrl.ForeColor = Color.Blue;
        }
开发者ID:rdealexb,项目名称:keepass,代码行数:69,代码来源:PwEntryForm.cs

示例7: GetFactory

		private static TsrFactory GetFactory(PwUuid u)
		{
			if(u == null) { Debug.Assert(false); return null; }

			foreach(TsrFactory f in TsrPool.Factories)
			{
				if(u.Equals(f.Uuid)) return f;
			}

			return null;
		}
开发者ID:joshuadugie,项目名称:KeePass-2.x,代码行数:11,代码来源:TsrPool.cs

示例8: MenuGetImageIndex

        private static int MenuGetImageIndex(PwDocument ds, PwIcon pwID,
			PwUuid pwCustomID)
        {
            if(!pwCustomID.Equals(PwUuid.Zero) && (ds ==
                Program.MainForm.DocumentManager.ActiveDocument))
            {
                return (int)PwIcon.Count +
                    Program.MainForm.DocumentManager.ActiveDatabase.GetCustomIconIndex(
                    pwCustomID);
            }

            if((int)pwID < (int)PwIcon.Count) return (int)pwID;

            return (int)PwIcon.Key;
        }
开发者ID:haro-freezd,项目名称:KeePass,代码行数:15,代码来源:EntryMenu.cs


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