예제 #1
0
        private void SetMinMax(BandInfo bandInfo, bool custom)
        {
            if (bandInfo == null)
            {
                return;
            }

            var band = GetBand(bandInfo.Combo);

            if (band == null)
            {
                return;
            }

            if (custom)
            {
                var model = new RasterMinMaxModel(band);
                if (_context.Container.Run <RasterMinMaxPresenter, RasterMinMaxModel>(model, ParentForm))
                {
                    bandInfo.Min.DoubleValue = model.Min;
                    bandInfo.Max.DoubleValue = model.Max;
                }
            }
            else
            {
                ComputeBandMinMax(band, bandInfo);
            }
        }
예제 #2
0
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "标题";
            b0.FieldName   = "F_BannerContent";
            b0.Width       = 800;
            Bands.Add(b0);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "录入时间";
            b1.FieldName   = "F_Time";
            b1.Width       = 100;
            Bands.Add(b1);

            BandInfo b2 = new BandInfo();

            b2.HanderTitle = "是否在大屏中显示";
            b2.FieldName   = "Show";
            b2.Width       = 120;
            Bands.Add(b2);


            return(Bands);
        }
예제 #3
0
        internal static int SetBandInfo(BandInfo info)
        {
            if (info == null)
            {
                return(-1);
            }

            SafeProcedure.ExecuteNonQuery(
                Database.GetDatabase(D4DDefine.DBInstanceName),
                "dbo.BandInfo_Set",
                delegate(IParameterSet parameters)
            {
                parameters.AddWithValue("@BandId", info.BandId);
                parameters.AddWithValue("@BandName", info.BandName);
                parameters.AddWithValue("@Info1", info.Info1);
                parameters.AddWithValue("@Info2", info.Info2);
                parameters.AddWithValue("@Info3", info.Info3);
                parameters.AddWithValue("@Remark", info.Remark);
                parameters.AddWithValue("@DeleteFlag", info.DeleteFlag);
                parameters.AddWithValue("@RetVal", DBNull.Value, ParameterDirectionWrap.ReturnValue);
            },
                delegate(IParameterSet outputParameters)
            {
                info.BandId = Convert.ToInt32(outputParameters.GetValue("@RetVal"));
            });

            return(info.BandId);
        }
예제 #4
0
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "设备名称";
            b0.FieldName   = "F_Name";
            b0.Width       = 60;
            Bands.Add(b0);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "设备描述";
            b1.FieldName   = "F_Decs";
            b1.Width       = 200;
            Bands.Add(b1);

            BandInfo b2 = new BandInfo();

            b2.HanderTitle = "排序";
            b2.FieldName   = "F_Order";
            b2.Width       = 100;
            Bands.Add(b2);


            return(Bands);
        }
예제 #5
0
파일: LoginList.xaml.cs 프로젝트: Dekai/zdk
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "登陆名";
            b0.FieldName   = "F_LoginName";
            b0.Width       = 200;
            Bands.Add(b0);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "用户姓名";
            b1.FieldName   = "UserName";
            b1.Width       = 200;
            Bands.Add(b1);


            BandInfo b2 = new BandInfo();

            b2.HanderTitle = "角色名称";
            b2.FieldName   = "RoleName";
            b2.Width       = 200;
            Bands.Add(b2);


            BandInfo b3 = new BandInfo();

            b3.HanderTitle = "是否启用";
            b3.FieldName   = "IsActive";
            b3.Width       = 50;
            Bands.Add(b3);

            return(Bands);
        }
예제 #6
0
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();

            BandInfo b = new BandInfo();

            b.HanderTitle = "工程名称";
            b.FieldName   = "F_Name";
            b.Width       = 300;
            Bands.Add(b);


            foreach (NameValue item in CostType)
            {
                if (item.IsSelected)
                {
                    BandInfo b7 = new BandInfo();
                    b7.HanderTitle = item.Name;
                    b7.FieldName   = "CostType_" + item.Value;
                    b7.Width       = 80;
                    Bands.Add(b7);
                }
            }


            BandInfo b8 = new BandInfo();

            b8.HanderTitle = "合计";
            b8.FieldName   = "CostType_Count";
            b8.Width       = 80;
            Bands.Add(b8);


            return(Bands);
        }
