internal RoomLogin(Service service, string forceNick)
            : base(_keyBase, service.Jid.ToString())
        {
            _mucMark = MucMarks.Instance.Find(service);

            if (_mucMark == null)
            {
                _mucMark = new MucMark(service);
            }

            if (!string.IsNullOrEmpty(forceNick))
            {
                _mucMark.Nick = forceNick;
            }

            DataContext = service;

            InitializeComponent();

            if (!string.IsNullOrEmpty(_mucMark.Nick))
            {
                _nick.Text = _mucMark.Nick;
            }
            else
            {
                _nick.Text = Account.Instance.Self.Jid.User;
            }

            if (!service.IsMucPasswordProtected)
            {
                _passwordPanel.Visibility = Visibility.Collapsed;
            }

            if (!string.IsNullOrEmpty(_mucMark.Password))
            {
                _password.Password = _mucMark.Password;
            }
        }
示例#2
0
        protected static void MucLoginInternalMark(MucMark mucMark)
        {
            try
            {
                RoomLogin roomLogin = new RoomLogin(mucMark, null);

                roomLogin.Show();
                roomLogin.Activate();
            }

            catch (WindowExistsException e)
            {
                e.ActivateControl();
            }
        }
示例#3
0
 public void MucLogin(MucMark mucMark)
 {
     App.InvokeSafe(App._dispatcherPriority,
                    new MucLoginmarkCallback(MucLoginInternalMark), mucMark);
 }
 internal RoomLogin(MucMark mucMark, string forceNick)
     : this(mucMark.Service, forceNick)
 {
 }