Beispiel #1
0
        public void TestClientOpenningPerformance()
        {
            for (int i = 0; i < 100; i++)
            {
                var watch  = new Stopwatch();
                var watch1 = new Stopwatch();
                watch.Start();
                watch1.Start();
                var client = new PresentationManagerClient();
                client.ClientCredentials.UserName.UserName = "******";
                client.ClientCredentials.UserName.Password = "******";
                client.Open();
                watch1.Stop();
                var ms1    = watch1.ElapsedMilliseconds;
                var watch2 = new Stopwatch();
                watch2.Start();
                client.GetMenus(0);
                watch2.Stop();
                var ms2    = watch2.ElapsedMilliseconds;
                var watch3 = new Stopwatch();
                watch3.Start();
                client.Close();
                watch3.Stop();
                watch.Stop();

                Console.WriteLine(i + ". start: " + ms1 + " ms,\texecute: " + ms2 + " ms,\tstop: " + watch3.ElapsedMilliseconds + " ms,\ttotal: " + watch.ElapsedMilliseconds);

                /*var frm = client.GetDetailForm(
                 *              Guid.Parse("B88FE6CA-D327-44C5-BC84-37F47D85FB4A"), 0);*/
            }
        }
Beispiel #2
0
        public void Test()
        {
            var client = new PresentationManagerClient();

            client.ClientCredentials.UserName.UserName = "******";
            client.ClientCredentials.UserName.Password = "******";

            //SomeClass bizControlData = client.Test();
            //var par1Type = bizControlData.Param1.GetType();
        }
Beispiel #3
0
        public void GetForm()
        {
            var client = new PresentationManagerClient();

            client.ClientCredentials.UserName.UserName = "******";
            client.ClientCredentials.UserName.Password = "******";

            var frm = client.GetDetailForm(
                Guid.Parse("B88FE6CA-D327-44C5-BC84-37F47D85FB4A"), 0);

            Assert.IsNotNull(frm);
        }
Beispiel #4
0
        /*public IPresentationManager PresentationManager
         * {
         *  get
         *  {
         *      var pm = new PresentationManagerClient();
         *      if (pm.ClientCredentials != null)
         *      {
         *          pm.ClientCredentials.UserName.UserName = Connection.UserName;
         *          pm.ClientCredentials.UserName.Password = Connection.Password;
         *      }
         *      pm.Open();
         *
         *      return pm;
         *  }
         * }*/

        protected PresentationManagerClient GetPresentationManager()
        {
            var pm = new PresentationManagerClient();

            if (pm.ClientCredentials != null)
            {
                pm.ClientCredentials.UserName.UserName = Connection.UserName;
                pm.ClientCredentials.UserName.Password = Connection.Password;
            }
            pm.Open();

            return(pm);
        }