当前位置: 首页>>代码示例>>C#>>正文


C# MessageDialog.ShowAll方法代码示例

本文整理汇总了C#中MessageDialog.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# MessageDialog.ShowAll方法的具体用法?C# MessageDialog.ShowAll怎么用?C# MessageDialog.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MessageDialog的用法示例。


在下文中一共展示了MessageDialog.ShowAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Inventory_InventoryObjectOffered

    void Inventory_InventoryObjectOffered(object sender, InventoryObjectOfferedEventArgs e)
    {
        Gtk.Application.Invoke(delegate {
                MessageDialog md = new MessageDialog(MainClass.win, DialogFlags.DestroyWithParent, MessageType.Info, ButtonsType.YesNo, false,e.Offer+"\n Would you like to accept");
                md.Response += delegate(object o,ResponseArgs args)
                {
                    if (args.ResponseId == ResponseType.Yes)
                    {
                        e.Accept = true;
                    }
                    else
                    {
                        e.Accept = false;
                    }
                    md.Destroy();
                };

                md.ShowAll();

            });
    }
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:21,代码来源:MainWindow.cs

示例2: OnDialog

 private void OnDialog(object obj, EventArgs args)
 {
     Window md = new MessageDialog(failed_feeds);
     md.ShowAll();
 }
开发者ID:wfarr,项目名称:newskit,代码行数:5,代码来源:Summa.Gui.FirstRun.cs

示例3: Self_IM

    void Self_IM(object sender, InstantMessageEventArgs e)
    {
        // Note to self, if i do implement a dispatcher here these two need to be dispatched but not open
        // new IM tabs so don't treat the same as the rest below.
        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.StartTyping)
            return;

        if (e.IM.Dialog == OpenMetaverse.InstantMessageDialog.StopTyping)
            return;

        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.GroupNoticeRequested)
            return;

        if (e.IM.Dialog == OpenMetaverse.InstantMessageDialog.InventoryOffered)
            return;

        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.TaskInventoryOffered)
            return;

        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.FriendshipOffered)
            return;

        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.InventoryAccepted)
        {
            Gtk.Application.Invoke(delegate {
                MessageDialog md = new MessageDialog(MainClass.win, DialogFlags.DestroyWithParent, MessageType.Info, ButtonsType.Ok, false,e.IM.FromAgentName + " accepted your inventory offer");
                md.Response += delegate { md.Destroy(); };
                md.ShowAll();
            });
            return;
        }

        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.GroupNotice)
        {
            //Hmm need to handle this differently than a standard IM
            Gtk.Application.Invoke(delegate {
                MessageDialog md = new MessageDialog(MainClass.win,DialogFlags.DestroyWithParent,MessageType.Info,ButtonsType.Ok,false,"GROUP NOTICE\nFrom:"+e.IM.FromAgentName+"\n"+e.IM.Message);
                md.Response += delegate { md.Destroy(); };
                md.ShowAll();
            });
            return;
        }

        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.GroupInvitation)
        {
            Gtk.Application.Invoke(delegate {
                MessageDialog md = new MessageDialog(MainClass.win,DialogFlags.DestroyWithParent,MessageType.Question,ButtonsType.YesNo,false,e.IM.FromAgentName+" has invited you to join a group\n"+e.IM.Message+"\nPress yes to accept or no to decline");
                md.Response += delegate(object o,ResponseArgs args)
                {
                    if(args.ResponseId==ResponseType.Yes)
                    {
                        MainClass.client.Self.InstantMessage(MainClass.client.Self.Name,e.IM.FromAgentID,"",e.IM.IMSessionID,InstantMessageDialog.GroupInvitationAccept,InstantMessageOnline.Offline,MainClass.client.Self.RelativePosition,MainClass.client.Network.CurrentSim.ID,null);
                    }
                    else
                    {
                        MainClass.client.Self.InstantMessage(MainClass.client.Self.Name,e.IM.FromAgentID,"",e.IM.IMSessionID,InstantMessageDialog.GroupInvitationDecline,InstantMessageOnline.Offline,MainClass.client.Self.RelativePosition,MainClass.client.Network.CurrentSim.ID,null);
                    }
                    md.Destroy();
         		};
                md.ShowAll();

                return;
            });
        }

        if(e.IM.Dialog==OpenMetaverse.InstantMessageDialog.RequestTeleport)
        {
            //Hmm need to handle this differently than a standard IM
            Gtk.Application.Invoke(delegate {
                MessageDialog md = new MessageDialog(MainClass.win, DialogFlags.DestroyWithParent, MessageType.Question, ButtonsType.YesNo, false,e.IM.FromAgentName + " would like you to join them\n" + e.IM.Message + "\nPress yes to teleport or no to ignore");
                md.Response += delegate(object o,ResponseArgs args)
                {
                    if(args.ResponseId==ResponseType.Yes)
                    {
                        MainClass.client.Self.TeleportLureRespond(e.IM.FromAgentID,true);
                    }
                    else
                    {
                        MainClass.client.Self.TeleportLureRespond(e.IM.FromAgentID,false);
                    }
                    md.Destroy();
                 };
                 md.ShowAll();
            });

            return;

        }

        if (e.IM.Dialog==InstantMessageDialog.MessageFromObject)
            return; //Its an object Im, chat will grab this for us

        if (im_windows.ContainsKey(e.IM.IMSessionID))
            return; // Do nothing handler is registered

        if(active_ims.Contains(e.IM.IMSessionID))
           return;

        //We only want the following stuff here for a new window create
        if (e.IM.Dialog != OpenMetaverse.InstantMessageDialog.MessageFromAgent &&
//.........这里部分代码省略.........
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:101,代码来源:MainWindow.cs


注:本文中的MessageDialog.ShowAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。