예제 #1
0
    // -----------------------------------------------------------------------------------------------------------------------------------
    public void Load(RuntimeAssetType type, string indexName,
                     bool isCacheToRecord = false, Action <object> OnAssetLoaded = null)
    {
        if (!IsInitialized)
        {
            Debug.Log("尚未初始化!");
            return;
        }

        AssetRecord record = RecordsInfo.GetAssetRecord(type, indexName);

        if (record != null)
        {
            //LoadMethod loadMethod = (type == RuntimeAssetType.BUNDLE_PREFAB ||
            //                         type == RuntimeAssetType.BUNDLE_SCENE) ?
            //                         LoadMethod.BUNDLE_FILE : LoadMethod.WWW;

            //LoadFile loadFile = record.GetLoadFile(FileAddressType.LOCAL, isCacheToRecord,
            //                                       loadMethod, FileAddressType.NULL, OnAssetLoaded);

            LoadBehaviour behaviour = (type == RuntimeAssetType.BUNDLE_PREFAB ||
                                       type == RuntimeAssetType.BUNDLE_SCENE) ?
                                      LoadBehaviour.ContentLoadFromLoacal_LoadBundleFile :
                                      LoadBehaviour.ContentLoadFromLoacal_WWW;

            LoadFile loadFile = record.GetLoadFile(behaviour, isCacheToRecord, OnAssetLoaded);
            LoadFileController.Instance.Load(loadFile);
        }
        else
        {
            Debug.Log(indexName + "未找到此资源!!!!!");
        }
    }
예제 #2
0
        public List <RecordsInfo> SearchRecords(string hospital)
        {
            RecordsInfo        records  = null;
            List <RecordsInfo> lRecords = new List <RecordsInfo>();

            try
            {
                using (var conn = DALHelper.GetConnection())
                    using (var cmd = conn.CreateCommand())
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.CommandText = DBConstants.Recorded.Init_Fetch_Records;
                        cmd.Parameters.AddWithValue("@Hospital", hospital);
                        conn.Open();
                        SqlDataReader dr = cmd.ExecuteReader();
                        while (dr.Read())
                        {
                            records             = new RecordsInfo();
                            records.RecordsID   = Convert.ToInt64(dr["RECORDSID"]);
                            records.PatientId   = Convert.ToString(dr["PATIENTID"]);
                            records.PatientName = Convert.ToString(dr["FIRSTNAME"]);
                            records.LastName    = Convert.ToString(dr["LASTNAME"]);
                            records.DOB         = Convert.ToDateTime(dr["DOB"]);
                            records.Age         = Convert.ToInt32(dr["AGE"]);
                            records.Gender      = Convert.ToString(dr["GENDER"]);

                            records.Address1 = Convert.ToString(dr["ADDRESS1"]);
                            records.Address2 = Convert.ToString(dr["ADDRESS2"]);
                            records.City     = Convert.ToString(dr["CITY"]);
                            records.PState   = Convert.ToString(dr["PSTATE"]);
                            records.PCountry = Convert.ToString(dr["PCOUNTRY"]);
                            records.ZIPCode  = Convert.ToString(dr["ZIPCODE"]);

                            records.ContactNumber1 = Convert.ToString(dr["CONTACTNUM1"]);
                            records.ContactNumber2 = Convert.ToString(dr["CONTACTNUM2"]);
                            records.PEmail         = Convert.ToString(dr["PEMAIL"]);
                            records.RefDoctor      = Convert.ToString(dr["REFERENCEDOCTOR"]);
                            records.LastVisit      = Convert.ToDateTime(dr["LASTVISIT"]);
                            records.Diagnosis      = Convert.ToString(dr["DIAGNOSIS"]);
                            records.FileName       = Convert.ToString(dr["FILENAME"]);
                            records.Hospital       = Convert.ToString(dr["HOSPITAL"]);
                            records.ODate          = Convert.ToString(dr["ODATE"]);
                            records.OTime          = Convert.ToString(dr["OTIME"]);
                            lRecords.Add(records);
                        }
                    }
            }
            catch (Exception ex)
            {
            }
            return(lRecords);
        }
예제 #3
0
        //GAL start
        private void InitializeDashboard()
        {
            receiverUI1 = new ReceiverUI();
            receiverUI2 = new ReceiverUI();
            receiverUI3 = new ReceiverUI();
            receiverUI4 = new ReceiverUI();

            ARFCN1 = new UnitView();
            ARFCN2 = new UnitView();
            ARFCN3 = new UnitView();
            ARFCN4 = new UnitView();

            SetReceiverUI(receiverUI1, 1);
            SetReceiverUI(receiverUI2, 2);
            SetReceiverUI(receiverUI3, 3);
            SetReceiverUI(receiverUI4, 4);

            BrushConverter conv = new BrushConverter();

            dashboardButtonFiles = new DashboardButton();
            FilesInfo filesButton = new FilesInfo();

            SetDashboardButton("#ffea6c41", filesButton.ItemName, filesButton.Count, PackIconMaterialKind.File, dashboardButtonFiles);

            dashboardButtonRecordFiles = new DashboardButton();
            RecordsInfo recordsButton = new RecordsInfo();

            SetDashboardButton("#ffe69a2a", recordsButton.ItemName, recordsButton.Count, PackIconMaterialKind.RecordRec, dashboardButtonRecordFiles);

            dashboardButtonPhoneCalls = new DashboardButton();
            CallsInfo callButton = new CallsInfo();

            SetDashboardButton("#FF469408", callButton.ItemName, callButton.Count, PackIconMaterialKind.PhoneLog, dashboardButtonPhoneCalls);

            dashboardButtonSmsMessages = new DashboardButton();
            SmsInfo smsButton = new SmsInfo();

            SetDashboardButton("#FF177EC1", smsButton.ItemName, smsButton.Count, PackIconMaterialKind.EmailOpen, dashboardButtonSmsMessages);


            Units     = TransferDB.Units;
            computers = TransferDB.Computers;
        }
예제 #4
0
    public void LoadMulti(RuntimeAssetType type, List <string> indexNames, bool isCacheToRecord,
                          LoadMethod method, Action <object> onLoadingEnd, Action onAllLoaded)
    {
        if (!IsInitialized)
        {
            Debug.Log("尚未初始化!");
            return;
        }

        Dictionary <string, AssetRecord> records = RecordsInfo.GetRecordsDic(type);
        Queue <AssetRecord> queue = new Queue <AssetRecord>();

        var it = indexNames.GetEnumerator();

        while (it.MoveNext())
        {
            if (records.ContainsKey(it.Current))
            {
                queue.Enqueue(records[it.Current]);
            }
        }
        LoadMulti(queue, isCacheToRecord, method, onLoadingEnd, onAllLoaded);
    }