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

C# CommandEventHandler类代码示例

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

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



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

示例1: CreateChildControls

 protected internal override void CreateChildControls()
 {
     this.Controls.Clear();
     this._logInLinkButton = new LinkButton();
     this._logInImageButton = new ImageButton();
     this._logOutLinkButton = new LinkButton();
     this._logOutImageButton = new ImageButton();
     this._logInLinkButton.EnableViewState = false;
     this._logInImageButton.EnableViewState = false;
     this._logOutLinkButton.EnableViewState = false;
     this._logOutImageButton.EnableViewState = false;
     this._logInLinkButton.EnableTheming = false;
     this._logInImageButton.EnableTheming = false;
     this._logInLinkButton.CausesValidation = false;
     this._logInImageButton.CausesValidation = false;
     this._logOutLinkButton.EnableTheming = false;
     this._logOutImageButton.EnableTheming = false;
     this._logOutLinkButton.CausesValidation = false;
     this._logOutImageButton.CausesValidation = false;
     CommandEventHandler handler = new CommandEventHandler(this.LogoutClicked);
     this._logOutLinkButton.Command += handler;
     this._logOutImageButton.Command += handler;
     handler = new CommandEventHandler(this.LoginClicked);
     this._logInLinkButton.Command += handler;
     this._logInImageButton.Command += handler;
     this.Controls.Add(this._logOutLinkButton);
     this.Controls.Add(this._logOutImageButton);
     this.Controls.Add(this._logInLinkButton);
     this.Controls.Add(this._logInImageButton);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:30,代码来源:LoginStatus.cs


示例2: Command

 /// <summary>
 ///     Creates a new Command
 /// </summary>
 /// <param name="cmd">The name of the command</param>
 /// <param name="desc">The description of the command</param>
 /// <param name="expectedArgs">A list of a list of expected command arguments where each outer list is a new argument set</param>
 /// <param name="callback">The CommandEventHandler delegate to callback to</param>
 public Command(string cmd, string desc, List<List<CommandArgument>> expectedArgs,
     CommandEventHandler callback)
 {
     Name = cmd;
     ExpectedArgs = expectedArgs;
     Callback = callback;
     Description = desc;
 }
开发者ID:amg-argh,项目名称:GTAVDeveloperConsole,代码行数:15,代码来源:CommandDispatcher.cs


示例3: AppendDetailViewFields

 public static void AppendDetailViewFields(string sDETAIL_NAME, HtmlTable tbl, IDataReader rdr, L10N L10n, TimeZone T10n, CommandEventHandler Page_Command)
 {
     if ( tbl == null )
     {
         SplendidError.SystemWarning(new StackTrace(true).GetFrame(0), "HtmlTable is not defined for " + sDETAIL_NAME);
         return;
     }
     DataTable dtFields = SplendidCache.DetailViewFields(sDETAIL_NAME);
     AppendDetailViewFields(dtFields.DefaultView, tbl, rdr, L10n, T10n, Page_Command, false);
 }
开发者ID:NALSS,项目名称:splendidcrm-99885,代码行数:10,代码来源:SplendidDynamic.cs


示例4: Register

        public static void Register(string option, CommandEventHandler handler, bool requiresValue)
        {
            string optionKey = PrepareOptionKey(option);
            OptionRoute route;

            if (CommandRouter.routes.ContainsKey(optionKey))
                throw new Exception("Komut opsiyon key'i zaten mevcut");

            route = new OptionRoute() { Option = option, Handler = handler, RequiresValue = requiresValue };

            CommandRouter.routes.Add(optionKey, route);
        }
开发者ID:0ffffffffh,项目名称:fastMagnet,代码行数:12,代码来源:CommandRouter.cs


示例5: PrototypeDevice

        public PrototypeDevice()
        {
            DcClient = new DeviceHive.HttpClient(Resources.GetString(Resources.StringResources.CloudUrl), DateTime.MinValue, RequestTimeout);

            Initializing += new ConnectEventHandler(PreInit);
            Connecting += new ConnectEventHandler(PreConnect);
            Connected += new ConnectEventHandler(PostConnect);
            BeforeCommand += new CommandEventHandler(PreProcessCommand);
            AfterCommand += new CommandEventHandler(PostProcessCommand);
            BeforeNotification += new NotificationEventHandler(PreProcessNotification);
            AfterNotification += new NotificationEventHandler(PostProcessNotification);
            Disconnected += new SimpleEventHandler(OnDisconnect);
            LastTemp = 0.0f;
        }
开发者ID:reven86,项目名称:framework,代码行数:14,代码来源:PrototypeDevice.cs


示例6: Register

		public static bool Register(string value, AccessLevel access, CommandEventHandler handler)
		{
			if (String.IsNullOrWhiteSpace(value))
			{
				return false;
			}

			if (CommandSystem.Entries.ContainsKey(value))
			{
				return Replace(value, access, handler, value);
			}

			CommandSystem.Register(value, access, handler);
			return true;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:15,代码来源:CommandUtility.cs


示例7: Register

		public static bool Register(string value, AccessLevel access, CommandEventHandler handler, out CommandEntry entry)
		{
			entry = null;

			if (String.IsNullOrWhiteSpace(value))
			{
				return false;
			}

			if (CommandSystem.Entries.ContainsKey(value))
			{
				return Replace(value, access, handler, value, out entry);
			}

			CommandSystem.Register(value, access, handler);

			return CommandSystem.Entries.TryGetValue(value, out entry);
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:18,代码来源:CommandUtility.cs


示例8: Command

 /// <summary>
 /// Creates a new command.
 /// </summary>
 /// <param name="name">Name for the new command.</param>
 /// <param name="callback">Callback for the new command.</param>
 public Command(string name, CommandEventHandler callback)
 {
     foreach (object o in callback.Method.GetCustomAttributes(false))
     {
         if (o is AlertAttribute)
         {
             alert = true;
         }
         else if (o is AliasAttribute)
         {
             aliases = ((AliasAttribute)o).aliases;
         }
         else if (o is DescriptionAttribute)
         {
             desc = ((DescriptionAttribute)o).description;
         }
     }
     this.callback = callback;
     this.name = name.ToLower();
 }
开发者ID:edaniels,项目名称:TerrariAPI,代码行数:25,代码来源:Command.cs


示例9: Replace

		public static bool Replace(string value, AccessLevel access, CommandEventHandler handler, string newValue)
		{
			if (String.IsNullOrWhiteSpace(value))
			{
				if (String.IsNullOrWhiteSpace(newValue))
				{
					return false;
				}

				value = newValue;
			}

			if (handler == null)
			{
				if (!CommandSystem.Entries.ContainsKey(value))
				{
					return false;
				}

				handler = CommandSystem.Entries[value].Handler;
			}

			if (value != newValue)
			{
				if (String.IsNullOrWhiteSpace(newValue))
				{
					Unregister(value);
					return true;
				}

				value = newValue;
			}

			Unregister(value);
			CommandSystem.Register(value, access, handler);
			return true;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:37,代码来源:CommandUtility.cs


示例10: AppendButtons

		public static void AppendButtons(string sVIEW_NAME, Guid gASSIGNED_USER_ID, Control ctl, bool bIsMobile, DataRow rdr, L10N L10n, CommandEventHandler Page_Command)
		{
			if ( ctl == null )
			{
				SplendidError.SystemWarning(new StackTrace(true).GetFrame(0), "AppendButtons ctl is not defined");
				return;
			}
			//ctl.Controls.Clear();

			Hashtable hashIDs = new Hashtable();
			// 05/06/2010   Use a special Page flag to override the default IsPostBack behavior. 
			bool bIsPostBack = ctl.Page.IsPostBack;
			bool bNotPostBack = false;
			if ( ctl.TemplateControl is SplendidControl )
			{
				bNotPostBack = (ctl.TemplateControl as SplendidControl).NotPostBack;
				bIsPostBack = ctl.Page.IsPostBack && !bNotPostBack;
			}
			bool bShowUnassigned = Crm.Config.show_unassigned();
			DataTable dt = SplendidCache.DynamicButtons(sVIEW_NAME);
			if ( dt != null )
			{
				foreach(DataRow row in dt.Rows)
				{
					Guid   gID                 = Sql.ToGuid   (row["ID"                ]);
					int    nCONTROL_INDEX      = Sql.ToInteger(row["CONTROL_INDEX"     ]);
					string sCONTROL_TYPE       = Sql.ToString (row["CONTROL_TYPE"      ]);
					string sMODULE_NAME        = Sql.ToString (row["MODULE_NAME"       ]);
					string sMODULE_ACCESS_TYPE = Sql.ToString (row["MODULE_ACCESS_TYPE"]);
					string sTARGET_NAME        = Sql.ToString (row["TARGET_NAME"       ]);
					string sTARGET_ACCESS_TYPE = Sql.ToString (row["TARGET_ACCESS_TYPE"]);
					bool   bMOBILE_ONLY        = Sql.ToBoolean(row["MOBILE_ONLY"       ]);
					bool   bADMIN_ONLY         = Sql.ToBoolean(row["ADMIN_ONLY"        ]);
					string sCONTROL_TEXT       = Sql.ToString (row["CONTROL_TEXT"      ]);
					string sCONTROL_TOOLTIP    = Sql.ToString (row["CONTROL_TOOLTIP"   ]);
					string sCONTROL_ACCESSKEY  = Sql.ToString (row["CONTROL_ACCESSKEY" ]);
					string sCONTROL_CSSCLASS   = Sql.ToString (row["CONTROL_CSSCLASS"  ]);
					string sTEXT_FIELD         = Sql.ToString (row["TEXT_FIELD"        ]);
					string sARGUMENT_FIELD     = Sql.ToString (row["ARGUMENT_FIELD"    ]);
					string sCOMMAND_NAME       = Sql.ToString (row["COMMAND_NAME"      ]);
					string sURL_FORMAT         = Sql.ToString (row["URL_FORMAT"        ]);
					string sURL_TARGET         = Sql.ToString (row["URL_TARGET"        ]);
					string sONCLICK_SCRIPT     = Sql.ToString (row["ONCLICK_SCRIPT"    ]);
					// 07/28/2010   We need a flag to exclude a button from a mobile device. 
					bool   bEXCLUDE_MOBILE     = false;
					try
					{
						bEXCLUDE_MOBILE = Sql.ToBoolean(row["EXCLUDE_MOBILE"]);
					}
					catch
					{
					}
					// 03/14/2014   Allow hidden buttons to be created. 
					bool   bHIDDEN             = false;
					try
					{
						bHIDDEN = Sql.ToBoolean(row["HIDDEN"]);
					}
					catch
					{
					}

					// 09/01/2008   Give each button an ID to simplify validation. 
					// Attempt to name the control after the command name.  If no command name, then use the control text. 
					string sCONTROL_ID = String.Empty;
					if ( !Sql.IsEmptyString(sCOMMAND_NAME) )
					{
						sCONTROL_ID = sCOMMAND_NAME;
					}
					else if ( !Sql.IsEmptyString(sCONTROL_TEXT) )
					{
						sCONTROL_ID = sCONTROL_TEXT;
						if ( sCONTROL_TEXT.IndexOf('.') >= 0 )
						{
							sCONTROL_ID = sCONTROL_TEXT.Split('.')[1];
							sCONTROL_ID = sCONTROL_ID.Replace("LBL_", "");
							sCONTROL_ID = sCONTROL_ID.Replace("_BUTTON_LABEL", "");
						}
					}
					if ( !Sql.IsEmptyString(sCONTROL_ID) )
					{
						// 09/01/2008   Cleanup the ID. 
						sCONTROL_ID = sCONTROL_ID.Trim();
						sCONTROL_ID = sCONTROL_ID.Replace(' ', '_');
						sCONTROL_ID = sCONTROL_ID.Replace('.', '_');
						sCONTROL_ID = "btn" + sCONTROL_ID.ToUpper();
						// 12/16/2008   Add to hash after cleaning the ID. 
						if ( hashIDs.Contains(sCONTROL_ID) )
							sCONTROL_ID = sVIEW_NAME.Replace('.', '_') + "_" + nCONTROL_INDEX.ToString();
						if ( !hashIDs.Contains(sCONTROL_ID) )
							hashIDs.Add(sCONTROL_ID, null);
						else
							sCONTROL_ID = String.Empty;  // If ID still exists, then don't set the ID. 
					}

					// 03/21/2008   We need to use a view to search for the rows for the ColumnName. 
					// 11/22/2010   Convert data reader to data table for Rules Wizard. 
					//DataView vwSchema = null;
					//if ( rdr != null )
					//	vwSchema = new DataView(rdr.GetSchemaTable());
//.........这里部分代码省略.........
开发者ID:huamouse,项目名称:Taoqi,代码行数:101,代码来源:SplendidDynamic.cs


示例11: CreateMoveButton

        private LinkButton CreateMoveButton(string direction, string tooltip, CommandEventHandler handler)
        {
            var b = new LinkButton();
            b.ID = ID + "_" + direction + "_" + itemEditorIndex;
			b.Text = "<b class='fa fa-arrow-" + direction + "'></b>";
            b.ToolTip = tooltip;
            b.CommandArgument = itemEditorIndex.ToString();
            b.CausesValidation = false;
            b.Command += handler;

            return b;
        }
开发者ID:nikita239,项目名称:Aspect,代码行数:12,代码来源:ItemEditorList.cs


示例12: Register

		public static void Register( string command, CommandEventHandler handler )
		{
			CommandSystem.Register( command, MC.AccessLevelReq, handler );
		}
开发者ID:brodock,项目名称:genova-project,代码行数:4,代码来源:MegaSpawnerGump.cs


示例13: RegisterButtonEvents

 public static void RegisterButtonEvents(Control container, CommandEventHandler eventHandler)
 {
     foreach (var button in container.Controls.OfType<IButtonControl>())
         button.Command += eventHandler;
 }
开发者ID:teamaton,项目名称:speak-lib,代码行数:5,代码来源:PagerControl.cs


示例14: AppendDetailViewFields

 protected void AppendDetailViewFields(string sDETAIL_NAME, HtmlTable tbl, IDataReader rdr, CommandEventHandler Page_Command)
 {
     // 12/02/2005 Paul.  AppendEditViewFields will get called inside InitializeComponent(),
     // which occurs before OnInit(), so make sure to initialize L10n.
     SplendidDynamic.AppendDetailViewFields(sDETAIL_NAME, tbl, rdr, GetL10n(), GetT10n(), Page_Command);
 }
开发者ID:NALSS,项目名称:splendidcrm-99885,代码行数:6,代码来源:SplendidControl.cs


示例15: Register

 public static void Register( string command, AccessLevel access, CommandEventHandler handler )
 {
    Server.Commands.Register( command, access, handler );
 }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:4,代码来源:saythis.cs


示例16: CreateChildControls

        /// <devdoc>
        /// Creates all the child controls that may be rendered.
        /// </devdoc>
        protected internal override void CreateChildControls() {
            Controls.Clear();

            _logInLinkButton = new LinkButton();
            _logInImageButton = new ImageButton();
            _logOutLinkButton = new LinkButton();
            _logOutImageButton = new ImageButton();

            _logInLinkButton.EnableViewState = false;
            _logInImageButton.EnableViewState = false;
            _logOutLinkButton.EnableViewState = false;
            _logOutImageButton.EnableViewState = false;

            // Disable theming of child controls (VSWhidbey 86010)
            _logInLinkButton.EnableTheming = false;
            _logInImageButton.EnableTheming = false;

            _logInLinkButton.CausesValidation = false;
            _logInImageButton.CausesValidation = false;

            _logOutLinkButton.EnableTheming = false;
            _logOutImageButton.EnableTheming = false;

            _logOutLinkButton.CausesValidation = false;
            _logOutImageButton.CausesValidation = false;

            CommandEventHandler handler = new CommandEventHandler(LogoutClicked);
            _logOutLinkButton.Command += handler;
            _logOutImageButton.Command += handler;

            handler = new CommandEventHandler(LoginClicked);
            _logInLinkButton.Command += handler;
            _logInImageButton.Command += handler;

            Controls.Add(_logOutLinkButton);
            Controls.Add(_logOutImageButton);
            Controls.Add(_logInLinkButton);
            Controls.Add(_logInImageButton);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:42,代码来源:loginstatus.cs


示例17: CommandEntry

 public CommandEntry( string command, CommandEventHandler handler, AccessLevel accessLevel )
 {
     m_Command = command;
     m_Handler = handler;
     m_AccessLevel = accessLevel;
 }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:6,代码来源:CommandEntry.cs


示例18: Replace

		public static bool Replace(string value, AccessLevel access, CommandEventHandler handler, string newValue)
		{
			CommandEntry entry;

			return Replace(value, access, handler, newValue, out entry);
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:6,代码来源:CommandUtility.cs


示例19: AppendGridColumns

		// 04/11/2011   Add the layout flag so that we can provide a preview mode. 
		public static void AppendGridColumns(DataView dvFields, HtmlTable tbl, IDataReader rdr, L10N L10n, TimeZone T10n, CommandEventHandler Page_Command, bool bLayoutMode)
		{
			if ( tbl == null )
			{
				SplendidError.SystemWarning(new StackTrace(true).GetFrame(0), "HtmlTable is not defined");
				return;
			}
			// 01/07/2006   Show table borders in layout mode. This will help distinguish blank lines from wrapped lines. 
			if ( bLayoutMode )
				tbl.Border = 1;

			HtmlTableRow trAction = new HtmlTableRow();
			HtmlTableRow trHeader = new HtmlTableRow();
			HtmlTableRow trField  = new HtmlTableRow();
			tbl.Rows.Insert(0, trAction);
			tbl.Rows.Insert(1, trHeader);
			tbl.Rows.Insert(2, trField );
			trAction.Attributes.Add("class", "listViewThS1");
			trHeader.Attributes.Add("class", "listViewThS1");
			trField .Attributes.Add("class", "oddListRowS1");
			trAction.Visible = bLayoutMode;

			HttpSessionState Session = HttpContext.Current.Session;
			bool bSupportsDraggable = Sql.ToBoolean(Session["SupportsDraggable"]);
			foreach(DataRowView row in dvFields)
			{
				Guid   gID                         = Sql.ToGuid   (row["ID"                        ]);
				int    nCOLUMN_INDEX               = Sql.ToInteger(row["COLUMN_INDEX"              ]);
				string sCOLUMN_TYPE                = Sql.ToString (row["COLUMN_TYPE"               ]);
				string sHEADER_TEXT                = Sql.ToString (row["HEADER_TEXT"               ]);
				string sSORT_EXPRESSION            = Sql.ToString (row["SORT_EXPRESSION"           ]);
				string sITEMSTYLE_WIDTH            = Sql.ToString (row["ITEMSTYLE_WIDTH"           ]);
				string sITEMSTYLE_CSSCLASS         = Sql.ToString (row["ITEMSTYLE_CSSCLASS"        ]);
				string sITEMSTYLE_HORIZONTAL_ALIGN = Sql.ToString (row["ITEMSTYLE_HORIZONTAL_ALIGN"]);
				string sITEMSTYLE_VERTICAL_ALIGN   = Sql.ToString (row["ITEMSTYLE_VERTICAL_ALIGN"  ]);
				bool   bITEMSTYLE_WRAP             = Sql.ToBoolean(row["ITEMSTYLE_WRAP"            ]);
				string sDATA_FIELD                 = Sql.ToString (row["DATA_FIELD"                ]);
				string sDATA_FORMAT                = Sql.ToString (row["DATA_FORMAT"               ]);
				string sURL_FIELD                  = Sql.ToString (row["URL_FIELD"                 ]);
				string sURL_FORMAT                 = Sql.ToString (row["URL_FORMAT"                ]);
				string sURL_TARGET                 = Sql.ToString (row["URL_TARGET"                ]);
				string sLIST_NAME                  = Sql.ToString (row["LIST_NAME"                 ]);
				
				HtmlTableCell tdAction = new HtmlTableCell();
				trAction.Cells.Add(tdAction);
				tdAction.NoWrap = true;

				Literal litIndex = new Literal();
				tdAction.Controls.Add(litIndex);
				litIndex.Text = " " + nCOLUMN_INDEX.ToString() + " ";

				// 05/18/2013   Add drag handle. 
				if ( bSupportsDraggable )
				{
					Image imgDragIcon = new Image();
					imgDragIcon.SkinID = "draghandle_horz";
					imgDragIcon.Attributes.Add("draggable"  , "true");
					imgDragIcon.Attributes.Add("ondragstart", "event.dataTransfer.setData('Text', '" + nCOLUMN_INDEX.ToString() + "');");
					tdAction.Controls.Add(imgDragIcon);
					// 08/08/2013   IE does not support preventDefault. 
					// http://stackoverflow.com/questions/1000597/event-preventdefault-function-not-working-in-ie
					tdAction.Attributes.Add("ondragover", "LayoutDragOver(event, '" + nCOLUMN_INDEX.ToString() + "')");
					tdAction.Attributes.Add("ondrop"    , "LayoutDropIndex(event, '" + nCOLUMN_INDEX.ToString() + "')");
				}
				else
				{
					ImageButton btnMoveUp   = CreateLayoutImageButtonSkin(gID, "Layout.MoveUp"  , nCOLUMN_INDEX, L10n.Term(".LNK_LEFT"  ), "leftarrow_inline" , Page_Command);
					ImageButton btnMoveDown = CreateLayoutImageButtonSkin(gID, "Layout.MoveDown", nCOLUMN_INDEX, L10n.Term(".LNK_RIGHT" ), "rightarrow_inline", Page_Command);
					tdAction.Controls.Add(btnMoveUp  );
					tdAction.Controls.Add(btnMoveDown);
				}
				ImageButton btnInsert   = CreateLayoutImageButtonSkin(gID, "Layout.Insert"  , nCOLUMN_INDEX, L10n.Term(".LNK_INS"   ), "plus_inline"      , Page_Command);
				ImageButton btnEdit     = CreateLayoutImageButtonSkin(gID, "Layout.Edit"    , nCOLUMN_INDEX, L10n.Term(".LNK_EDIT"  ), "edit_inline"      , Page_Command);
				ImageButton btnDelete   = CreateLayoutImageButtonSkin(gID, "Layout.Delete"  , nCOLUMN_INDEX, L10n.Term(".LNK_DELETE"), "delete_inline"    , Page_Command);
				tdAction.Controls.Add(btnInsert  );
				tdAction.Controls.Add(btnEdit    );
				tdAction.Controls.Add(btnDelete  );
				
				HtmlTableCell tdHeader = new HtmlTableCell();
				trHeader.Cells.Add(tdHeader);
				tdHeader.NoWrap = true;
				
				HtmlTableCell tdField = new HtmlTableCell();
				trField.Cells.Add(tdField);
				tdField.NoWrap = true;

				Literal litHeader = new Literal();
				tdHeader.Controls.Add(litHeader);
				if ( bLayoutMode )
					litHeader.Text = sHEADER_TEXT;
				else
					litHeader.Text = L10n.Term(sHEADER_TEXT);

				Literal litField = new Literal();
				tdField.Controls.Add(litField);
				litField.Text = sDATA_FIELD;
				litField.Visible = bLayoutMode;
			}
		}
开发者ID:huamouse,项目名称:Taoqi,代码行数:100,代码来源:SplendidDynamic.cs


示例20: AppendEditViewFields

		public static void AppendEditViewFields(DataView dvFields, HtmlTable tbl, DataRow rdr, L10N L10n, TimeZone T10n, CommandEventHandler Page_Command, bool bLayoutMode, string sSubmitClientID)
		{
			bool bIsMobile = false;
			SplendidPage Page = tbl.Page as SplendidPage;
			if ( Page != null )
				bIsMobile = Page.IsMobile;
			// 06/21/2009   We need the script manager to properly register EnterKey presses for text boxes. 
			ScriptManager mgrAjax = ScriptManager.GetCurrent(tbl.Page);
			// 11/23/2009   Taoqi 4.0 is very slow on Blackberry devices.  Lets try and turn off AJAX AutoComplete. 
			bool bAjaxAutoComplete = (mgrAjax != null);
			// 12/07/2009   The Opera Mini browser does not support popups. Use a DropdownList instead. 
			bool bSupportsPopups = true;
			if ( bIsMobile )
			{
				// 11/24/2010   .NET 4 has broken the compatibility of the browser file system. 
				// We are going to minimize our reliance on browser files in order to reduce deployment issues. 
				bAjaxAutoComplete = Utils.AllowAutoComplete && (mgrAjax != null);
				bSupportsPopups = Utils.SupportsPopups;
			}
			// 07/28/2010   Save AjaxAutoComplete and SupportsPopups for use in TeamSelect and KBSelect. 
			// We are having issues with the data binding event occurring before the page load. 
			Page.Items["AjaxAutoComplete"] = bAjaxAutoComplete;
			Page.Items["SupportsPopups"  ] = bSupportsPopups  ;
			// 05/06/2010   Use a special Page flag to override the default IsPostBack behavior. 
			bool bIsPostBack = tbl.Page.IsPostBack;
			bool bNotPostBack = false;
			if ( tbl.TemplateControl is SplendidControl )
			{
				bNotPostBack = (tbl.TemplateControl as SplendidControl).NotPostBack;
				bIsPostBack = tbl.Page.IsPostBack && !bNotPostBack;
			}

			HtmlTableRow tr = null;
			// 11/28/2005   Start row index using the existing count so that headers can be specified. 
			int nRowIndex = tbl.Rows.Count - 1;
			int nColIndex = 0;
			HtmlTableCell tdLabel = null;
			HtmlTableCell tdField = null;
			// 01/07/2006   Show table borders in layout mode. This will help distinguish blank lines from wrapped lines. 
			if ( bLayoutMode )
				tbl.Border = 1;
			// 11/15/2007   If there are no fields in the detail view, then hide the entire table. 
			// This allows us to hide the table by removing all detail view fields. 
			// 09/12/2009   There is no reason to hide the table when in layout mode. 
			if ( dvFields.Count == 0 && tbl.Rows.Count <= 1 && !bLayoutMode )
				tbl.Visible = false;

			// 01/27/2008   We need the schema table to determine if the data label is free-form text. 
			// 03/21/2008   We need to use a view to search for the rows for the ColumnName. 
			// 01/18/2010   To apply ACL Field Security, we need to know if the current record has an ASSIGNED_USER_ID field, and its value. 
			Guid gASSIGNED_USER_ID = Guid.Empty;
			//DataView vwSchema = null;
			if ( rdr != null )
			{
				// 11/22/2010   Convert data reader to data table for Rules Wizard. 
				//vwSchema = new DataView(rdr.GetSchemaTable());
				//vwSchema.RowFilter = "ColumnName = 'ASSIGNED_USER_ID'";
				//if ( vwSchema.Count > 0 )
				if ( rdr.Table.Columns.Contains("ASSIGNED_USER_ID") )
				{
					gASSIGNED_USER_ID = Sql.ToGuid(rdr["ASSIGNED_USER_ID"]);
				}
			}

			// 01/01/2008   Pull config flag outside the loop. 
			bool bEnableTeamManagement  = Crm.Config.enable_team_management();
			bool bRequireTeamManagement = Crm.Config.require_team_management();
			// 01/01/2008   We need a quick way to require user assignments across the system. 
			bool bRequireUserAssignment = Crm.Config.require_user_assignment();
			// 08/28/2009   Allow dynamic teams to be turned off. 
			bool bEnableDynamicTeams   = Crm.Config.enable_dynamic_teams();
			HttpSessionState Session = HttpContext.Current.Session;
			HttpApplicationState Application = HttpContext.Current.Application;
			// 10/07/2010   Convert the currency values before displaying. 
			// The UI culture should already be set to format the currency. 
			Currency C10n = HttpContext.Current.Items["C10n"] as Currency;
			// 05/08/2010   Define the copy buttons outside the loop so that we can replace the javascript with embedded code. 
			// This is so that the javascript will run properly in the SixToolbar UpdatePanel. 
			HtmlInputButton btnCopyRight = null;
			HtmlInputButton btnCopyLeft  = null;
			// 09/13/2010   We need to prevent duplicate names. 
			Hashtable hashLABEL_IDs = new Hashtable();
			bool bSupportsDraggable = Sql.ToBoolean(Session["SupportsDraggable"]);
			// 12/13/2013   Allow each line item to have a separate tax rate. 
			bool bEnableTaxLineItems = Sql.ToBoolean(HttpContext.Current.Application["CONFIG.Orders.TaxLineItems"]);
			foreach(DataRowView row in dvFields)
			{
				string sEDIT_NAME         = Sql.ToString (row["EDIT_NAME"        ]);
				int    nFIELD_INDEX       = Sql.ToInteger(row["FIELD_INDEX"      ]);
				string sFIELD_TYPE        = Sql.ToString (row["FIELD_TYPE"       ]);
				string sDATA_LABEL        = Sql.ToString (row["DATA_LABEL"       ]);
				string sDATA_FIELD        = Sql.ToString (row["DATA_FIELD"       ]);
				// 01/19/2010   We need to be able to format a Float field to prevent too many decimal places. 
				string sDATA_FORMAT       = Sql.ToString (row["DATA_FORMAT"      ]);
				string sDISPLAY_FIELD     = Sql.ToString (row["DISPLAY_FIELD"    ]);
				string sCACHE_NAME        = Sql.ToString (row["CACHE_NAME"       ]);
				bool   bDATA_REQUIRED     = Sql.ToBoolean(row["DATA_REQUIRED"    ]);
				bool   bUI_REQUIRED       = Sql.ToBoolean(row["UI_REQUIRED"      ]);
				string sONCLICK_SCRIPT    = Sql.ToString (row["ONCLICK_SCRIPT"   ]);
				string sFORMAT_SCRIPT     = Sql.ToString (row["FORMAT_SCRIPT"    ]);
//.........这里部分代码省略.........
开发者ID:huamouse,项目名称:Taoqi,代码行数:101,代码来源:SplendidDynamic.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# CommandFlags类代码示例发布时间:2022-05-24
下一篇:
C# CommandEventArgs类代码示例发布时间: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