コード例 #1
0
 public void BasicTest()
 {
     System.Collections.Generic.List<string> TestObject = new System.Collections.Generic.List<string>();
     TestObject.AddRange(new string[] { "this", "is", "a", "test" });
     ListMapping<int, string> Results = TestObject.Permute();
     Assert.Equal(24, Results.Keys.Count);
     foreach (int Key in Results.Keys)
         foreach (string Item in Results[Key])
             Assert.True(Item == "this" || Item == "is" || Item == "a" || Item == "test");
 }
コード例 #2
0
 public void Fill(long house_id)
 {
     this.m_houseId = house_id;
     System.Collections.Generic.List<FasetItem> list = new System.Collections.Generic.List<FasetItem> {
         FasetItem.Null
     };
     list.AddRange(Mappers.FasetItemMapper.FindBySetNameFaset(this.GetSetNameFaset()));
     this.bsFasetItems.set_DataSource(list);
     this.selectedType.set_DataSource(list);
     this.selectedType.set_DisplayMember("Name");
     this.selectedType.set_ValueMember("Id");
     this.dt = Mappers.HouseMapper.GetPropertyByHouse(house_id);
     this.bsHousePropertys.set_DataSource(this.dt);
 }
コード例 #3
0
ファイル: AdminSessionsView.cs プロジェクト: u4097/SQLScript
 public void Fill()
 {
     System.Collections.Generic.List<string> list = new System.Collections.Generic.List<string> { "" };
     list.AddRange(Session.GetIpAddresses());
     System.Collections.Generic.List<string> list2 = new System.Collections.Generic.List<string> { "" };
     list2.AddRange(Session.GetUsernames());
     System.Collections.Generic.List<string> list3 = new System.Collections.Generic.List<string> { "" };
     list3.AddRange(Session.GetHostnames());
     System.Collections.Generic.List<string> list4 = new System.Collections.Generic.List<string> { "" };
     list4.AddRange(Session.GetArmNames());
     this.cbIpAddress.set_DataSource(list);
     this.cbUsername.set_DataSource(list2);
     this.cbHostname.set_DataSource(list3);
     this.cbArmName.set_DataSource(list4);
 }
コード例 #4
0
ファイル: Crawls.cs プロジェクト: jaynav/MyWebCrawler
    public void CrawlNow(string p)
    {
        try
        {

        WebClient easyclient = new WebClient();
        easyclient.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36");
        easyclient.Headers.Add("accept-Encoding", "deflate");
        string theHtml = easyclient.DownloadString(p);

        WebHeaderCollection GetHeaders = easyclient.ResponseHeaders;
        for (int i = 0; i < GetHeaders.Count; i++)
        {
            if (GetHeaders.GetKey(i).Contains("Last-Modified"))
            {
                internalDict.Add(p, GetHeaders.Get(i));
            }

        }

        ///creates an instance of the scraper;creates a generic list  class;
        ///then adds to the list the links it finds on the url requested
        /// then it adds url to queue
        FindsLinksViaRegex linkfinder = new FindsLinksViaRegex();
        List<LinkItem> linkitm = new System.Collections.Generic.List<LinkItem>();

        linkitm.AddRange(linkfinder.Find(theHtml));

            foreach (LinkItem info in linkitm)
            {
                if (info.Href != null)
                {
                   qOfURls.Enqueue(info.Href);
                }
            }
        }
        catch( System.Net.WebException)
            {
            // do something
            }
        catch (Exception)
        {
             //catch other errors
        }
    }
コード例 #5
0
ファイル: Geometry.cs プロジェクト: padzikm/ComputerGraphics
 // sortowanie katowe punktow z tablicy p w kierunku przeciwnym do ruchu wskazowek zegara wzgledem punktu centralnego c
 // czyli sortowanie wzgledem roznacych katow odcinka (c,p[i]) z osia x
 // przy pomocy parametru ifAngleEqual można doprwcyzować kryterium sortowania gdy katy sa rowne
 // (domyslnie nic nie doprecyzowujemy, pozostawiamy rowne)
 public static Point[] AngleSort(Point c, Point[] p, System.Comparison<Point> ifAngleEqual = null)
 {
     if (ifAngleEqual == null) ifAngleEqual = (p1, p2) => 0;
     if (p == null) throw new System.ArgumentNullException();
     if (p.Length < 2) return p;
     System.Comparison<Point> cmp = delegate(Point p1, Point p2)
         {
             int r = -(new Geometry.Segment(c, p1)).Direction(p2);
             return r != 0 ? r : ifAngleEqual(p1, p2);
         };
     var s1 = new System.Collections.Generic.List<Point>();
     var s2 = new System.Collections.Generic.List<Point>();
     for (int i = 0; i < p.Length; ++i)
         if (p[i].y > c.y || (p[i].y == c.y && p[i].x >= c.x))
             s1.Add(p[i]);
         else
             s2.Add(p[i]);
     s1.Sort(cmp);
     s2.Sort(cmp);
     s1.AddRange(s2);
     return s1.ToArray();
 }
コード例 #6
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
        //临码之质临
        private string[] zhiLinSha()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = daXiaoSha();
            string[] bigNum = { "1", "2", "3", "5", "7" };
            if (zhiLinCbx.Checked == false)
            {
                result.AddRange(allNum);
            }

            if (zhiLinCbx.Checked && linMaShaQuCbx.Checked)//质临杀去
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    for (int j = 0; j < bigNum.Count(); j++)
                    {
                        if (
                            !(
                            ((bigNum.Contains(allNum[i].Substring(0, 1)) && bigNum.Contains(allNum[i].Substring(1, 1))) && (Convert.ToInt32(allNum[i].Substring(0, 1)) - Convert.ToInt32(allNum[i].Substring(1, 1)) == 1))
                            ||
                            ((bigNum.Contains(allNum[i].Substring(0, 1)) && bigNum.Contains(allNum[i].Substring(1, 1))) && (Convert.ToInt32(allNum[i].Substring(1, 1)) - Convert.ToInt32(allNum[i].Substring(0, 1)) == 1))
                            ||
                            ((bigNum.Contains(allNum[i].Substring(1, 1)) && bigNum.Contains(allNum[i].Substring(2, 1))) && (Convert.ToInt32(allNum[i].Substring(1, 1)) - Convert.ToInt32(allNum[i].Substring(2, 1)) == 1))
                            ||
                            ((bigNum.Contains(allNum[i].Substring(1, 1)) && bigNum.Contains(allNum[i].Substring(2, 1))) && (Convert.ToInt32(allNum[i].Substring(2, 1)) - Convert.ToInt32(allNum[i].Substring(1, 1)) == 1))
                            ||
                            ((bigNum.Contains(allNum[i].Substring(0, 1)) && bigNum.Contains(allNum[i].Substring(2, 1))) && (Convert.ToInt32(allNum[i].Substring(0, 1)) - Convert.ToInt32(allNum[i].Substring(2, 1)) == 1))
                            ||
                            ((bigNum.Contains(allNum[i].Substring(0, 1)) && bigNum.Contains(allNum[i].Substring(2, 1))) && (Convert.ToInt32(allNum[i].Substring(2, 1)) - Convert.ToInt32(allNum[i].Substring(0, 1)) == 1))
                            )
                            )
                        {
                            result.Add(allNum[i]);
                        }
                    }
                }
            }
            List<string> result1 = result.Distinct().ToList();//去除重复项
            return result1.ToArray();
        }
コード例 #7
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //跨距
        private string[] kuaJu()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = heZhi();

            if (killKuaDu.Checked == false)
            {
                List<int> nums = new List<int>();
                foreach (Control ctls in this.kuaJuGpb.Controls)
                {
                    bool isNum = isNumber(ctls.Text);
                    if ((ctls as CheckBox).Checked == true && isNum == true)
                    {
                        nums.Add(Convert.ToInt16(ctls.Text));
                    }
                }

                if (nums.Count > 0)
                {
                    for (int i = 0; i < allNum.Count(); i++)
                    {
                        for (int j = 0; j < nums.Count(); j++)
                        {
                            int a = Convert.ToInt32(allNum[i].Substring(0, 1));
                            int b = Convert.ToInt32(allNum[i].Substring(1, 1));
                            int c = Convert.ToInt32(allNum[i].Substring(2, 1));
                            int max = 0;
                            int min = 0;

                            if (a > b)
                            {
                                if (a > c)
                                {
                                    max = a;
                                }
                                else
                                {
                                    max = c;
                                }
                            }
                            else
                            {
                                if (b > c)
                                {
                                    max = b;
                                }
                                else
                                {
                                    max = c;
                                }
                            }

                            if (a < b)
                            {
                                if (a < c)
                                {
                                    min = a;
                                }
                                else
                                {
                                    min = c;
                                }
                            }
                            else
                            {
                                if (b < c)
                                {
                                    min = b;
                                }
                                else
                                {
                                    min = c;
                                }
                            }

                            if (
                                max - min == nums[j]
                            )
                            {
                                result.Add(allNum[i]);
                            }
                        }
                    }
                }
                else
                {
                    result.AddRange(allNum);
                }

                List<string> result1 = result.Distinct().ToList();//去除重复项
                return result1.ToArray();
            }
            else
            {
                List<int> nums = new List<int>();
                result.AddRange(allNum);

                foreach (Control ctls in this.kuaJuGpb.Controls)
                {
                    bool isNum = isNumber(ctls.Text);
                    if ((ctls as CheckBox).Checked == true && isNum == true)
                    {
                        nums.Add(Convert.ToInt16(ctls.Text));
                    }
                }

                if (nums.Count > 0)
                {
                    for (int i = 0; i < allNum.Count(); i++)
                    {
                        for (int j = 0; j < nums.Count(); j++)
                        {
                            int a = Convert.ToInt32(allNum[i].Substring(0, 1));
                            int b = Convert.ToInt32(allNum[i].Substring(1, 1));
                            int c = Convert.ToInt32(allNum[i].Substring(2, 1));
                            int max = 0;
                            int min = 0;

                            if (a > b)
                            {
                                if (a > c)
                                {
                                    max = a;
                                }
                                else
                                {
                                    max = c;
                                }
                            }
                            else
                            {
                                if (b > c)
                                {
                                    max = b;
                                }
                                else
                                {
                                    max = c;
                                }
                            }

                            if (a < b)
                            {
                                if (a < c)
                                {
                                    min = a;
                                }
                                else
                                {
                                    min = c;
                                }
                            }
                            else
                            {
                                if (b < c)
                                {
                                    min = b;
                                }
                                else
                                {
                                    min = c;
                                }
                            }

                            if (
                                max - min == nums[j]
                            )
                            {
                                result.Remove(allNum[i]);
                            }
                        }
                    }
                }

                List<string> result1 = result.Distinct().ToList();//去除重复项
                return result1.ToArray();

            }
        }
コード例 #8
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
        //平面杀码
        private string[] pingMianShaMa()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string shaNum = "";

            foreach (Control ctl in this.groupBox1.Controls) //this可以根据实际情况修改为this.groupBreakFast,this.groupLunch,this.groupDinner
            {
                if (ctl is CheckBox)
                {
                    if ((ctl as CheckBox).Checked == true)
                        shaNum += (ctl as CheckBox).Text;
                }
            }
            string[] allNum = liTiShaMaGe();
            if (shaNum.Equals(""))
            {
                result.AddRange(allNum);
            }
            if (shaNum != "")
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    if (allNum[i].IndexOfAny(shaNum.ToCharArray(0, shaNum.Length)) < 0)
                    {
                        result.Add(allNum[i]);
                    }
                }
            }
            return result.ToArray();
        }
