本文整理汇总了C#中ApplicationInfo类的典型用法代码示例。如果您正苦于以下问题:C# ApplicationInfo类的具体用法?C# ApplicationInfo怎么用?C# ApplicationInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationInfo类属于命名空间,在下文中一共展示了ApplicationInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Main
static void Main()
{
//new CrashLogTraceListener();
using (Mutex mutex = new Mutex(false, MutexName))
{
if (mutex.WaitOne(1, true) == false)
{
MessageBox.Show("Another instance of ConnectUO 2.0 Updater is running. Please wait for that instance to close before running the Updater again.", "Already Running");
return;
}
for (Process[] processArray = Process.GetProcessesByName("ConnectUO.exe"); processArray.Length > 0; processArray = Process.GetProcessesByName("ConnectUO.exe"))
{
Thread.Sleep(50);
}
_applicationInfo = new ApplicationInfo();
Directory.SetCurrentDirectory(_applicationInfo.BaseDirectory);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmUpdate());
if (_status == UpdateStatus.Success)
{
Process.Start(Path.Combine(_applicationInfo.BaseDirectory, "ConnectUO.exe"));
}
_applicationInfo.Process.Kill();
}
}
开发者ID:jeffboulanger,项目名称:connectuo,代码行数:33,代码来源:Program.cs
示例2: ToApplication
public static ApplicationInfo ToApplication(this DataRow dr)
{
ApplicationInfo info = new ApplicationInfo();
info.ApplicationID = dr.GetGuid("ApplicationID");
info.ApplicationName = dr.GetString("ApplicationName");
return info;
}
开发者ID:IdeaFortune,项目名称:Monaco,代码行数:7,代码来源:DataHelpers.cs
示例3: SaveHosts
// 将CStringArray中的主机事项写入ini文件或者registry
public static void SaveHosts(ApplicationInfo appInfo,
ArrayList saHost)
{
string strEntry = null;
int i = 0;
for(i=0; i<saHost.Count; i++)
{
strEntry = "entry" + Convert.ToString(i+1);
string strValue = (string)saHost[i];
appInfo.SetString("ServerAddress",
strEntry,
strValue);
}
// 最后一次,截断
strEntry = "entry" + Convert.ToString(i+1);
appInfo.SetString("ServerAddress",
strEntry,
"");
}
开发者ID:renyh1013,项目名称:dp2,代码行数:26,代码来源:HostArray.cs
示例4: AddRange
/// <summary>
/// Copies the elements of the specified <see cref="ApplicationInfo">ApplicationInfo</see> array to the end of the collection.
/// </summary>
/// <param name="value">An array of type <see cref="ApplicationInfo">ApplicationInfo</see> containing the Components to add to the collection.</param>
public void AddRange(ApplicationInfo[] value)
{
for (int i = 0; (i < value.Length); i = (i + 1))
{
this.Add(value[i]);
}
}
开发者ID:yeyong,项目名称:manageserver,代码行数:11,代码来源:ApplicationInfoCollection.cs
示例5: BmGame
public BmGame(String[] args)
{
int width = WIDTH;
int height = HEIGHT;
int realWidth = width + WIDTH_EX;
int realHeight = height;
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferWidth = realWidth;
graphics.PreferredBackBufferHeight = realHeight;
IsFixedTimeStep = true;
Content.RootDirectory = "Content";
ApplicationInfo info = new ApplicationInfo(width, height);
#if WINDOWS
info.nativeInterface = this;
info.realWidth = realWidth;
info.realHeight = realHeight;
IsMouseVisible = true;
#endif
info.args = args;
application = new BmApplication(Content, info);
}
开发者ID:bbqchickenrobot,项目名称:atomic-bomberman-xna,代码行数:27,代码来源:BmGame.cs
示例6: Setup
protected override void Setup(ApplicationInfo info)
{
base.Setup(info);
MyWindow myWindow = new MyWindow(new WindowTemplate());
SetWindow(myWindow);
}
开发者ID:AIBrain,项目名称:ochregui,代码行数:8,代码来源:Sample2.cs
示例7: CreateApplication
public void CreateApplication(string name)
{
var applicationInfo = new ApplicationInfo();
applicationInfo.Name = name;
applicationInfo.CreatedAt = DateTime.UtcNow;
UseRepository(repositoryService=>repositoryService.CreateApplication(applicationInfo));
}
开发者ID:MySmallfish,项目名称:Simple.ApplicationAdmin,代码行数:8,代码来源:ApplicationManagerService.cs
示例8: AreCommandArgumentsValid
/// <summary>
/// Calls <see cref="CheckCommandArguments"/> and checks, if there are errors or not.
/// </summary>
/// <param name="args">The arguments given to the application.</param>
/// <param name="appInfo">Informations on the app.</param>
/// <returns><c>True</c> if the command arguments are valid, otherwise <c>false</c>.</returns>
public static bool AreCommandArgumentsValid(string[] args, ApplicationInfo appInfo)
{
var result = CheckCommandArguments(args, appInfo);
#if TRACE
result.ForEach(line => Trace.WriteLine(line));
#endif
return result.Count == 0;
}
开发者ID:codingfreak,项目名称:cfUtils,代码行数:14,代码来源:AppUtil.cs
示例9: Summary
public Summary(DeviceInfo deviceInfo, ApplicationInfo applicationInfo)
{
this.Date = DateTime.SpecifyKind(deviceInfo.Date, DateTimeKind.Utc);
this.ApplicationId = applicationInfo.ApplicationId;
this.PlatformId = deviceInfo.PlatformType;
this.Version = applicationInfo.Version;
this.Count++;
}
开发者ID:Appacts,项目名称:mobile-analytics-server,代码行数:8,代码来源:Summary.cs
示例10: Main
public static void Main(string[] args)
{
var applicationInfo = new ApplicationInfo();
Console.WriteLine("***************************************************************");
Console.WriteLine(string.Format("-- {0} {1}", applicationInfo.AssemblyTitle, applicationInfo.AssemblyVersion));
Console.WriteLine(string.Format("-- {0}", applicationInfo.AssemblyCopyright));
Console.WriteLine("***************************************************************");
GetRandomFiles();
}
开发者ID:MSantilal,项目名称:SortOfRandomFileChooser,代码行数:10,代码来源:Program.cs
示例11: Setup
protected override void Setup(ApplicationInfo info)
{
base.Setup(info);
MyWindow win = new MyWindow(new WindowTemplate()
{
HasFrame = true,
});
SetWindow(win);
}
开发者ID:AIBrain,项目名称:ochregui,代码行数:11,代码来源:Program.cs
示例12: getResourcesForApplication
public override Resources getResourcesForApplication (ApplicationInfo app)
{
if (app.packageName.Equals ("system")) {
return mContext.mMainThread.getSystemContext ().getResources ();
}
Resources r = mContext.mMainThread.getTopLevelResources (
app.publicSourceDir, mContext.mPackageInfo);
if (r != null) {
return r;
}
throw new NameNotFoundException ("Unable to open " + app.publicSourceDir);
}
开发者ID:hakeemsm,项目名称:XobotOS,代码行数:12,代码来源:ApplicationPackageManager.cs
示例13: StartApplication
public void StartApplication(string configFile)
{
//start in separate thread
ApplicationInfo appInfo = new ApplicationInfo(XDocument.Load(configFile));
appInfo.Completed += appInfo_Completed;
//when the app is about to stop services, it should check whether the service is used by other programs
appInfo.ServiceCheckCallback = new ServiceCheckFunction(IsServiceUsedByOtherApps);
apps.Add(appInfo);
appInfo.Start();
}
开发者ID:rocksoccer,项目名称:AppStarter,代码行数:12,代码来源:ApplicationManager.cs
示例14: Main
static void Main(string[] args)
{
ApplicationInfo appInfo = new ApplicationInfo()
{
Title = "OchreGui Demo",
ScreenSize = new Size(80, 70),
Font = "courier12x12_aa_tc.png",
FontFlags = libtcod.TCODFontFlags.LayoutTCOD,
};
using (DemoApplication app = new DemoApplication())
{
app.Start(appInfo);
}
}
开发者ID:AIBrain,项目名称:ochregui,代码行数:15,代码来源:Program.cs
示例15: CreateApplication
public static void CreateApplication()
{
// Create an offline connection, we use an empty Guid as personId
// There is a bug to create a constructor without requiring a guid
//// Use this only if you master application wants to do this in Offline mode
OfflineWebApplicationConnection offlineConnection =
new OfflineWebApplicationConnection(Guid.Empty);
offlineConnection.Authenticate();
// Setting up the application we want to create
ApplicationInfo appInfo =
new ApplicationInfo();
appInfo.Name = "Android application";
appInfo.AuthorizationReason =
"Android aplication";
appInfo.Description =
"Just an android application";
// get a base64 encoded logo
appInfo.LargeLogo = new ApplicationBinaryConfiguration(
"C:\\blah.png", "image/gif");
// base64 encoded public key for this application
appInfo.PublicKeys.Add(
GetPublicKeyFromPfxOrP12("C:\\JourneyCompass.cer"));
// You need to have PrivacyStatement + TermsOfUse or ActionUrl
appInfo.PrivacyStatement = new ApplicationBinaryConfiguration(
"C:\\privacy.txt", "text/plain");
appInfo.TermsOfUse = new ApplicationBinaryConfiguration
("C:\\terms.txt", "text/plain");
//actionUrl
//appInfo.ActionUrl = new Uri("http://localhost/redirect.aspx");
// Create and add the rules individually
List<AuthorizationSetDefinition> rules = new List<AuthorizationSetDefinition>();
rules.Add((AuthorizationSetDefinition)(new TypeIdSetDefinition(Height.TypeId)));
rules.Add((AuthorizationSetDefinition)(new TypeIdSetDefinition(new Guid("a5033c9d-08cf-4204-9bd3-cb412ce39fc0"))));
AuthorizationRule rule1 = new AuthorizationRule(
HealthRecordItemPermissions.All,
rules,
null);
// Here we are setting up the child as an offline application
appInfo.OfflineBaseAuthorizations.Add(rule1);
// Add more rules, if needed
// Lets make the child app!
Provisioner.AddApplication(offlineConnection, appInfo);
}
开发者ID:hariwashere,项目名称:JourneyCompass,代码行数:48,代码来源:CreateChildApplication.cs
示例16: Setup
/// Setup() gets called immediately after Application.Start(), and we can override this to provide custom
/// initialization code.
///
/// The first thing we need to do in this method, however, is call the base method - this
/// initializes libtcod, opening the system window and setting the font, all according to the options provided in
/// the ApplicationInfo parameter.
///
/// After calling the base method, we add our setup code, in this case creating the MyWindow (defined below) object
/// and setting it as the current Window.
protected override void Setup(ApplicationInfo info)
{
/// One thing to note: in almost all cases, when overriding a framework method it is necessary
/// to call the base method first. The base methods handle most of the gritty details of triggering
/// events, propagating messages, and calling the necessary stub methods.
base.Setup(info);
/// Just use the default options in the WindowTemplate.
WindowTemplate mainWindowTemplate = new WindowTemplate();
/// Create the mainWindow with the options specified in mainWindowInfo. We define MyWindow below.
MyWindow mainWindow = new MyWindow(mainWindowTemplate);
/// Set the mainWindow to be MyApplication's window. Note that if we don't set the application window,
/// a default one is created and set automatically.
SetWindow(mainWindow);
}
开发者ID:AIBrain,项目名称:ochregui,代码行数:26,代码来源:Sample1.cs
示例17: NativeCommandProcessor
internal NativeCommandProcessor(ApplicationInfo applicationInfo, ExecutionContext context) : base(applicationInfo)
{
this.sync = new object();
if (applicationInfo == null)
{
throw PSTraceSource.NewArgumentNullException("applicationInfo");
}
this.applicationInfo = applicationInfo;
base._context = context;
base.Command = new NativeCommand();
base.Command.CommandInfo = applicationInfo;
base.Command.Context = context;
base.Command.commandRuntime = base.commandRuntime = new MshCommandRuntime(context, applicationInfo, base.Command);
base.CommandScope = context.EngineSessionState.CurrentScope;
((NativeCommand) base.Command).MyCommandProcessor = this;
this.inputWriter = new ProcessInputWriter(base.Command);
}
开发者ID:nickchal,项目名称:pash,代码行数:17,代码来源:NativeCommandProcessor.cs
示例18: Application
public Application(ApplicationInfo info)
{
nativeInterface = info.nativeInterface;
width = info.width;
height = info.height;
realWidth = info.realWidth;
realHeight = info.realHeight;
sharedApplication = this;
context = new Context();
updatables = new UpdatableList(1);
drawables = new DrawableList(1);
cmdLine = CreateCommandLine();
cmdLine.Parse(info.args);
}
开发者ID:bbqchickenrobot,项目名称:atomic-bomberman-xna,代码行数:17,代码来源:Application.cs
示例19: CreateApplication
public void CreateApplication(ApplicationInfo applicationInfo)
{
UseDataContext(dataContext =>
{
var appInfo = dataContext.Applications.FirstOrDefault(a => a.Name == applicationInfo.Name);
if (appInfo != null)
{
throw new ArgumentException(string.Format("Application '{0}' already exist.", applicationInfo.Name));
}
appInfo = new Application();
appInfo.Name = applicationInfo.Name;
appInfo.CreatedAt = applicationInfo.CreatedAt;
dataContext.Applications.InsertOnSubmit(appInfo);
dataContext.SubmitChanges();
});
}
开发者ID:MySmallfish,项目名称:Simple.ApplicationAdmin,代码行数:18,代码来源:ApplicationRepositoryService.cs
示例20: LoadHosts
// 从ini文件或者registry装载已经配置的所有主机事项
public static ArrayList LoadHosts(ApplicationInfo appInfo)
{
ArrayList saResult = new ArrayList();
for(int i=0; ;i++)
{
string strEntry = "entry" + Convert.ToString(i+1);
string strValue = appInfo.GetString("ServerAddress",
strEntry,
"");
if (strValue == "")
break;
saResult.Add(strValue);
}
return saResult;
}
开发者ID:renyh1013,项目名称:dp2,代码行数:19,代码来源:HostArray.cs
注:本文中的ApplicationInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论