Пример #1
0
        //-----------------------------------------------
        public static void RegisterUnites()
        {
            CClasseUniteDistance distance = new CClasseUniteDistance();

            CGestionnaireUnites.AddClasseUnite(distance);
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Meter|20019"), "m", c_IdM, distance, 1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Decimeter|20020"), "dm", c_IdDM, distance, 0.1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Centimeter|20021"), "cm", c_IdCM, distance, 0.01, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Millimeter|20022"), "mm", c_IdMM, distance, 0.001, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Decameter|20023"), "dam", c_IdAM, distance, 10, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Hectometer|20024"), "hm", c_IdHM, distance, 100, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Kilometer|20025"), "km", c_IdKM, distance, 1000, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Yard|20026"), "yd", c_IdYARD, distance, 0.9144, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Feet|20027"), "ft", c_IdFEET, distance, 0.3048, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Inch|20028"), "in", c_IdINCH, distance, 0.0254, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Micrometer|20029"), "µm", c_IdMICROM, distance, 10e-6, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Nanometer|20030"), "nm", c_IdNM, distance, 10e-9, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Picometer|20031"), "pm", c_IdPM, distance, 10e-12, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Femtometer|20032"), "fm", c_IdFM, distance, 10e-15, 0));
        }
Пример #2
0
        //-----------------------------------------------
        public static void RegisterUnites()
        {
            CClasseUnitePoids Poids = new CClasseUnitePoids();

            CGestionnaireUnites.AddClasseUnite(Poids);
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Gram|20053"), "g", c_idG, Poids, 1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Decigram|20054"), "dg", c_idDG, Poids, 0.1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Centigram|20055"), "cg", c_idCG, Poids, 0.01, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Milligram|20056"), "mg", c_idMG, Poids, 0.001, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Decagram|20057"), "dag", c_idDAG, Poids, 10, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Hectogram|20058"), "hg", c_idHG, Poids, 100, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Kilogram|20059"), "kg", c_idKG, Poids, 1000, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Quintal|20060"), "q", c_idQUINTAL, Poids, 100000, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Ton|20061"), "t", c_idTONNE, Poids, 1000000, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Microgram|20162"), "µg", c_idMICROG, Poids, 10e-6, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Nanogram|20163"), "ng", c_idNANOG, Poids, 10e-9, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Picogram|20164"), "pg", c_idPICOG, Poids, 10e-12, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Femtogram|20165"), "fg", c_idFEMTOG, Poids, 10e-15, 0));
        }
Пример #3
0
        //-----------------------------------------------
        public static void RegisterUnites()
        {
            CClasseUniteUnite unite = new CClasseUniteUnite();

            CGestionnaireUnites.AddClasseUnite(unite);
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Unit|20170"), I.T("u|20171"), c_idUnite, unite, 1, 0));
        }
Пример #4
0
        //-----------------------------------------------
        public static void RegisterUnites()
        {
            CClasseUniteAngle angle = new CClasseUniteAngle();

            CGestionnaireUnites.AddClasseUnite(angle);
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Degree|20167"), "°", c_IdDeg, angle, 1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Minute|20168"), "'", c_IdMin, angle, 1.0 / 60.0, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Second|20169"), "''", c_IdSec, angle, 1.0 / 3600.0, 0));
        }
        //------------------------------------------------------
        public static void OnInitGestionnaireUnites(object sender, EventArgs args)
        {
            CListeObjetDonneeGenerique <CClasseUniteInDb> classes = new CListeObjetDonneeGenerique <CClasseUniteInDb>(CContexteDonneeSysteme.GetInstance());

            classes.Refresh();
            foreach (CClasseUniteInDb classe in classes)
            {
                CGestionnaireUnites.AddClasseUnite(classe);
            }
            CListeObjetDonneeGenerique <CUniteInDb> unites = new CListeObjetDonneeGenerique <CUniteInDb>(CContexteDonneeSysteme.GetInstance());

            unites.Refresh();
            foreach (CUniteInDb unite in unites)
            {
                CGestionnaireUnites.AddUnite(unite);
            }
        }
Пример #6
0
        //-----------------------------------------------
        public static void RegisterUnites()
        {
            CClasseUniteVolume volume = new CClasseUniteVolume();

            CGestionnaireUnites.AddClasseUnite(volume);
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Liter|20046"), "l", c_IdL, volume, 1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Deciliter|20047"), "dl", c_IdDL, volume, 0.1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Centiliter|20048"), "cl", c_IdCL, volume, 0.01, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Milliliter|20049"), "ml", c_IdML, volume, 0.001, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Decaliter|20050"), "dal", c_IdDAL, volume, 10, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Hectoliter|20051"), "hl", c_IdHL, volume, 100, 0));
        }
Пример #7
0
        //-----------------------------------------------
        public static void RegisterUnites()
        {
            CClasseUniteTemps temps = new CClasseUniteTemps();

            CGestionnaireUnites.AddClasseUnite(temps);
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Hour|20034"), "h", c_idH, temps, 1, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Minute|20035"), "min", c_idMIN, temps, 1.0 / 60.0, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Second|20036"), "s", c_idSEC, temps, 1.0 / 60.0 / 60.0, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Day|20037"), I.T("day|20041"), c_idDAY, temps, 24, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Week|20038"), I.T("wk|20042"), c_idWEEK, temps, 24 * 7, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Year|20039"), I.T("yrs|20043"), c_idYEAR, temps, 24 * 365.25, 0));
            CGestionnaireUnites.AddUnite(new CUniteStandard(
                                             I.T("Century|20040"), I.T("cent|20044"), c_idCENTURY, temps, 24 * 365.25 * 100, 0));
        }