コード例 #9
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //号码属性
        public string[] numberPro()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = longTouFengWei();
            string[] zhiNums = new string[] { "1", "2", "3", "5", "7" };
            string[] danNums = new string[] { "1", "3", "5", "7", "9" };
            string[] xiaoNums = new string[] { "0", "1", "2", "3", "4" };

            int cbkCount = 0;
            foreach (Control ctls in this.numberProGpb.Controls)
            {
                if (ctls is CheckBox)
                    if ((ctls as CheckBox).Checked == true)
                    {
                        cbkCount++;
                        if (ctls.Name.Equals("zs0"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (!zhiNums.Contains(a) && !zhiNums.Contains(b) && !zhiNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("ds0"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (!danNums.Contains(a) && !danNums.Contains(b) && !danNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("xs0"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (!xiaoNums.Contains(a) && !xiaoNums.Contains(b) && !xiaoNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }

                        if (ctls.Name.Equals("zs1"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (zhiNums.Contains(a) && !zhiNums.Contains(b) && !zhiNums.Contains(c))
                                    ||
                                    (!zhiNums.Contains(a) && zhiNums.Contains(b) && !zhiNums.Contains(c))
                                    ||
                                    (!zhiNums.Contains(a) && !zhiNums.Contains(b) && zhiNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("ds1"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (danNums.Contains(a) && !danNums.Contains(b) && !danNums.Contains(c))
                                    ||
                                    (!danNums.Contains(a) && danNums.Contains(b) && !danNums.Contains(c))
                                    ||
                                    (!danNums.Contains(a) && !danNums.Contains(b) && danNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("xs1"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (xiaoNums.Contains(a) && !xiaoNums.Contains(b) && !xiaoNums.Contains(c))
                                    ||
                                    (!xiaoNums.Contains(a) && xiaoNums.Contains(b) && !xiaoNums.Contains(c))
                                    ||
                                    (!xiaoNums.Contains(a) && !xiaoNums.Contains(b) && xiaoNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }

                        if (ctls.Name.Equals("zs2"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (zhiNums.Contains(a) && zhiNums.Contains(b) && !zhiNums.Contains(c))
                                    ||
                                    (!zhiNums.Contains(a) && zhiNums.Contains(b) && zhiNums.Contains(c))
                                    ||
                                    (zhiNums.Contains(a) && !zhiNums.Contains(b) && zhiNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("ds2"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (danNums.Contains(a) && danNums.Contains(b) && !danNums.Contains(c))
                                    ||
                                    (!danNums.Contains(a) && danNums.Contains(b) && danNums.Contains(c))
                                    ||
                                    (danNums.Contains(a) && !danNums.Contains(b) && danNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("xs2"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (xiaoNums.Contains(a) && xiaoNums.Contains(b) && !xiaoNums.Contains(c))
                                    ||
                                    (!xiaoNums.Contains(a) && xiaoNums.Contains(b) && xiaoNums.Contains(c))
                                    ||
                                    (xiaoNums.Contains(a) && !xiaoNums.Contains(b) && xiaoNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }

                        if (ctls.Name.Equals("zs3"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (zhiNums.Contains(a) && zhiNums.Contains(b) && zhiNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("ds3"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (danNums.Contains(a) && danNums.Contains(b) && danNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("xs3"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (xiaoNums.Contains(a) && xiaoNums.Contains(b) && xiaoNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                    }
            }

            if (cbkCount == 0)
            {
                result.AddRange(allNum);
            }

            List<string> result1 = result.Distinct().ToList();//去除重复项
            result1.Sort();
            return result1.ToArray();
        }
コード例 #10
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //边临和
        private string[] bianLinHeCal()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = zuiDaLinMaJuLiCal();
            int countChecked = 0;//计算勾选过数字没
            foreach (Control ctls in this.bianLinHe.Controls)
            {
                if (ctls is CheckBox == false || (ctls as CheckBox).Checked == false)
                {
                    continue;
                }
                countChecked++;

                int _blh = Convert.ToInt32(ctls.Name.Split('_')[1]);//拿到勾选的边临和

                for (int i = 0; i < allNum.Length; i++)
                {
                    int a = Convert.ToInt16(allNum[i].Substring(0, 1));
                    int b = Convert.ToInt16(allNum[i].Substring(1, 1));
                    int c = Convert.ToInt16(allNum[i].Substring(2, 1));

                    //反边球运算 开始
                    int left = a;//得到百位之前空格数
                    int right = 9 - c;//得到个位之后空格数
                    int _fbq=left + right;
                    //反边球运算 结束

                    int leftCenter = 9 - a + b;//得到百位与十位在立体走势图中的空格数
                    int centerRight = 9 - b + c;//得到十位与个位在立体走势图中的空格数
                    if (leftCenter > centerRight && leftCenter + _fbq == _blh)//如果左边大于右边
                    {
                        result.Add(allNum[i]);
                    }

                    if (centerRight > leftCenter && centerRight + _fbq == _blh)//如果右边大于左边
                    {
                        result.Add(allNum[i]);
                    }

                    if (leftCenter == centerRight && centerRight + _fbq == _blh)//如果两个跨距相等
                    {
                        result.Add(allNum[i]);
                    }

                }
            }
            if (countChecked == 0)
            {
                result.AddRange(allNum);
            }

            return result.ToArray();
        }
コード例 #11
0
ファイル: AsCashStore.cs プロジェクト: ftcaicai/ArkClient
	public void RequestProductInfoToPurchaseServer( body2_SC_CHARGE_ITEMLIST[] _chargeItems)
	{
		dicChargeItemInfo.Clear();
		
		List<string> listItemName = new System.Collections.Generic.List<string>();
		
		dicChargeItemInfo = ConvertChargeItemListToDictionary( _chargeItems);
		
		listItemName.AddRange( dicChargeItemInfo.Keys);

		if( purchaseManager != null)
		{
			purchaseManager.RequestProductInfos( listItemName.ToArray());
		}
		else
		{
			#region -test-
#if UNITY_EDITOR
			List<Store_Item_Info_Table> testList = new List<Store_Item_Info_Table>();
			int count = 0;

			foreach (body2_SC_CHARGE_ITEMLIST item in _chargeItems)
				Debug.LogWarning(item.ToString());

			foreach( string id in listItemName)
				testList.Add( new Store_Item_Info_Table( Store_Item_Type.ChargeItem, count++, id, 1));

			ProcessAfterReceiveProductInfo();

			nowState = StoreState.NOTOUCH;
#endif
			#endregion
		}
	}
コード例 #12
0
ファイル: Assets.cs プロジェクト: jinpan/Traders_IAP
 public System.Windows.Forms.DialogResult ShowAssetUsageDialog(string title, string caption, TickerWeight[] inputweights, TickerWeight[] outputweights, out TickerWeight[] userinputweights)
 {
     decimal minfraction = System.Math.Max(System.Math.Min((
         from x in inputweights
         select (decimal)Game.State.PortfolioTable.Rows.Find(x.Ticker)["Position"] / x.Weight).Min(), 1m), 0m);
     System.Windows.Forms.NumericUpDown[] udcontrols = inputweights.Select(delegate(TickerWeight x)
     {
         System.Windows.Forms.NumericUpDown numericUpDown = new System.Windows.Forms.NumericUpDown();
         numericUpDown.Maximum = x.Weight;
         numericUpDown.Value = x.Weight * minfraction;
         numericUpDown.Increment = x.Weight / MathHelper.GreatestCommonFactor(MathHelper.GreatestCommonFactor((
             from y in inputweights
             select y.Weight).ToArray<decimal>()), MathHelper.GreatestCommonFactor((
             from y in outputweights
             select y.Weight).ToArray<decimal>()));
         return numericUpDown;
     }).ToArray<System.Windows.Forms.NumericUpDown>();
     System.Windows.Forms.Control[] second = new System.Windows.Forms.Control[]
     {
         new System.Windows.Forms.PictureBox
         {
             SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize,
             Image = Resources.arrow_down,
             Anchor = System.Windows.Forms.AnchorStyles.None
         }
     };
     System.Windows.Forms.TextBox[] tbcontrols = (
         from x in outputweights
         select new System.Windows.Forms.TextBox
         {
             Text = System.Math.Round(x.Weight * minfraction).ToString("0"),
             ReadOnly = true
         }).ToArray<System.Windows.Forms.TextBox>();
     decimal[] weights = (
         from x in inputweights
         select x.Weight).Concat(
         from x in outputweights
         select x.Weight).ToArray<decimal>();
     for (int j = 0; j < udcontrols.Length; j++)
     {
         udcontrols[j].TextChanged += delegate(object sender, System.EventArgs e)
         {
             if (!((System.Windows.Forms.NumericUpDown)sender).Focused)
             {
                 return;
             }
             for (int j = 0; j < weights.Length; j++)
             {
                 if (j < udcontrols.Length)
                 {
                     udcontrols[j].Value = System.Convert.ToInt64(weights[j]) * System.Convert.ToInt64(((System.Windows.Forms.NumericUpDown)sender).Value) / System.Convert.ToInt64(((System.Windows.Forms.NumericUpDown)sender).Maximum);
                 }
                 else
                 {
                     tbcontrols[j - udcontrols.Length].Text = (System.Convert.ToInt64(weights[j]) * System.Convert.ToInt64(((System.Windows.Forms.NumericUpDown)sender).Value) / System.Convert.ToInt64(((System.Windows.Forms.NumericUpDown)sender).Maximum)).ToString("0");
                 }
             }
         };
     }
     System.Collections.Generic.List<string> list = new System.Collections.Generic.List<string>();
     list.AddRange(
         from x in inputweights
         select x.Ticker);
     list.Add(null);
     list.AddRange(
         from x in outputweights
         select x.Ticker);
     PromptDialog f = new PromptDialog(title, caption, udcontrols.Cast<System.Windows.Forms.Control>().Concat(second).Concat(tbcontrols).ToArray<System.Windows.Forms.Control>(), list.ToArray());
     System.Windows.Forms.DialogResult dialogResult = f.ShowDialog();
     if (dialogResult == System.Windows.Forms.DialogResult.OK)
     {
         userinputweights = inputweights.Select((TickerWeight x, int i) => new TickerWeight
         {
             Ticker = x.Ticker,
             Weight = f.GetValue<decimal>(i)
         }).ToArray<TickerWeight>();
     }
     else
     {
         userinputweights = null;
     }
     return dialogResult;
 }
コード例 #13
0
ファイル: List.cs プロジェクト: sasiit23/smah1
 public void AddRange(IEnumerable <T> collection)
 {
     list.AddRange(collection); OnCountChanged();
 }
コード例 #14
0
ファイル: efl_ui_radio.eo.cs プロジェクト: gbalykov/TizenFX
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_ui_radio_state_value_get_static_delegate == null)
                    {
                        efl_ui_radio_state_value_get_static_delegate = new efl_ui_radio_state_value_get_delegate(state_value_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetStateValue") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_radio_state_value_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_radio_state_value_get_static_delegate)
                        });
                    }

                    if (efl_ui_radio_state_value_set_static_delegate == null)
                    {
                        efl_ui_radio_state_value_set_static_delegate = new efl_ui_radio_state_value_set_delegate(state_value_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetStateValue") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_radio_state_value_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_radio_state_value_set_static_delegate)
                        });
                    }

                    if (efl_ui_radio_value_pointer_set_static_delegate == null)
                    {
                        efl_ui_radio_value_pointer_set_static_delegate = new efl_ui_radio_value_pointer_set_delegate(value_pointer_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetValuePointer") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_radio_value_pointer_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_radio_value_pointer_set_static_delegate)
                        });
                    }

                    if (efl_ui_radio_selected_object_get_static_delegate == null)
                    {
                        efl_ui_radio_selected_object_get_static_delegate = new efl_ui_radio_selected_object_get_delegate(selected_object_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSelectedObject") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_radio_selected_object_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_radio_selected_object_get_static_delegate)
                        });
                    }

                    if (efl_ui_radio_group_value_get_static_delegate == null)
                    {
                        efl_ui_radio_group_value_get_static_delegate = new efl_ui_radio_group_value_get_delegate(group_value_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetGroupValue") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_radio_group_value_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_radio_group_value_get_static_delegate)
                        });
                    }

                    if (efl_ui_radio_group_value_set_static_delegate == null)
                    {
                        efl_ui_radio_group_value_set_static_delegate = new efl_ui_radio_group_value_set_delegate(group_value_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetGroupValue") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_radio_group_value_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_radio_group_value_set_static_delegate)
                        });
                    }

                    if (efl_ui_radio_group_add_static_delegate == null)
                    {
                        efl_ui_radio_group_add_static_delegate = new efl_ui_radio_group_add_delegate(group_add);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "AddGroup") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_radio_group_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_radio_group_add_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #15
0
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_gesture_manager_config_get_static_delegate == null)
                    {
                        efl_gesture_manager_config_get_static_delegate = new efl_gesture_manager_config_get_delegate(config_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetConfig") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_manager_config_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_manager_config_get_static_delegate)
                        });
                    }

                    if (efl_gesture_manager_config_set_static_delegate == null)
                    {
                        efl_gesture_manager_config_set_static_delegate = new efl_gesture_manager_config_set_delegate(config_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetConfig") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_manager_config_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_manager_config_set_static_delegate)
                        });
                    }

                    if (efl_gesture_manager_recognizer_register_static_delegate == null)
                    {
                        efl_gesture_manager_recognizer_register_static_delegate = new efl_gesture_manager_recognizer_register_delegate(recognizer_register);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "RecognizerRegister") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_manager_recognizer_register"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_manager_recognizer_register_static_delegate)
                        });
                    }

                    if (efl_gesture_manager_recognizer_unregister_static_delegate == null)
                    {
                        efl_gesture_manager_recognizer_unregister_static_delegate = new efl_gesture_manager_recognizer_unregister_delegate(recognizer_unregister);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "RecognizerUnregister") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_manager_recognizer_unregister"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_manager_recognizer_unregister_static_delegate)
                        });
                    }

                    if (efl_gesture_manager_recognizer_get_static_delegate == null)
                    {
                        efl_gesture_manager_recognizer_get_static_delegate = new efl_gesture_manager_recognizer_get_delegate(recognizer_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetRecognizer") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gesture_manager_recognizer_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gesture_manager_recognizer_get_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #16
0
ファイル: efl_observable.eo.cs プロジェクト: yl33/TizenFX
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
            var methods = Efl.Eo.Globals.GetUserMethods(type);

            if (efl_observable_observer_add_static_delegate == null)
            {
                efl_observable_observer_add_static_delegate = new efl_observable_observer_add_delegate(observer_add);
            }
            if (methods.FirstOrDefault(m => m.Name == "AddObserver") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_observable_observer_add"), func = Marshal.GetFunctionPointerForDelegate(efl_observable_observer_add_static_delegate)
                });
            }
            if (efl_observable_observer_del_static_delegate == null)
            {
                efl_observable_observer_del_static_delegate = new efl_observable_observer_del_delegate(observer_del);
            }
            if (methods.FirstOrDefault(m => m.Name == "DelObserver") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_observable_observer_del"), func = Marshal.GetFunctionPointerForDelegate(efl_observable_observer_del_static_delegate)
                });
            }
            if (efl_observable_observer_clean_static_delegate == null)
            {
                efl_observable_observer_clean_static_delegate = new efl_observable_observer_clean_delegate(observer_clean);
            }
            if (methods.FirstOrDefault(m => m.Name == "ObserverClean") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_observable_observer_clean"), func = Marshal.GetFunctionPointerForDelegate(efl_observable_observer_clean_static_delegate)
                });
            }
            if (efl_observable_observers_iterator_new_static_delegate == null)
            {
                efl_observable_observers_iterator_new_static_delegate = new efl_observable_observers_iterator_new_delegate(observers_iterator_new);
            }
            if (methods.FirstOrDefault(m => m.Name == "NewObserversIterator") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_observable_observers_iterator_new"), func = Marshal.GetFunctionPointerForDelegate(efl_observable_observers_iterator_new_static_delegate)
                });
            }
            if (efl_observable_observers_update_static_delegate == null)
            {
                efl_observable_observers_update_static_delegate = new efl_observable_observers_update_delegate(observers_update);
            }
            if (methods.FirstOrDefault(m => m.Name == "UpdateObservers") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_observable_observers_update"), func = Marshal.GetFunctionPointerForDelegate(efl_observable_observers_update_static_delegate)
                });
            }
            if (efl_observable_iterator_tuple_new_static_delegate == null)
            {
                efl_observable_iterator_tuple_new_static_delegate = new efl_observable_iterator_tuple_new_delegate(iterator_tuple_new);
            }
            if (methods.FirstOrDefault(m => m.Name == "NewIteratorTuple") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_observable_iterator_tuple_new"), func = Marshal.GetFunctionPointerForDelegate(efl_observable_iterator_tuple_new_static_delegate)
                });
            }
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #17
0
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
            var methods = Efl.Eo.Globals.GetUserMethods(type);

            if (efl_loop_timer_interval_get_static_delegate == null)
            {
                efl_loop_timer_interval_get_static_delegate = new efl_loop_timer_interval_get_delegate(timer_interval_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetTimerInterval") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_timer_interval_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_timer_interval_get_static_delegate)
                });
            }
            if (efl_loop_timer_interval_set_static_delegate == null)
            {
                efl_loop_timer_interval_set_static_delegate = new efl_loop_timer_interval_set_delegate(timer_interval_set);
            }
            if (methods.FirstOrDefault(m => m.Name == "SetTimerInterval") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_timer_interval_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_timer_interval_set_static_delegate)
                });
            }
            if (efl_loop_timer_time_pending_get_static_delegate == null)
            {
                efl_loop_timer_time_pending_get_static_delegate = new efl_loop_timer_time_pending_get_delegate(time_pending_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetTimePending") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_timer_time_pending_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_timer_time_pending_get_static_delegate)
                });
            }
            if (efl_loop_timer_reset_static_delegate == null)
            {
                efl_loop_timer_reset_static_delegate = new efl_loop_timer_reset_delegate(timer_reset);
            }
            if (methods.FirstOrDefault(m => m.Name == "ResetTimer") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_timer_reset"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_timer_reset_static_delegate)
                });
            }
            if (efl_loop_timer_loop_reset_static_delegate == null)
            {
                efl_loop_timer_loop_reset_static_delegate = new efl_loop_timer_loop_reset_delegate(timer_loop_reset);
            }
            if (methods.FirstOrDefault(m => m.Name == "ResetTimerLoop") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_timer_loop_reset"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_timer_loop_reset_static_delegate)
                });
            }
            if (efl_loop_timer_delay_static_delegate == null)
            {
                efl_loop_timer_delay_static_delegate = new efl_loop_timer_delay_delegate(timer_delay);
            }
            if (methods.FirstOrDefault(m => m.Name == "TimerDelay") != null)
            {
                descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_timer_delay"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_timer_delay_static_delegate)
                });
            }
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #18
0
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_ui_panes_split_ratio_get_static_delegate == null)
                    {
                        efl_ui_panes_split_ratio_get_static_delegate = new efl_ui_panes_split_ratio_get_delegate(split_ratio_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSplitRatio") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_panes_split_ratio_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_split_ratio_get_static_delegate)
                        });
                    }

                    if (efl_ui_panes_split_ratio_set_static_delegate == null)
                    {
                        efl_ui_panes_split_ratio_set_static_delegate = new efl_ui_panes_split_ratio_set_delegate(split_ratio_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetSplitRatio") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_panes_split_ratio_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_split_ratio_set_static_delegate)
                        });
                    }

                    if (efl_ui_panes_fixed_get_static_delegate == null)
                    {
                        efl_ui_panes_fixed_get_static_delegate = new efl_ui_panes_fixed_get_delegate(fixed_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetFixed") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_panes_fixed_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_fixed_get_static_delegate)
                        });
                    }

                    if (efl_ui_panes_fixed_set_static_delegate == null)
                    {
                        efl_ui_panes_fixed_set_static_delegate = new efl_ui_panes_fixed_set_delegate(fixed_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetFixed") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_panes_fixed_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_fixed_set_static_delegate)
                        });
                    }

                    if (efl_ui_direction_get_static_delegate == null)
                    {
                        efl_ui_direction_get_static_delegate = new efl_ui_direction_get_delegate(direction_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetDirection") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_direction_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_direction_get_static_delegate)
                        });
                    }

                    if (efl_ui_direction_set_static_delegate == null)
                    {
                        efl_ui_direction_set_static_delegate = new efl_ui_direction_set_delegate(direction_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetDirection") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_direction_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_direction_set_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #19
0
ファイル: Program.cs プロジェクト: mikity-mikity/KingGidra
        static void Main(string[] args)
        {
            int hSeg = 16;
            int vSeg = 8;

            mikity.index    myIndex    = new mikity.index();        //節点番号と座標変数の対応表
            mikity.index    mask       = new mikity.index();        //節点番号と座標変数の対応表
            mikity.shape    myShape    = new mikity.shape();        //座標変数
            mikity.elements Triangles  = new mikity.elements();     //三角形要素
            mikity.elements myElements = new mikity.elements();     //張力要素リスト
            mikity.elements Border     = new mikity.elements();     //境界要素リスト

            //形状定義
            System.Random rand = new System.Random(0);
            for (int i = 0; i < hSeg; i++)
            {
                for (int j = 0; j < vSeg + 1; j++)
                {
                    int num = i + j * (hSeg);
                    myIndex.Add(new int[3] {
                        num * 3, num * 3 + 1, num * 3 + 2
                    });
                    myShape.AddRange(new double[3] {
                        (rand.NextDouble() - 0.5) * 15d, (rand.NextDouble() - 0.5) * 15d, (rand.NextDouble() - 0.5) * 15d
                    });
                }
            }
            double Radius = 10.0;

            for (int i = 0; i < hSeg; i++)
            {
                int num = i + 0 * (hSeg);
                mask.Add(myIndex[num]);
                double theta = System.Math.PI * 2 / hSeg * i;
                myShape[mask.Last()] = new double[3] {
                    Radius *System.Math.Cos(theta), Radius *System.Math.Sin(theta), -2.0
                };
            }
            for (int i = 0; i < hSeg; i++)
            {
                int    num   = i + vSeg * (hSeg);
                double theta = System.Math.PI * 2 / hSeg * i;
                mask.Add(myIndex[num]);
                myShape[mask.Last()] = new double[3] {
                    Radius *System.Math.Cos(theta), Radius *System.Math.Sin(theta), 0.0
                };
            }
            //基準正方形を構成する2つの三角形
            int[,] _t = (matrix_INT)(new int[2, 2] {
                { 0, 1 }, { hSeg, hSeg + 1 }
            });
            Triangles.Add(new int[3] {
                _t[0, 0], _t[0, 1], _t[1, 0]
            });
            Triangles.Add(new int[3] {
                _t[0, 1], _t[1, 1], _t[1, 0]
            });
            int[] tmp = vector.lin(0, 1);
            //作成した基準正方形を並べて行を作成
            for (int i = 1; i < hSeg; i++)
            {
                Triangles.AddRange((elements)Triangles[tmp] + i);
            }
            Triangles[Triangles.Count - 2][1] = 0;
            Triangles[Triangles.Count - 1][0] = 0;
            Triangles[Triangles.Count - 1][1] = hSeg;
            //作成した基準行を並べて膜を作成
            tmp = vector.lin(0, 2 * hSeg - 1);
            for (int i = 1; i < vSeg; i++)
            {
                Triangles.AddRange((elements)Triangles[tmp] + i * (hSeg));
            }
            myElements.AddRange(Triangles);

            //3項法の準備
            mikity.term p = new mikity.term(myShape.Count);          //加速度
            mikity.term q = new mikity.term(myShape.Count);          //速度
            mikity.term x = new mikity.term(myShape);                //位置

            //GUIと可変パラメータの準備
            mikity.visualize.FigureUI figUI = new mikity.visualize.FigureUI();
            //時間の刻み幅
            mikity.visualize.slider s1 = figUI.addSlider(min: 1, step: 2, max: 44, val: 38, text: "dt");
            s1.Converter = val => Math.Pow(10, ((double)val / 10) - 4.8) * 2.0;
            System.Collections.Generic.List <double> dt = new System.Collections.Generic.List <double>();
            //リング間の距離
            mikity.visualize.slider s2 = figUI.addSlider(min: 0, step: 2, max: 4000, val: 800, text: "Ring");
            s2.Converter = val => (val) / 200;
            //描画ウインドウの準備
            mikity.visualize.figure3D myFigure = new mikity.visualize.figure3D();
            myFigure.xtitle = "Tanzbrunnen";
            System.Collections.Generic.List <double> fps   = new System.Collections.Generic.List <double>();
            System.Collections.Generic.List <int>    ticks = new System.Collections.Generic.List <int>();
            ticks.AddRange(new int[101]);
            //3項法のメインループ
            int t = 0;
            mikity.visualize.drawelements.scale(0.5);
            while (figUI.Exit == false)
            {
                if (figUI.Pause == false)
                {
                    t++;

                    ticks.Add(System.Environment.TickCount);
                    ticks.Remove(ticks[0]);
                    fps.Add((double)1000 / (ticks[100] - ticks[0]) * 100);
                    dt.Add(s1.value);
                    double w1 = s2.value;//リング

                    for (int i = 0; i < hSeg; i++)
                    {
                        double theta = System.Math.PI * 2 / hSeg * i;
                        myShape[mask[i]] = new double[3] {
                            Radius *System.Math.Cos(theta), Radius *System.Math.Sin(theta), -w1
                        };
                    }
                    for (int i = 0; i < hSeg; i++)
                    {
                        double theta = System.Math.PI * 2 / hSeg * i;
                        myShape[mask[i + hSeg]] = new double[3] {
                            Radius *System.Math.Cos(theta), Radius *System.Math.Sin(theta), -0.0
                        };
                    }
                    if (figUI.Exit == true)
                    {
                        break;
                    }
                    System.Threading.Tasks.Parallel.ForEach(myElements, (element e) =>
                    {
                        e.Update(myShape, myIndex);
                        e.Stress = e.Metric;
                        e.makeOmega();
                    });
                    vector grad = myElements.Gradient();
                    vector.mask(grad, mask);
                    p.Add(grad);
                    if (vector.norm(p[t]) != 0)
                    {
                        p[t] = (vector)p[t] / vector.norm(p[t]);
                    }
                    q.Add((0.98 * (vector)q[t - 1]) - (vector)p[t] * dt[t - 1]);
                    //x.Add(myShape + (vector)q[t] * dt[t - 1]);
                    x.Add(myShape - (vector)p[t] * dt[t - 1] * 10);
                    myShape = x[t];
                    if (t % 5 == 0)
                    {
                        myFigure.drawlater();
                        myFigure.clf();
                        myFigure.WriteLine("dt=" + dt[t - 1].ToString("0.000e00"));
                        myFigure.WriteLine("FPS=" + fps[t - 1].ToString("0.0"));
                        myFigure.set_shape(myShape, myIndex);
                        mikity.visualize.drawelements.draw_fixedpoints(myFigure, mask, myIndex);
                        mikity.visualize.drawelements.draw_triangles(myFigure, Triangles, myIndex);
                        myFigure.drawnow();
                    }
                }
                if (figUI.expPNG == true)
                {
                    myFigure.exportPNG();
                }
                if (figUI.expEMF == true)
                {
                    myFigure.exportEMF();
                }
                if (figUI.expSeq == true)
                {
                    System.Windows.MessageBoxResult res = System.Windows.MessageBox.Show("Click OK to export sequential BMPs", "Message from mikity", System.Windows.MessageBoxButton.OKCancel, System.Windows.MessageBoxImage.Information);
                    if (res == System.Windows.MessageBoxResult.OK)
                    {
                        mikity.visualize.sequence.init();
                        using (mikity.visualize.figure3D myFigure2 = new mikity.visualize.figure3D())
                        {
                            myFigure2.xtitle = "Tanzbrunnen";
                            for (int i = 1; i <= t; i += 5)
                            {
                                myFigure2.drawlater();
                                myFigure2.clf();
                                myFigure2.WriteLine("dt=" + dt[i - 1].ToString("0.000e00"));
                                myFigure2.WriteLine("FPS=" + fps[i - 1].ToString("0.0"));
                                myFigure2.set_shape(x[i], myIndex);
                                mikity.visualize.drawelements.draw_fixedpoints(myFigure2, mask, myIndex);
                                mikity.visualize.drawelements.draw_triangles(myFigure2, Triangles, myIndex);
                                myFigure2.drawnow();
                                myFigure2.exportBMP((int)i / 5);
                                System.Windows.Forms.Application.DoEvents();
                            }
                        }
                    }
                    System.Windows.MessageBox.Show("Finish!", "Message from mikity", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
                }
                System.Windows.Forms.Application.DoEvents();
            }
        }
コード例 #20
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
        //必杀组合(杀组合)
        private string[] biShaZu()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string zu1 = textBox4.Text;
            string zu2 = textBox5.Text;
            string zu3 = textBox6.Text;
            string[] allNum = biXiaZu();
            if (zu1.Equals("") && zu2.Equals("") && zu3.Equals(""))
            {
                result.AddRange(allNum);
            }
            if (zu1 != "" && zu2.Equals("") && zu3.Equals(""))
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    if ((!(allNum[i].Contains(zu1))) && !(allNum[i].Contains(zu1.Substring(1, 1) + zu1.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(0, 1)))))
                        ))
                    {
                        result.Add(allNum[i]);
                    }
                    //((allNum[i].Substring(0, 1).IndexOf(zu1.Substring(0, 1)) < 0) && (allNum[i].Substring(2, 1).IndexOf(zu1.Substring(1, 1)) < 0))
                }
            }
            if (zu1 != "" && zu2 != "" && zu3.Equals(""))
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    if (((!(allNum[i].Contains(zu1))) && !(allNum[i].Contains(zu1.Substring(1, 1) + zu1.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(0, 1)))))
                        ))

                        &&

                        ((!(allNum[i].Contains(zu2))) && !(allNum[i].Contains(zu2.Substring(1, 1) + zu2.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu2.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu2.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu2.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu2.Substring(0, 1)))))
                        )))
                    {
                        result.Add(allNum[i]);
                    }
                }
            }
            if (zu1 != "" && zu3 != "" && zu2.Equals(""))
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    if (((!(allNum[i].Contains(zu1))) && !(allNum[i].Contains(zu1.Substring(1, 1) + zu1.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(0, 1)))))
                        ))

                        &&

                        ((!(allNum[i].Contains(zu3))) && !(allNum[i].Contains(zu3.Substring(1, 1) + zu3.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu3.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu3.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu3.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu3.Substring(0, 1)))))
                        )))
                    {
                        result.Add(allNum[i]);
                    }
                }
            }
            if (zu1 != "" && zu2 != "" && zu3 != "")
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    if (((!(allNum[i].Contains(zu1))) && !(allNum[i].Contains(zu1.Substring(1, 1) + zu1.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(0, 1)))))
                        ))

                        &&

                        ((!(allNum[i].Contains(zu2))) && !(allNum[i].Contains(zu2.Substring(1, 1) + zu2.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu2.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu2.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu2.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu2.Substring(0, 1)))))
                        ))

                        &&

                        ((!(allNum[i].Contains(zu3))) && !(allNum[i].Contains(zu3.Substring(1, 1) + zu3.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu3.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu3.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu3.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu3.Substring(0, 1)))))
                        )))
                    {
                        result.Add(allNum[i]);
                    }
                }
            }
            return result.ToArray();
        }
