• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Engine.ChatModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Smuxi.Engine.ChatModel的典型用法代码示例。如果您正苦于以下问题:C# ChatModel类的具体用法?C# ChatModel怎么用?C# ChatModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ChatModel类属于Smuxi.Engine命名空间,在下文中一共展示了ChatModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ChatView

        public ChatView(ChatModel chat)
        {
            Trace.Call(chat);

            _ChatModel = chat;
            _Name = _ChatModel.Name;
            ID = _ChatModel.ID;
            Name = _Name;

            MessageTextView tv = new MessageTextView();
            _EndMark = tv.Buffer.CreateMark("end", tv.Buffer.EndIter, false);
            tv.ShowTimestamps = true;
            tv.ShowMarkerline = true;
            tv.Editable = false;
            tv.CursorVisible = true;
            tv.WrapMode = Gtk.WrapMode.Char;
            tv.MessageAdded += OnMessageTextViewMessageAdded;
            tv.MessageHighlighted += OnMessageTextViewMessageHighlighted;
            tv.PopulatePopup += OnMessageTextViewPopulatePopup;
            _OutputMessageTextView = tv;

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            //sw.HscrollbarPolicy = Gtk.PolicyType.Never;
            sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.VscrollbarPolicy = Gtk.PolicyType.Always;
            sw.ShadowType = Gtk.ShadowType.In;
            sw.Add(_OutputMessageTextView);
            _OutputScrolledWindow = sw;

            // popup menu
            _TabMenu = new Gtk.Menu();

            Gtk.ImageMenuItem close_item = new Gtk.ImageMenuItem(Gtk.Stock.Close, null);
            close_item.Activated += new EventHandler(OnTabMenuCloseActivated);
            _TabMenu.Append(close_item);

            //FocusChild = _OutputTextView;
            //CanFocus = false;

            _TabLabel = new Gtk.Label();
            _TabLabel.Text = _Name;

            _TabHBox = new Gtk.HBox();
            _TabHBox.PackEnd(new Gtk.Fixed(), true, true, 0);
            _TabHBox.PackEnd(_TabLabel, false, false, 0);
            _TabHBox.ShowAll();

            _TabEventBox = new Gtk.EventBox();
            _TabEventBox.VisibleWindow = false;
            _TabEventBox.ButtonPressEvent += new Gtk.ButtonPressEventHandler(OnTabButtonPress);
            _TabEventBox.Add(_TabHBox);
            _TabEventBox.ShowAll();

            _ThemeSettings = new ThemeSettings();

            // OPT-TODO: this should use a TaskStack instead of TaskQueue
            _LastSeenHighlightQueue = new TaskQueue("LastSeenHighlightQueue("+_Name+")");
            _LastSeenHighlightQueue.AbortedEvent += OnLastSeenHighlightQueueAbortedEvent;
            _LastSeenHighlightQueue.ExceptionEvent += OnLastSeenHighlightQueueExceptionEvent;
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:60,代码来源:ChatView.cs


示例2: AddChat

        public void AddChat(ChatModel page)
        {
            Trace.Call(page);

            Console.WriteLine("New page: "+page.Name+ " type: "+page.ChatType);
            Frontend.ChangeActiveChat(page);
        }
开发者ID:RoninBG,项目名称:smuxi,代码行数:7,代码来源:TestUI.cs


示例3: AddChat

        public override void AddChat(ChatModel chat)
        {
            ChatView chatView = (ChatView) CreateChatView(chat);
            chatView.MainWindow = _MainWindow;
            _ChatViews.Add(chat, chatView);

            _ActiveChat = chatView;
        }
开发者ID:RoninBG,项目名称:smuxi,代码行数:8,代码来源:ChatViewManager.cs


示例4: ProtocolChatView

        public ProtocolChatView(ChatModel chat)
            : base(chat)
        {
            Trace.Call(chat);

            Add(OutputScrolledWindow);

            ShowAll();
        }
开发者ID:carlosmn,项目名称:smuxi,代码行数:9,代码来源:ProtocolChatView.cs


示例5: ChatView

        public ChatView(ChatModel chat, MainWindow window)
        {
            Trace.Call(chat, window);

            if (chat == null) {
                throw new ArgumentNullException("chat");
            }
            if (window == null) {
                throw new ArgumentNullException("window");
            }

            ChatModel = chat;
            f_MainWindow = window;
            f_WidgetID = f_NextID++;
            f_WidgetName = "output_textview_" + f_WidgetID;

            f_MainWindow.Modify("output_vbox", "append",
                "{" +
                    "textview[" + f_WidgetName + "] " +
                        ".expand:vh " +
                        ".display[" + f_WidgetID + "d]:0 " +
                        "offset[" + f_WidgetID + "os]:0 " +
                        "richtext:1 " +
                        "style_color0_normal:fg=black " +
                        "style_color1_normal:fg=red " +
                        "style_color2_normal:fg=green " +
                        "style_color3_normal:fg=yellow " +
                        "style_color4_normal:fg=blue " +
                        "style_color5_normal:fg=magenta " +
                        "style_color6_normal:fg=cyan " +
                        "style_color7_normal:fg=white " +
                        "style_color8_normal:fg=black,attr=bold " +
                        "style_color9_normal:fg=red,attr=bold " +
                        "style_color10_normal:fg=green,attr=bold " +
                        "style_color11_normal:fg=yellow,attr=bold " +
                        "style_color12_normal:fg=blue,attr=bold " +
                        "style_color13_normal:fg=magenta,attr=bold " +
                        "style_color14_normal:fg=cyan,attr=bold " +
                        "style_color15_normal:fg=white,attr=bold " +
                        "style_url_normal:attr=underline " +
                        "style_u_normal:attr=underline " +
                        "style_b_normal:attr=bold " +
                        "style_i_normal:attr=standout " +
                "}"
            );
            MessageTextView = new TextView(f_MainWindow, f_WidgetName);
            MessageTextView.OffsetVariableName = f_WidgetID + "os";
            // HACK: as the chat is not always visible we can't extract the
            // heigth and width information from the textview because it simply
            // returns 0 when invisible, thus we need to abuse output_vbox
            MessageTextView.HeigthVariableName = "output_vbox:h";
            MessageTextView.WidthVariableName = "output_vbox:w";
            MessageTextView.AutoLineWrap = true;

            Participants = new List<PersonModel>();
        }
开发者ID:RAOF,项目名称:smuxi,代码行数:56,代码来源:ChatView.cs


示例6: SessionChatView

        public SessionChatView(ChatModel chat)
            : base(chat)
        {
            Trace.Call(chat);

            OutputMessageTextView.ShowMarkerline = false;
            OutputMessageTextView.ShowTimestamps = false;

            Add(OutputScrolledWindow);
        }
开发者ID:carlosmn,项目名称:smuxi,代码行数:10,代码来源:SessionChatView.cs


示例7: ChatViewAddedEventArgs

 public ChatViewAddedEventArgs(ChatModel chatModel, string chatId,
                               ChatType chatType, int chatPosition,
                               Type protocolManagerType)
 {
     ChatModel = chatModel;
     ChatID = chatId;
     ChatType = chatType;
     ChatPosition = chatPosition;
     ProtocolManagerType = protocolManagerType;
 }
开发者ID:grendello,项目名称:smuxi,代码行数:10,代码来源:ChatViewSyncManager.cs


示例8: AddChat

        public void AddChat(ChatModel chat)
        {
            TraceRemotingCall(chat);

            try {
                _ChatViewManager.AddChat(chat);
            } catch (Exception ex) {
                Frontend.ShowException(ex);
            }
        }
开发者ID:flugsio,项目名称:smuxi,代码行数:10,代码来源:GnomeUI.cs


示例9: ChatView

        protected ChatView(ChatModel chat)
        {
            _ChatModel = chat;

            InitializeComponent();

            Name = chat.Name;
            Text = chat.Name;

            _OutputTextView.SelectionChanged += new EventHandler(OutputSelectionChanged);
        }
开发者ID:meebey,项目名称:smuxi,代码行数:11,代码来源:ChatView.cs


示例10: AddChat

        public void AddChat(ChatModel chat)
        {
            Trace.Call(chat);

            try {
                _ChatViewManager.AddChat(chat);
            } catch (Exception ex) {
            #if LOG4NET
                _Logger.Fatal(ex);
            #endif
            }
        }
开发者ID:pacificIT,项目名称:smuxi,代码行数:12,代码来源:StflUI.cs


示例11: SessionHookCommand

        public SessionHookCommand(Session session,
                                  ChatModel chat,
                                  string commandCharacter)
        {
            if (session == null) {
                throw new ArgumentNullException("session");
            }

            Session = session;
            Chat = chat;
            CommandCharacter = commandCharacter;
            CommandName = "Session.Command";
        }
开发者ID:pacificIT,项目名称:smuxi,代码行数:13,代码来源:SessionHookCommand.cs


示例12: ProtocolChatView

        public ProtocolChatView(ChatModel chat)
            : base(chat)
        {
            Trace.Call(chat);

            var tabImage = new Gtk.Image(IconPixbuf);
            TabHBox.PackStart(tabImage, false, false, 2);
            TabHBox.ShowAll();

            Add(OutputScrolledWindow);

            ShowAll();
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:13,代码来源:ProtocolChatView.cs


示例13: AddMessageToChat

        public void AddMessageToChat(ChatModel chat, MessageModel msg)
        {
            Trace.Call(chat, msg);

            ChatView chatView = _ChatViewManager.GetChat(chat);
            #if LOG4NET
            if (chatView == null) {
                _Logger.Fatal(String.Format("AddMessageToChat(): _ChatViewManager.GetChat(chat) chat.Name: {0} returned null!", chat.Name));
                return;
            }
            #endif
            chatView.AddMessage(msg);
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:13,代码来源:StflUI.cs


示例14: SessionChatView

        public SessionChatView(ChatModel chat)
            : base(chat)
        {
            Trace.Call(chat);

            OutputMessageTextView.ShowMarkerline = false;

            var tabImage = new Gtk.Image(IconPixbuf);
            TabHBox.PackStart(tabImage, false, false, 2);
            TabHBox.ShowAll();

            Add(OutputScrolledWindow);
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:13,代码来源:SessionChatView.cs


示例15: ProtocolManagerHookCommand

        public ProtocolManagerHookCommand(ProtocolManagerBase protocolManager,
                                          ChatModel chat,
                                          string commandCharacter)
        {
            if (protocolManager == null) {
                throw new ArgumentNullException("protocolManager");
            }

            ProtocolManager = protocolManager;
            Chat = chat;
            CommandCharacter = commandCharacter;
            CommandName = "ProtocolManager.Command";
        }
开发者ID:RAOF,项目名称:smuxi,代码行数:13,代码来源:ProtocolManagerHookCommand.cs


示例16: AddChat

        public void AddChat(ChatModel chat)
        {
            TraceRemotingCall(chat);

            MethodBase mb = Trace.GetMethodBase();
            Gtk.Application.Invoke(delegate {
                TraceRemotingCall(mb, chat);

                try {
                    _ChatViewManager.AddChat(chat);
                } catch (Exception ex) {
                    Frontend.ShowException(ex);
                }
            });
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:15,代码来源:GnomeUI.cs


示例17: PersonChatView

        public PersonChatView(ChatModel chat)
            : base(chat)
        {
            Trace.Call(chat);

            _TabImage = new Gtk.Image(
                new Gdk.Pixbuf(
                    null,
                    "person-chat.svg",
                    16,
                    16
                )
            );

            TabHBox.PackStart(_TabImage, false, false, 2);
            TabHBox.ShowAll();

            Add(OutputScrolledWindow);
        }
开发者ID:RoninBG,项目名称:smuxi,代码行数:19,代码来源:PersonChatView.cs


示例18: CommandModel

        public CommandModel(FrontendManager fm, ChatModel chat, string cmdChar, string data)
        {
            Trace.Call(fm, chat == null ? "(null)" : chat.GetType().ToString(), cmdChar, data);

            _Data = data;
            _DataArray = data.Split(new char[] {' '});
            _Parameter = String.Join(" ", _DataArray, 1, _DataArray.Length - 1);
            _CommandCharacter = cmdChar;
            if (data.StartsWith(cmdChar) &&
                !data.StartsWith(cmdChar + cmdChar)) {
                _IsCommand = true;
                _Command = (_DataArray[0].Length > cmdChar.Length) ?
                                _DataArray[0].Substring(cmdChar.Length).ToLower() :
                                String.Empty;
            } else if (data.StartsWith(cmdChar + cmdChar)) {
                _Data = data.Substring(cmdChar.Length);
                _DataArray[0] = _DataArray[0].Substring(cmdChar.Length);
            }
            _FrontendManager = fm;
            _Chat = chat;
        }
开发者ID:grendello,项目名称:smuxi,代码行数:21,代码来源:CommandModel.cs


示例19: AddMessageToChat

        public void AddMessageToChat(ChatModel chat, MessageModel msg)
        {
            Trace.Call(chat, msg);

            try {
                ChatView chatView = _ChatViewManager.GetChat(chat);
                if (chatView == null) {
            #if LOG4NET
                    _Logger.Fatal(String.Format("AddMessageToChat(): _ChatViewManager.GetChat(chat) chat.Name: {0} returned null!", chat.Name));
            #endif
                    return;
                }

                // FIXME: this must be marshalled into the UI thread!
                chatView.AddMessage(msg);
                _ChatViewManager.UpdateNavigation();
            } catch (Exception ex) {
            #if LOG4NET
                _Logger.Fatal(ex);
            #endif
            }
        }
开发者ID:pacificIT,项目名称:smuxi,代码行数:22,代码来源:StflUI.cs


示例20: ChatView

        public ChatView(ChatModel chat, MainWindow window)
        {
            Trace.Call(chat, window);

            if (chat == null) {
                throw new ArgumentNullException("chat");
            }
            if (window == null) {
                throw new ArgumentNullException("window");
            }

            f_ChatModel = chat;
            f_MainWindow = window;
            f_WidgetID = f_NextID++;
            f_WidgetName = "output_textview_" + f_WidgetID;

            f_MainWindow.Modify("output_vbox", "append",
                "{" +
                    "textview[" + f_WidgetName + "] " +
                        ".expand:vh " +
                        ".display[" + f_WidgetID + "d]:0 " +
                        "offset[" + f_WidgetID + "os]:0 " +
                        "richtext:1 " +
                        "style_red_normal:fg=red " +
                        "style_url_normal:attr=underline " +
                        "style_u_normal:attr=underline " +
                        "style_b_normal:attr=bold " +
                        "style_i_normal:attr=standout " +
                "}"
            );
            MessageTextView = new TextView(f_MainWindow, f_WidgetName);
            MessageTextView.OffsetVariableName = f_WidgetID + "os";
            // HACK: as the chat is not always visible we can't extract the
            // heigth and width information from the textview because it simply
            // returns 0 when invisible, thus we need to abuse output_vbox
            MessageTextView.HeigthVariableName = "output_vbox:h";
            MessageTextView.WidthVariableName = "output_vbox:w";
            MessageTextView.AutoLineWrap = true;
        }
开发者ID:grendello,项目名称:smuxi,代码行数:39,代码来源:ChatView.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Engine.CommandModel类代码示例发布时间:2022-05-26
下一篇:
C# GameData.Identity类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap