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


C# Application.LogOn方法代码示例

本文整理汇总了C#中Application.LogOn方法的典型用法代码示例。如果您正苦于以下问题:C# Application.LogOn方法的具体用法?C# Application.LogOn怎么用?C# Application.LogOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application的用法示例。


在下文中一共展示了Application.LogOn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Task3Library

        public Task3Library()
        {
            app = new Application();

            var result = app.LogOn("TRAINING", "Administrator", "P2ssw0rd");
            if (result != LogOnStatus.LoggedOn)
                throw new Exception("Can't log on");
        }
开发者ID:AlexanderChechet,项目名称:ADAM,代码行数:8,代码来源:Task3Library.cs

示例2: Main

        static void Main(string[] args)
        {
            Application app = new Application();
            LogOnStatus status = app.LogOn("TRAINING", "Eugeni.Tseitlin", "sp8hxj4v3a");

            if (status != LogOnStatus.LoggedOn)
            {
                throw new UnauthorizedAccessException();
            }

            CustomIndexer.ClassificationInitializer.InitializeSpecifications(app);
        }
开发者ID:eugeni96,项目名称:Cubus,代码行数:12,代码来源:Program.cs

示例3: Index

        //
        // GET: /Home/

        public ActionResult Index()
        {   
            Application app = new Application();
            LogOnStatus status = app.LogOn("TRAINING", "Demidov", "5090588");
            Console.WriteLine(status);
            if (status != LogOnStatus.LoggedOn)
            {
                throw new UnauthorizedAccessException();
            }
            Session["AdamApp"] = app;
            
            return View();
        }
开发者ID:IgorDemidov,项目名称:Coubus.UI.3,代码行数:16,代码来源:HomeController.cs

示例4: Main

        static void Main(string[] args)
        {
            Application app = new Application();

            LogOnStatus status = app.LogOn("LUXDAM", "Eduard_Pasmetukhau", "P2ssw0rd!");

            if (status == LogOnStatus.LoggedOn)
            {
                Console.WriteLine("Ok");
            }
            else Console.WriteLine(status);

            Classification c = new Classification(app);
            ClassificationHelper ch = new ClassificationHelper(app);
            Guid? rootGuid= ch.GetId(new SearchExpression("name = 'Luxottica Content*'"));
            
            Console.WriteLine("List of classification with parent Luxottica Content");
            //Console.ReadKey();


            if (rootGuid != null)
            {
                ClassificationCollection classCollections = new ClassificationCollection(app);
                classCollections.Load(new SearchExpression(String.Format("parent = '{0}'", rootGuid)));
                foreach (Classification classification in classCollections)
                {
                    Console.WriteLine(classification.Label + " Guid: "+classification.Id);
                }
            }
            Console.WriteLine();
            Console.ReadKey();
            Console.WriteLine("First 10 Guids of Records in classification Luxottica Content");

            RecordCollection rc = new RecordCollection(app);
            rc.Load(new SearchExpression(String.Format("classification = '{0}'", rootGuid)));
            

            foreach (Record r in rc.Take<Record>(10))
            {
                Console.WriteLine(r.Id);
            }

            Console.ReadKey();

            
        }
开发者ID:eduard-posmetuhov,项目名称:ADAM.Practic.FirstTask,代码行数:46,代码来源:Program.cs


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