예제 #7
0
        private void addbrand(string pid)
        {
            string tempurl = string.Format("http://www.nb77.cn/index.php?mod=user&ajax=1&bid={0}", pid);
            string page    = HtmlAnalysis.Gethtmlcode("http://www.nb77.cn/static/css/dealer/dealer_user.css");
            // var str1 = "<option value='1' >A-奥迪</option><option value='19777' >A-奥驰</option><option value='19780' >A-奥玲</option><option value='957' >A-阿斯顿·马丁</option><option value='771' >B-奔驰Smart</option><option value='190' >B-保时捷</option><option value='469' >B-宾利</option><option value='144' >B-标致</option><option value='302' >B-宝骏</option><option value='462' >B-北汽</option><option value='105' >B-比亚迪</option><option value='99' >B-奔驰</option><option value='773' >B-奔腾</option><option value='78' >B-本田</option><option value='5' >B-宝马</option><option value='779' >B-宝马MINI</option><option value='34' >B-别克</option><option value='186' >C-长安</option><option value='258' >C-昌河</option><option value='254' >C-长丰</option><option value='116' >C-长城</option><option value='310' >D-大迪</option><option value='424' >D-道奇</option><option value='19782' >D-大运</option><option value='658' >D-大发</option><option value='669' >D-东南</option><option value='224' >D-东风</option><option value='192' >D-大宇</option><option value='15' >D-大众</option><option value='53' >F-福特</option><option value='64' >F-丰田</option><option value='360' >F-福迪</option><option value='484' >F-法拉利</option><option value='244' >F-福田</option><option value='160' >F-菲亚特</option><option value='769' >G-GMC</option><option value='329' >G-广汽</option><option value='170' >H-华普</option><option value='443' >H-汇众</option><option value='485' >H-悍马</option><option value='363' >H-海马</option><option value='147' >H-哈飞</option><option value='685' >H-华泰</option><option value='385' >H-黑豹</option><option value='645' >H-红旗</option><option value='691' >J-金龙</option><option value='153' >J-吉利</option><option value='19769' >J-解放</option><option value='289' >J-江淮</option><option value='194' >J-吉普</option><option value='535' >J-捷豹</option><option value='841' >J-吉利帝豪</option><option value='723' >J-吉利上海英伦</option><option value='654' >J-金杯</option><option value='233' >J-江铃</option><option value='393' >J-吉奥</option><option value='175' >J-吉利全球鹰</option><option value='774' >K-开瑞</option><option value='632' >K-凯迪拉克</option><option value='196' >K-克莱斯勒</option><option value='19778' >K-凯马</option><option value='547' >L-路虎</option><option value='543' >L-林肯</option><option value='554' >L-兰博基尼</option><option value='405' >L-力帆</option><option value='724' >L-铃木</option><option value='648' >L-陆风</option><option value='374' >L-莲花</option><option value='770' >L-劳斯莱斯</option><option value='213' >L-雷诺</option><option value='198' >L-雷克萨斯</option><option value='776' >M-迈巴赫</option><option value='572' >M-玛莎拉蒂</option><option value='355' >M-名爵</option><option value='57' >M-马自达</option><option value='85' >N-尼桑</option><option value='111' >N-南汽</option><option value='408' >N-纳智捷</option><option value='576' >O-讴歌</option><option value='580' >O-欧宝</option><option value='165' >Q-奇瑞</option><option value='131' >Q-起亚</option><option value='978' >Q-启辰</option><option value='216' >R-荣威</option><option value='863' >R-瑞麒</option><option value='206' >S-斯巴鲁</option><option value='203' >S-萨博</option><option value='19771' >S-时代</option><option value='217' >S-斯柯达</option><option value='19754' >S-上汽大通</option><option value='376' >S-曙光</option><option value='597' >S-双龙</option><option value='665' >S-双环</option><option value='138' >S-三菱</option><option value='19781' >T-唐骏</option><option value='19731' >T-特斯拉</option><option value='209' >W-沃尔沃</option><option value='615' >W-五十铃</option><option value='370' >W-威麟</option><option value='182' >W-五菱</option><option value='341' >W-万丰</option><option value='454' >X-夏利</option><option value='47' >X-现代</option><option value='123' >X-雪铁龙</option><option value='501' >X-雪佛兰</option><option value='389' >y-依维柯</option><option value='346' >y-一汽</option><option value='19773' >Y-跃进</option><option value='452' >y-永源</option><option value='19779' >Y-跃进</option><option value='607' >y-英菲尼迪</option><option value='325' >Z-中顺</option><option value='327' >Z-众泰</option><option value='19776' >Z-重汽</option><option value='331' >Z-中兴</option><option value='226' >Z-中华</option>";
            List <BandInfo> bandlist = new List <BandInfo>();
            var             list     = RegexServer.RegGroupCollection(page, "<option value=(?<x>\\d+)>(?<y>.*?)</option>");

            if (list == null)
            {
                return;
            }
            for (int i = 0; i < list.Count; i++)
            {
                var      key   = list[i].Groups["x"].Value;
                var      bname = list[i].Groups["y"].Value;
                BandInfo brand = new BandInfo
                {
                    FirstChart     = "",
                    BrandName      = bname,
                    ParentBrandNum = "bid_" + pid,
                    BrandNum       = key,
                    DisplayName    = bname,
                    CreateTime     = DateTime.Now
                };
                bandlist.Add(brand);
            }

            new BandInfoDb().AddBandInfo(bandlist);
        }
