winform facebook app accept friend request

I am using facebook-c#-sdk to develop a winform FaceBook app, this app should be able to accept friend request and chat with people. But I didn't find any samples on how to access friend_request in the facebook-c#-sdk. Can someone help to point out how could I accept friend request? And especially how can I get the notification first and then accept the request? Extra information: T

winform facebook应用程序接受好友请求

我正在使用facebook-c#-sdk开发一个winform FaceBook应用程序,这个应用程序应该能够接受朋友请求并与人聊天。 但是我没有找到关于如何在facebook-c#-sdk中访问friend_request的示例。 有人可以帮助指出我如何接受朋友请求? 特别是,如何才能首先获取通知,然后接受请求? 额外的信息: API,[facebook-C#-SDK]由Microsoft正式支持 http://developers.facebook.com/tools/third-party-sdks/ 我已经检查了下面

facebook sdk invite friends to application

I want to allow users to invite friends to a facebook app through the Facebook c# sdk. I'm not keen on using the popups or any flakey meta language. is there a way to do this without resorting to popups? The best way to do this is via Requests 2.0. That is what FB recommends. There is a blog post about it on Facebook Developers here: http://developers.facebook.com/blog/post/464/ It&#

facebook sdk邀请朋友来申请

我想让用户通过Facebook c#sdk邀请朋友加入Facebook应用程序。 我不喜欢使用弹出窗口或任何flakey元语言。 有没有办法做到这一点,而不诉诸弹出? 最好的方法是通过Requests 2.0。 这是FB建议的。 在Facebook Developers上有一篇关于它的博客文章:http://developers.facebook.com/blog/post/464/ 其实很简单: FB.init({ appId:'YOUR_APP_ID', cookie:true, status:true, xfbml:true }); FB.ui({ method: 'ap

How do I setup configuration when I use command line to build C#/.NET?

When my program tries to access the dll in the network drive, I got this error message. Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///Z:smchoworkstasks2011ning_fpgabackendmyclass.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> System.NotSupportedException: An attempt was made to load an assembl

当我使用命令行构建C#/ .NET时,如何设置配置?

当我的程序尝试访问网络驱动器中的dll时,我收到了此错误消息。 Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///Z:smchoworkstasks2011ning_fpgabackendmyclass.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> System.NotSupportedException: An attempt was made to load an assembly from a network location wh

.net: Version numbers for DLL vs EXE?

I have been recently versioning my product (exe) and increasing the build number each time in assemblyinfo.cs. Works great, my product is currently on version 1.5.xx so in increase the 4 digit each time i have a succesful build. Now i have my DLLs which are also part of my application. What would anyone suggest how to version these? Should i version these the same as my exe ie, 1.5.xx or s

.net:DLL与EXE的版本号?

我最近版本化了我的产品(exe),并且每次在assemblyinfo.cs中增加内部版本号。 很好的工作,我的产品目前在版本1.5.xx,所以每次我有一个成功的构建增加4位数。 现在我有我的DLL也是我的应用程序的一部分。 有人会建议如何版本这些? 我应该如何版本这些与我的exe文件相同,即1.5.xx还是应该创建另一个不同的版本号? 这是我目前有点困惑。 当我的产品功能增加时,我可以提高1.5到2.0,但是这会使我的dll在哪里?

Force redundant name qualifier for static methods in Resharper