コード例 #21
0
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs = new System.Collections.Generic.List <Efl_Op_Description>();

            if (efl_input_hold_get_static_delegate == null)
            {
                efl_input_hold_get_static_delegate = new efl_input_hold_get_delegate(hold_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_hold_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_hold_get_static_delegate)
                });
            if (efl_input_hold_set_static_delegate == null)
            {
                efl_input_hold_set_static_delegate = new efl_input_hold_set_delegate(hold_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_hold_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_hold_set_static_delegate)
                });
            if (efl_duplicate_static_delegate == null)
            {
                efl_duplicate_static_delegate = new efl_duplicate_delegate(duplicate);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_duplicate"), func = Marshal.GetFunctionPointerForDelegate(efl_duplicate_static_delegate)
                });
            if (efl_input_timestamp_get_static_delegate == null)
            {
                efl_input_timestamp_get_static_delegate = new efl_input_timestamp_get_delegate(timestamp_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_timestamp_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_timestamp_get_static_delegate)
                });
            if (efl_input_timestamp_set_static_delegate == null)
            {
                efl_input_timestamp_set_static_delegate = new efl_input_timestamp_set_delegate(timestamp_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_timestamp_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_timestamp_set_static_delegate)
                });
            if (efl_input_device_get_static_delegate == null)
            {
                efl_input_device_get_static_delegate = new efl_input_device_get_delegate(device_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_device_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_get_static_delegate)
                });
            if (efl_input_device_set_static_delegate == null)
            {
                efl_input_device_set_static_delegate = new efl_input_device_set_delegate(device_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_device_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_set_static_delegate)
                });
            if (efl_input_event_flags_get_static_delegate == null)
            {
                efl_input_event_flags_get_static_delegate = new efl_input_event_flags_get_delegate(event_flags_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_event_flags_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_event_flags_get_static_delegate)
                });
            if (efl_input_event_flags_set_static_delegate == null)
            {
                efl_input_event_flags_set_static_delegate = new efl_input_event_flags_set_delegate(event_flags_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_event_flags_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_event_flags_set_static_delegate)
                });
            if (efl_input_processed_get_static_delegate == null)
            {
                efl_input_processed_get_static_delegate = new efl_input_processed_get_delegate(processed_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_processed_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_processed_get_static_delegate)
                });
            if (efl_input_processed_set_static_delegate == null)
            {
                efl_input_processed_set_static_delegate = new efl_input_processed_set_delegate(processed_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_processed_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_processed_set_static_delegate)
                });
            if (efl_input_scrolling_get_static_delegate == null)
            {
                efl_input_scrolling_get_static_delegate = new efl_input_scrolling_get_delegate(scrolling_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_scrolling_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_scrolling_get_static_delegate)
                });
            if (efl_input_scrolling_set_static_delegate == null)
            {
                efl_input_scrolling_set_static_delegate = new efl_input_scrolling_set_delegate(scrolling_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_scrolling_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_scrolling_set_static_delegate)
                });
            if (efl_input_fake_get_static_delegate == null)
            {
                efl_input_fake_get_static_delegate = new efl_input_fake_get_delegate(fake_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_fake_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_fake_get_static_delegate)
                });
            if (efl_input_reset_static_delegate == null)
            {
                efl_input_reset_static_delegate = new efl_input_reset_delegate(reset);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_input_reset"), func = Marshal.GetFunctionPointerForDelegate(efl_input_reset_static_delegate)
                });
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #22
0
ファイル: Program.cs プロジェクト: mikity-mikity/ForceDiagram
        static void Main(string[] args)
        {
            int hSeg = 16;
            int vSeg = 8;
            mikity.index myIndex = new mikity.index();                  //節点番号と座標変数の対応表
            mikity.index mask = new mikity.index();                  //節点番号と座標変数の対応表
            mikity.shape myShape = new mikity.shape();                  //座標変数
            mikity.elements Triangles = new mikity.elements();          //三角形要素
            mikity.elements myElements = new mikity.elements();         //張力要素リスト
            mikity.elements Border = new mikity.elements();         //境界要素リスト

            //形状定義
            System.Random rand = new System.Random(0);
            for (int i = 0; i < hSeg; i++)
            {
                for (int j = 0; j < vSeg + 1; j++)
                {
                    int num = i + j * (hSeg);
                    myIndex.Add(new int[3] { num * 3, num * 3 + 1, num * 3 + 2 });
                    myShape.AddRange(new double[3] { (rand.NextDouble() - 0.5) * 15d, (rand.NextDouble() - 0.5) * 15d, (rand.NextDouble() - 0.5) * 15d });
                }
            }
            double Radius = 10.0;
            for (int i = 0; i < hSeg; i++)
            {
                int num = i + 0 * (hSeg);
                mask.Add(myIndex[num]);
                double theta = System.Math.PI * 2 / hSeg * i;
                myShape[mask.Last()] = new double[3] { Radius*System.Math.Cos(theta), Radius*System.Math.Sin(theta), -2.0 };
            }
            for (int i = 0; i < hSeg; i++)
            {
                int num = i + vSeg * (hSeg);
                double theta = System.Math.PI * 2 / hSeg * i;
                mask.Add(myIndex[num]);
                myShape[mask.Last()] = new double[3] { Radius * System.Math.Cos(theta), Radius * System.Math.Sin(theta), 0.0 };
            }
            //基準正方形を構成する2つの三角形
            int[,] _t = (matrix_INT)(new int[2, 2] { { 0, 1 }, { hSeg, hSeg+1 } });
            Triangles.Add(new int[3] { _t[0, 0], _t[0, 1], _t[1, 0] });
            Triangles.Add(new int[3] { _t[0, 1], _t[1, 1], _t[1, 0] });
            int[] tmp = vector.lin(0, 1);
            //作成した基準正方形を並べて行を作成
            for (int i = 1; i < hSeg; i++)
            {
                Triangles.AddRange((elements)Triangles[tmp] + i);
            }
            Triangles[Triangles.Count-2][1] = 0;
            Triangles[Triangles.Count-1][0] = 0;
            Triangles[Triangles.Count-1][1] = hSeg;
            //作成した基準行を並べて膜を作成
            tmp = vector.lin(0, 2*hSeg-1);
            for (int i = 1; i < vSeg; i++)
            {
                Triangles.AddRange((elements)Triangles[tmp] + i * (hSeg));

            }
            myElements.AddRange(Triangles);

            //3項法の準備
            mikity.term p = new mikity.term(myShape.Count);          //加速度
            mikity.term q = new mikity.term(myShape.Count);          //速度
            mikity.term x = new mikity.term(myShape);                //位置

            //GUIと可変パラメータの準備
            mikity.visualize.FigureUI figUI = new mikity.visualize.FigureUI();
            //時間の刻み幅
            mikity.visualize.slider s1 = figUI.addSlider(min: 1, step: 2, max: 44, val: 38, text: "dt");
            s1.Converter = val => Math.Pow(10, ((double)val / 10) - 4.8) * 2.0;
            System.Collections.Generic.List<double> dt = new System.Collections.Generic.List<double>();
            //リング間の距離
            mikity.visualize.slider s2 = figUI.addSlider(min: 0, step: 2, max: 4000, val: 800, text: "Ring");
            s2.Converter = val => (val)/200;
            //描画ウインドウの準備
            mikity.visualize.figure3D myFigure = new mikity.visualize.figure3D();
            myFigure.xtitle = "Tanzbrunnen";
            System.Collections.Generic.List<double> fps = new System.Collections.Generic.List<double>();
            System.Collections.Generic.List<int> ticks = new System.Collections.Generic.List<int>();
            ticks.AddRange(new int[101]);
            //3項法のメインループ
            int t = 0;
            mikity.visualize.drawelements.scale(0.5);
            while (figUI.Exit == false)
            {
                if (figUI.Pause == false)
                {
                    t++;
                    ticks.Add(System.Environment.TickCount);
                    ticks.Remove(ticks[0]);
                    fps.Add((double)1000 / (ticks[100] - ticks[0]) * 100);
                    dt.Add(s1.value);
                    double w1 = s2.value;//リング
                    for (int i = 0; i < hSeg; i++)
                    {
                        double theta = System.Math.PI * 2 / hSeg * i;
                        myShape[mask[i]] = new double[3] { Radius * System.Math.Cos(theta), Radius * System.Math.Sin(theta), -w1 };
                    }
                    for (int i = 0; i < hSeg; i++)
                    {
                        double theta = System.Math.PI * 2 / hSeg * i;
                        myShape[mask[i + hSeg]] = new double[3] { Radius * System.Math.Cos(theta), Radius * System.Math.Sin(theta), -0.0 };
                    }
                    if (figUI.Exit == true) break;
                    System.Threading.Tasks.Parallel.ForEach(myElements, (element e) =>
                    {
                        e.Update(myShape, myIndex);
                        e.Stress = e.Metric;
                        e.makeOmega();
                    });
                    vector grad = myElements.Gradient();
                    vector.mask(grad, mask);
                    p.Add(grad);
                    if (vector.norm(p[t]) != 0)
                    {
                        p[t] = (vector)p[t] / vector.norm(p[t]);
                    }
                    q.Add((0.98 * (vector)q[t - 1]) - (vector)p[t] * dt[t - 1]);
                    //x.Add(myShape + (vector)q[t] * dt[t - 1]);
                    x.Add(myShape - (vector)p[t] * dt[t - 1]*10);
                    myShape = x[t];
                    if (t % 5 == 0)
                    {
                        myFigure.drawlater();
                        myFigure.clf();
                        myFigure.WriteLine("dt=" + dt[t - 1].ToString("0.000e00"));
                        myFigure.WriteLine("FPS=" + fps[t - 1].ToString("0.0"));
                        myFigure.set_shape(myShape, myIndex);
                        mikity.visualize.drawelements.draw_fixedpoints(myFigure, mask, myIndex);
                        mikity.visualize.drawelements.draw_triangles(myFigure, Triangles, myIndex);
                        myFigure.drawnow();
                    }
                }
                if (figUI.expPNG == true)
                {
                    myFigure.exportPNG();
                }
                if (figUI.expEMF == true)
                {
                    myFigure.exportEMF();
                }
                if (figUI.expSeq == true)
                {
                    System.Windows.MessageBoxResult res = System.Windows.MessageBox.Show("Click OK to export sequential BMPs", "Message from mikity", System.Windows.MessageBoxButton.OKCancel, System.Windows.MessageBoxImage.Information);
                    if (res == System.Windows.MessageBoxResult.OK)
                    {
                        mikity.visualize.sequence.init();
                        using (mikity.visualize.figure3D myFigure2 = new mikity.visualize.figure3D())
                        {
                            myFigure2.xtitle = "Tanzbrunnen";
                            for (int i = 1; i <= t; i += 5)
                            {
                                myFigure2.drawlater();
                                myFigure2.clf();
                                myFigure2.WriteLine("dt=" + dt[i - 1].ToString("0.000e00"));
                                myFigure2.WriteLine("FPS=" + fps[i - 1].ToString("0.0"));
                                myFigure2.set_shape(x[i], myIndex);
                                mikity.visualize.drawelements.draw_fixedpoints(myFigure2, mask, myIndex);
                                mikity.visualize.drawelements.draw_triangles(myFigure2, Triangles, myIndex);
                                myFigure2.drawnow();
                                myFigure2.exportBMP((int)i / 5);
                                System.Windows.Forms.Application.DoEvents();
                            }
                        }
                    }
                    System.Windows.MessageBox.Show("Finish!", "Message from mikity", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
                }
                System.Windows.Forms.Application.DoEvents();
            }


        }
コード例 #23
0
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_canvas_proxy_source_get_static_delegate == null)
                    {
                        efl_canvas_proxy_source_get_static_delegate = new efl_canvas_proxy_source_get_delegate(source_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSource") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_get_static_delegate)
                        });
                    }

                    if (efl_canvas_proxy_source_set_static_delegate == null)
                    {
                        efl_canvas_proxy_source_set_static_delegate = new efl_canvas_proxy_source_set_delegate(source_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetSource") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_set_static_delegate)
                        });
                    }

                    if (efl_canvas_proxy_source_clip_get_static_delegate == null)
                    {
                        efl_canvas_proxy_source_clip_get_static_delegate = new efl_canvas_proxy_source_clip_get_delegate(source_clip_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSourceClip") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_clip_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_clip_get_static_delegate)
                        });
                    }

                    if (efl_canvas_proxy_source_clip_set_static_delegate == null)
                    {
                        efl_canvas_proxy_source_clip_set_static_delegate = new efl_canvas_proxy_source_clip_set_delegate(source_clip_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetSourceClip") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_clip_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_clip_set_static_delegate)
                        });
                    }

                    if (efl_canvas_proxy_source_events_get_static_delegate == null)
                    {
                        efl_canvas_proxy_source_events_get_static_delegate = new efl_canvas_proxy_source_events_get_delegate(source_events_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSourceEvents") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_events_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_events_get_static_delegate)
                        });
                    }

                    if (efl_canvas_proxy_source_events_set_static_delegate == null)
                    {
                        efl_canvas_proxy_source_events_set_static_delegate = new efl_canvas_proxy_source_events_set_delegate(source_events_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetSourceEvents") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_proxy_source_events_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_proxy_source_events_set_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #24
0
ファイル: edituser.ascx.cs プロジェクト: jaytem/minGit
    private void LoadPreferenceList()
    {
        System.Collections.Generic.List<NotificationPreferenceData> groupPrefList;
            NotificationPreferenceCriteria criteria = new NotificationPreferenceCriteria();

            criteria.PagingInfo.RecordsPerPage = 10000;
            criteria.AddFilter(NotificationPreferenceProperty.UserId, CriteriaFilterOperator.EqualTo, uId);
            //Getting the Group Preference list
            groupPrefList = _notificationPreferenceApi.GetDefaultPreferenceList(criteria);
            //Getting the Colleagues preference list
            //need to set source to 0 because we dont want individual group prefs.
            criteria.AddFilter(NotificationPreferenceProperty.ActionSourceId, CriteriaFilterOperator.EqualTo, 0);
            preferenceList = _notificationPreferenceApi.GetList(criteria);
            //Adding the group list to Preferences
            preferenceList.AddRange(groupPrefList);
    }
コード例 #25
0
            /// <summary>Gets the list of Eo operations to override.</summary>
            /// <returns>The list of Eo operations to be overload.</returns>
            public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
            {
                var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                var methods = Efl.Eo.Globals.GetUserMethods(type);

                if (efl_config_profile_get_static_delegate == null)
                {
                    efl_config_profile_get_static_delegate = new efl_config_profile_get_delegate(profile_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetProfile") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_profile_get"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_get_static_delegate)
                    });
                }

                if (efl_config_profile_set_static_delegate == null)
                {
                    efl_config_profile_set_static_delegate = new efl_config_profile_set_delegate(profile_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetProfile") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_profile_set"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_set_static_delegate)
                    });
                }

                if (efl_config_save_static_delegate == null)
                {
                    efl_config_save_static_delegate = new efl_config_save_delegate(save);
                }

                if (methods.FirstOrDefault(m => m.Name == "Save") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_save"), func = Marshal.GetFunctionPointerForDelegate(efl_config_save_static_delegate)
                    });
                }

                if (efl_config_profile_iterate_static_delegate == null)
                {
                    efl_config_profile_iterate_static_delegate = new efl_config_profile_iterate_delegate(profile_iterate);
                }

                if (methods.FirstOrDefault(m => m.Name == "ProfileIterate") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_profile_iterate"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_iterate_static_delegate)
                    });
                }

                if (efl_config_profile_exists_static_delegate == null)
                {
                    efl_config_profile_exists_static_delegate = new efl_config_profile_exists_delegate(profile_exists);
                }

                if (methods.FirstOrDefault(m => m.Name == "ProfileExists") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_profile_exists"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_exists_static_delegate)
                    });
                }

                if (efl_config_profile_dir_get_static_delegate == null)
                {
                    efl_config_profile_dir_get_static_delegate = new efl_config_profile_dir_get_delegate(profile_dir_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetProfileDir") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_profile_dir_get"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_dir_get_static_delegate)
                    });
                }

                if (efl_config_profile_derived_add_static_delegate == null)
                {
                    efl_config_profile_derived_add_static_delegate = new efl_config_profile_derived_add_delegate(profile_derived_add);
                }

                if (methods.FirstOrDefault(m => m.Name == "AddProfileDerived") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_profile_derived_add"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_derived_add_static_delegate)
                    });
                }

                if (efl_config_profile_derived_del_static_delegate == null)
                {
                    efl_config_profile_derived_del_static_delegate = new efl_config_profile_derived_del_delegate(profile_derived_del);
                }

                if (methods.FirstOrDefault(m => m.Name == "DelProfileDerived") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_profile_derived_del"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_derived_del_static_delegate)
                    });
                }

                if (efl_config_get_static_delegate == null)
                {
                    efl_config_get_static_delegate = new efl_config_get_delegate(config_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetConfig") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_get"), func = Marshal.GetFunctionPointerForDelegate(efl_config_get_static_delegate)
                    });
                }

                if (efl_config_set_static_delegate == null)
                {
                    efl_config_set_static_delegate = new efl_config_set_delegate(config_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetConfig") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_config_set"), func = Marshal.GetFunctionPointerForDelegate(efl_config_set_static_delegate)
                    });
                }

                descs.AddRange(base.GetEoOps(type));
                return(descs);
            }
