コード例 #1
0
        private bool PromptForDDDDetails()
        {
            if (this.Dispatcher.Thread == Thread.CurrentThread)
            {
                DDDLoginDialog dlg = new DDDLoginDialog(_dddHostname, _dddPort.ToString(), _dddSharePath);
                dlg.Owner = this;

                if (!dlg.ShowDialog().Value)
                {
                    return(false);
                }
                string hostname = dlg.SelectedHostname;
                string port     = dlg.SelectedPort;
                _dddHostname  = hostname;
                _dddPort      = Int32.Parse(port);
                _dddSharePath = dlg.SharePath;
                UserID        = dlg.SelectedUserId;
                TeamID        = dlg.SelectedTeamId;
                return(true);
            }
            else
            {
                return((bool)this.Dispatcher.Invoke(new bNoParams(PromptForDDDDetails), DispatcherPriority.Normal));
            }
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: wshanshan/DDD
        private bool PromptForDDDDetails()
        {
            if (this.Dispatcher.Thread == Thread.CurrentThread)
            {
                DDDLoginDialog dlg = new DDDLoginDialog(_dddHostname, _dddPort.ToString(), _dddSharePath);
                dlg.Owner = this;

                if (!dlg.ShowDialog().Value)
                    return false;
                string hostname = dlg.SelectedHostname;
                string port = dlg.SelectedPort;
                _dddHostname = hostname;
                _dddPort = Int32.Parse(port);
                _dddSharePath = dlg.SharePath;
                UserID = dlg.SelectedUserId;
                TeamID = dlg.SelectedTeamId;
                return true;
            }
            else
            {
                return (bool)this.Dispatcher.Invoke(new bNoParams(PromptForDDDDetails), DispatcherPriority.Normal);
            }
        }