예제 #8
0
        private async Task CreateBandActorTask(BandActorGenerator bag, CancellationToken cancellationToken)
        {
            CryptoRandom random = new CryptoRandom();

            while (!cancellationToken.IsCancellationRequested && this.MaxBandsToCreatePerServiceInstance > 0)
            {
                bool created = false;
                while (!created && !cancellationToken.IsCancellationRequested)
                {
                    ActorId bandActorId;
                    ActorId doctorActorId;
                    int     randomCountyId = -1;
                    string  doctorName     = null;

                    randomCountyId = random.Next(0, bag.doctorsPerCounty.Keys.Count);
                    doctorName     = bag.GetRandomName(random);

                    CountyRecord randomCountyRecord = bag.doctorsPerCounty.Keys.ElementAt(randomCountyId);
                    BandInfo     bandActorInfo      = bag.GetRandomHealthStatus(randomCountyRecord, random);

                    try
                    {
                        bandActorId   = new ActorId(Guid.NewGuid());
                        doctorActorId = new ActorId(bandActorInfo.DoctorId);

                        IDoctorActor docActor = ActorProxy.Create <IDoctorActor>(doctorActorId, this.DoctorServiceUri);
                        await docActor.NewAsync(doctorName, randomCountyRecord);

                        IBandActor bandActor = ActorProxy.Create <IBandActor>(bandActorId, this.ActorServiceUri);
                        await bandActor.NewAsync(bandActorInfo);

                        ServiceEventSource.Current.Message("Actor created {0} verifying...", bandActorId);

                        await VerifyActors(
                            new HealthIndexCalculator(this.Context),
                            bandActorId,
                            doctorName,
                            randomCountyRecord,
                            bandActorInfo,
                            docActor,
                            bandActor,
                            cancellationToken);
                    }

                    catch (Exception e)
                    {
                        ServiceEventSource.Current.ServiceMessage(this, "Failed to iniitalize band or doctor. {0}", e.ToString());
                    }

                    created = true;
                }

                this.MaxBandsToCreatePerServiceInstance--;

                ServiceEventSource.Current.ServiceMessage(this, "Created Actors, {0} remaining", this.MaxBandsToCreatePerServiceInstance);

                await Task.Delay(100, cancellationToken);
            }
        }
