本文整理汇总了C#中Kimono.KUrl类的典型用法代码示例。如果您正苦于以下问题:C# KUrl类的具体用法?C# KUrl怎么用?C# KUrl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KUrl类属于Kimono命名空间,在下文中一共展示了KUrl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSlave
/// <remarks>
/// Creates a new slave.
/// <param> name="protocol" the protocol
/// </param><param> name="url" is the url
/// </param><param> name="error" is the error code on failure and undefined else.
/// </param><param> name="error_text" is the error text on failure and undefined else.
/// </param></remarks> <return> 0 on failure, or a pointer to a slave otherwise.
/// </return>
/// <short> Creates a new slave.</short>
public static KIO.Slave CreateSlave(string protocol, KUrl url, ref int error, StringBuilder error_text)
{
StackItem[] stack = new StackItem[5];
#if DEBUG
stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(protocol);
#else
stack[1].s_class = (IntPtr) GCHandle.Alloc(protocol);
#endif
#if DEBUG
stack[2].s_class = (IntPtr) DebugGCHandle.Alloc(url);
#else
stack[2].s_class = (IntPtr) GCHandle.Alloc(url);
#endif
stack[3].s_int = error;
#if DEBUG
stack[4].s_class = (IntPtr) DebugGCHandle.Alloc(error_text);
#else
stack[4].s_class = (IntPtr) GCHandle.Alloc(error_text);
#endif
staticInterceptor.Invoke("createSlave$#$$", "createSlave(const QString&, const KUrl&, int&, QString&)", stack);
#if DEBUG
DebugGCHandle.Free((GCHandle) stack[1].s_class);
#else
((GCHandle) stack[1].s_class).SynchronizedFree();
#endif
#if DEBUG
DebugGCHandle.Free((GCHandle) stack[2].s_class);
#else
((GCHandle) stack[2].s_class).SynchronizedFree();
#endif
error = stack[3].s_int;
#if DEBUG
DebugGCHandle.Free((GCHandle) stack[4].s_class);
#else
((GCHandle) stack[4].s_class).SynchronizedFree();
#endif
return (KIO.Slave) Enum.ToObject(typeof(KIO.Slave), stack[0].s_int);
}
示例2: Get
public override void Get(KUrl url)
{
string docurl = url.ToString().Substring(9);
if (docurl == string.Empty) {
Redirection(new KUrl("monodoc:/root:/classlib"));
Finished();
return;
}
MimeType("text/html");
Node n;
try {
string data = GetHtml(docurl, null, out n);
if (data != null) {
data = data.Replace("href=\"", "href=\"monodoc:/");
Data(data);
} else {
Data("The requested url is not availible");
}
} catch {
Data("The requested url is not availible");
}
Finished();
}
示例3: Access
/// <remarks>
/// Used to access a service from an url. Always check for the signal serviceReady() that fires
/// when this service is actually ready for use.
/// </remarks> <short> Used to access a service from an url.</short>
public static Plasma.Service Access(KUrl url, QObject parent)
{
return (Plasma.Service) staticInterceptor.Invoke("access##", "access(const KUrl&, QObject*)", typeof(Plasma.Service), typeof(KUrl), url, typeof(QObject), parent);
}
示例4: ShowPreview
public abstract void ShowPreview(KUrl url);
示例5: Save
public virtual void Save(KUrl url, string suggestedFileName)
{
interceptor.Invoke("save#$", "save(const KUrl&, const QString&)", typeof(void), typeof(KUrl), url, typeof(string), suggestedFileName);
}
示例6: SimpleSave
public static void SimpleSave(KUrl url, string suggestedFileName, QWidget window)
{
staticInterceptor.Invoke("simpleSave#$#", "simpleSave(const KUrl&, const QString&, QWidget*)", typeof(void), typeof(KUrl), url, typeof(string), suggestedFileName, typeof(QWidget), window);
}
示例7: AskEmbedOrSave
public static KParts.BrowserRun.AskSaveResult AskEmbedOrSave(KUrl url, string mimeType)
{
return (KParts.BrowserRun.AskSaveResult) staticInterceptor.Invoke("askEmbedOrSave#$", "askEmbedOrSave(const KUrl&, const QString&)", typeof(KParts.BrowserRun.AskSaveResult), typeof(KUrl), url, typeof(string), mimeType);
}
示例8: AllowExecution
public static bool AllowExecution(string mimeType, KUrl url)
{
return (bool) staticInterceptor.Invoke("allowExecution$#", "allowExecution(const QString&, const KUrl&)", typeof(bool), typeof(string), mimeType, typeof(KUrl), url);
}
示例9: Directory
/// <remarks>
/// Converts the given URL into 8-bit form and separate the
/// dirname from the filename. This is useful for slave functions
/// like stat or get.
/// The dirname is returned with the final slash always stripped
/// </remarks> <short> Converts the given URL into 8-bit form and separate the dirname from the filename.</short>
public QByteArray Directory(KUrl url, bool ignore_trailing_slash)
{
return (QByteArray) interceptor.Invoke("directory#$", "directory(const KUrl&, bool) const", typeof(QByteArray), typeof(KUrl), url, typeof(bool), ignore_trailing_slash);
}
示例10: FileName
/// <remarks>
/// Converts the given URL into 8-bit form and retrieve the filename.
/// </remarks> <short> Converts the given URL into 8-bit form and retrieve the filename.</short>
public QByteArray FileName(KUrl url)
{
return (QByteArray) interceptor.Invoke("fileName#", "fileName(const KUrl&) const", typeof(QByteArray), typeof(KUrl), url);
}
示例11: Encode
/// <remarks>
/// Converts the given URL into its 8-bit components
/// </remarks> <short> Converts the given URL into its 8-bit components </short>
public QByteArray Encode(KUrl url)
{
return (QByteArray) interceptor.Invoke("encode#", "encode(const KUrl&) const", typeof(QByteArray), typeof(KUrl), url);
}
示例12: OpenUrl
public override bool OpenUrl(KUrl url)
{
return (bool) interceptor.Invoke("openUrl#", "openUrl(const KUrl&)", typeof(bool), typeof(KUrl), url);
}
示例13: Begin
public virtual void Begin(KUrl url)
{
interceptor.Invoke("begin#", "begin(const KUrl&)", typeof(void), typeof(KUrl), url);
}
示例14: HtmlError
/// <remarks>
/// presents a detailed error message to the user.
/// <code>errorCode</code> kio error code, eg KIO.ERR_SERVER_TIMEOUT.
/// <code>text</code> kio additional information text.
/// <code>url</code> the url that triggered the error.
/// </remarks> <short> presents a detailed error message to the user.</short>
protected void HtmlError(int errorCode, string text, KUrl reqUrl)
{
interceptor.Invoke("htmlError$$#", "htmlError(int, const QString&, const KUrl&)", typeof(void), typeof(int), errorCode, typeof(string), text, typeof(KUrl), reqUrl);
}
示例15: SetUrl
/// <remarks>
/// Set the URL of the bookmark
/// <param> name="url" the new bookmark URL
/// </param></remarks> <short> Set the URL of the bookmark </short>
public void SetUrl(KUrl url)
{
interceptor.Invoke("setUrl#", "setUrl(const KUrl&)", typeof(void), typeof(KUrl), url);
}