Example #1
0
        private void CompareButton_Click(object sender, EventArgs e)
        {
            if (!_model._shoppingCart.selectedItems.Any())
            {
                MessageBox.Show("נא הכנס פריטים לסל לצורך החישוב");
            }
            else
            {
                _model.FindTheMinPricesForAllChains();
                chain bestRankChain = _model.FindBestRank();
                if (bestRankChain != null)
                {
                    bestChainLabel.ForeColor = Color.CadetBlue;
                    bestChainLabel.Text      = "הרשת המשתלמת ביותר לסל זה היא " + bestRankChain.chain_name;
                    bestChainLabel.Left      = this.Width / 2 - bestChainLabel.Width / 2;
                }
                else
                {
                    bestChainLabel.ForeColor = Color.Red;
                    bestChainLabel.Text      = "לא נמצאה רשת מומלצת לסל קניות זה";
                }

                this.Height = 750;
                CreateResultTabControl();
            }
        }
Example #2
0
            public static chain from_iterable(CodeContext /*!*/ context, PythonType cls, object iterables)
            {
                chain res;

                if (cls == DynamicHelpers.GetPythonTypeFromType(typeof(chain)))
                {
                    res = new chain();
                    res.InnerEnumerator = LazyYielder(iterables);
                }
                else
                {
                    res = (chain)cls.CreateInstance(context);
                    res.InnerEnumerator = LazyYielder(iterables);
                }

                return(res);
            }
Example #3
0
            public static chain from_iterable(CodeContext/*!*/ context, PythonType cls, object iterables) {
                chain res;
                if (cls == DynamicHelpers.GetPythonTypeFromType(typeof(chain))) {
                    res = new chain();
                    res.InnerEnumerator = LazyYielder(iterables);
                } else {
                    res = (chain)cls.CreateInstance(context);
                    res.InnerEnumerator = LazyYielder(iterables);
                }

                return res;
            }
Example #4
0
 public void joinChains(chain c1, chain c2)
 {
     buildChain(c1.getSequence() + c2.getSequence(), c1.gameObject.transform);
     c1.destroy();
     c2.destroy();
 }