예제 #9
0
파일: List.xaml.cs 프로젝트: Dekai/zdk
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();

            BandInfo b = new BandInfo();

            b.HanderTitle = "工程名称";
            b.FieldName   = "F_Name";
            b.Width       = 220;
            Bands.Add(b);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "单据名称";
            b1.FieldName   = "F_ApplyTitle";
            b1.Width       = 200;
            Bands.Add(b1);

            BandInfo b2 = new BandInfo();

            b2.HanderTitle = "单据类型";
            b2.FieldName   = "ApplyTypeName";
            b2.Width       = 120;
            Bands.Add(b2);

            BandInfo b3 = new BandInfo();

            b3.HanderTitle = "金额总计";
            b3.FieldName   = "F_ApplyAmount";
            b3.Width       = 120;
            Bands.Add(b3);

            BandInfo b4 = new BandInfo();

            b4.HanderTitle = "报销日期";
            b4.FieldName   = "F_ApplyDate";
            b4.Width       = 120;
            Bands.Add(b4);


            BandInfo b5 = new BandInfo();

            b5.HanderTitle = "描述";
            b5.FieldName   = "F_ApplyDescription";
            b5.Width       = 120;
            Bands.Add(b5);


            BandInfo b8 = new BandInfo();

            b8.HanderTitle = "状态";
            b8.FieldName   = "StateName";
            b8.Width       = 80;
            Bands.Add(b8);


            return(Bands);
        }
예제 #10
0
        private void bpaste_Click(object sender, EventArgs e)
        {
            // Paste
            if (subreportedit.SelectedSection == null)
            {
                MessageBox.Show("Select a destination section first");
                return;
            }
            if (!Clipboard.ContainsText())
            {
                MessageBox.Show("Clipboard data not valid");
                return;
            }
            string ntext = Clipboard.GetText().Trim();

            if (ntext.Length < 10)
            {
                MessageBox.Show("Clipboard content not valid");
                return;
            }
            if (ntext.Substring(0, 8) != "<SECTION")
            {
                MessageBox.Show("Clipboard content not valid");
                return;
            }
            Section sec     = subreportedit.SelectedSection;
            Report  nreport = new Report();
            {
                ReportReader rreader = new ReportReader(nreport);
                {
                    List <PrintPosItem> nlist = rreader.ReadFromString(ntext);
                    foreach (PrintPosItem xitem in nlist)
                    {
                        // Validate name
                        if (FReport.Components.IndexOfKey(xitem.Name) >= 0)
                        {
                            FReport.GenerateNewName(xitem);
                        }
                        FReport.Components.Add(xitem.Name, xitem);
                        sec.Components.Add(xitem);
                        xitem.Section = sec;
                    }
                    subreportedit.Redraw();
                    // Select recently added items
                    subreportedit.ClearSelection();
                    foreach (PrintPosItem xitem in nlist)
                    {
                        subreportedit.SelectedItems.Add(xitem.SelectionIndex, xitem);
                    }
                }
            }
            BandInfo nband = subreportedit.BandsList[sec.SelectionIndex];

            subreportedit.SelectedItemsBands.Add(sec.SelectionIndex, nband);
            subreportedit.SelectPosItem();
            AfterSelectDesign(this, null);
            subreportedit.parentcontrol.Invalidate();
        }
예제 #11
0
    /// <summary>
    /// Creates dummy data of given number of bands
    /// </summary>
    /// <returns>BandInfo[]</returns>
    private static BandInfo[] getDummyData(int count)
    {
        BandInfo[] b = new BandInfo[count];

        for (int i = 0; i < count; ++i)
        {
            b[i] = new BandInfo(i);
        }

        return(b);
    }
