Skip to content
Some extensions, helper classes, and CodeSite method tracer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Vikings.Base
Vikings.CodeHelper
Vikings.CodeSite.Extensions
Vikings.Swf.Extensions
Vikings.Swf
Vikings.System.Extensions
Vikings.Translate.Tests
Vikings.Translate
Vikings.Wpf.Extensions
.gitattributes
.gitignore
LICENSE
README.md
Vikings.sln

README.md

Vikings

  • Vikings是一个.NET工具包,可在nuget直接下载编译过的包。其主要目的是为.NET框架增加易用的扩展
  • 一些扩展、助手类和CodeSite方法跟踪器
  • Vikings is a .NET coding utility package, binary package avaliable on nuget for Visual Studio. Its main purpose is adding some awesome extensions to .NET Framework.

Extensions list

Vikings.Swf.Extensions and Vikings.Wpf.Extensions

  • .NET WinForm和WPF的扩展,将LINQ引入界面控件查询。其主要目的在于简化代码并提高代码可读性。
  • .NET WinForm and WPF extension, introducing LINQ to UI controls retrieval. Its main purpose is code reducing and readability improving.

Usage:

  • (some winform object).All() return a IEnumable object contained all UI controls in the given win form Control object
  • (some WPF form object).All() return a IEnumable object contained all UI controls in the given WPF form object
  • (some WPF form object).Child() return a IEnumable object contained all child UI controls in the given WPF form object
if (!this.All().OfType<CheckBox>().Any(f => f.IsChecked == true))
	MessageBox.Show("请至少选择一个");

So, you can use LINQ functions like Any() Where() to retrieval controls

Vikings.Translate

  • Google 翻译调用,简化代码,一行搞定
  • Google translation, very simple, only one line

Usage:

  • Vikings.Translate.Translate("some text to be translate","original language code,like en-US, support 'auto'","target language code, like zh-CN")
Vikings.Translate.GoogleTranslate.Translate("新年快乐!","auto","en-US");
You can’t perform that action at this time.