本文整理汇总了C#中IApplication类的典型用法代码示例。如果您正苦于以下问题:C# IApplication类的具体用法?C# IApplication怎么用?C# IApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IApplication类属于命名空间,在下文中一共展示了IApplication类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ApplicationViewModel
public ApplicationViewModel(IApplication application)
{
Name = application.Name;
SiteUrl = application.SiteUrl;
GitUrl = GetCloneUrl(application, RepositoryType.Git);
HgUrl = GetCloneUrl(application, RepositoryType.Mercurial);
}
开发者ID:RaleighHokie,项目名称:kudu,代码行数:7,代码来源:ApplicationViewModel.cs
示例2: Run
async Task Run(IApplication application)
{
ApplicationArchiveInfo info = await application.PackageAsync();
Console.WriteLine("Application name: {0}", info.ApplicationName);
Console.WriteLine("Application path: {0}", info.Path);
}
开发者ID:Netsuye,项目名称:Splunk-SDK,代码行数:7,代码来源:TestApplicationInterface.cs
示例3: MainForm
/// <summary>
/// Конструктор класса
/// </summary>
/// <param name="app">Ссылка на платформу</param>
/// <param name="pBios">Ссылка на подсистему ввода/вывода платформы</param>
public MainForm(IApplication app, IEpromIO pBios, IProtocol protocol)
{
InitializeComponent();
textInserter = new TextInsert(InsertToText);
oldValue = new object();
newValue = new object();
oldValue = "0";
newValue = "0";
bios = new BIOS(app, pBios);
proto = protocol;
currentState = new ObjectCurrentState();
for (int i = 0; i < 11; i++)
{
DataGridViewRow r = new DataGridViewRow();
if ((i % 2) == 0) r.DefaultCellStyle.BackColor = Color.WhiteSmoke;
dataGridViewCalibrationTable.Rows.Add(r);
}
syncker = new Sync();
packetSyncMutex = new Mutex(false);
gr = new GraphicCalibration(CreateGraphics(), new Rectangle(12, 38, 422, 267));
gr.CalculateScale();
}
开发者ID:slawer,项目名称:service,代码行数:34,代码来源:MainForm.cs
示例4: Startup
public void Startup(ref object initializationData)
{
m_application = initializationData as IApplication;
m_appStatus = m_application as IApplicationStatus;
// Wireup the events
SetupEvents();
}
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:7,代码来源:AcmeExt.cs
示例5: InsertApplication
public string InsertApplication(IApplication app)
{
string appid = "";
try
{
Database db = DatabaseFactory.CreateDatabase();
DbCommand dbCommand = db.GetStoredProcCommand("usp_SNB_InsertApplication");
db.AddInParameter(dbCommand, "@first_name", DbType.String, app.FirstName);
db.AddInParameter(dbCommand, "@last_name", DbType.String, app.LastName);
db.AddInParameter(dbCommand, "@ssn", DbType.String, app.Ssn);
db.AddInParameter(dbCommand, "@email", DbType.String, app.Email);
//DataSet ds = db.ExecuteDataSet(dbCommand);
appid = db.ExecuteScalar(dbCommand).ToString();
dbCommand.Connection.Close();
dbCommand.Connection.Dispose();
dbCommand.Dispose();
}
catch (Exception ex)
{
}
return appid;
}
开发者ID:RPEnterprise,项目名称:ScheinBank,代码行数:30,代码来源:ApplicationDA.cs
示例6: ShapeToKMLForm
public ShapeToKMLForm(IApplication application)
{
layers = new List<LayerProperties>();
InitializeComponent();
this.m_application = application;
chkLayers.Items.Clear();
IMxDocument activeDoc = application.Document as IMxDocument;
IMap activeMap = activeDoc.FocusMap;
layers.Clear();
for (int i = 0; i < activeMap.LayerCount; i++)
{
//if it's a raster or a feature layer. Other supported layers will be added later
if ((activeMap.get_Layer(i) is IFeatureLayer) || (activeMap.get_Layer(i) is IRasterLayer))
{
//chkLayers.Items.Add(activeMap.get_Layer(i).Name, false);
LayerProperties lp = new LayerProperties();
lp.Layeru = activeMap.get_Layer(i);
lp.Tesselate = false;
lp.AltitudeMode = AltitudeMode.clampToGround;
lp.Extrude = false;
lp.Color = Color.Black;
lp.name = lp.Layeru.Name;
chkLayers.Items.Add(lp, false);
}
}
}
开发者ID:adakkak,项目名称:shp-kml-arcgis,代码行数:30,代码来源:ShapeToKMLForm.cs
示例7: GetActiveObjectID
/// <summary>
/// Get ID of current page
/// </summary>
/// <param name="obj">_Object Type</param>
/// <returns>current page Id</returns>
public static string GetActiveObjectID(IApplication oneNoteApp, _ObjectType obj)
{
string currentPageId = "";
uint count = oneNoteApp.Windows.Count;
foreach (Window window in oneNoteApp.Windows)
{
if (window.Active)
{
switch (obj)
{
case _ObjectType.Notebook:
currentPageId = window.CurrentNotebookId;
break;
case _ObjectType.Section:
currentPageId = window.CurrentSectionId;
break;
case _ObjectType.SectionGroup:
currentPageId = window.CurrentSectionGroupId;
break;
}
currentPageId = window.CurrentPageId;
}
}
return currentPageId;
}
开发者ID:evilch,项目名称:WordHighlight,代码行数:32,代码来源:HierarchyHelper.cs
示例8: Form1
/// <summary>
/// Конструктор
/// </summary>
/// <param name="application">Интерфейс связи с платформой</param>
public Form1(IApplication application)
{
app = application;
protocol = app.GetProtocol(ProtocolVersion.x100);
try
{
par = LoadConfiguration(Application.StartupPath + ParametrConstants.ConfigName);
}
catch
{
par = new SetTimeParameters();
}
InitializeComponent();
this.boxArray[0] = this.button1;
this.boxArray[1] = this.button2;
this.boxArray[2] = this.button5;
this.boxArray[3] = this.button6;
this.boxArray[4] = this.button7;
this.boxArray[5] = this.button8;
this.boxArray[6] = this.button9;
SetImageForm();
}
开发者ID:slawer,项目名称:service,代码行数:29,代码来源:Form1.cs
示例9: GetDockableWindow
public IDockableWindow GetDockableWindow(IApplication app, string winName)
{
IDockableWindowManager dWinManager = app as IDockableWindowManager;
UID winID = new UIDClass();
winID.Value = winName;
return dWinManager.GetDockableWindow(winID);
}
开发者ID:usgin,项目名称:arcmap-cswclient,代码行数:7,代码来源:ButtonCSW.cs
示例10: Initialize
public override void Initialize(IApplication application)
{
base.Initialize(application);
application.Adapter.SupportedOrientations = WaveEngine.Common.Input.DisplayOrientation.LandscapeRight;
WaveServices.ScreenContextManager.To(new ScreenContext(new MainScene()));
}
开发者ID:noatom,项目名称:Samples,代码行数:7,代码来源:Game.cs
示例11: Init
public void Init(IApplication application)
{
mApplication = (Implement.Application)application;
TypeMapper = Utils.GetMessageMapping();
Controllers = new List<object>();
LoadController(application);
}
开发者ID:qcjxberin,项目名称:ec,代码行数:7,代码来源:DefaultMessageCenter.cs
示例12: AddInfrastructureReferences
// Add a reference to the infrastructure project on each endpoint project
public static void AddInfrastructureReferences(IApplication app, ISolution solution)
{
foreach (var endpoint in app.Design.Endpoints.GetAll())
{
endpoint.Project.AddReference(app.Design.Infrastructure.As<IProductElement>().GetProject());
}
}
开发者ID:nanohex,项目名称:ServiceMatrix,代码行数:8,代码来源:Helpers.cs
示例13: Application
protected Application(Generator g, Type type, bool initialize = true)
: base(g, type, initialize)
{
Application.Instance = this;
handler = (IApplication)base.Handler;
Generator.Initialize(g); // make everything use this by default
}
开发者ID:majorsilence,项目名称:Eto,代码行数:7,代码来源:Application.cs
示例14: Initialize
public override void Initialize(IApplication application)
{
base.Initialize(application);
GameStorage gameStorage;
if (WaveServices.Storage.Exists<GameStorage>())
{
gameStorage = WaveServices.Storage.Read<GameStorage>();
}
else
{
gameStorage = new GameStorage();
}
Catalog.RegisterItem(gameStorage);
application.Adapter.DefaultOrientation = DisplayOrientation.Portrait;
application.Adapter.SupportedOrientations = DisplayOrientation.Portrait;
//ViewportManager vm = WaveServices.ViewportManager;
//vm.Activate(768, 1024, ViewportManager.StretchMode.Fill);
ScreenContext screenContext = new ScreenContext(new MyScene());
WaveServices.ScreenContextManager.To(screenContext);
}
开发者ID:kevins963,项目名称:ColorDrop,代码行数:25,代码来源:Game.cs
示例15: ChallengeComponent
public ChallengeComponent(IApplication application, INetworkedSession curSession, INetworkedSession otherSession, ChallengeDirection direction)
{
_application = application;
CurSession = curSession;
OtherSession = otherSession;
Direction = direction;
}
开发者ID:brookerk,项目名称:case42rpg,代码行数:7,代码来源:ChallengeComponent.cs
示例16: Execute
/// <summary>
/// Executes task.
/// </summary>
/// <param name="application">The application.</param>
/// <param name="kernel">IoC container.</param>
public void Execute(IApplication application, IKernel kernel)
{
var facilityConfig = GetFacilityConfig(application);
kernel.ConfigurationStore.AddFacilityConfiguration("nhibernate.facility", facilityConfig);
kernel.AddFacility("nhibernate.facility", new NHibernateFacility(new NHibernateConfigurator(application, kernel)));
}
开发者ID:coreframework,项目名称:Core-Framework,代码行数:12,代码来源:ConfigureNHibernateFacility.cs
示例17: PublicModule
public PublicModule(IApplication application, IRootPathProvider rootPathProvider,
IArticleRepository articleRepository, IPageRepository pageRepository)
: base(application)
{
this._ArticleRepository = articleRepository;
this._PageRepository = pageRepository;
this._rootPathProvider = rootPathProvider;
// Bind the HTTP POST verb with /robots.txt with a response filled by text
this.Get["/robots.txt"] = GetRobotTxt;
// Bind the HTTP POST verb with /sitemap.xml to the GetSitemap method
this.Get["/sitemap.xml"] = GetSitemap;
// Define a route for urls "/{seoTitle}" which will returns the article matching the specified slug
this.Get["/{category}/{seoTitle}"] = parameters => {
// [BUG]: /sitemap.xml n'est pas prioritaire sur /{seoTitle}
if(parameters.seoTitle == "rss")
return GetRSSFeed(parameters);
// fin de [BUG]
return GetStaticPage(parameters);
};
// Define a route for urls "/{seoTitle}" which will returns the article matching the specified slug
this.Get["/{seoTitle}"] = parameters => {
// [BUG]: /sitemap.xml n'est pas prioritaire sur /{seoTitle}
if(parameters.seoTitle == "sitemap")
return GetSitemap(parameters);
// fin de [BUG]
return GetStaticPage(parameters);
};
}
开发者ID:qginformatique,项目名称:GMATechProject,代码行数:32,代码来源:PublicModule.cs
示例18: ApplyCustomAuthentication
// Generates code for custom authentication and shows the file on IDE editor
public static void ApplyCustomAuthentication(IAbstractEndpoint endpoint, IApplication application, IServiceProvider sp)
{
var solution = sp.TryGetService<ISolution>();
// If the custom file doesn't exist... we will generate it
if (!solution.Find(endpoint.Project.Name + @"\Infrastructure\Authentication.cs").Any())
{
application.Design.Infrastructure.Security.Authentication.LocalNamespace = endpoint.Project.Data.RootNamespace
+ ".Infrastructure";
application.Design.Infrastructure.Security.Authentication.As<IProductElement>()
// We are using Temp as we don't want the generation run on each build
.CreateTempGenerateCodeCommand(sp, "Authentication.cs"
, endpoint.Project.Name + @"\Infrastructure"
, @"t4://extension/a5e9f15b-ad7f-4201-851e-186dd8db3bc9/T/T4/Security/EndpointCustomAuthentication.tt")
.Execute();
}
var item = solution.Find(endpoint.Project.Name + @"\Infrastructure\Authentication.cs").FirstOrDefault();
if (item != null)
{
// Open the file on the IDE Editor
item.As<EnvDTE.ProjectItem>()
.Open(EnvDTE.Constants.vsViewKindCode)
.Visible = true;
}
}
开发者ID:nanohex,项目名称:ServiceMatrix,代码行数:26,代码来源:AuthenticationFeature.cs
示例19: GenerateAuthenticationCodeOnEndpoints
public static void GenerateAuthenticationCodeOnEndpoints(IApplication app, IServiceProvider sp)
{
if (app.HasAuthentication)
{
foreach (var endpoint in app.Design.Endpoints.GetAll())
{
var prefixAuthentication = "AuthenticationEndpointCode" + endpoint.As<IProductElement>().InstanceName;
if (!app.Design.Infrastructure.Security.Authentication.AsElement().AutomationExtensions.Any(a => a.Name.StartsWith(prefixAuthentication)))
{
app.Design.Infrastructure.Security.Authentication.LocalNamespace = endpoint.Project.Data.RootNamespace
+ ".Infrastructure";
app.Design.Infrastructure.Security.Authentication.As<IProductElement>()
.CreateTempGenerateCodeCommand(sp, "Authentication.cs"
, endpoint.Project.Name + @"\Infrastructure\GeneratedCode"
, @"t4://extension/a5e9f15b-ad7f-4201-851e-186dd8db3bc9/T/T4/Security/EndpointAuthentication.tt"
, prefixAuthentication)
.Execute();
}
var prefixAuthorize = "AuthorizeOutgoingMessagesEndpointCode" + endpoint.As<IProductElement>().InstanceName;
if (!app.Design.Infrastructure.Security.Authentication.AsElement().AutomationExtensions.Any(a => a.Name.StartsWith(prefixAuthorize)))
{
app.Design.Infrastructure.Security.Authentication.LocalNamespace = endpoint.Project.Data.RootNamespace
+ ".Infrastructure";
app.Design.Infrastructure.Security.Authentication.As<IProductElement>()
.CreateTempGenerateCodeCommand(sp, "AuthorizeOutgoingMessages.cs"
, endpoint.Project.Name + @"\Infrastructure\GeneratedCode"
, @"t4://extension/a5e9f15b-ad7f-4201-851e-186dd8db3bc9/T/T4/Security/EndpointAuthorizeOutgoingMessages.tt"
, prefixAuthorize)
.Execute();
}
}
}
}
开发者ID:nanohex,项目名称:ServiceMatrix,代码行数:34,代码来源:AuthenticationFeature.cs
示例20: Initialize
public override void Initialize(IApplication application)
{
base.Initialize(application);
// Load storage game data
GameStorage gameStorage;
if (WaveServices.Storage.Exists<GameStorage>())
{
gameStorage = WaveServices.Storage.Read<GameStorage>();
}
else
{
gameStorage = new GameStorage();
}
Catalog.RegisterItem<GameStorage>(gameStorage);
// Register the SoundManager service
WaveServices.RegisterService<SoundManager>(new SoundManager());
// Play background music
WaveServices.MusicPlayer.Play(new MusicInfo(WaveContent.Assets.Audio.bg_music_mp3));
WaveServices.MusicPlayer.IsRepeat = true;
// GameBackContext is visible always at the background.
// For this reason the behavior is set to Draw and Update when the scene is in background.
var backContext = new ScreenContext("GameBackContext", new GameScene());
backContext.Behavior = ScreenContextBehaviors.DrawInBackground | ScreenContextBehaviors.UpdateInBackground;
//On init show the Main menu
WaveServices.ScreenContextManager.Push(backContext);
WaveServices.ScreenContextManager.Push(new ScreenContext("MenuContext", new MenuScene()));
}
开发者ID:WaveEngine,项目名称:QuickStarters,代码行数:34,代码来源:Game.cs
注:本文中的IApplication类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论