예제 #12
0
        public BandInfo GetRandomHealthStatus(CountyRecord county, CryptoRandom random)
        {
            BandInfo b = new BandInfo();

            b.CountyInfo = county;
            b.PersonName = this.GetRandomName(random);
            double healthDistribution = GetRandomNormalDistributedWithGivenMeanAndStdev(r, b.CountyInfo.CountyHealth, .75, 3);

            b.HealthIndex = NormalizeHealthDistribution(healthDistribution);
            b.DoctorId    = this.doctorsPerCounty[county][random.Next(0, this.doctorsPerCounty[county].Count)];
            return(b);
        }
        private async Task CreateKnownActors(BandActorGenerator bag, ConfigurationSettings settings, CancellationToken cancellationToken, bool verify)
        {
            CryptoRandom          random = new CryptoRandom();
            FabricClient          fc     = new FabricClient();
            HealthIndexCalculator hic    = new HealthIndexCalculator(this.Context);

            KeyedCollection <string, ConfigurationProperty> serviceParameters = settings.Sections["HealthMetrics.BandCreationService.Settings"].Parameters;

            while (!cancellationToken.IsCancellationRequested)
            {
                ActorId bandActorId;
                ActorId doctorActorId;
                int     randomCountyId = -1;
                string  doctorName     = null;

                randomCountyId = int.Parse(serviceParameters["KnownCountyIdIndex"].Value);
                //(2968 is King, WA) || (2231 is Multnomah, OR) || (1870 is St. Lawrence, NY)
                doctorName = serviceParameters["KnownDoctorName"].Value;

                CountyRecord randomCountyRecord = bag.doctorsPerCounty.Keys.ElementAt(randomCountyId);
                BandInfo     bandActorInfo      = bag.GetRandomHealthStatus(randomCountyRecord, random);

                try
                {
                    bandActorInfo.PersonName = serviceParameters["KnownPatientName"].Value;
                    bandActorId = new ActorId(new Guid(serviceParameters["KnownPatientId"].Value));

                    bandActorInfo.DoctorId = new Guid(serviceParameters["KnownDoctorId"].Value);
                    doctorActorId          = new ActorId(bandActorInfo.DoctorId);

                    bag.doctorsPerCounty[bag.doctorsPerCounty.Keys.ElementAt(randomCountyId)].Add(bandActorInfo.DoctorId);

                    IDoctorActor docActor = ActorProxy.Create <IDoctorActor>(doctorActorId, this.DoctorServiceUri);
                    await docActor.NewAsync(doctorName, randomCountyRecord);

                    IBandActor bandActor = ActorProxy.Create <IBandActor>(bandActorId, this.ActorServiceUri);
                    await bandActor.NewAsync(bandActorInfo);

                    if (verify)
                    {
                        await VerifyActors(hic, bandActorId, doctorName, randomCountyRecord, bandActorInfo, docActor, bandActor);

                        break;
                    }

                    await Task.Delay(TimeSpan.FromMinutes(1), cancellationToken);
                }
                catch (Exception e)
                {
                    ServiceEventSource.Current.ServiceMessage(this, "Exception when creating actor {0}", e.ToString());
                }
            }
        }
예제 #14
0
        internal static void MapImageList(IRecord record, List <BandInfo> list)
        {
            BandInfo m = new BandInfo();

            m.BandId   = record.GetInt32OrDefault(0, 0);
            m.BandName = record.GetStringOrEmpty(1);
            m.Info1    = record.GetStringOrEmpty(2);
            m.Info2    = record.GetStringOrEmpty(3);
            m.Info3    = record.GetStringOrEmpty(4);
            m.Remark   = record.GetStringOrEmpty(5);

            list.Add(m);
        }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            SaveLoadManager.resetVariables();
        }

        if (Input.GetKeyDown(KeyCode.P))
        {
            SaveLoadManager.printVariables();
        }

        if (Input.GetKeyDown(KeyCode.M))
        {
            BandInfo     newBand    = new BandInfo("CollaboDaisakusen", 100, new EInstrumentType[] { EInstrumentType.Guitar, EInstrumentType.Guitar, EInstrumentType.Bass, EInstrumentType.Drums, EInstrumentType.Piano, EInstrumentType.Vocals, EInstrumentType.Vocals });
            string[]     newSetList = new string[] { "Ambiguous", "Startear", "Button", "Golden Life" };
            List <float> newReviews = new List <float>();
            newReviews.Add(Random.Range(0f, 1f));
            newReviews.Add(Random.Range(0f, 1f));
            newReviews.Add(Random.Range(0f, 1f));
            SaveLoadManager.band    = newBand;
            SaveLoadManager.setList = newSetList;
            SaveLoadManager.reviews = newReviews;
        }

        if (Input.GetKeyDown(KeyCode.S))
        {
            SaveLoadManager.saveAllData();
        }

        if (Input.GetKeyDown(KeyCode.L))
        {
            SaveLoadManager.loadAllData();
        }

        if (Input.GetKeyDown(KeyCode.N))
        {
            if (SaveLoadManager.name == "jeff")
            {
                SaveLoadManager.setName("david");
            }
            else if (SaveLoadManager.name == "david")
            {
                SaveLoadManager.setName("yi");
            }
            else if (SaveLoadManager.name == "yi")
            {
                SaveLoadManager.setName("jeff");
            }
        }
    }
