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


C# IExecutionContext.GetBoolFrom方法代码示例

本文整理汇总了C#中IExecutionContext.GetBoolFrom方法的典型用法代码示例。如果您正苦于以下问题:C# IExecutionContext.GetBoolFrom方法的具体用法?C# IExecutionContext.GetBoolFrom怎么用?C# IExecutionContext.GetBoolFrom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IExecutionContext的用法示例。


在下文中一共展示了IExecutionContext.GetBoolFrom方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Do

 public override CommandResult Do(IExecutionContext context)
 {
     string absoluteDestPath = context.GetStringFrom(DestPath);
     string absoluteSourcePath = context.GetStringFrom(SourcePath);
     bool asboluteMoveFast = context.GetBoolFrom(MoveFast);
     bool asboluteClearFirst = context.GetBoolFrom(ClearFirst);
     context.Log.AddLogInformation("Начинаем создавать папку " + absoluteDestPath);
     if (asboluteClearFirst && Directory.Exists(absoluteDestPath))
     {
         Directory.Delete(absoluteDestPath, true);
     }
     if (!Directory.Exists(absoluteDestPath))
     {
         Directory.CreateDirectory(absoluteDestPath);
     }
     IOUtil.CopyDirectory(absoluteSourcePath, absoluteDestPath, asboluteMoveFast);
     context.Log.AddLogInformation("Папка " + absoluteDestPath + " создана");
     return CommandResult.Next;
 }
开发者ID:vgrinin,项目名称:gin,代码行数:19,代码来源:CreateDirectoryContent.cs

示例2: Create

        public override Control Create(IExecutionContext context)
        {
            SQLConnectionProperties val = (SQLConnectionProperties)Value;

            _control = new SQLConnectionControl(context);
            SQLConnectionControl control = (SQLConnectionControl)_control;
            control.Value = val;

            bool fixedInstanceName = context.GetBoolFrom(FixedInstanceName);
            bool fixedDBName = context.GetBoolFrom(FixedDBName);
            bool fixedSqlAuth = context.GetBoolFrom(FixedSqlAuth);
            bool fixedUserName = context.GetBoolFrom(FixedUserName);

            control.SetControlEnabled(SQLConnectionSubControl.UserName, !fixedUserName);
            control.SetControlEnabled(SQLConnectionSubControl.SqlAuthentication, !fixedSqlAuth);
            control.SetControlEnabled(SQLConnectionSubControl.DBName, !fixedDBName);
            control.SetControlEnabled(SQLConnectionSubControl.ServerName, !fixedInstanceName);

            return _control;
        }
开发者ID:vgrinin,项目名称:gin,代码行数:20,代码来源:ICSQLConnection.cs

示例3: Create

 public override Control Create(IExecutionContext context)
 {
     bool absoluteInitialValue = context.GetBoolFrom(Value);
     _control = new Editors.CheckBoxEditor(Caption, absoluteInitialValue, null, null, null);
     return _control;
 }
开发者ID:vgrinin,项目名称:gin,代码行数:6,代码来源:UserInputCheckBox.cs

示例4: Do

        public override CommandResult Do(IExecutionContext context)
        {
            string absoluteFilePath = context.GetStringFrom(FilePath);

            bool absoluteAllUsers = context.GetBoolFrom(AllUsers);
            string absoluteShortcutName = context.GetStringFrom(ShortcutName);
            string linkPathName = GetLinkPathName(absoluteShortcutName, absoluteAllUsers, Place);

            WshShell shell = new WshShell();
            IWshShortcut link = (IWshShortcut)shell.CreateShortcut(linkPathName);
            link.TargetPath = absoluteFilePath;
            link.Save();

            return CommandResult.Next;
        }
开发者ID:vgrinin,项目名称:gin,代码行数:15,代码来源:CreateShortcut.cs

示例5: Do

        public override CommandResult Do(IExecutionContext context)
        {
            _context = context;

            context.Log.AddLogInformation("SyncType = " + SyncType);
            string absoluteConnectionCtring = context.GetStringFrom(ConnectionString);
            context.Log.AddLogInformation("ConnectionString = '" + absoluteConnectionCtring + "'");
            string absolutePackagePath = context.GetStringFrom(PackagePath);
            context.Log.AddLogInformation("PackagePath = '" + absolutePackagePath + "'");

            using (SqlConnection connection = new SqlConnection(absoluteConnectionCtring))
            {
                connection.Open();
                context.Log.AddLogInformation("Открыли соединение с БД, выполняем rp_AddSynchRegister");
                int synchID = CommonSP.rp_AddSynchRegister(connection, absolutePackagePath);
                context.Log.AddLogInformation("rp_AddSynchRegister выполнена, SynchID = " + synchID);
                int synchResult = 0;

                try
                {
                    ExecuteDTSPackages(connection, context);

                    if (SyncType == OSBBSynchronizationType.TextFile)
                    {
                        UpdateExcelTemplates(connection, absolutePackagePath);
                    }

                    bool absoluteUpdateSetStrings = context.GetBoolFrom(UpdateSetStrings);
                    if (absoluteUpdateSetStrings)
                    {
                        _context.Log.AddLogInformation("Начинаем выполнение rp_UpdateSetStringName");
                        CommonSP.rp_UpdateSetStringName(connection);
                        _context.Log.AddLogInformation("rp_UpdateSetStringName выполнена");
                    }

                    bool absoluteCheckFormulaDiapasons = context.GetBoolFrom(CheckFormulaDiapasons);
                    if (absoluteCheckFormulaDiapasons)
                    {
                        _context.Log.AddLogInformation("Начинаем выполнение rp_BuildFormulas");
                        CommonSP.rp_BuildFormulas(connection);
                        _context.Log.AddLogInformation("rp_BuildFormulas выполнена");
                    }
                    synchResult = 1;
                }
                finally
                {
                    _context.Log.AddLogInformation("Начинаем выполнение rp_UpdSynchRegister");
                    CommonSP.rp_UpdSynchRegister(connection, absolutePackagePath, synchID, synchResult);
                    _context.Log.AddLogInformation("rp_UpdSynchRegister выполнена");
                }

            }

            return CommandResult.Next;
        }
开发者ID:vgrinin,项目名称:gin,代码行数:55,代码来源:CMSynchronize.cs


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