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


C# Manager类代码示例

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


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

示例1: Main

        static void Main(string[] args)
        {
            Manager manager = new Manager
                (1,
                 "Ivan",
                 "Murtov",
                 3500,
                 "Accounting",
                 new List<RegularEmpoyee>()
                 {
                     new RegularEmpoyee(2, "Martin", "Venelinov", 1000d, "Sales"),
                     new RegularEmpoyee(3, "Radosting", "Mokanov", 1000d, "Sales")
                 });

            Developer developer = new Developer
                (2,
                "Ivan",
                "Ivanchev",
                8000d,
                "Production",
                new List<Projects>()
                {
                    new Projects("Project Prayer", new DateTime(2015, 12, 12), "Very cool project"),
                    new Projects("project SPUP", new DateTime(2015, 12,11), "MRI project for AR")
                });

            List<Employee> employees = new List<Employee>();
            employees.Add(developer);
            employees.Add(manager);

            foreach (var employee in employees)
            {
                Console.WriteLine(employee);
            }
        }
开发者ID:imurtov,项目名称:InheritanceAndAbstractionHomework,代码行数:35,代码来源:Hierarchy.cs

示例2: Main

    static void Main()
    {
        var computer = new Sale("Lenovo","12-12-2014", 650);
        var dvd = new Sale("Philips", "12-12-2015", 300);
        var tv = new Sale("Samsung", "12-12-2016", 620);

        var john = new SalesEmployee(8120403565, "John", "Carera", 1500, Department.Production, dvd);
        var ivan = new SalesEmployee(85264040262, "Ivan", "Smallhouse", 5200, Department.Sales, computer, tv);

        var ludnica = new Project("gospodari.bg", "05-07-1947", "some details");
        var web = new Project("home.bg", "04-04-1984", "deeeetails");
        ludnica.CloseProject();
        
        var doncho = new Developer(85012236461, "Doncho", "Donkov", 41500, Department.Production, web, ludnica);

        var kiro = new Manager(7511119253, "Kiro", "Pora", john, ivan, doncho);

        var listOfPeople = new List<IPerson> {kiro, doncho, ivan, john};

        foreach (var person in listOfPeople)
        {
            Console.WriteLine(person);
            Console.WriteLine("--------------------------------------------------------------------------------");   
        }
    }
开发者ID:SGStoyanov,项目名称:SoftUni,代码行数:25,代码来源:CompanyTester.cs

示例3: StealthHelper_OnStealth

        void StealthHelper_OnStealth(Manager.StealthManager.OnStealthEventArgs obj)
        {
            //Using First the Trinket then the vision ward.

            if (Manager.MenuManager.AutoTrinket)
            {
                if (obj.IsStealthed
                    && obj.Sender.IsEnemy
                    && obj.Sender.ServerPosition.Distance(ObjectManager.Player.ServerPosition) <= 600f)
                {
                    var objectPosition = obj.Sender.ServerPosition;
                    if (Trinket.IsOwned() && Trinket.IsReady())
                    {
                        var extend = ObjectManager.Player.ServerPosition.Extend(objectPosition, 400f);
                        Trinket.Cast(extend);
                        return;
                    }

                    if (Manager.SpellManager.totem.IsOwned() && Manager.SpellManager.totem.IsReady())
                    {
                        var extend = ObjectManager.Player.ServerPosition.Extend(objectPosition, 400f);
                        Manager.SpellManager.totem.Cast(extend);
                    }
                }
            }
        }
开发者ID:Kysamaa,项目名称:EloBuddy,代码行数:26,代码来源:Reveal.cs