예제 #16
0
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "角色";
            b0.FieldName   = "F_Name";
            b0.Width       = 200;
            Bands.Add(b0);



            return(Bands);
        }
예제 #17
0
파일: List.xaml.cs 프로젝트: Dekai/zdk
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "工程名称";
            b0.FieldName   = "F_ProjectName";
            b0.Width       = 200;
            Bands.Add(b0);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "事故名称";
            b1.FieldName   = "F_AccidentName";
            b1.Width       = 200;
            Bands.Add(b1);

            BandInfo b2 = new BandInfo();

            b2.HanderTitle = "事故描述";
            b2.FieldName   = "F_Description";
            b2.Width       = 120;
            Bands.Add(b2);

            BandInfo b3 = new BandInfo();

            b3.HanderTitle = "日期";
            b3.FieldName   = "F_AccidentDate";
            b3.Width       = 120;
            Bands.Add(b3);

            BandInfo b4 = new BandInfo();

            b4.HanderTitle = "操作人";
            b4.FieldName   = "F_OperatorName";
            b4.Width       = 120;
            Bands.Add(b4);


            BandInfo b5 = new BandInfo();

            b5.HanderTitle = "操作时间";
            b5.FieldName   = "F_OperateTime";
            b5.Width       = 120;
            Bands.Add(b5);


            return(Bands);
        }
예제 #18
0
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "标题";
            b0.FieldName   = "F_Name";
            b0.Width       = 200;
            Bands.Add(b0);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "描述";
            b1.FieldName   = "F_Content";
            b1.Width       = 300;
            Bands.Add(b1);

            BandInfo b2 = new BandInfo();

            b2.HanderTitle = "价格";
            b2.FieldName   = "F_Money";
            b2.Width       = 100;
            Bands.Add(b2);

            BandInfo b3 = new BandInfo();

            b3.HanderTitle = "日期";
            b3.FieldName   = "F_Date";
            b3.Width       = 100;
            Bands.Add(b3);

            BandInfo b4 = new BandInfo();

            b4.HanderTitle = "状态";
            b4.FieldName   = "F_StateName";
            b4.Width       = 100;
            Bands.Add(b4);


            BandInfo b5 = new BandInfo();

            b5.HanderTitle = "录入人员";
            b5.FieldName   = "UserName";
            b5.Width       = 100;
            Bands.Add(b5);


            return(Bands);
        }
예제 #19
0
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "工程名称";
            b0.FieldName   = "F_Name";
            b0.Width       = 300;
            Bands.Add(b0);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "工程所干天数";
            b1.FieldName   = "daycount";
            b1.Width       = 120;
            Bands.Add(b1);

            BandInfo b2 = new BandInfo();

            b2.HanderTitle = "本公司人员出勤人次";
            b2.FieldName   = "empcount";
            b2.Width       = 120;
            Bands.Add(b2);

            BandInfo b3 = new BandInfo();

            b3.HanderTitle = "外雇耙工总人数";
            b3.FieldName   = "PaGong";
            b3.Width       = 120;
            Bands.Add(b3);

            BandInfo b4 = new BandInfo();

            b4.HanderTitle = "外雇普通工人总人数";
            b4.FieldName   = "Worker";
            b4.Width       = 120;
            Bands.Add(b4);


            BandInfo b5 = new BandInfo();

            b5.HanderTitle = "外雇工头总人数";
            b5.FieldName   = "GongTou";
            b5.Width       = 120;
            Bands.Add(b5);


            return(Bands);
        }
