EventArgsViewEnumViewEnum Class |
Namespace: SOWIWeb.Helper
The EventArgsViewEnumViewEnum type exposes the following members.
Name | Description | |
---|---|---|
EventArgsViewEnumViewEnum |
Constructor without parameter
| |
EventArgsViewEnumViewEnum(ViewEnum, String, String, String) |
Constructor with parameter
|
Name | Description | |
---|---|---|
Action |
Name of MVC action e.g. Index
| |
Controller |
Name of MVC controller e.g. Home
| |
Path |
View path e.g. ~/Views/Test/Layout
| |
View |
Name of view e.g. a view from enumeration of Forms
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Adds event handler for a custom view path setting
//* add event handler for a custom view path setting * SOWIWeb.Foundation.FormsExtensions.OnFormsToPath += this.FormsToPath;
/// <summary> /// Custom Form default view path /// </summary> /// <param name="sender">null object because it's static declaration</param> /// <param name="e">Has view name and view path</param> private void FormsToPath(object sender, SOWIWeb.Foundation.EventArgsViewToPathEnum<SOWIWeb.Foundation.Forms> e) { switch (e.View) { case Forms.none: break; case Forms.CreateContent: break; case Forms.DeleteContent: break; case Forms.DetailsContent: break; case Forms.EditContent: break; case Forms.FileChoice: break; case Forms.Form: break; case Forms.IndexContent: break; case Forms.IndexContentDataTables: break; case Forms.Layout: e.Path = "~/Views/Test/Layout"; break; case Forms.ListHeader: break; case Forms.Navigation: break; default: break; } }