コード例 #1
0
        public MainWindowViewModel()
        {
            EdgeLocalStateFilePath.SetValidateNotifyError(IsExitisFile);
            EdgeCookiesFilePath.SetValidateNotifyError(IsExitisFile);
            ChromeLocalStateFilePath.SetValidateNotifyError(IsExitisFile);
            ChromeCookiesFilePath.SetValidateNotifyError(IsExitisFile);
            ObsCookiesFilePath.SetValidateNotifyError(IsExitisFile);
            EdgeCommand   = new[] { EdgeLocalStateFilePath.ObserveHasErrors, EdgeCookiesFilePath.ObserveHasErrors, ObsCookiesFilePath.ObserveHasErrors }.CombineLatestValuesAreAllFalse().ToReactiveCommand <Models.CommandParameter>();
            ChromeCommand = new[] { ChromeLocalStateFilePath.ObserveHasErrors, ChromeCookiesFilePath.ObserveHasErrors, ObsCookiesFilePath.ObserveHasErrors }.CombineLatestValuesAreAllFalse().ToReactiveCommand <Models.CommandParameter>();

            LocalStateFilePath.SetValidateNotifyError(IsExitisFile);
            SrcCookieFilePath.SetValidateNotifyError(IsExitisFile);
            DestCookieFilePath.SetValidateNotifyError(IsExitisFile);
            HostKey.SetValidateNotifyError(host =>
            {
                if (String.IsNullOrWhiteSpace(host))
                {
                    return("Empty");
                }

                return(null);
            });

            ParamCommand = new[] { LocalStateFilePath.ObserveHasErrors, SrcCookieFilePath.ObserveHasErrors, HostKey.ObserveHasErrors, DestCookieFilePath.ObserveHasErrors }.CombineLatestValuesAreAllFalse().ToReactiveCommand <Models.CommandParameter>();

            EdgeCommand.Subscribe(ExecuteCommand.Execute);
            ChromeCommand.Subscribe(ExecuteCommand.Execute);
            ParamCommand.Subscribe(ExecuteCommand.Execute);

            OkCommand.Subscribe(async _ =>
            {
                Executing.Value = true;

                try
                {
                    await System.Threading.Tasks.Task.Run(() =>
                    {
                        CookieManager.Converter.Convert(Environment.ExpandEnvironmentVariables(Param.LocalStateFilePath), Environment.ExpandEnvironmentVariables(Param.SrcCookieFilePath), Param.HostKey, Environment.ExpandEnvironmentVariables(Param.DestCookieFilePath));
                    });
                }
                catch
                {
                    IsErrorDialogOpen.Value = true;
                }

                Executing.Value    = false;
                IsDialogOpen.Value = false;
            }
                                );

            ExecuteCommand.Subscribe(param =>
            {
                IsDialogOpen.Value = true;
                Param = param;
            });

            CancelCommand.Subscribe(_ => IsDialogOpen.Value = false);

            ErrorOkCommand.Subscribe(_ => IsErrorDialogOpen.Value = false);
        }
コード例 #2
0
ファイル: Host.cs プロジェクト: Tzur-Eitan/ProjectIn.Net
 public override string ToString()
 {
     return("Host key: " + HostKey.ToString() + "\n" +
            "First Name: " + FirstName + "\n" +
            "Last Name: " + LastName + "\n" +
            "Fhone Number: " + FhoneNumber.ToString() + "\n" +
            "Mail Address: " + MailAddress + "\n" +
            "Bank Branch Details: " + BankBranchDetails.ToString() + "\n");
 }
コード例 #3
0
ファイル: Host.cs プロジェクト: polinafr/marom
        public override string ToString()
        {
            string s;

            s = $@"Host Key: {HostKey.ToString()}, 
            Private Name: {PrivateName}, Family Name: {FamilyName}, 
            Fhone Number: {FhoneNumber.ToString()}, MailAddress: {MailAddress}, 
            bank Branch: {bankBranch.ToString()}, BankAccountNumber: {BankAccountNumber.ToString()}, CollectionClearance:{CollectionClearance.ToString()} \n";
            return(s);
        }
コード例 #4
0
 public override string ToString()
 {
     return("Host key: " + HostKey.ToString() + "\n" +
            "First Name: " + FirstName + "\n" +
            "Last Name: " + LastName + "\n" +
            "Fhone Number: " + FhoneNumber.ToString() + "\n" +
            "Mail Address: " + MailAddress + "\n" +
            "Bank Branch Details: " + BankBranchDetails.ToString() + "\n" +
            "Bank Account Number: " + BankAccountNumber.ToString() + "\n" +
            "my commition: " + MyCommition.ToString() + "\n" +
            "Collection Clearance? " + CollectionClearance.ToString() + "\n");
 }