예제 #20
0
        private void ComputeBandMinMax(RasterBand band, BandInfo bandInfo)
        {
            if (band == null || bandInfo == null)
            {
                return;
            }

            double min, max;

            if (band.ComputeMinMax(false, out min, out max))
            {
                bandInfo.Min.DoubleValue = min;
                bandInfo.Max.DoubleValue = max;
            }
        }
예제 #21
0
        public async Task NewAsync(BandInfo info)
        {
            await this.StateManager.SetStateAsync <CountyRecord>("CountyInfo", info.CountyInfo);

            await this.StateManager.SetStateAsync <Guid>("DoctorId", info.DoctorId);

            await this.StateManager.SetStateAsync <HealthIndex>("HealthIndex", info.HealthIndex);

            await this.StateManager.SetStateAsync <string>("PatientName", info.PersonName);

            await this.StateManager.SetStateAsync <List <HeartRateRecord> >("HeartRateRecords", new List <HeartRateRecord>());

            await this.RegisterReminders();

            ActorEventSource.Current.ActorMessage(this, "Band created. ID: {0}, Name: {1}, Doctor ID: {2}", this.Id, info.PersonName, info.DoctorId);
        }
예제 #22
0
파일: ToolBarTray.cs 프로젝트: ash2005/z
        // Create new band and add all toolbars with the same Band and toolbar with index startIndex
        private BandInfo CreateBand(int startIndex)
        {
            Collection <ToolBar> toolbarCollection = ToolBars;
            BandInfo             bandInfo          = new BandInfo();
            ToolBar toolBar = toolbarCollection[startIndex];

            bandInfo.Band.Add(toolBar);
            int bandNumber = toolBar.Band;

            for (int i = startIndex + 1; i < toolbarCollection.Count; i++)
            {
                toolBar = toolbarCollection[i];
                if (bandNumber == toolBar.Band)
                {
                    InsertToolBar(toolBar, bandInfo.Band);
                }
            }
            return(bandInfo);
        }
예제 #23
0
        public List <BandInfo> GetBandInfoList(bool needCompany)
        {
            List <BandInfo> list = BandInfoDao.GetAllBandInfo(0);

            if (list == null)
            {
                list = new List <BandInfo>();
            }

            if (needCompany)
            {
                BandInfo bInfo = new BandInfo();
                bInfo.BandId   = 0;
                bInfo.BandName = "¹«Ë¾";
                list.Add(bInfo);
            }

            return(list);
        }
예제 #24
0
        public async Task NewAsync(BandInfo info)
        {
            ConditionalValue <BandActorState> BandActorStateResult = await this.StateManager.TryGetStateAsync <BandActorState>("BandActorState");

            if (!BandActorStateResult.HasValue)
            {
                BandActorState state = new BandActorState();
                state.CountyInfo  = info.CountyInfo;
                state.DoctorId    = info.DoctorId;
                state.HealthIndex = info.HealthIndex;
                state.PatientName = info.PersonName;

                await this.StateManager.SetStateAsync <BandActorState>("BandActorState", state);

                await this.RegisterReminders();

                ActorEventSource.Current.ActorMessage(this, "Band created. ID: {0}, Name: {1}, Doctor ID: {2}", this.Id, state.PatientName, state.DoctorId);
            }
        }
예제 #25
0
        private List <BandInfo> GetRecordBands()
        {
            List <BandInfo> Bands = new List <BandInfo>();
            BandInfo        b0    = new BandInfo();

            b0.HanderTitle = "姓名";
            b0.FieldName   = "F_Name";
            b0.Width       = 60;
            Bands.Add(b0);

            BandInfo b1 = new BandInfo();

            b1.HanderTitle = "手机";
            b1.FieldName   = "F_Mobile";
            b1.Width       = 100;
            Bands.Add(b1);


            return(Bands);
        }
    public static void loadAllData()
    {
        Debug.Log("Loading from " + saveFilePath + fileSep + saveFileName + "...");

        if (File.Exists(saveFilePath + fileSep + saveFileName))
        {
            BinaryFormatter bf   = new BinaryFormatter();
            FileStream      file = File.Open(saveFilePath + fileSep + saveFileName, FileMode.Open);
            SaveData        data = (SaveData)bf.Deserialize(file);
            file.Close();

            band    = data.band;
            setList = data.setList;
            reviews = data.reviews;
        }
        else
        {
            Debug.Log("No file exists of that name.");
        }
    }
