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


C# Engine.ChatModel类代码示例

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


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


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