维基百科:WikiFunctions
Template:AutoWikiBrowser/heade
WikiFunctions.dll 是一個微軟 .NET Framework 動態鏈接庫,它包含了與編輯維基相關的各種類(class)和用戶界面元素。除了作為各種AWB可執行文件之間共享代碼的倉庫外, WikiFunctions 還包含了許多可被其他項目和AWB插件重複使用的獨立代碼。
Objects
WikiFunctions contains various objects and modules used by AutoWikiBrowser, other AWB products, and AWB plugins. It also contains various items which may be of use to 3rd party developers, some of which are:
WikiFunctions.Browser.WebControl | Provides a WebBrowser component adapted and extended for use with Wikis. |
---|---|
WikiFunctions.Controls.Help | Provides a web-based help browser. Must be inherited. |
WikiFunctions.Controls.LED | A simple "LED" control. Can be seen on the AWB logging-to-file tab. |
WikiFunctions.Controls.TransparentLabel | A label that can be transparent. |
WikiFunctions.Controls.Lists namespace | Various controls for manipulating lists. |
WikiFunctions.DatabaseScanner.DatabaseScanner | Provides a form and functions for searching XML data dumps. |
WikiFunctions.Controls.NoFlickerExtendedListView | This is advanced ListView control with custom column sorting and flicker-free rendering. |
WikiFunctions.Encryption.RijndaelSimple | Contains an easy to use wrapper around Rijndael encryption. The class uses a symmetric key algorithm (Rijndael/AES) to encrypt and decrypt data. As long as encryption and decryption routines use the same parameters to generate the keys, the keys are guaranteed to be the same. |
WikiFunctions.Lists | Provides functionality to create and manipulate Lists of pages from many different sources. |
WikiFunctions.Logging.IMyTraceListener | An interface implemented by all trace (logging) classes including the trace manager |
WikiFunctions.Logging.TraceListenerBase | This abstract class can be used to build trace listener classes |
WikiFunctions.Logging.TraceListenerUploadableBase | An abstract class for building auto-uploading trace listeners |
WikiFunctions.Logging.TraceManager | An inheritable implementation of a Logging manager, built around a generic collection of IMyTraceListener objects and String keys |
WikiFunctions.Logging.WikiTraceListener | This class logs in Mediawiki-markup format |
WikiFunctions.Logging.XHTMLTraceListener | This class logs in XHTML format |
WikiFunctions.Logging.Uploader.ITraceStatusProvider | Implemented by classes which expose a TraceStatus object |
WikiFunctions.Logging.Uploader.LogEntry | Object which contains details of target pages for log entries (see e.g. User:Kingbotk/Logs, Wikipedia:WikiProject Biography/Automation/Logs) |
WikiFunctions.Logging.Uploader.LogUploader | A class which uploads logs to Wikipedia. Inherits from WikiFunctions.Editor in AWB's DLL |
WikiFunctions.Logging.Uploader.TraceStatus | A class which keeps track of statistics and not-yet-uploaded log entries. |
WikiFunctions.Logging.Uploader.UploadableLogSettings | A simple settings class for logging solutions |
WikiFunctions.Logging.Uploader.UploadableLogSettings2 | An extended base class with extra properties for a comprehensive logging solution |
WikiFunctions.Logging.Uploader.UploadingPleaseWaitForm | A form for displaying when the application is busy uploading |
WikiFunctions.Logging.UploaderUsernamePassword | Stores the user's login details/cookies |
WikiFunctions.TalkPages.TalkPageHeaders.ProcessTalkPage | Parses a talk page for a {{talk header}} and/or {{skip to talk}} template and moves them to the top. |
WikiFunctions.Tools | Provides various tools as static methods, such as getting the html of a page. |
ApiEdit
Login
Example to simply login to the English Wikipedia.
You need to reference the WikiFunctions.dll or the project.
using WikiFunctions.API;
class Program
{
static void Main(string[] args)
{
ApiEdit editor = new ApiEdit("http://en.wikipedia.org/w/");
try
{
editor.Login("Username", "Password");
Console.WriteLine(" succeeded");
}
catch (LoginException)
{
Console.WriteLine(" failed");
}
}
}