public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection)
        {
            _connInfo = isNewConnection
                ? new RavenConnectionDialogViewModel { CxInfo = cxInfo }
                : RavenConnectionDialogViewModel.Load(cxInfo);

            var win = new RavenConectionDialog(_connInfo);
            var result = win.ShowDialog() == true;

            if (result)
            {
                _connInfo.Save();
                cxInfo.CustomTypeInfo.CustomAssemblyPath = Assembly.GetAssembly(typeof(RavenContext)).Location;
                cxInfo.CustomTypeInfo.CustomTypeName = "RavenLinqpadDriver.RavenContext";
            }

            return result;
        }
Пример #2
0
        public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection)
        {
            _connInfo = isNewConnection
                ? new RavenConnectionDialogViewModel {
                CxInfo = cxInfo
            }
                : RavenConnectionDialogViewModel.Load(cxInfo);

            var win    = new RavenConectionDialog(_connInfo);
            var result = win.ShowDialog() == true;

            if (result)
            {
                _connInfo.Save();
                cxInfo.CustomTypeInfo.CustomAssemblyPath = Assembly.GetAssembly(typeof(RavenContext)).Location;
                cxInfo.CustomTypeInfo.CustomTypeName     = "RavenLinqpadDriver.RavenContext";
            }

            return(result);
        }