コード例 #26
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //判断龙头凤尾
        private string[] longTouFengWei()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();

            int nums = 0;

            List<string> mm = new List<string>();
            foreach (Control ctls in this.ltfwMustGpb.Controls)
            {
                if ((ctls as CheckBox).Checked == true)
                {
                    mm.Add(ctls.Text);
                }
            }

            if (mm.Contains("包含"))
            {
                foreach (Control ctls in this.touDxGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(touDx());
                    }
                }
                foreach (Control ctls in this.touDsGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(touDs());
                    }
                }
                foreach (Control ctls in this.touZhGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(touZh());
                    }
                }
                foreach (Control ctls in this.weiDxGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(weiDx());
                    }
                }
                foreach (Control ctls in this.weiDsGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(weiDs());
                    }
                }
                foreach (Control ctls in this.weiZhGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(weiZh());
                    }
                }
            }

            if (mm.Contains("杀去"))
            {
                foreach (Control ctls in this.touDxGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(touDx());
                    }
                }
                foreach (Control ctls in this.touDsGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(touDs());
                    }
                }
                foreach (Control ctls in this.touZhGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(touZh());
                    }
                }
                foreach (Control ctls in this.weiDxGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(weiDx());
                    }
                }
                foreach (Control ctls in this.weiDsGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(weiDs());
                    }
                }
                foreach (Control ctls in this.weiZhGpb.Controls)
                {
                    if ((ctls as CheckBox).Checked == true)
                    {
                        nums++;
                        result.AddRange(weiZh());
                    }
                }

                List<string> temp = new List<string>();
                temp.AddRange(chaHe());
                for (int i = 0; i < result.Count(); i++)
                {
                    temp.Remove(result[i]);
                }
                result.Clear();
                result.AddRange(temp);

            }

            if (nums == 0)
            {
                result.AddRange(chaHe());
            }

            List<string> result1 = result.Distinct().ToList();//去除重复项
            return result1.ToArray();
        }
コード例 #27
0
ファイル: efl_config_global.eo.cs プロジェクト: y01k/TizenFX
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs = new System.Collections.Generic.List <Efl_Op_Description>();

            if (efl_config_profile_get_static_delegate == null)
            {
                efl_config_profile_get_static_delegate = new efl_config_profile_get_delegate(profile_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_profile_get"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_get_static_delegate)
            });
            if (efl_config_profile_set_static_delegate == null)
            {
                efl_config_profile_set_static_delegate = new efl_config_profile_set_delegate(profile_set);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_profile_set"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_set_static_delegate)
            });
            if (efl_config_save_static_delegate == null)
            {
                efl_config_save_static_delegate = new efl_config_save_delegate(save);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_save"), func = Marshal.GetFunctionPointerForDelegate(efl_config_save_static_delegate)
            });
            if (efl_config_profile_iterate_static_delegate == null)
            {
                efl_config_profile_iterate_static_delegate = new efl_config_profile_iterate_delegate(profile_iterate);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_profile_iterate"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_iterate_static_delegate)
            });
            if (efl_config_profile_exists_static_delegate == null)
            {
                efl_config_profile_exists_static_delegate = new efl_config_profile_exists_delegate(profile_exists);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_profile_exists"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_exists_static_delegate)
            });
            if (efl_config_profile_dir_get_static_delegate == null)
            {
                efl_config_profile_dir_get_static_delegate = new efl_config_profile_dir_get_delegate(profile_dir_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_profile_dir_get"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_dir_get_static_delegate)
            });
            if (efl_config_profile_derived_add_static_delegate == null)
            {
                efl_config_profile_derived_add_static_delegate = new efl_config_profile_derived_add_delegate(profile_derived_add);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_profile_derived_add"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_derived_add_static_delegate)
            });
            if (efl_config_profile_derived_del_static_delegate == null)
            {
                efl_config_profile_derived_del_static_delegate = new efl_config_profile_derived_del_delegate(profile_derived_del);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_profile_derived_del"), func = Marshal.GetFunctionPointerForDelegate(efl_config_profile_derived_del_static_delegate)
            });
            if (efl_config_get_static_delegate == null)
            {
                efl_config_get_static_delegate = new efl_config_get_delegate(config_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_get"), func = Marshal.GetFunctionPointerForDelegate(efl_config_get_static_delegate)
            });
            if (efl_config_set_static_delegate == null)
            {
                efl_config_set_static_delegate = new efl_config_set_delegate(config_set);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_config_set"), func = Marshal.GetFunctionPointerForDelegate(efl_config_set_static_delegate)
            });
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #28
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //最大邻码跨距
        private string[] zuiDaLinMaJuLiCal()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = quanTaiCal();
            int countChecked = 0;//计算勾选过数字没
            foreach (Control ctls in this.zuiDaLinMaKuaJu.Controls)
            {
                if (ctls is CheckBox == false || (ctls as CheckBox).Checked == false)
                {
                    continue;
                }
                countChecked++;

                int _kuaJu = Convert.ToInt16(ctls.Name.Split('_')[1]);//拿到勾选的最大邻码跨距
                for (int i = 0; i < allNum.Length; i++)
                {
                    int a = Convert.ToInt16(allNum[i].Substring(0, 1));
                    int b = Convert.ToInt16(allNum[i].Substring(1, 1));
                    int c = Convert.ToInt16(allNum[i].Substring(2, 1));

                    int leftCenter = 9 - a + b;//得到百位与十位在立体走势图中的空格数
                    int centerRight = 9 - b + c;//得到十位与个位在立体走势图中的空格数
                    if (leftCenter > centerRight && leftCenter == _kuaJu)//如果左边大于右边
                    {
                        result.Add(allNum[i]);
                    }

                    if (centerRight > leftCenter && centerRight == _kuaJu)//如果右边大于左边
                    {
                        result.Add(allNum[i]);
                    }

                    if (leftCenter == centerRight && centerRight == _kuaJu)//如果两个跨距相等
                    {
                        result.Add(allNum[i]);
                    }

                }
            }
            if (countChecked == 0)
            {
                result.AddRange(allNum);
            }
            return result.ToArray();
        }