コード例 #5
0
        static DeveelDbConnectionStringBuilder()
        {
            defaults = new Dictionary <string, object>();
            defaults.Add(HostKey, DefaultHost);
            defaults.Add(PortKey, DefaultPort);
            defaults.Add(DatabaseKey, DefaultDatabase);
            defaults.Add(UserNameKey, DefaultUserName);
            defaults.Add(PasswordKey, DefaultPassword);
            defaults.Add(SchemaKey, DefaultSchema);
            defaults.Add(PathKey, DefaultPath);
            defaults.Add(CreateKey, DefaultCreate);
            defaults.Add(BootOrCreateKey, DefaultBootOrCreate);
            defaults.Add(ParameterStyleKey, DefaultParameterStyle);
            defaults.Add(VerboseColumnNamesKey, DefaultVerboseColumnName);
            defaults.Add(PersistSecurityInfoKey, DefaultPersistSecurityInfo);
            defaults.Add(RowCacheSizeKey, DefaultRowCacheSize);
            defaults.Add(MaxCacheSizeKey, DefaultMaxCacheSize);
            defaults.Add(FetchSizeKey, DefaultFetchSize);
            defaults.Add(MaxFetchSizeKey, DefaultMaxFetchSize);
            defaults.Add(AutoCommitKey, DefaultAutoCommit);
            defaults.Add(QueryTimeoutKey, DefaultQueryTimeout);

            keymaps = new Dictionary <string, string>(StringComparer.InvariantCultureIgnoreCase);
            keymaps[HostKey.ToUpper()]     = HostKey;
            keymaps["ADDRESS"]             = HostKey;
            keymaps["SERVER"]              = HostKey;
            keymaps[PortKey.ToUpper()]     = PortKey;
            keymaps[DatabaseKey.ToUpper()] = DatabaseKey;
            keymaps["CATALOG"]             = DatabaseKey;
            keymaps["INITIAL CATALOG"]     = DatabaseKey;
            keymaps["DB"] = DatabaseKey;
            keymaps[SchemaKey.ToUpper()]   = SchemaKey;
            keymaps["DEFAULT SCHEMA"]      = SchemaKey;
            keymaps[PathKey.ToUpper()]     = PathKey;
            keymaps["DATA PATH"]           = PathKey;
            keymaps["DATABASE PATH"]       = PathKey;
            keymaps["DATAPATH"]            = PathKey;
            keymaps["DATABASEPATH"]        = PathKey;
            keymaps[CreateKey.ToUpper()]   = CreateKey;
            keymaps[BootOrCreateKey]       = BootOrCreateKey;
            keymaps["BOOT OR CREATE"]      = BootOrCreateKey;
            keymaps["CREATE OR BOOT"]      = BootOrCreateKey;
            keymaps["CREATEORBOOT"]        = BootOrCreateKey;
            keymaps[CreateKey.ToUpper()]   = CreateKey;
            keymaps["CREATE DATABASE"]     = CreateKey;
            keymaps[UserNameKey.ToUpper()] = UserNameKey;
            keymaps["USER"]                             = UserNameKey;
            keymaps["USER NAME"]                        = UserNameKey;
            keymaps["USER ID"]                          = UserNameKey;
            keymaps["USERID"]                           = UserNameKey;
            keymaps["UID"]                              = UserNameKey;
            keymaps[PasswordKey.ToUpper()]              = PasswordKey;
            keymaps["PASS"]                             = PasswordKey;
            keymaps["PWD"]                              = PasswordKey;
            keymaps["SECRET"]                           = PasswordKey;
            keymaps[ParameterStyleKey.ToUpper()]        = ParameterStyleKey;
            keymaps["PARAMSTYLE"]                       = ParameterStyleKey;
            keymaps["PARAMETER STYLE"]                  = ParameterStyleKey;
            keymaps["USEPARMAMETER"]                    = ParameterStyleKey;
            keymaps["USE PARAMETER"]                    = ParameterStyleKey;
            keymaps[VerboseColumnNamesKey.ToUpper()]    = VerboseColumnNamesKey;
            keymaps["VERBOSE COLUMNS"]                  = VerboseColumnNamesKey;
            keymaps["VERBOSE COLUMN NAMES"]             = VerboseColumnNamesKey;
            keymaps["VERBOSECOLUMNS"]                   = VerboseColumnNamesKey;
            keymaps["COLUMNS VERBOSE"]                  = VerboseColumnNamesKey;
            keymaps[PersistSecurityInfoKey.ToUpper()]   = PersistSecurityInfoKey;
            keymaps["PERSIST SECURITY INFO"]            = PersistSecurityInfoKey;
            keymaps[RowCacheSizeKey.ToUpper()]          = RowCacheSizeKey;
            keymaps["ROW CACHE SIZE"]                   = RowCacheSizeKey;
            keymaps["CACHE SIZE"]                       = RowCacheSizeKey;
            keymaps[MaxCacheSizeKey.ToUpper()]          = MaxCacheSizeKey;
            keymaps["MAX CACHE SIZE"]                   = MaxCacheSizeKey;
            keymaps["MAX CACHE"]                        = MaxCacheSizeKey;
            keymaps[QueryTimeoutKey.ToUpper()]          = QueryTimeoutKey;
            keymaps["QUERY TIMEOUT"]                    = QueryTimeoutKey;
            keymaps[IgnoreIdentifiersCaseKey.ToUpper()] = IgnoreIdentifiersCaseKey;
            keymaps["IGNORE CASE"]                      = IgnoreIdentifiersCaseKey;
            keymaps["IGNORE ID CASE"]                   = IgnoreIdentifiersCaseKey;
            keymaps["ID CASE IGNORED"]                  = IgnoreIdentifiersCaseKey;
            keymaps[StrictGetValueKey.ToUpper()]        = StrictGetValueKey;
            keymaps["STRICT"]                           = StrictGetValueKey;
            keymaps["STRICT GETVALUE"]                  = StrictGetValueKey;
            keymaps["STRICT VALUE"]                     = StrictGetValueKey;
            keymaps["STRICTVALUE"]                      = StrictGetValueKey;
            keymaps[FetchSizeKey.ToUpper()]             = FetchSizeKey;
            keymaps["FETCH SIZE"]                       = FetchSizeKey;
            keymaps["ROW COUNT"]                        = FetchSizeKey;
            keymaps["ROWCOUNT"]                         = FetchSizeKey;
            keymaps[MaxFetchSizeKey.ToUpper()]          = MaxFetchSizeKey;
            keymaps["MAX FETCH SIZE"]                   = MaxFetchSizeKey;
            keymaps["MAXFETCHSIZE"]                     = MaxFetchSizeKey;
            keymaps["MAX ROW COUNT"]                    = MaxFetchSizeKey;
            keymaps["MAX ROWCOUNT"]                     = MaxFetchSizeKey;
            keymaps["MAXROWCOUNT"]                      = MaxFetchSizeKey;
            keymaps[AutoCommitKey.ToUpper()]            = AutoCommitKey;
            keymaps["AUTOCOMMIT"]                       = AutoCommitKey;
            keymaps["AUTO-COMMIT"]                      = AutoCommitKey;
            keymaps["AUTO_COMMIT"]                      = AutoCommitKey;
            keymaps["AUTO COMMIT"]                      = AutoCommitKey;
            keymaps["COMMIT AUTO"]                      = AutoCommitKey;
            keymaps["COMMIT_AUTO"]                      = AutoCommitKey;
            keymaps["COMMITAUTO"]                       = AutoCommitKey;
            keymaps["COMMIT-AUTO"]                      = AutoCommitKey;
            keymaps["COMMIT"]                           = AutoCommitKey;
            keymaps["ENLIST"]                           = EnlistKey;
        }
コード例 #6
0
ファイル: Host.cs プロジェクト: RuthMil/.Net-Project
 public override string ToString()
 {
     return("Host ID: " + HostKey.ToString() + " Name: " + FirstName + ' ' + LastName +
            " Phone Number: " + PhoneNumber + " Mail Address: " + MailAddress);
 }
コード例 #7
0
 public override string ToString()
 {
     return(HostKey.ToString());
 }
コード例 #8
0
 //for debugging
 public override string ToString()
 {
     return(HostKey.ToString() + PrivateName.ToString() + FamilyName.ToString() +
            FhoneNumber.ToString() + MailAddress.ToString() + BankAccountNumber.ToString() +
            CollectionClearance.ToString());
 }
コード例 #9
0
 public override string ToString()  //for debugging
 {
     return(HostKey.ToString());
 }
コード例 #10
0
 public override string ToString() //do it later
 {
     return(HostKey.ToString());
 }