Пример #1
0
        public void onClickAddPrefilledFieldsQ(object sender, EventArgs e)
        {
            FlaggedDataPair dataPair = new FlaggedDataPair(0, "", "", currentQuote);

            dataPair.setNew();
            dataPair.Index.Text = PriceGuide.SelectedItem.ToString();
            dataPair.Value.Text = prices[PriceGuide.SelectedIndex];
            List <View> list = new List <View>()
            {
                dataPair.Index, dataPair.Value
            };

            if (currentQuote == 0)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid1, new bool[] { true, true });
            }
            else if (currentQuote == 1)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid2, new bool[] { true, true });
            }
            else if (currentQuote == 2)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid3, new bool[] { true, true });
            }
            else if (currentQuote == 3)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid4, new bool[] { true, true });
            }
            else if (currentQuote == 4)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid5, new bool[] { true, true });
            }
            entryDictQ.Add(dataPair);
        }
Пример #2
0
        public void populateQuoteList(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            entryDictQ = new List <FlaggedDataPair>();
            if (dictionary.Count > 0)
            {
                for (int i = 0; i < dictionary["Value"].Count; i++)
                {
                    FlaggedDataPair dataPair = new FlaggedDataPair(0, dictionary["Value"][i], dictionary["AdvValue"][i], int.Parse(dictionary["TaskID"][i]));
                    dataPair.Value.Text    = FormatFunctions.PrettyDate(dictionary["Value"][i]);
                    dataPair.Value.ToolTip = "Item";
                    dataPair.Index.Text    = FormatFunctions.PrettyDate(dictionary["AdvValue"][i]);
                    dataPair.Index.ToolTip = "Amount";
                    List <UIElement> list = new List <UIElement>()
                    {
                        dataPair.Index, dataPair.Value
                    };
                    int[] j = new int[] { 2, 4 };
                    if (dictionary["TaskID"][i] == "0")
                    {
                        GridFiller.rapidFillSpacedPremadeObjects(list, Option1, j, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "1")
                    {
                        GridFiller.rapidFillSpacedPremadeObjects(list, Option2, j, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "2")
                    {
                        GridFiller.rapidFillSpacedPremadeObjects(list, Option3, j, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "3")
                    {
                        GridFiller.rapidFillSpacedPremadeObjects(list, Option4, j, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "4")
                    {
                        GridFiller.rapidFillSpacedPremadeObjects(list, Option5, j, new bool[] { true, true });
                    }
                    entryDictQ.Add(dataPair);
                }
            }
        }
Пример #3
0
        public void populateQuoteList(string result)
        {
            Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result));

            entryDictQ = new List <FlaggedDataPair>();
            if (dictionary.Count > 0)
            {
                for (int i = 0; i < dictionary["Value"].Count; i++)
                {
                    FlaggedDataPair dataPair = new FlaggedDataPair(0, dictionary["Value"][i], dictionary["AdvValue"][i], int.Parse(dictionary["TaskID"][i]));
                    dataPair.Value.Text        = dictionary["Value"][i];
                    dataPair.Value.Placeholder = "Item";
                    dataPair.Index.Text        = dictionary["AdvValue"][i];
                    dataPair.Index.Placeholder = "Amount";
                    List <View> list = new List <View>()
                    {
                        dataPair.Index, dataPair.Value
                    };
                    if (dictionary["TaskID"][i] == "0")
                    {
                        GridFiller.rapidFillPremadeObjects(list, QuoteGrid1, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "1")
                    {
                        GridFiller.rapidFillPremadeObjects(list, QuoteGrid2, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "2")
                    {
                        GridFiller.rapidFillPremadeObjects(list, QuoteGrid3, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "3")
                    {
                        GridFiller.rapidFillPremadeObjects(list, QuoteGrid4, new bool[] { true, true });
                    }
                    else if (dictionary["TaskID"][i] == "4")
                    {
                        GridFiller.rapidFillPremadeObjects(list, QuoteGrid5, new bool[] { true, true });
                    }
                    entryDictQ.Add(dataPair);
                }
            }
        }
Пример #4
0
        public void onClickAddFieldsQ(object sender, RoutedEventArgs e)
        {
            FlaggedDataPair dataPair = new FlaggedDataPair(0, "", "", Tab.SelectedIndex);

            dataPair.setNew();
            dataPair.Index.Text    = "";
            dataPair.Index.ToolTip = "Item";
            dataPair.Value.Text    = "";
            dataPair.Value.ToolTip = "Amount";
            List <UIElement> list = new List <UIElement>()
            {
                dataPair.Index, dataPair.Value
            };

            int[] i = new int[] { 3, 3 };

            if (Tab.SelectedIndex == 0)
            {
                GridFiller.rapidFillSpacedPremadeObjects(list, Option1, i, new bool[] { true, true });
            }
            else if (Tab.SelectedIndex == 1)
            {
                GridFiller.rapidFillSpacedPremadeObjects(list, Option2, i, new bool[] { true, true });
            }
            else if (Tab.SelectedIndex == 2)
            {
                GridFiller.rapidFillSpacedPremadeObjects(list, Option3, i, new bool[] { true, true });
            }
            else if (Tab.SelectedIndex == 3)
            {
                GridFiller.rapidFillSpacedPremadeObjects(list, Option4, i, new bool[] { true, true });
            }
            else if (Tab.SelectedIndex == 4)
            {
                GridFiller.rapidFillSpacedPremadeObjects(list, Option5, i, new bool[] { true, true });
            }
            entryDictQ.Add(dataPair);
        }
Пример #5
0
        public void onClickAddFieldsQ(object sender, EventArgs e)
        {
            FlaggedDataPair dataPair = new FlaggedDataPair(0, "", "", currentQuote);

            dataPair.setNew();
            dataPair.Value.Text        = "";
            dataPair.Value.Placeholder = "Item";
            dataPair.Index.Text        = "";
            dataPair.Index.Placeholder = "Amount";
            List <View> list = new List <View>()
            {
                dataPair.Index, dataPair.Value
            };

            if (currentQuote == 0)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid1, new bool[] { true, true });
            }
            else if (currentQuote == 1)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid2, new bool[] { true, true });
            }
            else if (currentQuote == 2)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid3, new bool[] { true, true });
            }
            else if (currentQuote == 3)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid4, new bool[] { true, true });
            }
            else if (currentQuote == 4)
            {
                GridFiller.rapidFillPremadeObjects(list, QuoteGrid5, new bool[] { true, true });
            }
            entryDictQ.Add(dataPair);
        }