예제 #27
0
        public void AddBandInfo(BandInfo item)
        {
            int error = 0;

            do
            {
                try
                {
                    using (var db = _dbFactory.OpenDbConnection())
                    {
                        item.CreateTime = DateTime.Now;

                        db.Insert(item);
                    }
                    break;
                }
                catch (Exception ex1)
                {
                    error++;
                    Thread.Sleep(10000);
                    LogServer.WriteLog(ex1.Message, "DBError");
                }
            } while (error < 4);
        }
예제 #28
0
        private static BandInfo[] parseBandInfoFromIMD(string[] IMDFileLines)
        {
            //parse satellite name
            string satelliteName = "";

            for (int l = 0; l < IMDFileLines.Length; l++)
            {
                if (IMDFileLines[l].Contains("satId"))
                {
                    satelliteName = IMDFileLines[l].Split(new char[] { '"' })[1];
                }
            }

            //parse band calibration data
            List <BandInfo> bandInfos = new System.Collections.Generic.List <BandInfo>();

            for (int l = 0; l < IMDFileLines.Length; l++)
            {
                if (IMDFileLines[l].Contains("BEGIN_GROUP = BAND"))
                {
                    BandInfo info = new BandInfo();

                    info.bandCode = IMDFileLines[l].Substring(IMDFileLines[l].IndexOf("BAND_") + 5);

                    l++;
                    while (IMDFileLines[l].Contains("END_GROUP") == false)
                    {
                        string[] fields = IMDFileLines[l].TrimEnd(';').Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);

                        if (fields[0].Equals("ULLon"))
                        {
                            info.ULLon = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("ULLat"))
                        {
                            info.ULLat = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("URLon"))
                        {
                            info.URLon = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("URLat"))
                        {
                            info.URLat = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("LRLon"))
                        {
                            info.LRLon = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("LRLat"))
                        {
                            info.LRLat = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("LLLon"))
                        {
                            info.LLLon = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("LLLat"))
                        {
                            info.LLLat = double.Parse(fields[2]);
                        }

                        if (fields[0].Equals("absCalFactor"))
                        {
                            info.absCalFactor = double.Parse(fields[2]);
                        }
                        if (fields[0].Equals("effectiveBandwidth"))
                        {
                            info.effectiveBandwidth = double.Parse(fields[2]);
                        }

                        l++;
                    }

                    info.satelliteName = satelliteName;

                    bandInfos.Add(info);
                }
            }

            return(bandInfos.ToArray());
        }
 public static void resetVariables()
 {
     band    = null;
     setList = new string[] { "wtf", "bbq" };
     reviews = new List <float>();
 }
        private static async Task VerifyActors(
            HealthIndexCalculator hic, ActorId bandActorId, string doctorName, CountyRecord randomCountyRecord, BandInfo bandActorInfo, IDoctorActor docActor,
            IBandActor bandActor)
        {
            while (true)
            {
                BandDataViewModel view = await bandActor.GetBandDataAsync();

                if (view.PersonName == bandActorInfo.PersonName)
                {
                    if (view.CountyInfo == bandActorInfo.CountyInfo)
                    {
                        if (view.DoctorId == bandActorInfo.DoctorId)
                        {
                            if (view.PersonId == bandActorId.GetGuidId())
                            {
                                if (hic.ComputeIndex(bandActorInfo.HealthIndex) == view.HealthIndex)
                                {
                                    break;
                                }
                                else
                                {
                                    await bandActor.NewAsync(bandActorInfo);

                                    await Task.Delay(100);
                                }
                            }
                        }
                    }
                }
            }

            while (true)
            {
                Tuple <CountyRecord, string> info = await docActor.GetInfoAndNameAsync();

                if (info.Item2 == String.Format("Dr. {0}", doctorName) &&
                    info.Item1 == randomCountyRecord)
                {
                    break;
                }
                else
                {
                    await docActor.NewAsync(doctorName, randomCountyRecord);

                    await Task.Delay(100);
                }
            }
        }