当前位置: 首页>>代码示例>>C#>>正文


C# Wizards.WizardArgs类代码示例

本文整理汇总了C#中SIM.Tool.Base.Wizards.WizardArgs的典型用法代码示例。如果您正苦于以下问题:C# WizardArgs类的具体用法?C# WizardArgs怎么用?C# WizardArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WizardArgs类属于SIM.Tool.Base.Wizards命名空间,在下文中一共展示了WizardArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1:

    bool IWizardStep.SaveChanges(WizardArgs wizardArgs)
    {
      var args = (RestoreWizardArgs)wizardArgs;
      args.Backup = this.backups.SelectedItem as InstanceBackup;

      return true;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:7,代码来源:ChooseBackup.xaml.cs

示例2:

 bool IWizardStep.SaveChanges(WizardArgs wizardArgs)
 {
     var args = (SetupWizardArgs)wizardArgs;
       args.LicenseFilePath = this.LicenseFile.Text;
       args.LocalRepositoryFolderPath = this.LocalRepositoryFolder.Text;
       return true;
 }
开发者ID:Sitecore,项目名称:Sitecore-Instance-Manager,代码行数:7,代码来源:LocalRepository.xaml.cs

示例3: SaveChanges

    public bool SaveChanges(WizardArgs wizardArgs)
    {
      ImportWizardArgs args = (ImportWizardArgs)wizardArgs;
      List<string> usedBindings = new List<string>();
      foreach (var binding in args.bindings.Where(x => x.IsChecked == true))
      {
        if (this.BindingUsing(binding.hostName))
        {
          usedBindings.Add(binding.hostName);
        }
      }

      if (usedBindings.Count > 0)
      {
        string usedBindingsMessage = string.Empty;
        foreach (string binding in usedBindings)
        {
          usedBindingsMessage += binding + "\n";
        }

        MessageBox.Show("The following bindings are already used:\n" + usedBindingsMessage);
        return false;
      }
      else
      {
        return true;
      }
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:28,代码来源:SetWebsiteBindings.xaml.cs

示例4: SqlConnectionStringBuilder

 bool IFlowControl.OnMovingNext(WizardArgs wizardArgs)
 {
     var args = (SetupWizardArgs)wizardArgs;
       SqlConnection connection = null;
       try
       {
     connection = SIM.Adapters.SqlServer.SqlServerManager.Instance.OpenConnection(new SqlConnectionStringBuilder(args.ConnectionString), true);
     connection.Close();
     return true;
       }
       catch (SqlException ex)
       {
     WindowHelper.HandleError(ex.Message, false, ex, this);
     return false;
       }
       catch (Exception ex)
       {
     WindowHelper.HandleError(ex.Message, true, ex, this);
     return false;
       }
       finally
       {
     if (connection != null)
     {
       connection.Close();
     }
       }
 }
开发者ID:Brad-Christie,项目名称:Sitecore-Instance-Manager,代码行数:28,代码来源:ConnectionString.xaml.cs

示例5: InitializeStep

    public void InitializeStep(WizardArgs wizardArgs)
    {
      ImportWizardArgs args = (ImportWizardArgs)wizardArgs;

      // TODO: Parse bindings in (ImportWizardArgs), Fill user control from bindings dictionary, Append all bindings in hosts
      this.siteBindings.DataContext = args.bindings;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:7,代码来源:SetWebsiteBindings.xaml.cs

示例6:

    bool IWizardStep.SaveChanges(WizardArgs wizardArgs)
    {
      var args = (ExportWizardArgs)wizardArgs;
      args.ExportFilePath = this.ExportedFile.Text;
      args.IncludeTempFolderContents = !(this.ExcludeTempFolderContents.IsChecked ?? true);
      args.IncludeMediaCacheFolderContents = !(this.ExcludeMediaCacheFolderContents.IsChecked ?? true);
      args.ExcludeLicenseFile = this.ExcludeLicenseFile.IsChecked ?? false;
      args.ExcludeDiagnosticsFolderContents = this.ExcludeDiagnosticsFolderContents.IsChecked ?? false;
      args.ExcludeLogsFolderContents = this.ExcludeLogsFolderContents.IsChecked ?? false;
      args.ExcludePackagesFolderContents = this.ExcludePackagesFolderContents.IsChecked ?? false;
      args.ExcludeUploadFolderContents = this.ExcludeUploadFolderContents.IsChecked ?? false;

      if (this.IsPathValid())
      {
        var path = Path.GetDirectoryName(this.ExportedFile.Text);

        if (!string.IsNullOrEmpty(path))
        {
          FileSystem.FileSystem.Local.Directory.CreateDirectory(path);
          return true;
        }
      }

      WindowHelper.ShowMessage("You have specified the incorrect path or file name.");
      return false;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:26,代码来源:ExportFile.xaml.cs

示例7: OnMovingNext

    public bool OnMovingNext(WizardArgs wizardArgs)
    {
      if (this._selectedInstances.Count != 0)
      {
        return true;
      }

      MessageBox.Show("You haven't selected any of the instances");
      return false;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:10,代码来源:SelectInstances.xaml.cs

示例8: SaveChanges

    public bool SaveChanges(WizardArgs wizardArgs)
    {
      var args = (MultipleDeletionWizardArgs)wizardArgs;

      if (this._selectedInstances.Count != 0)
      {
        args.SelectedInstances = this._selectedInstances;
      }

      return true;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:11,代码来源:SelectInstances.xaml.cs

示例9: OnMovingNext

    public bool OnMovingNext(WizardArgs wizardArgs)
    {
      var args = (BackupSettingsWizardArgs)wizardArgs;

      if (args.Databases || args.MongoDatabases || args.Files)
      {
        return true;
      }

      MessageBox.Show("You haven't chosen any backup option");
      return false;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:12,代码来源:BackupSettings.xaml.cs

示例10: OnMovingNext

        public bool OnMovingNext(WizardArgs wizardArgs)
        {
            var args = (DownloadWizardArgs)wizardArgs;
              bool canMoveNext = args.Products.Count > 0;
              if (!canMoveNext)
              {
            WindowHelper.HandleError("You didn't select any download, please select one to go further", false);
              }

              WindowHelper.LongRunningTask(() => this.PrepareData(args), "Sitecore Versions Downloader", Window.GetWindow(this), "Preparing for downloading");

              return canMoveNext;
        }
开发者ID:Sitecore,项目名称:Sitecore-Instance-Manager,代码行数:13,代码来源:Downloads.xaml.cs

示例11: GetSdnCookie

        bool IFlowControl.OnMovingNext(WizardArgs wizardArgs)
        {
            var args = (DownloadWizardArgs)wizardArgs;
              if (!string.IsNullOrEmpty(args.Cookies) && this.UserName.Text.EqualsIgnoreCase(args.UserName) && this.Passowrd.Password.EqualsIgnoreCase(args.Password) && args.Releases.Length > 0)
              {
            return true;
              }

              args.Releases = Product.Service.GetVersions("Sitecore CMS")
            .With(x => x.FirstOrDefault(z => !z.Name.StartsWith("8")))
            .With(x => x.Releases.ToArray());

              var username = args.UserName;
              var password = args.Password;
              if (string.IsNullOrEmpty(username))
              {
            WindowHelper.HandleError("The provided username is empty", false);
            return false;
              }

              if (!username.Contains('@'))
              {
            WindowHelper.HandleError("The provided username is not an email", false);
            return false;
              }

              if (string.IsNullOrEmpty(password))
              {
            WindowHelper.HandleError("The provided password is empty", false);
            return false;
              }

              var cookies = string.Empty;
              WindowHelper.LongRunningTask(
            () => cookies = GetSdnCookie(username, password),
            "Download Sitecore 6.x and 7.x Wizard",
            Window.GetWindow(this),
            "Authenticating"); // , "Validating provided credentials and getting an authentication token for downloading files");

              if (string.IsNullOrEmpty(cookies))
              {
            return false;
              }

              args.Cookies = cookies;

              return true;
        }
开发者ID:Brad-Christie,项目名称:Sitecore-Instance-Manager,代码行数:48,代码来源:Login.xaml.cs

示例12:

    bool IWizardStep.SaveChanges(WizardArgs wizardArgs)
    {
      var args = (ExportWizardArgs)wizardArgs;
      args.SelectedDatabases = ((List<ExportDatabase>)this.Databases.DataContext).Where(database => database.IsChecked).Select(database => database.DatabaseName);
      if (this.WipeSqlServerCredentials.IsChecked != null)
      {
        args.WipeSqlServerCredentials = (bool)this.WipeSqlServerCredentials.IsChecked;
      }

      if (this.IncludeMongoDatabases.IsChecked != null)
      {
        args.IncludeMongoDatabases = (bool)this.IncludeMongoDatabases.IsChecked;
      }

      return true;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:16,代码来源:ExportDatabases.xaml.cs

示例13: InitializeStep

        public void InitializeStep(WizardArgs wizardArgs)
        {
            var args = (DownloadWizardArgs)wizardArgs;
              this.checkBoxItems.Clear();
              this.Append(args.Releases);

              foreach (var product in args.Products)
              {
            var selectedPRoduct = product;
            ProductDownload8InCheckbox checkBoxItem = this.checkBoxItems.SingleOrDefault(cbi => cbi.Value.Equals(selectedPRoduct));
            if (checkBoxItem != null)
            {
              checkBoxItem.IsChecked = true;
            }
              }

              this.filePackages.DataContext = this.checkBoxItems;
        }
开发者ID:Sitecore,项目名称:Sitecore-Instance-Manager,代码行数:18,代码来源:Downloads.xaml.cs

示例14: GetMarketplaceCookie

    bool IFlowControl.OnMovingNext(WizardArgs wizardArgs)
    {
      var args = (DownloadWizardArgs)wizardArgs;
      if (!string.IsNullOrEmpty(args.Cookies) && this.UserName.Text.EqualsIgnoreCase(args.UserName) && this.Passowrd.Password.EqualsIgnoreCase(args.Password) && args.Releases.Length > 0)
      {
        return true;
      }

      var username = args.UserName;
      var password = args.Password;
      if (string.IsNullOrEmpty(username))
      {
        WindowHelper.HandleError("The provided username is empty", false);
        return false;
      }

      if (!username.Contains('@'))
      {
        WindowHelper.HandleError("The provided username is not an email", false);
        return false;
      }

      if (string.IsNullOrEmpty(password))
      {
        WindowHelper.HandleError("The provided password is empty", false);
        return false;
      }

      var cookies = string.Empty;
      WindowHelper.LongRunningTask(
        () => cookies = GetMarketplaceCookie(username, password), 
        "Download Sitecore 8.x Wizard", 
        Window.GetWindow(this), 
        "Authenticating");

      if (string.IsNullOrEmpty(cookies))
      {
        return false;
      }

      args.Cookies = cookies;
      return true;
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:43,代码来源:Login.xaml.cs

示例15: foreach

        bool IFlowControl.OnMovingNext(WizardArgs wizardArgs)
        {
            var args = (SetupWizardArgs)wizardArgs;

              if (this.Accounts == null)
              {
            return false;
              }

              try
              {
            const string message = "You probably don't have necessary permissions set. Please try to click 'Grant' button before you proceed.";
            foreach (var account in this.Accounts)
            {
              if (!this.ValidateAccount(account))
              {
            return false;
              }

              if (!FileSystem.FileSystem.Local.Security.HasPermissions(args.InstancesRootFolderPath, account, FileSystemRights.FullControl))
              {
            WindowHelper.ShowMessage(message, MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK);
            return false;
              }
            }

            if (!SqlServerManager.Instance.TestSqlServer(args.InstancesRootFolderPath, args.ConnectionString))
            {
              WindowHelper.ShowMessage(message, MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK);
              return false;
            }

            return true;
              }
              catch (Exception ex)
              {
            Log.Error("Cannot verify permissions", this, ex);
            return true;
              }
        }
开发者ID:Brad-Christie,项目名称:Sitecore-Instance-Manager,代码行数:40,代码来源:Permissions.xaml.cs


注:本文中的SIM.Tool.Base.Wizards.WizardArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。