コード例 #29
0
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_ui_tab_bar_current_tab_get_static_delegate == null)
                    {
                        efl_ui_tab_bar_current_tab_get_static_delegate = new efl_ui_tab_bar_current_tab_get_delegate(current_tab_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetCurrentTab") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_tab_bar_current_tab_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_bar_current_tab_get_static_delegate)
                        });
                    }

                    if (efl_ui_tab_bar_current_tab_set_static_delegate == null)
                    {
                        efl_ui_tab_bar_current_tab_set_static_delegate = new efl_ui_tab_bar_current_tab_set_delegate(current_tab_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetCurrentTab") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_tab_bar_current_tab_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_bar_current_tab_set_static_delegate)
                        });
                    }

                    if (efl_ui_tab_bar_tab_count_static_delegate == null)
                    {
                        efl_ui_tab_bar_tab_count_static_delegate = new efl_ui_tab_bar_tab_count_delegate(tab_count);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "TabCount") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_tab_bar_tab_count"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_bar_tab_count_static_delegate)
                        });
                    }

                    if (efl_ui_tab_bar_tab_add_static_delegate == null)
                    {
                        efl_ui_tab_bar_tab_add_static_delegate = new efl_ui_tab_bar_tab_add_delegate(tab_add);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "AddTab") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_tab_bar_tab_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_bar_tab_add_static_delegate)
                        });
                    }

                    if (efl_ui_tab_bar_tab_remove_static_delegate == null)
                    {
                        efl_ui_tab_bar_tab_remove_static_delegate = new efl_ui_tab_bar_tab_remove_delegate(tab_remove);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "TabRemove") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_tab_bar_tab_remove"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_bar_tab_remove_static_delegate)
                        });
                    }

                    if (efl_ui_tab_bar_tab_label_set_static_delegate == null)
                    {
                        efl_ui_tab_bar_tab_label_set_static_delegate = new efl_ui_tab_bar_tab_label_set_delegate(tab_label_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetTabLabel") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_tab_bar_tab_label_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_bar_tab_label_set_static_delegate)
                        });
                    }

                    if (efl_ui_tab_bar_tab_icon_set_static_delegate == null)
                    {
                        efl_ui_tab_bar_tab_icon_set_static_delegate = new efl_ui_tab_bar_tab_icon_set_delegate(tab_icon_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetTabIcon") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_tab_bar_tab_icon_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_tab_bar_tab_icon_set_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #30
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //反边球
        private string[] fanBianQiuCal()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = bianLinHeCal();
            int countChecked = 0;//计算勾选过数字没
            foreach (Control ctls in this.fanBianQiu.Controls)
            {
                if (ctls is CheckBox == false || (ctls as CheckBox).Checked == false)
                {
                    continue;
                }
                countChecked++;

                int _fbq = Convert.ToInt16(ctls.Name.Split('_')[1]);//拿到勾选的反边球

                for (int i = 0; i < allNum.Length; i++)
                {
                    int a = Convert.ToInt16(allNum[i].Substring(0, 1));
                    int b = Convert.ToInt16(allNum[i].Substring(1, 1));
                    int c = Convert.ToInt16(allNum[i].Substring(2, 1));

                    int left = a;//得到百位之前空格数
                    int right = 9 - c;//得到个位之后空格数
                    if (left + right == _fbq)
                    {
                        result.Add(allNum[i]);
                    }

                }

            }
            if (countChecked == 0)
            {
                result.AddRange(allNum);
            }

            return result.ToArray();
        }
コード例 #31
0
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_ui_datepicker_min_get_static_delegate == null)
                    {
                        efl_ui_datepicker_min_get_static_delegate = new efl_ui_datepicker_min_get_delegate(min_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetMin") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_datepicker_min_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_datepicker_min_get_static_delegate)
                        });
                    }

                    if (efl_ui_datepicker_min_set_static_delegate == null)
                    {
                        efl_ui_datepicker_min_set_static_delegate = new efl_ui_datepicker_min_set_delegate(min_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetMin") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_datepicker_min_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_datepicker_min_set_static_delegate)
                        });
                    }

                    if (efl_ui_datepicker_max_get_static_delegate == null)
                    {
                        efl_ui_datepicker_max_get_static_delegate = new efl_ui_datepicker_max_get_delegate(max_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetMax") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_datepicker_max_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_datepicker_max_get_static_delegate)
                        });
                    }

                    if (efl_ui_datepicker_max_set_static_delegate == null)
                    {
                        efl_ui_datepicker_max_set_static_delegate = new efl_ui_datepicker_max_set_delegate(max_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetMax") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_datepicker_max_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_datepicker_max_set_static_delegate)
                        });
                    }

                    if (efl_ui_datepicker_date_get_static_delegate == null)
                    {
                        efl_ui_datepicker_date_get_static_delegate = new efl_ui_datepicker_date_get_delegate(date_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetDate") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_datepicker_date_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_datepicker_date_get_static_delegate)
                        });
                    }

                    if (efl_ui_datepicker_date_set_static_delegate == null)
                    {
                        efl_ui_datepicker_date_set_static_delegate = new efl_ui_datepicker_date_set_delegate(date_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetDate") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_datepicker_date_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_datepicker_date_set_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #32
0
 public static System.Collections.Generic.IEnumerable <T> Add <T>(this System.Collections.Generic.IEnumerable <T> source, params T[] toAdd)
 {
     System.Collections.Generic.List <T> list = new System.Collections.Generic.List <T>(source);
     list.AddRange(toAdd);
     return(list.AsEnumerable <T>());
 }
コード例 #33
0
                    /// <summary>Gets the list of Eo operations to override.</summary>
                    /// <returns>The list of Eo operations to be overload.</returns>
                    public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                    {
                        var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                        var methods = Efl.Eo.Globals.GetUserMethods(type);

                        if (efl_ui_text_factory_images_matches_add_static_delegate == null)
                        {
                            efl_ui_text_factory_images_matches_add_static_delegate = new efl_ui_text_factory_images_matches_add_delegate(matches_add);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "AddMatches") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_text_factory_images_matches_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_text_factory_images_matches_add_static_delegate)
                            });
                        }

                        if (efl_ui_text_factory_images_matches_del_static_delegate == null)
                        {
                            efl_ui_text_factory_images_matches_del_static_delegate = new efl_ui_text_factory_images_matches_del_delegate(matches_del);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "DelMatches") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_text_factory_images_matches_del"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_text_factory_images_matches_del_static_delegate)
                            });
                        }

                        if (efl_ui_text_factory_images_matches_mmap_add_static_delegate == null)
                        {
                            efl_ui_text_factory_images_matches_mmap_add_static_delegate = new efl_ui_text_factory_images_matches_mmap_add_delegate(matches_mmap_add);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "AddMatchesMmap") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_text_factory_images_matches_mmap_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_text_factory_images_matches_mmap_add_static_delegate)
                            });
                        }

                        if (efl_ui_text_factory_images_matches_mmap_del_static_delegate == null)
                        {
                            efl_ui_text_factory_images_matches_mmap_del_static_delegate = new efl_ui_text_factory_images_matches_mmap_del_delegate(matches_mmap_del);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "DelMatchesMmap") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_text_factory_images_matches_mmap_del"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_text_factory_images_matches_mmap_del_static_delegate)
                            });
                        }

                        if (efl_canvas_text_factory_create_static_delegate == null)
                        {
                            efl_canvas_text_factory_create_static_delegate = new efl_canvas_text_factory_create_delegate(create);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "Create") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_canvas_text_factory_create"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_text_factory_create_static_delegate)
                            });
                        }

                        descs.AddRange(base.GetEoOps(type));
                        return(descs);
                    }
コード例 #34
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
        //杀期号
        private string[] shaQiHao()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string zu1 = "";
            string zu2 = "";
            string zu3 = "";
            if (textBox7.Text.Length == 3)
            {
                zu1 = textBox7.Text.Substring(0, 2);
                zu2 = textBox7.Text.Substring(1, 2);
                zu3 = textBox7.Text.Substring(0, 1) + textBox7.Text.Substring(2, 1);
            }
            string[] allNum = biShaZu();
            if (zu1.Equals("") && zu2.Equals("") && zu3.Equals(""))
            {
                result.AddRange(allNum);
            }

            if (zu1 != "" && zu2 != "" && zu3 != "")
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    if (((!(allNum[i].Contains(zu1))) && !(allNum[i].Contains(zu1.Substring(1, 1) + zu1.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu1.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu1.Substring(0, 1)))))
                        ))

                        &&

                        ((!(allNum[i].Contains(zu2))) && !(allNum[i].Contains(zu2.Substring(1, 1) + zu2.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu2.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu2.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu2.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu2.Substring(0, 1)))))
                        ))

                        &&

                        ((!(allNum[i].Contains(zu3))) && !(allNum[i].Contains(zu3.Substring(1, 1) + zu3.Substring(0, 1))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu3.Substring(0, 1))) && (allNum[i].Substring(2, 1).Contains(zu3.Substring(1, 1)))) &&
                        (!((allNum[i].Substring(0, 1).Contains(zu3.Substring(1, 1))) && (allNum[i].Substring(2, 1).Contains(zu3.Substring(0, 1)))))
                        )))
                    {
                        result.Add(allNum[i]);
                    }
                }
            }
            return result.ToArray();
        }
コード例 #35
0
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_input_device_type_get_static_delegate == null)
                    {
                        efl_input_device_type_get_static_delegate = new efl_input_device_type_get_delegate(device_type_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetDeviceType") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_type_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_type_get_static_delegate)
                        });
                    }

                    if (efl_input_device_type_set_static_delegate == null)
                    {
                        efl_input_device_type_set_static_delegate = new efl_input_device_type_set_delegate(device_type_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetDeviceType") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_type_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_type_set_static_delegate)
                        });
                    }

                    if (efl_input_device_source_get_static_delegate == null)
                    {
                        efl_input_device_source_get_static_delegate = new efl_input_device_source_get_delegate(source_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSource") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_source_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_source_get_static_delegate)
                        });
                    }

                    if (efl_input_device_source_set_static_delegate == null)
                    {
                        efl_input_device_source_set_static_delegate = new efl_input_device_source_set_delegate(source_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetSource") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_source_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_source_set_static_delegate)
                        });
                    }

                    if (efl_input_device_seat_get_static_delegate == null)
                    {
                        efl_input_device_seat_get_static_delegate = new efl_input_device_seat_get_delegate(seat_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSeat") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_seat_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_seat_get_static_delegate)
                        });
                    }

                    if (efl_input_device_seat_id_get_static_delegate == null)
                    {
                        efl_input_device_seat_id_get_static_delegate = new efl_input_device_seat_id_get_delegate(seat_id_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetSeatId") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_seat_id_get"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_seat_id_get_static_delegate)
                        });
                    }

                    if (efl_input_device_seat_id_set_static_delegate == null)
                    {
                        efl_input_device_seat_id_set_static_delegate = new efl_input_device_seat_id_set_delegate(seat_id_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetSeatId") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_seat_id_set"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_seat_id_set_static_delegate)
                        });
                    }

                    if (efl_input_device_children_iterate_static_delegate == null)
                    {
                        efl_input_device_children_iterate_static_delegate = new efl_input_device_children_iterate_delegate(children_iterate);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "ChildrenIterate") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_children_iterate"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_children_iterate_static_delegate)
                        });
                    }

                    if (efl_input_device_has_pointer_caps_static_delegate == null)
                    {
                        efl_input_device_has_pointer_caps_static_delegate = new efl_input_device_has_pointer_caps_delegate(has_pointer_caps);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "HasPointerCaps") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_input_device_has_pointer_caps"), func = Marshal.GetFunctionPointerForDelegate(efl_input_device_has_pointer_caps_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #36
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
        /// <summary>
        /// 凹凸升降平综合控制
        /// </summary>
        /// <returns></returns>
        private string[] allAoTu()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();

            if (aoCbx.Checked == true)
            {
                result.AddRange(ao());
            }

            if (tuCbx.Checked == true)
            {
                result.AddRange(tu());
            }

            if (shengCbx.Checked == true)
            {
                result.AddRange(sheng());
            }

            if (jiangCbx.Checked == true)
            {
                result.AddRange(jiang());
            }

            if (pingCbx.Checked == true)
            {
                result.AddRange(ping());
            }

            if (aoCbx.Checked == false && tuCbx.Checked == false && shengCbx.Checked == false && jiangCbx.Checked == false && pingCbx.Checked == false)
            {
                result.AddRange(linMa());
            }

            List<string> result1 = result.Distinct().ToList();//去除重复项
            result1.Sort();//排序
            return result1.ToArray();
        }
コード例 #37
0
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs = new System.Collections.Generic.List <Efl_Op_Description>();

            if (efl_content_get_static_delegate == null)
            {
                efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_get"), func = Marshal.GetFunctionPointerForDelegate(efl_content_get_static_delegate)
                });
            if (efl_content_set_static_delegate == null)
            {
                efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_set"), func = Marshal.GetFunctionPointerForDelegate(efl_content_set_static_delegate)
                });
            if (efl_content_unset_static_delegate == null)
            {
                efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_unset"), func = Marshal.GetFunctionPointerForDelegate(efl_content_unset_static_delegate)
                });
            if (efl_text_get_static_delegate == null)
            {
                efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_get_static_delegate)
                });
            if (efl_text_set_static_delegate == null)
            {
                efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_set_static_delegate)
                });
            if (efl_text_markup_get_static_delegate == null)
            {
                efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_markup_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_markup_get_static_delegate)
                });
            if (efl_text_markup_set_static_delegate == null)
            {
                efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_markup_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_markup_set_static_delegate)
                });
            if (efl_ui_l10n_text_get_static_delegate == null)
            {
                efl_ui_l10n_text_get_static_delegate = new efl_ui_l10n_text_get_delegate(l10n_text_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_l10n_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_l10n_text_get_static_delegate)
                });
            if (efl_ui_l10n_text_set_static_delegate == null)
            {
                efl_ui_l10n_text_set_static_delegate = new efl_ui_l10n_text_set_delegate(l10n_text_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_l10n_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_l10n_text_set_static_delegate)
                });
            if (efl_ui_l10n_translation_update_static_delegate == null)
            {
                efl_ui_l10n_translation_update_static_delegate = new efl_ui_l10n_translation_update_delegate(translation_update);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_l10n_translation_update"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_l10n_translation_update_static_delegate)
                });
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #38
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
 //必下组合(定位组合)
 private string[] biXiaZu()
 {
     System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
     string zu1 = textBox1.Text;
     string zu2 = textBox2.Text;
     string zu3 = textBox3.Text;
     string zu4 = textBox8.Text;
     string zu5 = textBox9.Text;
     string zu6 = textBox10.Text;
     string zu7 = textBox11.Text;
     string zu8 = textBox12.Text;
     string zu9 = textBox13.Text;
     string zu10 = textBox14.Text;
     string[] allNum = pingMianBiChu4();
     if (zu1.Equals("") && zu2.Equals("") && zu3.Equals(""))
     {
         result.AddRange(allNum);
     }
     if (zu1 != "" && zu2.Equals("") && zu3.Equals("") && zu4.Equals("") && zu5.Equals(""))
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if ((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3.Equals("") && zu4.Equals("") && zu5.Equals(""))
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4.Equals("") && zu5.Equals(""))
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4 != "" && zu5.Equals(""))
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu4.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu4.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4 != "" && zu5 != "")
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu4.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu4.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu5.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu5.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4 != "" && zu5 != "" && zu6 != "")
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu4.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu4.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu5.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu5.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu6.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu6.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4 != "" && zu5 != "" && zu6 != "" && zu7 != "")
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu4.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu4.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu5.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu5.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu6.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu6.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu7.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu7.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4 != "" && zu5 != "" && zu6 != "" && zu7 != "" && zu8 != "")
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu4.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu4.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu5.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu5.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu6.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu6.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu7.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu7.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu8.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu8.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4 != "" && zu5 != "" && zu6 != "" && zu7 != "" && zu8 != "" && zu9 != "")
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu4.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu4.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu5.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu5.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu6.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu6.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu7.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu7.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu8.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu8.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu9.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu9.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     if (zu1 != "" && zu2 != "" && zu3 != "" && zu4 != "" && zu5 != "" && zu6 != "" && zu7 != "" && zu8 != "" && zu9 != "" && zu10 != "")
     {
         for (int i = 0; i < allNum.Count(); i++)
         {
             if (((allNum[i].IndexOf(zu1.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu1.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu2.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu2.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu3.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu3.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu4.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu4.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu5.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu5.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu6.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu6.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu7.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu7.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu8.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu8.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu9.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu9.Substring(1, 1)) >= 0)) || ((allNum[i].IndexOf(zu10.Substring(0, 1)) >= 0) && (allNum[i].IndexOf(zu10.Substring(1, 1)) >= 0)))
             {
                 result.Add(allNum[i]);
             }
         }
     }
     return result.ToArray();
 }
コード例 #39
0
                    /// <summary>Gets the list of Eo operations to override.</summary>
                    /// <returns>The list of Eo operations to be overload.</returns>
                    public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                    {
                        var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                        var methods = Efl.Eo.Globals.GetUserMethods(type);

                        if (efl_gfx_gradient_radial_center_get_static_delegate == null)
                        {
                            efl_gfx_gradient_radial_center_get_static_delegate = new efl_gfx_gradient_radial_center_get_delegate(center_get);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "GetCenter") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_radial_center_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_radial_center_get_static_delegate)
                            });
                        }

                        if (efl_gfx_gradient_radial_center_set_static_delegate == null)
                        {
                            efl_gfx_gradient_radial_center_set_static_delegate = new efl_gfx_gradient_radial_center_set_delegate(center_set);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "SetCenter") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_radial_center_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_radial_center_set_static_delegate)
                            });
                        }

                        if (efl_gfx_gradient_radial_radius_get_static_delegate == null)
                        {
                            efl_gfx_gradient_radial_radius_get_static_delegate = new efl_gfx_gradient_radial_radius_get_delegate(radius_get);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "GetRadius") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_radial_radius_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_radial_radius_get_static_delegate)
                            });
                        }

                        if (efl_gfx_gradient_radial_radius_set_static_delegate == null)
                        {
                            efl_gfx_gradient_radial_radius_set_static_delegate = new efl_gfx_gradient_radial_radius_set_delegate(radius_set);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "SetRadius") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_radial_radius_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_radial_radius_set_static_delegate)
                            });
                        }

                        if (efl_gfx_gradient_radial_focal_get_static_delegate == null)
                        {
                            efl_gfx_gradient_radial_focal_get_static_delegate = new efl_gfx_gradient_radial_focal_get_delegate(focal_get);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "GetFocal") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_radial_focal_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_radial_focal_get_static_delegate)
                            });
                        }

                        if (efl_gfx_gradient_radial_focal_set_static_delegate == null)
                        {
                            efl_gfx_gradient_radial_focal_set_static_delegate = new efl_gfx_gradient_radial_focal_set_delegate(focal_set);
                        }

                        if (methods.FirstOrDefault(m => m.Name == "SetFocal") != null)
                        {
                            descs.Add(new Efl_Op_Description()
                            {
                                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_radial_focal_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_radial_focal_set_static_delegate)
                            });
                        }

                        descs.AddRange(base.GetEoOps(type));
                        return(descs);
                    }
コード例 #40
0
ファイル: AsCashStore.cs プロジェクト: ftcaicai/ArkClient
	public void AddItemToListForEditor()
	{
		List<string> listItemName = new System.Collections.Generic.List<string>();
	
		listItemName.AddRange( dicChargeItemInfo.Keys);
	
		List<Store_Item_Info_Table> testList = new List<Store_Item_Info_Table>();
		int count = 0;
		foreach( string id in listItemName)
			testList.Add( new Store_Item_Info_Table( Store_Item_Type.ChargeItem, count++, id, 1));

		AddStoreItems( testList);

		nowState = StoreState.NOTOUCH;
	}
コード例 #41
0
            /// <summary>Gets the list of Eo operations to override.</summary>
            /// <returns>The list of Eo operations to be overload.</returns>
            public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
            {
                var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                var methods = Efl.Eo.Globals.GetUserMethods(type);

                if (efl_loop_handler_active_get_static_delegate == null)
                {
                    efl_loop_handler_active_get_static_delegate = new efl_loop_handler_active_get_delegate(active_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetActive") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_active_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_active_get_static_delegate)
                    });
                }

                if (efl_loop_handler_active_set_static_delegate == null)
                {
                    efl_loop_handler_active_set_static_delegate = new efl_loop_handler_active_set_delegate(active_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetActive") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_active_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_active_set_static_delegate)
                    });
                }

                if (efl_loop_handler_fd_get_static_delegate == null)
                {
                    efl_loop_handler_fd_get_static_delegate = new efl_loop_handler_fd_get_delegate(fd_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetFd") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_fd_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_get_static_delegate)
                    });
                }

                if (efl_loop_handler_fd_set_static_delegate == null)
                {
                    efl_loop_handler_fd_set_static_delegate = new efl_loop_handler_fd_set_delegate(fd_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetFd") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_fd_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_set_static_delegate)
                    });
                }

                if (efl_loop_handler_fd_file_get_static_delegate == null)
                {
                    efl_loop_handler_fd_file_get_static_delegate = new efl_loop_handler_fd_file_get_delegate(fd_file_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetFdFile") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_fd_file_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_file_get_static_delegate)
                    });
                }

                if (efl_loop_handler_fd_file_set_static_delegate == null)
                {
                    efl_loop_handler_fd_file_set_static_delegate = new efl_loop_handler_fd_file_set_delegate(fd_file_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetFdFile") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_fd_file_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_fd_file_set_static_delegate)
                    });
                }

                if (efl_loop_handler_win32_get_static_delegate == null)
                {
                    efl_loop_handler_win32_get_static_delegate = new efl_loop_handler_win32_get_delegate(win32_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetWin32") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_win32_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_win32_get_static_delegate)
                    });
                }

                if (efl_loop_handler_win32_set_static_delegate == null)
                {
                    efl_loop_handler_win32_set_static_delegate = new efl_loop_handler_win32_set_delegate(win32_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetWin32") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_handler_win32_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_handler_win32_set_static_delegate)
                    });
                }

                descs.AddRange(base.GetEoOps(type));
                return(descs);
            }
コード例 #42
0
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
            var methods = Efl.Eo.Globals.GetUserMethods(type);

            if (efl_ui_widget_factory_item_class_get_static_delegate == null)
            {
                efl_ui_widget_factory_item_class_get_static_delegate = new efl_ui_widget_factory_item_class_get_delegate(item_class_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetItemClass") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_widget_factory_item_class_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_widget_factory_item_class_get_static_delegate)
                    });
            }
            if (efl_ui_widget_factory_item_class_set_static_delegate == null)
            {
                efl_ui_widget_factory_item_class_set_static_delegate = new efl_ui_widget_factory_item_class_set_delegate(item_class_set);
            }
            if (methods.FirstOrDefault(m => m.Name == "SetItemClass") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_widget_factory_item_class_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_widget_factory_item_class_set_static_delegate)
                    });
            }
            if (efl_ui_factory_create_static_delegate == null)
            {
                efl_ui_factory_create_static_delegate = new efl_ui_factory_create_delegate(create);
            }
            if (methods.FirstOrDefault(m => m.Name == "Create") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_factory_create"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_factory_create_static_delegate)
                    });
            }
            if (efl_ui_factory_release_static_delegate == null)
            {
                efl_ui_factory_release_static_delegate = new efl_ui_factory_release_delegate(release);
            }
            if (methods.FirstOrDefault(m => m.Name == "Release") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_factory_release"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_factory_release_static_delegate)
                    });
            }
            if (efl_ui_factory_bind_static_delegate == null)
            {
                efl_ui_factory_bind_static_delegate = new efl_ui_factory_bind_delegate(factory_bind);
            }
            if (methods.FirstOrDefault(m => m.Name == "FactoryBind") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_factory_bind"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_factory_bind_static_delegate)
                    });
            }
            if (efl_ui_property_bind_static_delegate == null)
            {
                efl_ui_property_bind_static_delegate = new efl_ui_property_bind_delegate(property_bind);
            }
            if (methods.FirstOrDefault(m => m.Name == "PropertyBind") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_property_bind"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_property_bind_static_delegate)
                    });
            }
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #43
0
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs = new System.Collections.Generic.List <Efl_Op_Description>();

            if (efl_ui_popup_part_backwall_repeat_events_get_static_delegate == null)
            {
                efl_ui_popup_part_backwall_repeat_events_get_static_delegate = new efl_ui_popup_part_backwall_repeat_events_get_delegate(repeat_events_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_popup_part_backwall_repeat_events_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_popup_part_backwall_repeat_events_get_static_delegate)
                });
            if (efl_ui_popup_part_backwall_repeat_events_set_static_delegate == null)
            {
                efl_ui_popup_part_backwall_repeat_events_set_static_delegate = new efl_ui_popup_part_backwall_repeat_events_set_delegate(repeat_events_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_popup_part_backwall_repeat_events_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_popup_part_backwall_repeat_events_set_static_delegate)
                });
            if (efl_file_mmap_get_static_delegate == null)
            {
                efl_file_mmap_get_static_delegate = new efl_file_mmap_get_delegate(mmap_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_mmap_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_mmap_get_static_delegate)
                });
            if (efl_file_mmap_set_static_delegate == null)
            {
                efl_file_mmap_set_static_delegate = new efl_file_mmap_set_delegate(mmap_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_mmap_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_mmap_set_static_delegate)
                });
            if (efl_file_get_static_delegate == null)
            {
                efl_file_get_static_delegate = new efl_file_get_delegate(file_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_get_static_delegate)
                });
            if (efl_file_set_static_delegate == null)
            {
                efl_file_set_static_delegate = new efl_file_set_delegate(file_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_set_static_delegate)
                });
            if (efl_file_key_get_static_delegate == null)
            {
                efl_file_key_get_static_delegate = new efl_file_key_get_delegate(key_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_key_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_key_get_static_delegate)
                });
            if (efl_file_key_set_static_delegate == null)
            {
                efl_file_key_set_static_delegate = new efl_file_key_set_delegate(key_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_key_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_key_set_static_delegate)
                });
            if (efl_file_loaded_get_static_delegate == null)
            {
                efl_file_loaded_get_static_delegate = new efl_file_loaded_get_delegate(loaded_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_loaded_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_loaded_get_static_delegate)
                });
            if (efl_file_load_static_delegate == null)
            {
                efl_file_load_static_delegate = new efl_file_load_delegate(load);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_load"), func = Marshal.GetFunctionPointerForDelegate(efl_file_load_static_delegate)
                });
            if (efl_file_unload_static_delegate == null)
            {
                efl_file_unload_static_delegate = new efl_file_unload_delegate(unload);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_file_unload"), func = Marshal.GetFunctionPointerForDelegate(efl_file_unload_static_delegate)
                });
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #44
0
 /// <summary>
 /// Returns the list of equivalent anagrams
 /// </summary>
 /// <param name="Word">Word to check</param>
 /// <returns>A list of words that are anagrams of the word entered</returns>
 public virtual System.Collections.Generic.List<string> FindAnagrams(string Word)
 {
     System.Collections.Generic.List<string> ReturnValues = new System.Collections.Generic.List<string>();
     ReturnValues.AddRange(DictionaryOfAnagrams[GetAnagramKey(Word)]);
     return ReturnValues;
 }
コード例 #45
0
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs = new System.Collections.Generic.List <Efl_Op_Description>();

            if (efl_loop_model_volatile_make_static_delegate == null)
            {
                efl_loop_model_volatile_make_static_delegate = new efl_loop_model_volatile_make_delegate(volatile_make);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_loop_model_volatile_make"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_model_volatile_make_static_delegate)
            });
            if (efl_model_properties_get_static_delegate == null)
            {
                efl_model_properties_get_static_delegate = new efl_model_properties_get_delegate(properties_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_properties_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_properties_get_static_delegate)
            });
            if (efl_model_property_get_static_delegate == null)
            {
                efl_model_property_get_static_delegate = new efl_model_property_get_delegate(property_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_property_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_get_static_delegate)
            });
            if (efl_model_property_set_static_delegate == null)
            {
                efl_model_property_set_static_delegate = new efl_model_property_set_delegate(property_set);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_property_set"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_set_static_delegate)
            });
            if (efl_model_children_count_get_static_delegate == null)
            {
                efl_model_children_count_get_static_delegate = new efl_model_children_count_get_delegate(children_count_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_children_count_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_children_count_get_static_delegate)
            });
            if (efl_model_property_ready_get_static_delegate == null)
            {
                efl_model_property_ready_get_static_delegate = new efl_model_property_ready_get_delegate(property_ready_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_property_ready_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_ready_get_static_delegate)
            });
            if (efl_model_children_slice_get_static_delegate == null)
            {
                efl_model_children_slice_get_static_delegate = new efl_model_children_slice_get_delegate(children_slice_get);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_children_slice_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_children_slice_get_static_delegate)
            });
            if (efl_model_child_add_static_delegate == null)
            {
                efl_model_child_add_static_delegate = new efl_model_child_add_delegate(child_add);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_child_add"), func = Marshal.GetFunctionPointerForDelegate(efl_model_child_add_static_delegate)
            });
            if (efl_model_child_del_static_delegate == null)
            {
                efl_model_child_del_static_delegate = new efl_model_child_del_delegate(child_del);
            }
            descs.Add(new Efl_Op_Description()
            {
                api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_model_child_del"), func = Marshal.GetFunctionPointerForDelegate(efl_model_child_del_static_delegate)
            });
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #46
0
        /// <summary>The subSpans are ordered in the same doc, so there is a possible match.
        /// Compute the slop while making the match as short as possible by advancing
        /// all subSpans except the last one in reverse order.
        /// </summary>
        private bool ShrinkToAfterShortestMatch()
        {
            matchStart = subSpans[subSpans.Length - 1].Start();
            matchEnd   = subSpans[subSpans.Length - 1].End();
            System.Collections.Generic.Dictionary <byte[], byte[]> possibleMatchPayloads = new System.Collections.Generic.Dictionary <byte[], byte[]>();
            if (subSpans[subSpans.Length - 1].IsPayloadAvailable())
            {
                System.Collections.Generic.ICollection <byte[]> payload = subSpans[subSpans.Length - 1].GetPayload();
                foreach (byte[] pl in payload)
                {
                    if (!possibleMatchPayloads.ContainsKey(pl))
                    {
                        possibleMatchPayloads.Add(pl, pl);
                    }
                }
            }

            System.Collections.Generic.List <byte[]> possiblePayload = null;

            int matchSlop = 0;
            int lastStart = matchStart;
            int lastEnd   = matchEnd;

            for (int i = subSpans.Length - 2; i >= 0; i--)
            {
                Spans prevSpans = subSpans[i];
                if (collectPayloads && prevSpans.IsPayloadAvailable())
                {
                    System.Collections.Generic.ICollection <byte[]> payload = prevSpans.GetPayload();
                    possiblePayload = new System.Collections.Generic.List <byte[]>(payload.Count);
                    possiblePayload.AddRange(payload);
                }

                int prevStart = prevSpans.Start();
                int prevEnd   = prevSpans.End();
                while (true)
                {
                    // Advance prevSpans until after (lastStart, lastEnd)
                    if (!prevSpans.Next())
                    {
                        inSameDoc = false;
                        more      = false;
                        break;                         // Check remaining subSpans for final match.
                    }
                    else if (matchDoc != prevSpans.Doc())
                    {
                        inSameDoc = false;             // The last subSpans is not advanced here.
                        break;                         // Check remaining subSpans for last match in this document.
                    }
                    else
                    {
                        int ppStart = prevSpans.Start();
                        int ppEnd   = prevSpans.End();                       // Cannot avoid invoking .end()
                        if (!DocSpansOrdered(ppStart, ppEnd, lastStart, lastEnd))
                        {
                            break;                             // Check remaining subSpans.
                        }
                        else
                        {
                            // prevSpans still before (lastStart, lastEnd)
                            prevStart = ppStart;
                            prevEnd   = ppEnd;
                            if (collectPayloads && prevSpans.IsPayloadAvailable())
                            {
                                System.Collections.Generic.ICollection <byte[]> payload = prevSpans.GetPayload();
                                possiblePayload = new System.Collections.Generic.List <byte[]>(payload.Count);
                                possiblePayload.AddRange(payload);
                            }
                        }
                    }
                }

                if (collectPayloads && possiblePayload != null)
                {
                    foreach (byte[] pl in possiblePayload)
                    {
                        if (!possibleMatchPayloads.ContainsKey(pl))
                        {
                            possibleMatchPayloads.Add(pl, pl);
                        }
                    }
                }

                System.Diagnostics.Debug.Assert(prevStart <= matchStart);
                if (matchStart > prevEnd)
                {
                    // Only non overlapping spans add to slop.
                    matchSlop += (matchStart - prevEnd);
                }

                /* Do not break on (matchSlop > allowedSlop) here to make sure
                 * that subSpans[0] is advanced after the match, if any.
                 */
                matchStart = prevStart;
                lastStart  = prevStart;
                lastEnd    = prevEnd;
            }

            bool match = matchSlop <= allowedSlop;

            if (collectPayloads && match && possibleMatchPayloads.Count > 0)
            {
                matchPayload.AddRange(possibleMatchPayloads.Keys);
            }

            return(match);            // ordered and allowed slop
        }
コード例 #47
0
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
            var methods = Efl.Eo.Globals.GetUserMethods(type);

            if (efl_content_get_static_delegate == null)
            {
                efl_content_get_static_delegate = new efl_content_get_delegate(content_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetContent") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_get"), func = Marshal.GetFunctionPointerForDelegate(efl_content_get_static_delegate)
                    });
            }
            if (efl_content_set_static_delegate == null)
            {
                efl_content_set_static_delegate = new efl_content_set_delegate(content_set);
            }
            if (methods.FirstOrDefault(m => m.Name == "SetContent") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_set"), func = Marshal.GetFunctionPointerForDelegate(efl_content_set_static_delegate)
                    });
            }
            if (efl_content_unset_static_delegate == null)
            {
                efl_content_unset_static_delegate = new efl_content_unset_delegate(content_unset);
            }
            if (methods.FirstOrDefault(m => m.Name == "UnsetContent") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_content_unset"), func = Marshal.GetFunctionPointerForDelegate(efl_content_unset_static_delegate)
                    });
            }
            if (efl_text_get_static_delegate == null)
            {
                efl_text_get_static_delegate = new efl_text_get_delegate(text_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetText") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_get_static_delegate)
                    });
            }
            if (efl_text_set_static_delegate == null)
            {
                efl_text_set_static_delegate = new efl_text_set_delegate(text_set);
            }
            if (methods.FirstOrDefault(m => m.Name == "SetText") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_set_static_delegate)
                    });
            }
            if (efl_text_markup_get_static_delegate == null)
            {
                efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetMarkup") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_markup_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_markup_get_static_delegate)
                    });
            }
            if (efl_text_markup_set_static_delegate == null)
            {
                efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set);
            }
            if (methods.FirstOrDefault(m => m.Name == "SetMarkup") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_text_markup_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_markup_set_static_delegate)
                    });
            }
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #48
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //全态计算
        private string[] quanTaiCal()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = numberPro();
            string[] zhiNums = new string[] { "1", "2", "3", "5", "7" };
            string[] danNums = new string[] { "1", "3", "5", "7", "9" };
            string[] xiaoNums = new string[] { "0", "1", "2", "3", "4" };
            string[] heNums = new string[] { "0", "4", "6", "8", "9" };
            string[] shuangNums = new string[] { "0", "2", "4", "6", "8" };
            string[] daNums = new string[] { "5", "6", "7", "8", "9" };

            int cbkCount = 0;
            foreach (Control ctls in this.quantaiGpb.Controls)
            {
                if (ctls is CheckBox)
                    if ((ctls as CheckBox).Checked == true)
                    {
                        cbkCount++;

                        if (ctls.Name.Equals("zhi"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (zhiNums.Contains(a) && zhiNums.Contains(b) && zhiNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("dan"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (danNums.Contains(a) && danNums.Contains(b) && danNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("xiao"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (xiaoNums.Contains(a) && xiaoNums.Contains(b) && xiaoNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("he"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (heNums.Contains(a) && heNums.Contains(b) && heNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("shuang"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (shuangNums.Contains(a) && shuangNums.Contains(b) && shuangNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("da"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                string a = allNum[i].Substring(0, 1);
                                string b = allNum[i].Substring(1, 1);
                                string c = allNum[i].Substring(2, 1);
                                if (
                                    (daNums.Contains(a) && daNums.Contains(b) && daNums.Contains(c))
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("zuSan"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                int a = Convert.ToInt16(allNum[i].Substring(0, 1));
                                int b = Convert.ToInt16(allNum[i].Substring(1, 1));
                                int c = Convert.ToInt16(allNum[i].Substring(2, 1));
                                if (
                                    a == b || a == c || b == c
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                        else if (ctls.Name.Equals("zuLiu"))
                        {
                            for (int i = 0; i < allNum.Count(); i++)
                            {
                                int a = Convert.ToInt16(allNum[i].Substring(0, 1));
                                int b = Convert.ToInt16(allNum[i].Substring(1, 1));
                                int c = Convert.ToInt16(allNum[i].Substring(2, 1));
                                if (
                                    a != b && a != c && b != c
                                    )
                                {
                                    result.Add(allNum[i]);
                                }
                            }
                        }
                    }
            }

            if (cbkCount == 0)
            {
                result.AddRange(allNum);
            }

            List<string> result1 = result.Distinct().ToList();//去除重复项
            result1.Sort();
            return result1.ToArray();
        }
コード例 #49
0
                /// <summary>Gets the list of Eo operations to override.</summary>
                /// <returns>The list of Eo operations to be overload.</returns>
                public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
                {
                    var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                    var methods = Efl.Eo.Globals.GetUserMethods(type);

                    if (efl_ui_popup_part_backwall_repeat_events_get_static_delegate == null)
                    {
                        efl_ui_popup_part_backwall_repeat_events_get_static_delegate = new efl_ui_popup_part_backwall_repeat_events_get_delegate(repeat_events_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetRepeatEvents") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_popup_part_backwall_repeat_events_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_popup_part_backwall_repeat_events_get_static_delegate)
                        });
                    }

                    if (efl_ui_popup_part_backwall_repeat_events_set_static_delegate == null)
                    {
                        efl_ui_popup_part_backwall_repeat_events_set_static_delegate = new efl_ui_popup_part_backwall_repeat_events_set_delegate(repeat_events_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetRepeatEvents") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_popup_part_backwall_repeat_events_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_popup_part_backwall_repeat_events_set_static_delegate)
                        });
                    }

                    if (efl_file_mmap_get_static_delegate == null)
                    {
                        efl_file_mmap_get_static_delegate = new efl_file_mmap_get_delegate(mmap_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetMmap") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_mmap_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_mmap_get_static_delegate)
                        });
                    }

                    if (efl_file_mmap_set_static_delegate == null)
                    {
                        efl_file_mmap_set_static_delegate = new efl_file_mmap_set_delegate(mmap_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetMmap") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_mmap_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_mmap_set_static_delegate)
                        });
                    }

                    if (efl_file_get_static_delegate == null)
                    {
                        efl_file_get_static_delegate = new efl_file_get_delegate(file_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetFile") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_get_static_delegate)
                        });
                    }

                    if (efl_file_set_static_delegate == null)
                    {
                        efl_file_set_static_delegate = new efl_file_set_delegate(file_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetFile") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_set_static_delegate)
                        });
                    }

                    if (efl_file_key_get_static_delegate == null)
                    {
                        efl_file_key_get_static_delegate = new efl_file_key_get_delegate(key_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetKey") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_key_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_key_get_static_delegate)
                        });
                    }

                    if (efl_file_key_set_static_delegate == null)
                    {
                        efl_file_key_set_static_delegate = new efl_file_key_set_delegate(key_set);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "SetKey") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_key_set"), func = Marshal.GetFunctionPointerForDelegate(efl_file_key_set_static_delegate)
                        });
                    }

                    if (efl_file_loaded_get_static_delegate == null)
                    {
                        efl_file_loaded_get_static_delegate = new efl_file_loaded_get_delegate(loaded_get);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "GetLoaded") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_loaded_get"), func = Marshal.GetFunctionPointerForDelegate(efl_file_loaded_get_static_delegate)
                        });
                    }

                    if (efl_file_load_static_delegate == null)
                    {
                        efl_file_load_static_delegate = new efl_file_load_delegate(load);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "Load") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_load"), func = Marshal.GetFunctionPointerForDelegate(efl_file_load_static_delegate)
                        });
                    }

                    if (efl_file_unload_static_delegate == null)
                    {
                        efl_file_unload_static_delegate = new efl_file_unload_delegate(unload);
                    }

                    if (methods.FirstOrDefault(m => m.Name == "Unload") != null)
                    {
                        descs.Add(new Efl_Op_Description()
                        {
                            api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_file_unload"), func = Marshal.GetFunctionPointerForDelegate(efl_file_unload_static_delegate)
                        });
                    }

                    descs.AddRange(base.GetEoOps(type));
                    return(descs);
                }
コード例 #50
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //凤尾质合
        private string[] weiZh()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = chaHe();

            List<string> nums = new List<string>();
            foreach (Control ctls in this.weiZhGpb.Controls)
            {
                if ((ctls as CheckBox).Checked == true)
                {
                    nums.Add(ctls.Text);
                }
            }

            int[] zhiNums = new int[] { 1, 2, 3, 5, 7 };
            int[] HeNums = new int[] { 0, 4, 6, 8, 9 };

            if (nums.Count > 0)
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    for (int j = 0; j < nums.Count(); j++)
                    {
                        int a = Convert.ToInt16(allNum[i].Substring(0, 1));
                        int b = Convert.ToInt16(allNum[i].Substring(1, 1));
                        int c = Convert.ToInt16(allNum[i].Substring(2, 1));

                        if (nums[0].Equals("质"))
                        {
                            if (zhiNums.Contains(c))
                            {
                                result.Add(allNum[i]);
                            }
                        }

                        if (nums[0].Equals("和"))
                        {
                            if (HeNums.Contains(c))
                            {
                                result.Add(allNum[i]);
                            }
                        }
                    }
                }
            }
            else
            {
                result.AddRange(allNum);
            }

            List<string> result1 = result.Distinct().ToList();//去除重复项
            return result1.ToArray();
        }
コード例 #51
0
            /// <summary>Gets the list of Eo operations to override.</summary>
            /// <returns>The list of Eo operations to be overload.</returns>
            public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
            {
                var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                var methods = Efl.Eo.Globals.GetUserMethods(type);

                if (efl_loop_model_volatile_make_static_delegate == null)
                {
                    efl_loop_model_volatile_make_static_delegate = new efl_loop_model_volatile_make_delegate(volatile_make);
                }

                if (methods.FirstOrDefault(m => m.Name == "VolatileMake") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_model_volatile_make"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_model_volatile_make_static_delegate)
                    });
                }

                if (efl_model_properties_get_static_delegate == null)
                {
                    efl_model_properties_get_static_delegate = new efl_model_properties_get_delegate(properties_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetProperties") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_properties_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_properties_get_static_delegate)
                    });
                }

                if (efl_model_property_get_static_delegate == null)
                {
                    efl_model_property_get_static_delegate = new efl_model_property_get_delegate(property_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetProperty") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_property_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_get_static_delegate)
                    });
                }

                if (efl_model_property_set_static_delegate == null)
                {
                    efl_model_property_set_static_delegate = new efl_model_property_set_delegate(property_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetProperty") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_property_set"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_set_static_delegate)
                    });
                }

                if (efl_model_children_count_get_static_delegate == null)
                {
                    efl_model_children_count_get_static_delegate = new efl_model_children_count_get_delegate(children_count_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetChildrenCount") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_children_count_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_children_count_get_static_delegate)
                    });
                }

                if (efl_model_property_ready_get_static_delegate == null)
                {
                    efl_model_property_ready_get_static_delegate = new efl_model_property_ready_get_delegate(property_ready_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetPropertyReady") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_property_ready_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_property_ready_get_static_delegate)
                    });
                }

                if (efl_model_children_slice_get_static_delegate == null)
                {
                    efl_model_children_slice_get_static_delegate = new efl_model_children_slice_get_delegate(children_slice_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetChildrenSlice") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_children_slice_get"), func = Marshal.GetFunctionPointerForDelegate(efl_model_children_slice_get_static_delegate)
                    });
                }

                if (efl_model_child_add_static_delegate == null)
                {
                    efl_model_child_add_static_delegate = new efl_model_child_add_delegate(child_add);
                }

                if (methods.FirstOrDefault(m => m.Name == "AddChild") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_child_add"), func = Marshal.GetFunctionPointerForDelegate(efl_model_child_add_static_delegate)
                    });
                }

                if (efl_model_child_del_static_delegate == null)
                {
                    efl_model_child_del_static_delegate = new efl_model_child_del_delegate(child_del);
                }

                if (methods.FirstOrDefault(m => m.Name == "DelChild") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_model_child_del"), func = Marshal.GetFunctionPointerForDelegate(efl_model_child_del_static_delegate)
                    });
                }

                descs.AddRange(base.GetEoOps(type));
                return(descs);
            }
コード例 #52
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //平衡指数
        public string[] pingHengZhiShu()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = fanBianQiuCal();

            int overMy = 0;
            List<int> nums = new List<int>();
            foreach (Control ctls in this.pHZSGpb.Controls)
            {
                bool isNum = isNumber(ctls.Text);
                if (ctls is CheckBox)
                {
                    if ((ctls as CheckBox).Checked == true && isNum == true)
                    {
                        nums.Add(Convert.ToInt16(ctls.Text));
                    }
                }
            }

            if (nums.Count == 1)
            {
                if (nums.Contains(1))
                {
                    if (jiaCkb.Checked == true)
                    {
                        overMy++;
                        result.AddRange(phJia());
                    }

                    if (jianCkb.Checked == true)
                    {
                        overMy++;
                        result.AddRange(phJian());
                    }

                    if (dengCkb.Checked == true)
                    {
                        overMy++;
                        result.AddRange(phDeng());
                    }
                }

                if (nums.Contains(0))
                {
                    if (jiaCkb.Checked == true)
                    {
                        overMy++;
                        result.AddRange(phJia());
                    }

                    if (jianCkb.Checked == true)
                    {
                        overMy++;
                        result.AddRange(phJian());
                    }

                    if (dengCkb.Checked == true)
                    {
                        overMy++;
                        result.AddRange(phDeng());
                    }

                    List<string> temp = new List<string>();
                    temp.AddRange(chaHe());
                    for (int i = 0; i < result.Count(); i++)
                    {
                        temp.Remove(result[i]);
                    }
                    result.Clear();
                    result.AddRange(temp);
                }

            }

            if (nums.Count == 2)
            {
                result.AddRange(allNum);
            }

            if (overMy == 0)
                result.AddRange(allNum);

            List<string> result1 = result.Distinct().ToList();//去除重复项
            result1.Sort();
            return result1.ToArray();
        }
