Exemplo n.º 1
0
        internal void EnterShareSkill()
        {
            Commondriver.Excellib.PopulateInCollection(Base.Excelpath, "Shareskills");
            Title.SendKeys(Commondriver.Excellib.ReadData(2, "Title"));
            Description.SendKeys(Commondriver.Excellib.ReadData(2, "Description"));
            Commondriver.Wait(10);
            SelectElement catobj = new SelectElement(Category);

            catobj.SelectByText(Commondriver.Excellib.ReadData(2, "Category"));
            Commondriver.Wait(10);
            SelectElement Subcatobj = new SelectElement(Subcategory);

            Subcatobj.SelectByText(Commondriver.Excellib.ReadData(2, "Subcategory"));
            Tagname.SendKeys(Commondriver.Excellib.ReadData(2, "Tagname"));
            Tagname.SendKeys(Keys.Return);
            Servicetype.Click();
            Locationtype.Click();
            Startdate.SendKeys(Commondriver.Excellib.ReadData(2, "Start date"));
            Enddate.SendKeys(Commondriver.Excellib.ReadData(2, "End date"));
            Availabledays.Click();
            Starttime.SendKeys(Commondriver.Excellib.ReadData(2, "Starttime"));
            Endtime.SendKeys(Commondriver.Excellib.ReadData(2, "End time"));
            Skilltrade.Click();
            Credit.SendKeys(Commondriver.Excellib.ReadData(2, "Credit"));
            System.Threading.Thread.Sleep(3000);
            AutoItX3 autoit = new AutoItX3();

            autoit.WinActivate("Open");
            autoit.Send(@"D:\\Mars\\MarsPageF\\file.txt");
            System.Threading.Thread.Sleep(3000);
            autoit.Send("{ENTER}");
            Active.Click();
            Save.Click();
        }
Exemplo n.º 2
0
        private void GetFromTxt(string filepath)
        {
            var file = File.ReadAllLines(filepath);
            var time = file[0];

            Company = file[1].Normalize(NormalizationForm.FormKC);
            Title   = file[2];

            var timesprit  = time.Split(' ');
            var day        = Regex.Replace(timesprit[0], @"\([月|火|水|木|金|土|日]\)", "");
            var time_sprit = timesprit[1].Split('~');

            Starttime = DateTime.Parse(day + " " + time_sprit[0]);
            Endtime   = DateTime.Parse(day + " " + time_sprit[1]);

            if (Endtime.CompareTo(Starttime) == -1)
            {
                Endtime = Endtime.AddDays(1);
            }

            Length = Endtime - Starttime;

            Series = Regex.Replace(Title, flag + "|" + subtitleflag + "|" + tvIndex, "");
            if (Series.Split(' ').Length > 1)
            {
                Series = Series.Split(' ')[0];
            }
            var matche = Regex.Matches(Title, subtitleflag);

            foreach (Match ma in matche)
            {
                SeriesInfo.Add(ma.Value);
            }
            var i = 4;

            while (file[i] != "")
            {
                Subtitle += "\n" + file[i];
                i++;
            }
            var genreIndexCount = Array.IndexOf(file, "ジャンル : ") + 1;

            while (file[genreIndexCount] != "")
            {
                GenreIndex.Add(GenreIndexRet(file[genreIndexCount]));
                Genre.Add(file[genreIndexCount].Split(' ')[0]);
                genreIndexCount++;
            }
            if (Regex.IsMatch(Title, tvIndex))
            {
                var tvidex_mat = Regex.Match(Title, tvIndex);
                Epinum = int.Parse(tvidex_mat.Groups["index"].Value.Normalize(NormalizationForm.FormKC));
            }
            else
            {
                Epinum = 0;
            }
        }
Exemplo n.º 3
0
 void clear()
 {
     TextBoxName.Clear();
     TextBoxDes.Clear();
     venue.Clear();
     organize.Clear();
     satrt.ResetText();
     strtime.ResetText();
     Endt.ResetText();
     Endtime.ResetText();
 }
Exemplo n.º 4
0
        public void ShareSkillPageRemaining()
        {
            var Startdatedata = ExcelLibHelper.ReadData(rownum, "StartDate");

            StartDate.SendKeys(Startdatedata);
            var Enddatedata = ExcelLibHelper.ReadData(rownum, "EndDate");

            EndDate.SendKeys(Enddatedata);
            Sunday.Click();
            Monday.Click();
            var Starttimedata = ExcelLibHelper.ReadData(rownum, "StartTime");

            Starttime.SendKeys(Startdatedata);
            var Endtimedata = ExcelLibHelper.ReadData(rownum, "EndTime");

            Endtime.SendKeys(Enddatedata);
        }
Exemplo n.º 5
0
 public void MergeFrom(Trip other)
 {
     if (other == null)
     {
         return;
     }
     if (other.UserId != 0)
     {
         UserId = other.UserId;
     }
     startLocationFormated_.Add(other.startLocationFormated_);
     endLocationFormated_.Add(other.endLocationFormated_);
     if (other.Distance != 0D)
     {
         Distance = other.Distance;
     }
     if (other.starttime_ != null)
     {
         if (starttime_ == null)
         {
             Starttime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         Starttime.MergeFrom(other.Starttime);
     }
     if (other.endtime_ != null)
     {
         if (endtime_ == null)
         {
             Endtime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         Endtime.MergeFrom(other.Endtime);
     }
     if (other.BreakCount != 0)
     {
         BreakCount = other.BreakCount;
     }
     if (other.AvgBreak != 0D)
     {
         AvgBreak = other.AvgBreak;
     }
     if (other.AvgSpeed != 0D)
     {
         AvgSpeed = other.AvgSpeed;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemplo n.º 6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            hash ^= startLocationFormated_.GetHashCode();
            hash ^= endLocationFormated_.GetHashCode();
            if (Distance != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Distance);
            }
            if (starttime_ != null)
            {
                hash ^= Starttime.GetHashCode();
            }
            if (endtime_ != null)
            {
                hash ^= Endtime.GetHashCode();
            }
            if (BreakCount != 0)
            {
                hash ^= BreakCount.GetHashCode();
            }
            if (AvgBreak != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(AvgBreak);
            }
            if (AvgSpeed != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(AvgSpeed);
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemplo n.º 7
0
        private void CreationChart()
        {
            MemberChart.Clear();
            IGoodsOrder goodsOrder = new GoodsOrder(GlobalConfig.DB.FromType.Read);
            IList <KeyValuePair <int, double> > memberShopingChartList = goodsOrder.GetOrderAmountRecord(ProvinceId, CityId, StartTime, Endtime, PayMode, OrderState, 1, ShowMode, GlobalConfig.KeepYear, SaleFilialeId, SalePlatformId);

            if (memberShopingChartList.Count > 0)
            {
                var count = memberShopingChartList.Aggregate(0, (current, t) => current + t.Key);
                MemberChart.DataSource = memberShopingChartList;
                MemberChart.ChartTitle.TextBlock.Text = StartTime.ToShortDateString() + "到" + Endtime.ToShortDateString() + "订单总数为" + count + ",详细如下:";
                MemberChart.DataBind();
            }
            else
            {
                MemberChart.ChartTitle.TextBlock.Text = "无发生数据";
            }
        }