Interaction logic for AddChatWindow.xaml
Inheritance: System.Windows.Window
        private void AddChat_Click(object sender, RoutedEventArgs e)
        {
            string chatSourceName = AddChatWindow.SelectChatSource(ChatSourceManager);

            if (!string.IsNullOrEmpty(chatSourceName))
            {
                // Show config window
                string VisualId = Guid.NewGuid().ToString();
                ChatSourceManager.CreateChat(VisualId, chatSourceName);
            }
        }
        public static string SelectChatSource( ChatSourceManager Manager )
        {
            AddChatWindow dlg = new AddChatWindow();
            dlg.ChatSources = (from b in Manager.Sources.Keys
                               select b).ToArray();

            bool? ret = dlg.ShowDialog();

            if (ret.HasValue && ret.Value)
                return dlg.ChatSource;

            return null;
        }
示例#3
0
        public static string SelectChatSource(ChatSourceManager Manager)
        {
            AddChatWindow dlg = new AddChatWindow();

            dlg.ChatSources = (from b in Manager.Sources.Keys
                               select b).ToArray();

            bool?ret = dlg.ShowDialog();

            if (ret.HasValue && ret.Value)
            {
                return(dlg.ChatSource);
            }

            return(null);
        }