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

C# PwGroup类代码示例

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

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



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

示例1: InitEx

        public void InitEx(PwGroup pgDataSource, bool bPrintMode)
        {
            Debug.Assert(pgDataSource != null); if(pgDataSource == null) throw new ArgumentNullException("pgDataSource");

            m_pgDataSource = pgDataSource;
            m_bPrintMode = bPrintMode;
        }
开发者ID:jonbws,项目名称:strengthreport,代码行数:7,代码来源:PrintForm.cs


示例2: ImportRecord

		private static void ImportRecord(Node<BaseRecord> currentNode, PwGroup groupAddTo, PwDatabase pwStorage)
		{
			BaseRecord record = currentNode.AssociatedObject;

			if (record.GetType() == typeof(FolderRecord))
			{
				FolderRecord folderRecord = (FolderRecord)record;
				var folder = CreateFolder(groupAddTo, folderRecord);

				foreach (var node in currentNode.Nodes)
				{
					ImportRecord(node, folder, pwStorage);
				}
			}
			else if (record.GetType() == typeof(WebFormRecord))
			{
				WebFormRecord webForm = (WebFormRecord)record;
				CreateWebForm(groupAddTo, pwStorage, webForm);
			}
			else if (record.GetType() == typeof(BaseRecord))
			{
				//Trace.WriteLine(String.Format("Error. Can't import unknown record type: {0}", record.RawJson));
			}
			else if (record.GetType() == typeof(UnknownRecord))
			{
				//CreateUnknown(groupAddTo, pwStorage, record as UnknownRecord);
			}
		}
开发者ID:diimdeep,项目名称:1P2KeePass,代码行数:28,代码来源:PIFImporter.cs


示例3: InitEx

        public void InitEx(PwGroup pgEntrySource, ImageList ilClientIcons,
			string strDefaultRef)
        {
            m_pgEntrySource = pgEntrySource;
            m_ilIcons = ilClientIcons;
            m_strDefaultRef = (strDefaultRef ?? string.Empty);
        }
开发者ID:Stoom,项目名称:KeePass,代码行数:7,代码来源:FieldRefForm.cs


示例4: CreateSummaryList

        public static string CreateSummaryList(PwGroup pgItems, bool bStartWithNewPar)
        {
            List<PwEntry> l = pgItems.GetEntries(true).CloneShallowToList();
            string str = CreateSummaryList(pgItems, l.ToArray());

            if((str.Length == 0) || !bStartWithNewPar) return str;
            return (MessageService.NewParagraph + str);
        }
开发者ID:pythe,项目名称:wristpass,代码行数:8,代码来源:EntryUtil.cs


