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

C# OpenMode类代码示例

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

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



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


示例16: FormBook

 public FormBook(OpenMode openMode)
     : base()
 {
     this.openMode = openMode;
     InitializeComponent();
     foreach (string cent in Enum.GetNames(typeof(Century))) {
         this.cbCentury.Items.Add(cent);
     }
     this.cbCentury.SelectedIndex = 0;
 }
开发者ID:davidbedok,项目名称:oeprogvep,代码行数:10,代码来源:FormBook.cs


示例17: Create

		public static Handle Create (Uri uri, OpenMode mode, bool exclusive, FilePermissions perm)
		{
			IntPtr handle = IntPtr.Zero;
			Result result = gnome_vfs_create_uri (out handle, uri.Handle, mode, exclusive, (uint)perm);
			if (result != Result.Ok) {
				Vfs.ThrowException (uri, result);
				return null;
			} else {
				return new Handle (handle);
			}
		}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:11,代码来源:Sync.cs


示例18: Open

		public static Handle Open (Uri uri, OpenMode mode)
		{
			IntPtr handle = IntPtr.Zero;
			Result result = gnome_vfs_open_uri (out handle, uri.Handle, mode);
			if (result != Result.Ok) {
				Vfs.ThrowException (uri, result);
				return null;
			} else {
				return new Handle (handle);
			}
		}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:11,代码来源:Sync.cs


示例19: GetExtensionDictionary

 /// <summary>
 /// Gets the extension dictionary.
 /// </summary>
 /// <param name="dbObj">The database object.</param>
 /// <param name="openMode">The open mode.</param>
 /// <returns>
 /// The existing extension dictionary or creates and add one if needed.
 /// use <see cref="HasExtensionDictionary" /> if only checking to see if it exist is needed
 /// </returns>
 public static DBDictionary GetExtensionDictionary(this DBObject dbObj, OpenMode openMode = OpenMode.ForRead)
 {
     if (!HasExtensionDictionary(dbObj))
     {
         if (!dbObj.IsWriteEnabled)
         {
             dbObj.UpgradeOpen();
         }
         dbObj.CreateExtensionDictionary();
     }
     return dbObj.ExtensionDictionary.GetDBObject<DBDictionary>(openMode);
 }
开发者ID:sybold,项目名称:AcExtensionLibrary,代码行数:21,代码来源:DBObjectExtensions.cs


示例20: FormController

        public FormController(AccessDataBase.Model.ControllerInfo ModelControllerInfo, OpenMode openMode)
        {
            InitializeComponent();

            doorUnit1.KryptonButtonReaderAdd1.Click += KryptonButtonReaderAddClick1;
            doorUnit1.KryptonButtonReaderAdd2.Click += KryptonButtonReaderAddClick1;
            doorUnit1.KryptonButtonReaderUpdate1.Click += KryptonButtonReaderUpdateClick1;
            doorUnit1.KryptonButtonReaderUpdate2.Click += KryptonButtonReaderUpdateClick1;
            doorUnit1.KryptonCheckBoxReader1.CheckedChanged += KryptonCheckBoxReaderCheckedChanged1;
            doorUnit1.KryptonCheckBoxReader2.CheckedChanged += KryptonCheckBoxReaderCheckedChanged1;

            doorUnit2.KryptonButtonReaderAdd1.Click += KryptonButtonReaderAddClick1;
            doorUnit2.KryptonButtonReaderAdd2.Click += KryptonButtonReaderAddClick1;
            doorUnit2.KryptonButtonReaderUpdate1.Click += KryptonButtonReaderUpdateClick2;
            doorUnit2.KryptonButtonReaderUpdate2.Click += KryptonButtonReaderUpdateClick2;
            doorUnit2.KryptonCheckBoxReader1.CheckedChanged += KryptonCheckBoxReaderCheckedChanged2;
            doorUnit2.KryptonCheckBoxReader2.CheckedChanged += KryptonCheckBoxReaderCheckedChanged2;

            doorUnit3.KryptonButtonReaderAdd1.Click += KryptonButtonReaderAddClick1;
            doorUnit3.KryptonButtonReaderAdd2.Click += KryptonButtonReaderAddClick1;
            doorUnit3.KryptonButtonReaderUpdate1.Click += KryptonButtonReaderUpdateClick3;
            doorUnit3.KryptonButtonReaderUpdate2.Click += KryptonButtonReaderUpdateClick3;
            doorUnit3.KryptonCheckBoxReader1.CheckedChanged += KryptonCheckBoxReaderCheckedChanged3;
            doorUnit3.KryptonCheckBoxReader2.CheckedChanged += KryptonCheckBoxReaderCheckedChanged3;

            doorUnit4.KryptonButtonReaderAdd1.Click += KryptonButtonReaderAddClick4;
            doorUnit4.KryptonButtonReaderAdd2.Click += KryptonButtonReaderAddClick4;
            doorUnit4.KryptonButtonReaderUpdate1.Click += KryptonButtonReaderUpdateClick4;
            doorUnit4.KryptonButtonReaderUpdate2.Click += KryptonButtonReaderUpdateClick4;
            doorUnit4.KryptonCheckBoxReader1.CheckedChanged += KryptonCheckBoxReaderCheckedChanged4;
            doorUnit4.KryptonCheckBoxReader2.CheckedChanged += KryptonCheckBoxReaderCheckedChanged4;

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

            this.modelControllerInfo = ModelControllerInfo;
            this.openMode = openMode;
            for (int i = 0; i < 4;i++ )
                arrayDoorUnitInfo[i] = new AccessDataBase.Model.DoorUnitInfo();

            if (openMode == OpenMode.Add)
            {
                showAddPara();
            }
            else if (openMode == OpenMode.Update)
            {
                showUpdatePara();
            }
        }
开发者ID:qq5013,项目名称:KryptonAccessController,代码行数:52,代码来源:FormController.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# OpenSim类代码示例发布时间:2022-05-24
下一篇:
C# OpenMetaverse类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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