當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。