示例5: InitEx

		public void InitEx(PwGroup pgDataSource, bool bPrintMode, int nDefaultSortColumn)
		{
			Debug.Assert(pgDataSource != null); if(pgDataSource == null) throw new ArgumentNullException("pgDataSource");

			m_pgDataSource = pgDataSource;
			m_bPrintMode = bPrintMode;
			m_nDefaultSortColumn = nDefaultSortColumn;
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:8,代码来源:PrintForm.cs


示例6: ModifyWith

			public GxiContext ModifyWith(PwGroup pg)
			{
				GxiContext c = (GxiContext)MemberwiseClone();
				Debug.Assert(object.ReferenceEquals(c.m_dStringKeyRepl, m_dStringKeyRepl));

				c.m_pg = pg;
				return c;
			}
开发者ID:joshuadugie,项目名称:KeePass-2.x,代码行数:8,代码来源:GxiImporter.cs


示例7: MoveElement

 public MoveElement(IStructureItem elementToMove, PwGroup targetGroup, Context ctx, IKp2aApp app, OnFinish finish)
     : base(finish)
 {
     _elementToMove = elementToMove;
     _targetGroup = targetGroup;
     _ctx = ctx;
     _app = app;
 }
开发者ID:pythe,项目名称:wristpass,代码行数:8,代码来源:MoveElement.cs


示例8: InitEx

        public void InitEx(PwGroup pg, bool bCreatingNew, ImageList ilClientIcons,
			PwDatabase pwDatabase)
        {
            m_pwGroup = pg;
            m_bCreatingNew = bCreatingNew;
            m_ilClientIcons = ilClientIcons;
            m_pwDatabase = pwDatabase;
        }
开发者ID:haro-freezd,项目名称:KeePass,代码行数:8,代码来源:GroupForm.cs


示例9: Save

		// public void Save(string strFile, PwGroup pgDataSource, KdbxFormat format,
		//	IStatusLogger slLogger)
		// {
		//	bool bMadeUnhidden = UrlUtil.UnhideFile(strFile);
		//
		//	IOConnectionInfo ioc = IOConnectionInfo.FromPath(strFile);
		//	this.Save(IOConnection.OpenWrite(ioc), pgDataSource, format, slLogger);
		//
		//	if(bMadeUnhidden) UrlUtil.HideFile(strFile, true); // Hide again
		// }

		/// <summary>
		/// Save the contents of the current <c>PwDatabase</c> to a KDBX file.
		/// </summary>
		/// <param name="sSaveTo">Stream to write the KDBX file into.</param>
		/// <param name="pgDataSource">Group containing all groups and
		/// entries to write. If <c>null</c>, the complete database will
		/// be written.</param>
		/// <param name="format">Format of the file to create.</param>
		/// <param name="slLogger">Logger that recieves status information.</param>
		public void Save(Stream sSaveTo, PwGroup pgDataSource, KdbxFormat format,
			IStatusLogger slLogger)
		{
			Debug.Assert(sSaveTo != null);
			if(sSaveTo == null) throw new ArgumentNullException("sSaveTo");

			m_format = format;
			m_slLogger = slLogger;

			HashingStreamEx hashedStream = new HashingStreamEx(sSaveTo, true, null);

			UTF8Encoding encNoBom = StrUtil.Utf8;
			CryptoRandom cr = CryptoRandom.Instance;

			try
			{
				m_pbMasterSeed = cr.GetRandomBytes(32);
				m_pbTransformSeed = cr.GetRandomBytes(32);
				m_pbEncryptionIV = cr.GetRandomBytes(16);

				m_pbProtectedStreamKey = cr.GetRandomBytes(32);
				m_craInnerRandomStream = CrsAlgorithm.Salsa20;
				m_randomStream = new CryptoRandomStream(m_craInnerRandomStream,
					m_pbProtectedStreamKey);

				m_pbStreamStartBytes = cr.GetRandomBytes(32);

				Stream writerStream;
				if(m_format == KdbxFormat.Default)
				{
					WriteHeader(hashedStream); // Also flushes the stream

					Stream sEncrypted = AttachStreamEncryptor(hashedStream);
					if((sEncrypted == null) || (sEncrypted == hashedStream))
						throw new SecurityException(KLRes.CryptoStreamFailed);

					sEncrypted.Write(m_pbStreamStartBytes, 0, m_pbStreamStartBytes.Length);

					Stream sHashed = new HashedBlockStream(sEncrypted, true);

					if(m_pwDatabase.Compression == PwCompressionAlgorithm.GZip)
						writerStream = new GZipStream(sHashed, CompressionMode.Compress);
					else
						writerStream = sHashed;
				}
				else if(m_format == KdbxFormat.PlainXml)
					writerStream = hashedStream;
				else { Debug.Assert(false); throw new FormatException("KdbFormat"); }

				m_xmlWriter = new XmlTextWriter(writerStream, encNoBom);
				WriteDocument(pgDataSource);

				m_xmlWriter.Flush();
				m_xmlWriter.Close();
				writerStream.Close();
			}
			finally { CommonCleanUpWrite(sSaveTo, hashedStream); }
		}
开发者ID:kusuriya,项目名称:PasswordKeeper,代码行数:78,代码来源:KdbxFile.Write.cs


示例10: Launch

        public static void Launch(Activity act, PwGroup parentGroup)
        {
            Intent i = new Intent(act, typeof(GroupEditActivity));

            PwGroup parent = parentGroup;
            i.PutExtra(KeyParent, parent.Uuid.ToHexString());

            act.StartActivityForResult(i, 0);
        }
开发者ID:pythe,项目名称:wristpass,代码行数:9,代码来源:GroupEditActivity.cs


示例11: GetGroupPath

 public static string GetGroupPath(PwGroup group)
 {
     string path = GetGroupPathRec(group);
     if (path.Length > 0) {
         return path;
     } else {
         return "(Root)";
     }
 }
开发者ID:jonbws,项目名称:strengthreport,代码行数:9,代码来源:ReportEngine.cs


示例12: GetGroupPathRec

 private static string GetGroupPathRec(PwGroup group)
 {
     if (group.ParentGroup != null) {
         string parent = GetGroupPathRec(group.ParentGroup);
         return parent + (parent.Length > 0 ? "/" : "") + group.Name;
     } else {
         // Empty, because we don't need the name of DB in path, which is the root.
         return "";
     }
 }
开发者ID:jonbws,项目名称:strengthreport,代码行数:10,代码来源:ReportEngine.cs


示例13: AddProduct

        private void AddProduct(PwDatabase database, PwGroup group, Product product)
        {
            var productGroup = group.FindCreateGroup(product.Name, true);

            foreach (var key in product.Keys)
            {
                if(!GroupContainsKeyAsPassword(productGroup,key))
                    AddKey(database, productGroup, key);
            }
        }
开发者ID:jeff2001,项目名称:MicrosoftKeyImporterPlugin,代码行数:10,代码来源:MicrosoftKeysExportFileFormatProvider.cs


示例14: AddKey

        private void AddKey(PwDatabase database, PwGroup group, Key key)
        {
            var entry = new PwEntry(true, true);

            group.AddEntry(entry, true);

            entry.Strings.Set(PwDefs.TitleField, new ProtectedString(database.MemoryProtection.ProtectTitle, key.Type));
            entry.Strings.Set(PwDefs.PasswordField, new ProtectedString(database.MemoryProtection.ProtectPassword, key.Value));
            entry.Strings.Set(PwDefs.NotesField, new ProtectedString(database.MemoryProtection.ProtectNotes, key.Description));
        }
开发者ID:jeff2001,项目名称:MicrosoftKeyImporterPlugin,代码行数:10,代码来源:MicrosoftKeysExportFileFormatProvider.cs


示例15: AddEntry

        protected AddEntry(Context ctx, IKp2aApp app, PwEntry entry, PwGroup parentGroup, OnFinish finish)
            : base(finish)
        {
            _ctx = ctx;
            _parentGroup = parentGroup;
            _app = app;
            _entry = entry;

            _onFinishToRun = new AfterAdd(app.GetDb(), entry, OnFinishToRun);
        }
开发者ID:pythe,项目名称:wristpass,代码行数:10,代码来源:AddEntry.cs


示例16: Search

        public Search(PwGroup rootGroup)
        {
            this.rootGroup = rootGroup;

            this.SearchInTitle = Settings.Default.SearchInTitle;
            this.SearchInUrl = Settings.Default.SearchInUrl;
            this.SearchInUserName = Settings.Default.SearchInUserName;
            this.SearchInNotes = Settings.Default.SearchInNotes;
            this.SearchInPassword = Settings.Default.SearchInPassword;
            this.searchInOther = Settings.Default.SearchInOther;
        }
开发者ID:iamkarlson,项目名称:keepass-quicksearch,代码行数:11,代码来源:Search.cs


示例17: ConstructEx

		private void ConstructEx(PwGroup pgDataSource, PwDatabase pwContextInfo,
			bool? bExportDeleted)
		{
			if(pgDataSource == null) throw new ArgumentNullException("pgDataSource");
			// pwContextInfo may be null

			m_pg = pgDataSource;
			m_pd = pwContextInfo;

			if(bExportDeleted.HasValue) m_bExpDel = bExportDeleted.Value;
		}
开发者ID:dbremner,项目名称:keepass2,代码行数:11,代码来源:PwExportInfo.cs


示例18: add_sub_groups

 private void add_sub_groups(PwGroup group, int level, string cur_item_uuid)
 {
     PwObjectList<PwGroup> groups = group.GetGroups(false);
     foreach (PwGroup sub_group in groups)
     {
         StartGroupDropdown item = new StartGroupDropdown(sub_group.Uuid.ToHexString(), sub_group.Name, level + 1);
         if (sub_group.Uuid.ToHexString() == cur_item_uuid)
             drop_cur_item = item;
         drop_items.Add(item);
         add_sub_groups(sub_group, level + 1, cur_item_uuid);
     }
 }
开发者ID:mitchcapper,项目名称:KPFloatingPanel,代码行数:12,代码来源:OptionsForm.cs


示例19: Run

        public override void Run()
        {
            StatusLogger.UpdateMessage(UiStringKey.AddingGroup);
            // Generate new group
            Group = new PwGroup(true, true, _name, (PwIcon)_iconId);
            Parent.AddGroup(Group, true);

            // Commit to disk
            SaveDb save = new SaveDb(_ctx, _app, OnFinishToRun, DontSave);
            save.SetStatusLogger(StatusLogger);
            save.Run();
        }
开发者ID:pythe,项目名称:wristpass,代码行数:12,代码来源:AddGroup.cs


示例20: AddGroup

        private AddGroup(Context ctx, IKp2aApp app, String name, int iconid, PwGroup parent, OnFinish finish, bool dontSave)
            : base(finish)
        {
            _ctx = ctx;
            _name = name;
            _iconId = iconid;
            Parent = parent;
            DontSave = dontSave;
            _app = app;

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# PwIcon类代码示例发布时间:2022-05-24
下一篇:
C# PwEntry类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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