示例4: EnterPassphrasePage

 public EnterPassphrasePage(iFolderWebService ifws, SimiasWebService simws, Manager simiasManager)
 {
     InitializeComponent();
     this.simiasWebService = simws;
     this.ifolderWebService = ifws;
     this.simiasManager = simiasManager;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:7,代码来源:EnterPassphrasePage.cs

示例5: Test

        public void Test()
        {
            System.Threading.AutoResetEvent evt = new System.Threading.AutoResetEvent(false);
            Packets.LicensePlatePacket p = null;
            int count = 0;

            Manager mnger = new Manager(new PacketSplitter());
            var parser = new Parsers.LicensePlateParser();
            parser.Handler += licensePlate =>
            {
                System.Diagnostics.Debug.WriteLine(licensePlate.LicensePlate.LicenseNumber);
                p = licensePlate;
                ++count;
                if (count > 1000)
                {
                    evt.Set();
                }
                
            };
            mnger.Parsers.Add(parser);

            mnger.Start();
            evt.WaitOne(10000);
            mnger.Stop();

            Assert.IsNotNull(p);
        }
开发者ID:vanan08,项目名称:damany,代码行数:27,代码来源:ManagerTest.cs

示例6: StartAndWait

        public void StartAndWait()
        {
            try
            {
                Manager = new Manager();

                StartSignalsListener();

                _log.Submit(LogLevel.Info, "Starting Services");

                Manager.Start();

                _log.Submit(LogLevel.Info, "Services started. Waiting for stop signal");

                StopResetEvent.WaitOne();

                Manager.Stop();
            }
            catch (Exception e)
            {
                _log.SubmitException(e);
            }

            Environment.Exit(0);
        }
开发者ID:abelsilva,项目名称:nugetory,代码行数:25,代码来源:UnixConsole.cs

示例7: Update

 // Update is called once per frame
 void Update()
 {
     if(in_game) {
         //check all aliens, if one is close enough to shoot, shoot at it
         for(int j = 0; j<Manager.alien_arr.Length; j++){
             if(Manager.alien_arr[j] != null
                 && Vector3.Distance(Manager.l.transform.position, Manager.alien_arr[j].transform.position) < LEARTH_GUN_DISTANCE
                 && (Time.time - checktime)>timebetween
                 && gscpt.gun_ammo > 0)
             {
                 GameObject learth_bul = Instantiate(manager.lbullet, Manager.l.transform.position, Quaternion.identity) as GameObject;
                 bullet_behav bstuff = learth_bul.GetComponent<bullet_behav>();
                 bstuff.SetTarget(Manager.alien_arr[j].transform.position);
                 checktime = Time.time;
                 gscpt.gun_ammo--;
             }
         }
     }
     else {
         if(gscpt.in_game) {
             GameObject m = GameObject.Find("manager");
             manager = m.GetComponent<Manager>();
             in_game = true;
         }
     }
 }
开发者ID:mbc1990,项目名称:Orb,代码行数:27,代码来源:alien_gun.cs

示例8: Setup

        public Manager Setup(String _homePage)
        {
            // Initialize the settings
            Settings mySettings = new Settings();

            // Set the default browser + Silverlight
            mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
            mySettings.Web.EnableSilverlight = true;
            mySettings.ExecutionDelay = 0;
            mySettings.AnnotateExecution = false;

            // Create the manager object
            Manager myManager = new Manager(mySettings);

            // Start the manager
            myManager.Start();

            // Launch a new browser instance. [This will launch an IE instance given the setting above]
            myManager.LaunchNewBrowser();

            // Navigate to a certain web page
            myManager.ActiveBrowser.NavigateTo(_homePage);

            return myManager;
        }
开发者ID:ekostadinov,项目名称:MyProjects,代码行数:25,代码来源:BaseTest.cs

示例9: Start

    // Use this for initialization
    void Start()
    {
        pc = transform.parent.parent.GetComponent<PlayerController>();
        meter = transform.Find("meter").GetComponent<Image>();

        manager = GameObject.Find("Manager").GetComponent<Manager>();
    }
开发者ID:mwdewey,项目名称:GameDev2,代码行数:8,代码来源:UltimateBar.cs

示例10: ClientImportPostProcess

 public static void ClientImportPostProcess( FileInfo file, int imported, int rejected ) {
   using( DomainContext ctx = new DomainContext() ) {
     Manager mgr = new Manager( ctx );
     ClientFileImportManager clientFileImportManager = new ClientFileImportManager( mgr );
     clientFileImportManager.SaveClientFileImport( file.Name, imported, rejected );
   }
 }
开发者ID:cmcginn,项目名称:AIM,代码行数:7,代码来源:FileImportService.cs

示例11: managers_with_two_parkinglots_and_two_parking_boys_should_print_its_avaliable_position

        public void managers_with_two_parkinglots_and_two_parking_boys_should_print_its_avaliable_position()
        {
            var manager = new Manager();
            manager.Manage(new Parkinglot(1));
            manager.Manage(new Parkinglot(2));

            var parkingBoy = new ParkingBoy(new MaxAvailableRate());
            parkingBoy.Manage(new Parkinglot(2));
            manager.Manage(parkingBoy);

            var parkingBoy1 = new ParkingBoy(new MaxAvailableRate());
            parkingBoy1.Manage(new Parkinglot(2));
            parkingBoy1.Manage(new Parkinglot(3));
            manager.Manage(parkingBoy1);
            var report = manager.Print(new Reporter());
            var expectedReport = "manager:\r\n"
                                 + "	parkinglot: 1\r\n"
                                 + "	parkinglot: 2\r\n"
                                 + "	parkingboy:\r\n"
                                 + "		parkinglot: 2\r\n"
                                 + "	parkingboy:\r\n"
                                 + "		parkinglot: 2\r\n"
                                 + "		parkinglot: 3\r\n";
            Assert.AreEqual(expectedReport, report);
        }
开发者ID:Jennifer-fu,项目名称:Parkinglot,代码行数:25,代码来源:ReportTest.cs

示例12: Main

        static void Main(string[] args)
        {
            SalesEmployee saler = new SalesEmployee(123145, "Joro", "Petrov", 120.20m, DepartmentType.Production);
            saler.AddSale(new Sale("Liutenica", DateTime.Parse("12.12.2015"), 2.20m));

            Customer kakaMinka = new Customer(15651513, "Kaka", "Minka", 5000);
            Customer pepiMotichkata = new Customer(67654654, "Pepi", "Motichkata", 3000);
            Manager theBoss = new Manager(156136, "Chicho", "Gosho", 10000, DepartmentType.Marketing);

            Developer dev = new Developer(333, "Bai", "Stavri", 101010, DepartmentType.Accounting);
            var projectAmazon = new Project("Amazon", null, null, true);
            var projectSoftUni = new Project("SoftUni", DateTime.Now, "....", true);
            dev.Projects.Add(projectAmazon);

            List<Person> people = new List<Person>();
            people.Add(kakaMinka);
            people.Add(pepiMotichkata);
            people.Add(theBoss);

            foreach (Person per in people)
            {
                Console.WriteLine("ID: {0}\nFirst name: {1}\nLast name: {2}", per.Id,
                    per.FirstName, per.LastName);
                Console.WriteLine("----------------------------");
            }
        }
开发者ID:IlianStefanov,项目名称:SoftUni,代码行数:26,代码来源:Program.cs

示例13: Start

    void Start()
    {
        bassL = L1.GetComponent<Light>();

        GameObject temp = GameObject.Find("spectrum equalizer");
        SpecData = temp.GetComponent<Manager>();
    }
开发者ID:gushrodah,项目名称:Visualizor,代码行数:7,代码来源:LB.cs

示例14: Container

        public Container(Manager manager)
            : base(manager)
        {
            sbVert = new ScrollBar(manager, Orientation.Vertical);
            sbVert.Init();
            sbVert.Detached = false;
            sbVert.Anchor = Anchors.Top | Anchors.Right | Anchors.Bottom;
            sbVert.ValueChanged += new EventHandler(ScrollBarValueChanged);
            sbVert.Range = 0;
            sbVert.PageSize = 0;
            sbVert.Value = 0;
            sbVert.Visible = false;

            sbHorz = new ScrollBar(manager, Orientation.Horizontal);
            sbHorz.Init();
            sbHorz.Detached = false;
            sbHorz.Anchor = Anchors.Right | Anchors.Left | Anchors.Bottom;
            sbHorz.ValueChanged += new EventHandler(ScrollBarValueChanged);
            sbHorz.Range = 0;
            sbHorz.PageSize = 0;
            sbHorz.Value = 0;
            sbHorz.Visible = false;

            Add(sbVert, false);
            Add(sbHorz, false);
        }
开发者ID:KtBkkr,项目名称:Asteria,代码行数:26,代码来源:Container.cs

示例15: Start

    // Use this for initialization
    IEnumerator Start()
    {
        if(waves.Length == 0) {
            yield break;
        }

        manager = FindObjectOfType<Manager>();

        while(true) {

            while(manager.IsPlaying() == false) {
                yield return new WaitForEndOfFrame();
            }

            GameObject g = (GameObject)Instantiate(waves[currentWave], transform.position, Quaternion.identity);

            g.transform.parent = transform;

            while(g.transform.childCount != 0) {
                yield return new WaitForEndOfFrame();
            }

            Destroy(g);

            if(waves.Length <= ++currentWave) {
                currentWave = 0;
            }
        }
    }
开发者ID:oyukin,项目名称:unity,代码行数:30,代码来源:Emitter.cs


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