• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Wizards.WizardArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetFinishActions

    public override IEnumerable<FinishAction> GetFinishActions(WizardArgs wizardArgs)
    {
      InstallModulesWizardArgs installModulesWizardArgs = (InstallModulesWizardArgs)wizardArgs;
      List<Product> modules = installModulesWizardArgs.Modules;
      foreach (Product module in modules)
      {
        XmlDocument manifest = module.Manifest;
        if (manifest != null && manifest != Product.EmptyManifest)
        {
          XmlElement finish = (XmlElement)manifest.SelectSingleNode("manifest/*/finish");
          if (finish == null)
          {
            continue;
          }

          foreach (FinishAction action in WizardPipelineManager.GetFinishActions(finish, this.WizardArgumentsType))
          {
            yield return new FinishAction(action.Text, action.Method);
          }
        }
      }
    }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:22,代码来源:InstallModulesFinishActionHive.cs


示例17:

        bool IWizardStep.SaveChanges(WizardArgs wizardArgs)
        {
            var args = (ImportWizardArgs)wizardArgs;
              if (WebServerManager.WebsiteExists(this.websiteName.Text))
              {
            this.websiteNameWarn.Visibility = System.Windows.Visibility.Visible;
            return false;
              }

              this.websiteNameWarn.Visibility = System.Windows.Visibility.Hidden;

              if (FileSystem.FileSystem.Local.Directory.Exists(this.rootFolderPath.Text) && FileSystem.FileSystem.Local.Directory.GetFiles(this.rootFolderPath.Text).Length > 0)
              {
            this.rootPathWarn.Visibility = System.Windows.Visibility.Visible;
            return false;
              }

              args.siteName = this.websiteName.Text;
              args.rootPath = this.rootFolderPath.Text;
              args.updateLicense = this.updateLicense.IsChecked == true ? true : false;
              args.pathToLicenseFile = ProfileManager.Profile.License;
              return true;
        }
开发者ID:Brad-Christie,项目名称:Sitecore-Instance-Manager,代码行数:23,代码来源:ImportWebsite.xaml.cs


示例18: OnMovingNext

 public bool OnMovingNext(WizardArgs wizardArgs)
 {
     return true;
 }
开发者ID:Sitecore,项目名称:Sitecore-Instance-Manager,代码行数:4,代码来源:ConfigurationPackages.xaml.cs


示例19: OnMovingBack

 public bool OnMovingBack(WizardArgs wizardArgs)
 {
     return true;
 }
开发者ID:Sitecore,项目名称:Sitecore-Instance-Manager,代码行数:4,代码来源:ConfigurationPackages.xaml.cs


示例20:

 void IWizardStep.InitializeStep(WizardArgs wizardArgs)
 {
   ImportWizardArgs args = (ImportWizardArgs)wizardArgs;
   this.websiteName.Text = args.siteName;
   this.rootFolderPath.Text = args.rootPath;
 }
开发者ID:lennartfranke,项目名称:Sitecore-Instance-Manager,代码行数:6,代码来源:ImportWebsite.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SIMONFramework.SIMONObject类代码示例发布时间:2022-05-26
下一篇:
C# Instances.Instance类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap