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


C# OpenMode类代码示例

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


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

示例1: FormCompany

        public FormCompany(AccessDataBase.Model.CompanyInfo companyInfo, OpenMode openMode)
        {
            InitializeComponent();

            this.CenterToScreen();
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = GetResourcesFile.getSystemIco();

            this.modelCompanyInfo = companyInfo;
            this.openMode = openMode;

            if (openMode == OpenMode.Add)
            {
                kryptonTextBoxCompanyID.Text = companyInfo.CompanyID.ToString();
            }
            else if (openMode == OpenMode.Update)
            {
                kryptonTextBoxCompanyID.Text = companyInfo.CompanyID.ToString();
                kryptonTextBoxCompanyName.Text = companyInfo.CompanyName.ToString();
                kryptonTextBoxCompanyDes.Text = companyInfo.CompanyDes.ToString();
                kryptonTextBoxCompanyAddr.Text = companyInfo.CompanyAddress.ToString();
                kryptonTextBoxTelPhone1.Text = companyInfo.CompanyTel1.ToString();
                kryptonTextBoxTelPhone2.Text = companyInfo.CompanyTel2.ToString();
            }
        }
开发者ID:qq5013,项目名称:KryptonAccessController,代码行数:27,代码来源:FormCompany.cs

示例2: FormDepartment

        public FormDepartment(AccessDataBase.Model.DepartmentInfo modelDepartmentInfo, OpenMode openMode)
        {
            InitializeComponent();
            InitComboBoxCompany();

            this.CenterToScreen();
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = GetResourcesFile.getSystemIco();

            this.modelDepartmentInfo = modelDepartmentInfo;
            this.openMode = openMode;

            if (openMode == OpenMode.Add)
            {
                kryptonTextBoxDepartmentID.Text = modelDepartmentInfo.DepartmentID.ToString();
            }
            else if (openMode == OpenMode.Update)
            {
                string companyName = modelDepartmentInfo.CompanyName;//.CompanyID.HasValue?modelDepartmentInfo.CompanyID.Value:0;
                modelCompanyInfo = bllCompanyInfo.GetModelList("CompanyName = '" + companyName + "'")[0];

                kryptonTextBoxDepartmentID.Text = modelDepartmentInfo.DepartmentID.ToString();
                kryptonComboBoxCompany.Text = modelCompanyInfo.CompanyName.ToString() ;
                kryptonTextBoxDepartmentName.Text = modelDepartmentInfo.DepartmentName.ToString();
                kryptonTextBoxDepartmentTel1.Text = modelDepartmentInfo.DepartmentTel1.ToString();
                kryptonTextBoxDepartmentTel2.Text = modelDepartmentInfo.DepartmentTel2.ToString();
                kryptonTextBoxDepartmentDes.Text = modelDepartmentInfo.DepartmentDes.ToString();
            }
        }
开发者ID:qq5013,项目名称:KryptonAccessController,代码行数:31,代码来源:FormDepartment.cs

示例3: GetUserDefinedBlockTableRecords

 /// <summary>
 /// Gets the user defined block table records.
 /// </summary>
 /// <param name="symbolTbl">The symbol table.</param>
 /// <param name="trx">The TRX.</param>
 /// <param name="mode">The mode.</param>
 /// <returns></returns>
 public static IEnumerable<BlockTableRecord> GetUserDefinedBlockTableRecords(this BlockTable symbolTbl,
     Transaction trx, OpenMode mode = OpenMode.ForRead)
 {
     return
         symbolTbl.GetSymbolTableRecords<BlockTableRecord>(trx, mode, SymbolTableRecordFilter.None, true)
             .UserDefinedBlocks();
 }
开发者ID:sybold,项目名称:AcExtensionLibrary,代码行数:14,代码来源:BlockTableExtensions.cs

示例4: iPhoneFile

 private iPhoneFile(iPhone phone, long handle, OpenMode mode)
     : base()
 {
     this.phone = phone;
     this.mode = mode;
     this.handle = handle;
 }
开发者ID:rajeshwarn,项目名称:iDeviceBrowser,代码行数:7,代码来源:iPhoneFile.cs

示例5: Open

		public static Handle Open (string uri, OpenMode mode, int priority, AsyncCallback callback)
		{
			IntPtr handle = IntPtr.Zero;
			AsyncCallbackWrapper wrapper = new AsyncCallbackWrapper (callback, null);
			gnome_vfs_async_open (out handle, uri, mode, priority, wrapper.NativeDelegate, IntPtr.Zero);
			return new Handle (handle);
		}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:7,代码来源:Async.cs

示例6: File

	// Constructor.
	public File(FileTable table, int number, OpenMode mode)
			{
				this.table = table;
				this.number = number;
				this.mode = mode;
				this.nextRecord = -1;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:File.cs

示例7: Create

		public static Handle Create (string uri, OpenMode mode, bool exclusive, FilePermissions perm, int priority, AsyncCallback callback)
		{
			IntPtr handle = IntPtr.Zero;
			AsyncCallbackWrapper wrapper = new AsyncCallbackWrapper (callback, null);
			gnome_vfs_async_create (out handle, uri, mode, exclusive, (uint)perm, priority, wrapper.NativeDelegate, IntPtr.Zero);
			return new Handle (handle);
		}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:7,代码来源:Async.cs

示例8: GetViewTableRecords

     public static IEnumerable<ViewTableRecord> GetViewTableRecords(this ViewTable symbolTbl,
 OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None)
     {
         return
             symbolTbl.GetSymbolTableRecords<ViewTableRecord>(symbolTbl.Database.TransactionManager.TopTransaction,
                 mode, filter, false);
     }
开发者ID:Hpadgroup,项目名称:AcExtensionLibrary,代码行数:7,代码来源:ViewTableExtensions.cs

示例9: GetAttributeReferences

 /// <summary>
 /// Gets the attribute references.
 /// </summary>
 /// <param name="bref">The bref.</param>
 /// <param name="trx">The TRX.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="includingErased">if set to <c>true</c> [including erased].</param>
 /// <param name="openObjectsOnLockedLayers">if set to <c>true</c> [open objects on locked layers].</param>
 /// <returns></returns>
 /// <exception cref="Autodesk.AutoCAD.Runtime.Exception"></exception>
 public static IEnumerable<AttributeReference> GetAttributeReferences(this BlockReference bref, Transaction trx,
     OpenMode mode = OpenMode.ForRead, bool includingErased = false, bool openObjectsOnLockedLayers = false)
 {
     if (trx == null)
     {
         throw new Exception(ErrorStatus.NoActiveTransactions);
     }
     if (includingErased)
     {
         foreach (ObjectId id in bref.AttributeCollection)
         {
             yield return (AttributeReference) trx.GetObject(id, mode, true, openObjectsOnLockedLayers);
         }
     }
     else
     {
         foreach (ObjectId id in bref.AttributeCollection)
         {
             if (!id.IsErased)
             {
                 yield return (AttributeReference) trx.GetObject(id, mode, false, openObjectsOnLockedLayers);
             }
         }
     }
 }
开发者ID:sybold,项目名称:AcExtensionLibrary,代码行数:35,代码来源:BlockReferenceExtensions.cs

示例10: GetAllTextStyleTableRecords

 /// <summary>
 /// Gets all text style table records.
 /// </summary>
 /// <param name="symbolTbl">The symbol table.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="filter">The filter.</param>
 /// <returns></returns>
 public static IEnumerable<TextStyleTableRecord> GetAllTextStyleTableRecords(this TextStyleTable symbolTbl,
     OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None)
 {
     return
         symbolTbl.GetSymbolTableRecords<TextStyleTableRecord>(
             symbolTbl.Database.TransactionManager.TopTransaction, mode, filter, true);
 }
开发者ID:sybold,项目名称:AcExtensionLibrary,代码行数:14,代码来源:TextStyleTableExtensions.cs

示例11: iPhoneFile

 private iPhoneFile(MobileDeviceInstance phone, long handle, OpenMode mode)
     : base()
 {
     this.phone = phone;
     this.mode = mode;
     this.handle = handle;
 }
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:7,代码来源:IPhoneFile.cs

示例12: GetShapeFileTableRecords

 /// <summary>
 /// Gets the shape file table records.
 /// </summary>
 /// <param name="symbolTbl">The symbol table.</param>
 /// <param name="trx">The TRX.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="filter">The filter.</param>
 /// <returns></returns>
 public static IEnumerable<TextStyleTableRecord> GetShapeFileTableRecords(this TextStyleTable symbolTbl,
     Transaction trx, OpenMode mode = OpenMode.ForRead,
     SymbolTableRecordFilter filter = SymbolTableRecordFilter.None)
 {
     return
         symbolTbl.GetSymbolTableRecords<TextStyleTableRecord>(trx, mode, filter, true)
             .Where(txt => txt.IsShapeFile);
 }
开发者ID:sybold,项目名称:AcExtensionLibrary,代码行数:16,代码来源:TextStyleTableExtensions.cs

示例13: DimStyleTable

 /// <summary>
 /// Dims the style table.
 /// </summary>
 /// <param name="database">The database.</param>
 /// <param name="transaction">The transaction.</param>
 /// <param name="openMode">The openMode.</param>
 /// <returns>DimStyleTable</returns>
 /// <exception cref="Exception"></exception>
 /// <example>
 /// <code source=".\Content\Samples\Samplescsharp\AcDbMgdExtensions\DatabaseServices\DatabaseExtensionsCommands.cs" language="cs" region="DimStyleTableTrx" />
 /// <code source=".\Content\Samples\Samplesvb\AcDbMgdExtensions\DatabaseServices\DatabaseExtensionsCommands.vb" language="VB" region="DimStyleTableTrx" />
 /// </example>
 public static DimStyleTable DimStyleTable(this Database database, Transaction transaction, OpenMode openMode = OpenMode.ForRead)
 {
     if (transaction == null)
     {
         throw new Exception(ErrorStatus.NoActiveTransactions);
     }
     return (DimStyleTable)transaction.GetObject(database.DimStyleTableId, openMode, false, false);
 }
开发者ID:sybold,项目名称:AcExtensionLibrary,代码行数:20,代码来源:DatabaseExtensions.cs

示例14: SitePropertiesDialog

        /// <summary>
        /// Constructor
        /// </summary>
        public SitePropertiesDialog(OpenMode mode, WebSites Sites, string ActiveSiteKey)
        {
            _openMode = mode;
            _webSites = Sites;
            _activeSitekey = ActiveSiteKey;

            InitializeComponent();
        }
开发者ID:Davincier,项目名称:openpetra,代码行数:11,代码来源:SitePropertiesDialog.cs

示例15: GetBlockTableRecords

        ///<overloads>
        /// <summmary>
        /// You can not edit a dependent block(a block that is inside from xref) from the referenced drawing. 
        /// The default is not to include dependent blocks since typically you will work on blocks that are contained 
        /// inside the drawing, and it saves time by not opening the DbObject and comparing 
        /// BlockTableRecord.ObjectId.OriginalDatabase.UnmanagedObject to the BlockTable.Database.UnmanagedObject property.
        /// </summmary>
        /// </overloads>
        /// <summary>
        /// Gets the block table records.
        /// </summary>
        /// <param name="symbolTbl">The symbol table.</param>
        /// <param name="trx">The TRX.</param>
        /// <param name="mode">The mode.</param>
        /// <param name="filter"><see cref="SymbolTableRecordFilter"/>.</param>
        /// <returns>IEnumerable{BlockTableRecord}</returns>

        public static IEnumerable<BlockTableRecord> GetBlockTableRecords(this BlockTable symbolTbl, Transaction trx,
            OpenMode mode = OpenMode.ForRead, SymbolTableRecordFilter filter = SymbolTableRecordFilter.None)
        {
            if (filter.IsSet(SymbolTableRecordFilter.IncludeDependent))
            {
                return symbolTbl.GetSymbolTableRecords<BlockTableRecord>(trx, mode, filter, true);
            }
            return symbolTbl.GetSymbolTableRecords<BlockTableRecord>(trx, mode, filter, true).NonDependent();
        }
开发者ID:sybold,项目名称:AcExtensionLibrary,代码行数:26,代码来源:BlockTableExtensions.cs


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