Esempio n. 1
0
        public void BulkReadTest()
        {
            var files = Directory.EnumerateFiles(@"E:\MDX", "*.mdx", SearchOption.AllDirectories);

            foreach (var file in files)
            //Parallel.ForEach(files, file =>
            {
                Model mdx                     = new Model(file);
                VERS  version                 = mdx.Get <VERS>();
                MODL  modl                    = mdx.Get <MODL>();
                SEQS  sequences               = mdx.Get <SEQS>();
                MTLS  materials               = mdx.Get <MTLS>();
                TEXS  textures                = mdx.Get <TEXS>();
                GEOS  geosets                 = mdx.Get <GEOS>();
                GEOA  geosetanims             = mdx.Get <GEOA>();
                HELP  helpers                 = mdx.Get <HELP>();
                ATCH  attachments             = mdx.Get <ATCH>();
                PIVT  pivotpoints             = mdx.Get <PIVT>();
                CAMS  cameras                 = mdx.Get <CAMS>();
                EVTS  events                  = mdx.Get <EVTS>();
                CLID  collisions              = mdx.Get <CLID>();
                GLBS  globalsequences         = mdx.Get <GLBS>();
                PRE2  particleemitter2s       = mdx.Get <PRE2>();
                RIBB  ribbonemitters          = mdx.Get <RIBB>();
                LITE  lights                  = mdx.Get <LITE>();
                TXAN  textureanimations       = mdx.Get <TXAN>();
                BONE  bones                   = mdx.Get <BONE>();
                BPOS  bindpositions           = mdx.Get <BPOS>();
                FAFX  faceFXes                = mdx.Get <FAFX>();
                CORN  particleEmitterPopcorns = mdx.Get <CORN>();
            }
            //);
        }
Esempio n. 2
0
        private void Sign_Click(object sender, EventArgs e)
        {
            KreationService.Log login = null;

            login = new KreationService.Log();
            try
            {
                login          = new KreationService.Log();
                AcceptButton   = Sign;
                login.Username = UserName.Text; /*assign textbox to string to pass server*/
                login.Password = Password.Text;
                login.type     = comboBox_Type.Text;
                login.branch   = comboBox_Branch.Text;

                String avl = client.login(login);/* Pass string to server and get return value then assign it to var */
                if (avl != login.type)
                {
                    MessageBox.Show("Retry, Incorrect Password or username");
                }

                else
                {
                    if (login.type == "Admin")
                    {
                        this.Hide();
                        Admin a = new Admin(login.Username);
                        a.ShowDialog();
                        this.Close();
                    }

                    else if (login.type == "Accountant" && login.branch == "Borella")
                    {
                        this.Hide();
                        Accountant ac = new Accountant(login.Username);
                        ac.ShowDialog();
                        this.Close();
                    }

                    else if (login.type == "Accountant" && login.branch == "Bamba")
                    {
                        this.Hide();
                        BAccountant bac = new BAccountant(login.Username);
                        bac.ShowDialog();
                        this.Close();
                    }

                    else if (login.type == "Accountant" && login.branch == "Wattala")
                    {
                        this.Hide();
                        WAccountant wac = new WAccountant(login.Username);
                        wac.ShowDialog();
                        this.Close();
                    }
                    else if (login.type == "Guest" && login.branch == "Borella")
                    {
                        this.Hide();
                        Guest g = new Guest();
                        g.ShowDialog();
                        this.Close();
                    }
                    else if (login.type == "Guest" && login.branch == "Bamba")
                    {
                        this.Hide();
                        BGuest bg = new BGuest();
                        bg.ShowDialog();
                        this.Close();
                    }
                    else if (login.type == "Guest" && login.branch == "Wattala")
                    {
                        this.Hide();
                        WGuest wg = new WGuest();
                        wg.ShowDialog();
                        this.Close();
                    }
                    else if (login.type == "Emp" && login.branch == "Borella")
                    {
                        this.Hide();
                        POS p = new POS(login.Username);
                        p.ShowDialog();
                        this.Close();
                    }
                    else if (login.type == "Emp" && login.branch == "Bamba")
                    {
                        this.Hide();
                        BPOS p = new BPOS(login.Username);
                        p.ShowDialog();
                        this.Close();
                    }
                    else if (login.type == "Emp" && login.branch == "Wattala")
                    {
                        this.Hide();
                        WPOS p = new WPOS(login.Username);
                        p.ShowDialog();
                        this.Close();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }