当前位置: 首页>>代码示例>>C#>>正文


C# ApplicationInfo类代码示例

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


ApplicationInfo类属于命名空间,在下文中一共展示了ApplicationInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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