I know I can force "this." qualifier for instance member with Resharper code cleanup. Can I force redundant name qualifier for static methods? public class Foo { public void Bar() { StaticMethod(); } private static void StaticMethod() { } } Would be forced to this: public class Foo { public void Bar() { Foo.StaticMethod(); }

在Resharper中为静态方法强制使用冗余名称限定符

我知道我可以强迫“这个”。 具有Resharper代码清理的实例成员的限定符。 我可以强制使用静态方法的冗余名称限定符吗? public class Foo { public void Bar() { StaticMethod(); } private static void StaticMethod() { } } 会被迫这样做: public class Foo { public void Bar() { Foo.StaticMethod(); } private static void StaticMethod() { } }

Handling WPF Canvas Resize Correctly/Efficiently

I am attaching working code. My Question: am I handling resize correctly/efficiently? I Draw a scene on my WPF Canvas Circle at Center of Canvas and a Vertical and Horizontal line in the center of the Canvas. When I resize the canvas I Clear all the Children and Redraw the entire scene based on the new Canvas Size. Is there a better way of doing this with say RenderTransform etc? FYI My real

处理WPF Canvas正确/有效地调整大小

我附上工作代码。 我的问题:我是否正确/有效地处理调整大小? 我在画布中心的WPF Canvas Circle和Canvas中心的垂直和水平线上画一个场景。 当我调整画布大小时,清除所有子项并根据新的“画布大小”重新绘制整个场景。 有没有更好的方式来做这个说RenderTransform等? 仅供参考我真正的应用比这个简单的例子更复杂,我只是想发布这个代码,因为它演示了最短的代码来演示我尝试的真正的优化。 XAML: <Window x:Clas

How to position labels around circle?

I'm trying to figure out how to calculate the position for text labels around a circle. This is slightly more complicated than you may think at first read . I get the basics: X = ptCenter.X + (dRadius * Math.Cos(dAngle * Math.PI / 180.0)) Y = ptCenter.Y + (dRadius * Math.Sin(dAngle * Math.PI / 180.0)) So, that will give me the point on the circle at angle dAngle with radius dRadius. Of

如何定位标签周围的标签?

我试图弄清楚如何计算一个圆圈周围文本标签的位置。 这比你在第一次阅读时可能会想到的稍微复杂一些。 我了解基础知识: X = ptCenter.X + (dRadius * Math.Cos(dAngle * Math.PI / 180.0)) Y = ptCenter.Y + (dRadius * Math.Sin(dAngle * Math.PI / 180.0)) 所以,这会给我在dAngle半径为dRadius的圆上的点。 当然,DrawText(任何种类,但我特别使用DrawingContext.DrawText,如果这对你的答案有任何不同)用给定的点作

Equivalent of typedef in C#

Is there a typedef equivalent in C#, or someway to get some sort of similar behaviour? I've done some googling, but everywhere I look seems to be negative. Currently I have a situation similar to the following: class GenericClass<T> { public event EventHandler<EventData> MyEvent; public class EventData : EventArgs { /* snip */ } // ... snip } Now, it doesn't t

在C#中的typedef等效

C#中是否有typedef等价物,或者有些类似的行为? 我做了一些谷歌搜索,但我看起来似乎是负面的。 目前我的情况类似于以下内容: class GenericClass<T> { public event EventHandler<EventData> MyEvent; public class EventData : EventArgs { /* snip */ } // ... snip } 现在,火箭科学家并没有想到,当试图为该事件实施处理程序时,这可能会很快导致大量输入(为可怕的双关语表示歉意)。 它

What happens if there are no IO threads to handle async result?

I'm wondering what happens when there are no IO threads to handle the result of an async call. Say you make an async web request (in a server application so all async code is handeled by the thread pool). The OS will signal when there is a result for you and when it does you'll need an IO thread to read the bytes from the socket. If there are no IO threads available because that are a

如果没有IO线程来处理异步结果,会发生什么情况?

我想知道当没有IO线程处理异步调用的结果时会发生什么。 假设你做了一个异步web请求(在服务器应用程序中,所有异步代码都由线程池处理)。 操作系统会发出什么信号,当您有结果时,以及何时需要IO线程读取套接字中的字节。 如果没有IO线程可用,因为这些线程都在使用中(全部含义由线程池设置的最大值)会发生什么情况? 有信号可以等待,直到有线程可用的队列吗? 还是信号只是闻所未闻? 如果后者发生,等待等待的代码

How to safely call an async method in C# without await

I have an async method which returns no data: public async Task MyAsyncMethod() { // do some stuff async, don't return any data } I'm calling this from another method which returns some data: public string GetStringData() { MyAsyncMethod(); // this generates a warning and swallows exceptions return "hello world"; } Calling MyAsyncMethod() without awaiting it causes a "Bec

如何在不等待的情况下安全地调用C#中的异步方法

我有一个不返回数据的async方法: public async Task MyAsyncMethod() { // do some stuff async, don't return any data } 我从另一个返回一些数据的方法调用它: public string GetStringData() { MyAsyncMethod(); // this generates a warning and swallows exceptions return "hello world"; } 在不等待它的情况下调用MyAsyncMethod()会导致在Visual Studio中出现“因为此调用未被等待,当前方法在调用完成