コード例 #53
0
ファイル: efl_app.eo.cs プロジェクト: gbalykov/TizenFX
            /// <summary>Gets the list of Eo operations to override.</summary>
            /// <returns>The list of Eo operations to be overload.</returns>
            public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
            {
                var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
                var methods = Efl.Eo.Globals.GetUserMethods(type);

                if (efl_app_build_efl_version_get_static_delegate == null)
                {
                    efl_app_build_efl_version_get_static_delegate = new efl_app_build_efl_version_get_delegate(build_efl_version_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetBuildEflVersion") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_app_build_efl_version_get"), func = Marshal.GetFunctionPointerForDelegate(efl_app_build_efl_version_get_static_delegate)
                    });
                }

                if (efl_app_efl_version_get_static_delegate == null)
                {
                    efl_app_efl_version_get_static_delegate = new efl_app_efl_version_get_delegate(efl_version_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetEflVersion") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_app_efl_version_get"), func = Marshal.GetFunctionPointerForDelegate(efl_app_efl_version_get_static_delegate)
                    });
                }

                if (efl_core_command_line_command_get_static_delegate == null)
                {
                    efl_core_command_line_command_get_static_delegate = new efl_core_command_line_command_get_delegate(command_get);
                }

                if (methods.FirstOrDefault(m => m.Name == "GetCommand") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_get"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_get_static_delegate)
                    });
                }

                if (efl_core_command_line_command_array_set_static_delegate == null)
                {
                    efl_core_command_line_command_array_set_static_delegate = new efl_core_command_line_command_array_set_delegate(command_array_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetCommandArray") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_array_set"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_array_set_static_delegate)
                    });
                }

                if (efl_core_command_line_command_string_set_static_delegate == null)
                {
                    efl_core_command_line_command_string_set_static_delegate = new efl_core_command_line_command_string_set_delegate(command_string_set);
                }

                if (methods.FirstOrDefault(m => m.Name == "SetCommandString") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_string_set"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_string_set_static_delegate)
                    });
                }

                if (efl_core_command_line_command_access_static_delegate == null)
                {
                    efl_core_command_line_command_access_static_delegate = new efl_core_command_line_command_access_delegate(command_access);
                }

                if (methods.FirstOrDefault(m => m.Name == "CommandAccess") != null)
                {
                    descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_core_command_line_command_access"), func = Marshal.GetFunctionPointerForDelegate(efl_core_command_line_command_access_static_delegate)
                    });
                }

                descs.AddRange(base.GetEoOps(type));
                return(descs);
            }
コード例 #54
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //差合
        private string[] chaHe()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = shaHeZhi();

            List<int> nums = new List<int>();
            foreach (Control ctls in this.chaHeGpb.Controls)
            {
                bool isNum = isNumber(ctls.Text);
                if ((ctls as CheckBox).Checked == true && isNum == true)
                {
                    nums.Add(Convert.ToInt16(ctls.Text));
                }
            }

            if (nums.Count > 0)
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    for (int j = 0; j < nums.Count(); j++)
                    {
                        int a = Convert.ToInt16(allNum[i].Substring(0, 1));
                        int b = Convert.ToInt16(allNum[i].Substring(1, 1));
                        int c = Convert.ToInt16(allNum[i].Substring(2, 1));

                        int aa = Math.Abs(a - b);
                        int bb = Math.Abs(a - c);
                        int cc = Math.Abs(b - c);

                        int f = Convert.ToInt16((aa + bb + cc).ToString().Substring((aa + bb + cc).ToString().Length - 1, 1));

                        if (
                            f == nums[j]
                        )
                        {
                            result.Add(allNum[i]);
                        }
                    }
                }
            }
            else
            {
                result.AddRange(allNum);
            }

            List<string> result1 = result.Distinct().ToList();//去除重复项
            return result1.ToArray();
        }
コード例 #55
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
        //平面胆码组四
        private string[] pingMianBiChu4()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            List<string> pingMianBiChu = new List<string>();
            List<string> pingMianBiChuGeShu = new List<string>();
            foreach (Control ctl in this.groupBox11.Controls) //this可以根据实际情况修改为this.groupBreakFast,this.groupLunch,this.groupDinner
            {
                if (ctl is CheckBox)
                {
                    if ((ctl as CheckBox).Checked == true)
                    {
                        if (!ctl.Name.Contains("fourZu"))
                        {
                            pingMianBiChu.Add((ctl as CheckBox).Text);
                        }
                        if (ctl.Name.Contains("fourZu"))
                        {
                            pingMianBiChuGeShu.Add((ctl as CheckBox).Text);
                        }
                    }
                }
            }

            List<string> allNum = new List<string>();
            allNum.AddRange(pingMianBiChu3());
            result.AddRange(pingMianDanMaOutput(allNum, pingMianBiChu, pingMianBiChuGeShu));

            List<string> result1 = result.Distinct().ToList();//去除重复项
            return result1.ToArray();
        }
コード例 #56
0
ファイル: page3.cs プロジェクト: svn2github/eztx
        //合值
        private string[] heZhi()
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();
            string[] allNum = f3Data;

            List<int> nums = new List<int>();
            foreach (Control ctls in this.heZhiGpb.Controls)
            {
                bool isNum = isNumber(ctls.Text);
                if ((ctls as CheckBox).Checked == true && isNum == true)
                {
                    nums.Add(Convert.ToInt16(ctls.Text));
                }
            }

            if (nums.Count > 0)
            {
                for (int i = 0; i < allNum.Count(); i++)
                {
                    for (int j = 0; j < nums.Count(); j++)
                    {
                        int allNumSum = Convert.ToInt32(allNum[i].Substring(0, 1)) + Convert.ToInt32(allNum[i].Substring(1, 1)) + Convert.ToInt32(allNum[i].Substring(2, 1));
                        if (
                            allNumSum.ToString().Substring(allNumSum.ToString().Length - 1, 1) == nums[j].ToString()
                        )
                        {
                            result.Add(allNum[i]);
                        }
                    }
                }
            }
            else
            {
                result.AddRange(allNum);
            }

            List<string> result1 = result.Distinct().ToList();//去除重复项
            return result1.ToArray();
        }
コード例 #57
0
ファイル: page1.cs プロジェクト: MEZboy/csharpsrc
        /// <summary>
        /// 平面胆码计算
        /// </summary>
        /// <param name="allNum"></param>
        /// <param name="pingMianBiChu"></param>
        /// <param name="pingMianBiChuGeShu"></param>
        /// <returns></returns>
        private List<string> pingMianDanMaOutput(List<string> allNum, List<string> pingMianBiChu, List<string> pingMianBiChuGeShu)
        {
            System.Collections.Generic.List<string> result = new System.Collections.Generic.List<string>();

            if (pingMianBiChu.Count == 0)
            {
                result.AddRange(allNum);
            }
            if (pingMianBiChu.Count == 1)
            {
                for (int i = 0; i < pingMianBiChu.Count; i++)
                {
                    for (int j = 0; j < pingMianBiChuGeShu.Count; j++)
                    {
                        for (int k = 0; k < allNum.Count(); k++)
                        {
                            if (Tools.SubstringCount(allNum[k], pingMianBiChu[i]) == Convert.ToInt16(pingMianBiChuGeShu[j]))
                            {
                                result.Add(allNum[k]);
                            }
                        }
                    }
                }
            }
            #region 平面必出选数多余1个
            if (pingMianBiChu.Count > 1)
            {
                string ppm = "";
                for (int i = 0; i < pingMianBiChu.Count; i++)
                {
                    ppm += pingMianBiChu[i];
                }

                for (int i = 0; i < allNum.Count(); i++)
                {
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Contains("3"))//选2个或以上出0,1,2,3个
                    {
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                result.Add(allNum[i]);
                            }
                        }
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Count == 3)//选2个或以上出0,1,2个
                    {
                        string x = allNum[i].Substring(0, 1), y = allNum[i].Substring(1, 1), z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (!((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Contains("3"))//选2个或以上出1,2,3个
                    {
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                result.Add(allNum[i]);
                            }
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Count == 2)//选2个或以上出1,2个
                    {
                        string x = allNum[i].Substring(0, 1), y = allNum[i].Substring(1, 1), z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (!((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }

                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Count == 1)//选2个或以上出0个
                    {
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Count == 2)//选2个或以上出0,1个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);

                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (!((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Count == 2)//选2个或以上出0,2个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z))) && !((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Contains("3") && pingMianBiChuGeShu.Count == 2)//选2个或以上出0,3个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }

                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Count == 1)//选2个或以上出1个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);

                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (!((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Count == 1)//选2个或以上出2个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z))) && !((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("3") && pingMianBiChuGeShu.Count == 1)//选2个或以上出3个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Contains("3") && pingMianBiChuGeShu.Count == 2)//选2个或以上出1,3个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if ((allNum[i].Contains(jbk)))
                            {
                                if ((!((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z)))) || ((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Contains("1") && pingMianBiChuGeShu.Contains("3") && pingMianBiChuGeShu.Count == 3)//选2个或以上出0,1,3个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if ((allNum[i].Contains(jbk)))
                            {
                                if ((!((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z)))) || ((pingMianBiChu.Contains(x)) && (pingMianBiChu.Contains(y)) && (pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Contains("3") && pingMianBiChuGeShu.Count == 2)//选2个或以上出2,3个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                    }
                    if (pingMianBiChu.Count > 1 && pingMianBiChuGeShu.Contains("0") && pingMianBiChuGeShu.Contains("2") && pingMianBiChuGeShu.Contains("3") && pingMianBiChuGeShu.Count == 3)//选2个或以上出0,2,3个
                    {
                        string x = allNum[i].Substring(0, 1);
                        string y = allNum[i].Substring(1, 1);
                        string z = allNum[i].Substring(2, 1);
                        for (int j = 0; j < pingMianBiChu.Count; j++)
                        {
                            string jbk = pingMianBiChu[j];
                            if (allNum[i].Contains(jbk))
                            {
                                if (((pingMianBiChu.Contains(x) && pingMianBiChu.Contains(y)) || (pingMianBiChu.Contains(x) && pingMianBiChu.Contains(z)) || (pingMianBiChu.Contains(y) && pingMianBiChu.Contains(z))))
                                    result.Add(allNum[i]);
                            }
                        }
                        if (allNum[i].IndexOfAny(ppm.ToCharArray(0, ppm.Length)) < 0)
                        {
                            result.Add(allNum[i]);
                        }
                    }
                }
            #endregion
            }
            List<string> result1 = result.Distinct().ToList();//去除重复项
            return result1;
        }
コード例 #58
0
ファイル: efl_ui_spin_button.eo.cs プロジェクト: y01k/TizenFX
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs = new System.Collections.Generic.List <Efl_Op_Description>();

            if (efl_ui_spin_button_circulate_get_static_delegate == null)
            {
                efl_ui_spin_button_circulate_get_static_delegate = new efl_ui_spin_button_circulate_get_delegate(circulate_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_spin_button_circulate_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_spin_button_circulate_get_static_delegate)
                });
            if (efl_ui_spin_button_circulate_set_static_delegate == null)
            {
                efl_ui_spin_button_circulate_set_static_delegate = new efl_ui_spin_button_circulate_set_delegate(circulate_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_spin_button_circulate_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_spin_button_circulate_set_static_delegate)
                });
            if (efl_ui_spin_button_editable_get_static_delegate == null)
            {
                efl_ui_spin_button_editable_get_static_delegate = new efl_ui_spin_button_editable_get_delegate(editable_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_spin_button_editable_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_spin_button_editable_get_static_delegate)
                });
            if (efl_ui_spin_button_editable_set_static_delegate == null)
            {
                efl_ui_spin_button_editable_set_static_delegate = new efl_ui_spin_button_editable_set_delegate(editable_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_spin_button_editable_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_spin_button_editable_set_static_delegate)
                });
            if (efl_ui_direction_get_static_delegate == null)
            {
                efl_ui_direction_get_static_delegate = new efl_ui_direction_get_delegate(direction_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_direction_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_direction_get_static_delegate)
                });
            if (efl_ui_direction_set_static_delegate == null)
            {
                efl_ui_direction_set_static_delegate = new efl_ui_direction_set_delegate(direction_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_direction_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_direction_set_static_delegate)
                });
            if (efl_ui_focus_composition_elements_get_static_delegate == null)
            {
                efl_ui_focus_composition_elements_get_static_delegate = new efl_ui_focus_composition_elements_get_delegate(composition_elements_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_elements_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_elements_get_static_delegate)
                });
            if (efl_ui_focus_composition_elements_set_static_delegate == null)
            {
                efl_ui_focus_composition_elements_set_static_delegate = new efl_ui_focus_composition_elements_set_delegate(composition_elements_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_elements_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_elements_set_static_delegate)
                });
            if (efl_ui_focus_composition_logical_mode_get_static_delegate == null)
            {
                efl_ui_focus_composition_logical_mode_get_static_delegate = new efl_ui_focus_composition_logical_mode_get_delegate(logical_mode_get);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_logical_mode_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_logical_mode_get_static_delegate)
                });
            if (efl_ui_focus_composition_logical_mode_set_static_delegate == null)
            {
                efl_ui_focus_composition_logical_mode_set_static_delegate = new efl_ui_focus_composition_logical_mode_set_delegate(logical_mode_set);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_logical_mode_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_logical_mode_set_static_delegate)
                });
            if (efl_ui_focus_composition_dirty_static_delegate == null)
            {
                efl_ui_focus_composition_dirty_static_delegate = new efl_ui_focus_composition_dirty_delegate(dirty);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_dirty"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_dirty_static_delegate)
                });
            if (efl_ui_focus_composition_prepare_static_delegate == null)
            {
                efl_ui_focus_composition_prepare_static_delegate = new efl_ui_focus_composition_prepare_delegate(prepare);
            }
            descs.Add(new Efl_Op_Description()
                {
                    api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_focus_composition_prepare"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_focus_composition_prepare_static_delegate)
                });
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }
コード例 #59
0
ファイル: efl_canvas_group.eo.cs プロジェクト: yl33/TizenFX
        public override System.Collections.Generic.List <Efl_Op_Description> GetEoOps(System.Type type)
        {
            var descs   = new System.Collections.Generic.List <Efl_Op_Description>();
            var methods = Efl.Eo.Globals.GetUserMethods(type);

            if (efl_canvas_group_need_recalculate_get_static_delegate == null)
            {
                efl_canvas_group_need_recalculate_get_static_delegate = new efl_canvas_group_need_recalculate_get_delegate(group_need_recalculate_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetGroupNeedRecalculate") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_need_recalculate_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_need_recalculate_get_static_delegate)
                    });
            }
            if (efl_canvas_group_need_recalculate_set_static_delegate == null)
            {
                efl_canvas_group_need_recalculate_set_static_delegate = new efl_canvas_group_need_recalculate_set_delegate(group_need_recalculate_set);
            }
            if (methods.FirstOrDefault(m => m.Name == "SetGroupNeedRecalculate") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_need_recalculate_set"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_need_recalculate_set_static_delegate)
                    });
            }
            if (efl_canvas_group_clipper_get_static_delegate == null)
            {
                efl_canvas_group_clipper_get_static_delegate = new efl_canvas_group_clipper_get_delegate(group_clipper_get);
            }
            if (methods.FirstOrDefault(m => m.Name == "GetGroupClipper") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_clipper_get"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_clipper_get_static_delegate)
                    });
            }
            if (efl_canvas_group_change_static_delegate == null)
            {
                efl_canvas_group_change_static_delegate = new efl_canvas_group_change_delegate(group_change);
            }
            if (methods.FirstOrDefault(m => m.Name == "GroupChange") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_change"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_change_static_delegate)
                    });
            }
            if (efl_canvas_group_calculate_static_delegate == null)
            {
                efl_canvas_group_calculate_static_delegate = new efl_canvas_group_calculate_delegate(group_calculate);
            }
            if (methods.FirstOrDefault(m => m.Name == "CalculateGroup") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_calculate"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_calculate_static_delegate)
                    });
            }
            if (efl_canvas_group_members_iterate_static_delegate == null)
            {
                efl_canvas_group_members_iterate_static_delegate = new efl_canvas_group_members_iterate_delegate(group_members_iterate);
            }
            if (methods.FirstOrDefault(m => m.Name == "GroupMembersIterate") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_members_iterate"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_members_iterate_static_delegate)
                    });
            }
            if (efl_canvas_group_member_add_static_delegate == null)
            {
                efl_canvas_group_member_add_static_delegate = new efl_canvas_group_member_add_delegate(group_member_add);
            }
            if (methods.FirstOrDefault(m => m.Name == "AddGroupMember") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_member_add"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_member_add_static_delegate)
                    });
            }
            if (efl_canvas_group_member_remove_static_delegate == null)
            {
                efl_canvas_group_member_remove_static_delegate = new efl_canvas_group_member_remove_delegate(group_member_remove);
            }
            if (methods.FirstOrDefault(m => m.Name == "GroupMemberRemove") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_member_remove"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_member_remove_static_delegate)
                    });
            }
            if (efl_canvas_group_member_is_static_delegate == null)
            {
                efl_canvas_group_member_is_static_delegate = new efl_canvas_group_member_is_delegate(group_member_is);
            }
            if (methods.FirstOrDefault(m => m.Name == "IsGroupMember") != null)
            {
                descs.Add(new Efl_Op_Description()
                    {
                        api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_canvas_group_member_is"), func = Marshal.GetFunctionPointerForDelegate(efl_canvas_group_member_is_static_delegate)
                    });
            }
            descs.AddRange(base.GetEoOps(type));
            return(descs);
        }