GTK#和windows窗体有什么区别?他们完全不同吗?
谢谢
我已经开始在Mac上使用MonoDevelop for F#.它非常酷,除了它崩溃了很多.困扰我的一件事是我不能改变项目中F#源文件的顺序.这可能吗?如果不是,那将使组织项目成为一场噩梦.
我在MonoTouch中寻找url escape和unescape函数.基本上我正在寻找方法stringByReplacingPercentEscapesUsingEncoding的MonoTouch等价物,如在objective-c代码的以下行中:
NSString *args = [(NSString*)[components objectAtIndex:3]
stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
Run Code Online (Sandbox Code Playgroud)
我本以期能够将其翻译成这样的东西:
string args = URL.Unescape(components[3]);
Run Code Online (Sandbox Code Playgroud)
MonoTouch中是否存在URL转义/ unescape函数,还是我必须自己滚动?
我有一个Monotouch iPad应用程序,我正在尝试设置自动构建脚本.我试图使用mdtool,但我似乎已经碰壁了.如果我使用MonoDevelop GUI构建解决方案,它会成功构建.但是,如果我清理解决方案,并使用mdtool进行构建,则会在未知文件中获得有关空引用异常的异常.
我在最近几个小时里用Google搜索过.我以为我在Stack Overflow上发现了一些引导,但它们似乎都是不同的情况.在UI中成功构建和CLI失败的情况并不多.
这是一些输出:
Performing main compilation...
Updating CodeBehind files
ERROR [2011-06-03 11:27:52Z]: Error generating code for xib file '/Users/Me/Documents/Code/MyApp/MainWindow.xib'
System.NullReferenceException: Object reference not set to an instance of an object at MonoDevelop.DesignerSupport.CodeBehindWriter.<get_OpenFiles>m__21 () [0x00000] in <filename unknown>:0
at MonoDevelop.Ide.DispatchService.GuiSyncDispatch (MonoDevelop.Ide.MessageHandler cb) [0x00000] in <filename unknown>:0
at MonoDevelop.DesignerSupport.CodeBehindWriter.get_OpenFiles () [0x00000] in <filename unknown>:0
at MonoDevelop.DesignerSupport.CodeBehindWriter.Write (System.CodeDom.CodeCompileUnit ccu, FilePath path) [0x00000] in <filename unknown>:0
at MonoDevelop.MacDev.XibCodeBehind.GenerateDesignerCode (MonoDevelop.DesignerSupport.CodeBehindWriter writer, MonoDevelop.Projects.ProjectFile xibFile, MonoDevelop.Projects.ProjectFile designerFile) [0x00000] in <filename unknown>:0
at MonoDevelop.MacDev.MacBuildUtilities.UpdateCodeBehind (IProgressMonitor …Run Code Online (Sandbox Code Playgroud) 我将文件app.config添加到C#mono项目中.
在我使用的项目内
foreach (string key in ConfigurationManager.AppSettings)
{
string value = ConfigurationManager.AppSettings[key];
Console.WriteLine("Key: {0}, Value: {1}", key, value);
}
Run Code Online (Sandbox Code Playgroud)
配置文件看起来像这样
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Key1" value="Kevin" />
<add key="Key2" value="150" />
<add key="Key3" value="Rice" />
</appSettings>
</configuration>
Run Code Online (Sandbox Code Playgroud)
没有检测到密钥.如何读取配置值?
我有一个名为HomeScreen的屏幕,它实现了UIViewController.我希望在此屏幕上使用背景图像.是否有一个事件可以覆盖以在HomeScreen.cs文件中设置此背景图像?
由于我不满意我的C#应用程序不能在Linux或Mac上工作,我安装了MonoDevelop,希望将我的应用程序移植到Mono以实现交叉平台化.
但是,我不知道如何使用MonoDevelop来完成这项任务.常见问题解答或文档中没有说明.
知道怎么做吗?
我们正在启动一个跨平台项目,以部署到Android和iOS.显然,很多代码都要在两者之间共享,而一些代码在很大程度上依赖于.NET框架项,就像sqlite-net库那样.
在两个项目之间共享代码的最佳方式(afaik)是使用PCL - 这样就可以在解决方案中使用来自iOS和Android项目的共享代码来引用项目,并将所有内容重新编译并链接到一个很好的方式.
但是,使用gmcs编译器编译在MonoDevelop中创建的PCL,并且在这种情况下无法构建一些外部依赖项(即,在这种情况下使用的框架缺乏System.Func<T, TResult>,仅提供System.Func<T1, T2, ..., T9, TResult>).反过来,MonoTouch的编译器(smcs)能够完美地编译PCL(通过用smcs二进制替换gmcs二进制文件来证明).从我在谷歌搜索后发现的,gmcs使用2.0 .NET框架,而smcs使用名为2.1框架的smth,实际上是更新的.NET的混合体.
这里有一个问题:在MonoDevelop中构建PCL(作为另一个项目的依赖项)时,是否可以指定使用哪个编译器?
我需要为Xamarin Studio(Gtk #project)安装gstreamer-sharp.我安装了OSSBuild并添加到引用gstreamer-sharp.dll,调试后我得到了异常:
Gst.GLib.GException:Gst.Parse.Launch中没有元素"playbin"(String pipeline_description)
输出:
0:00:00.010000000 6224 0748AA00 ERROR GST_REGISTRY gstregistrybinary.c:557:gst_registry_binary_read_cache: Binary registry type not recognized (invalid magic) for file at C:\Users\Admin\.gstreamer-0.10\registry.i686.bin
** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libgsf-win32-1-114.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libgsf-win32-1-114.dll': ?? ?????? ????????? ??????.
** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libpangocairo-1.0-0.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libpangocairo-1.0-0.dll': ?? ??????? ????????? ?????????.
** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\librsvg-2-2.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\librsvg-2-2.dll': ?? ?????? ????????? ??????.
0:00:02.501003000 6224 0748AA00 …Run Code Online (Sandbox Code Playgroud)