本文整理汇总了C#中IApplication类的典型用法代码示例。如果您正苦于以下问题:C# IApplication类的具体用法?C# IApplication怎么用?C# IApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IApplication类属于命名空间,在下文中一共展示了IApplication类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplicationViewModel
public ApplicationViewModel(IApplication application)
{
Name = application.Name;
SiteUrl = application.SiteUrl;
GitUrl = GetCloneUrl(application, RepositoryType.Git);
HgUrl = GetCloneUrl(application, RepositoryType.Mercurial);
}
示例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);
}
示例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();
}
示例4: Startup
public void Startup(ref object initializationData)
{
m_application = initializationData as IApplication;
m_appStatus = m_application as IApplicationStatus;
// Wireup the events
SetupEvents();
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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();
}
示例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);
}
示例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()));
}
示例11: Init
public void Init(IApplication application)
{
mApplication = (Implement.Application)application;
TypeMapper = Utils.GetMessageMapping();
Controllers = new List<object>();
LoadController(application);
}
示例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());
}
}
示例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
}
示例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);
}
示例15: ChallengeComponent
public ChallengeComponent(IApplication application, INetworkedSession curSession, INetworkedSession otherSession, ChallengeDirection direction)
{
_application = application;
CurSession = curSession;
OtherSession = otherSession;
Direction = direction;
}