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); }
public void populateResults(string result) { this.views = new List <ViewCell>(); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result), true); if (dictionary.Count > 1) { for (int i = 0; i < dictionary["eventtime"].Count; i++) { string c; bool CC = false; if (dictionary["eventtype"][i] == "ANSWER") { c = "Yes"; CC = true; } else { c = "No"; } string[] s = new string[3] { FormatFunctions.PrettyPhone(dictionary["cid_num"][i]), dictionary["eventtime"][i], c }; GridFiller.rapidFillColorized(s, TSection, CC); } } }
public void populateGrid(string result) { dp = new List <DataPair>(); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["IDKey"].Count; i++) { DataPair d = new DataPair(int.Parse(dictionary["IDKey"][i]), dictionary["Index"][i], dictionary["Value"][i]); List <UIElement> list = new List <UIElement>() { d.Index, d.Value }; d.Index.Text = FormatFunctions.PrettyDate(dictionary["Index"][i]); if (d.Index.Text.Contains("~")) { d.Value.Text = FormatFunctions.lookupAgentName(int.Parse(dictionary["Value"][i])); } else { d.Value.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); } GridFiller.rapidFillPremadeObjects(list, bodyGrid, new bool[] { true, true }); dp.Add(d); } } }
public void populateStamps(string result) { GridFiller.PurgeHeader(HourCalcBody); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); List <string> clockin = new List <string>(); List <string> clockout = new List <string>(); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["IDKey"].Count; i++) { string[] y = new string[2]; y[0] = FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]); y[1] = convertState(dictionary["State"][i]); if (dictionary["State"][i] == "True") { GridFiller.rapidFillColorized(y, HourCalcBody, true); clockin.Add(FormatFunctions.PrettyDate(dictionary["TimeStamp"][i])); } else if (dictionary["State"][i] == "False") { GridFiller.rapidFillColorized(y, HourCalcBody, false); clockout.Add(FormatFunctions.PrettyDate(dictionary["TimeStamp"][i])); } else { GridFiller.rapidFill(y, HourCalcBody); } } double x = calculateHours(clockin, clockout) / 60; HourDisplay.Text = "Total Hours: " + x; } }
public void printHeader() { string[] s = new string[] { "Spec 1", "Spec 2", "Wholesale", "Market" }; if (BrandPicker.SelectedIndex == -1 || !BrandPicker.SelectedItem.Equals("Additives")) { s = new string[] { "Brand", "Spec 1", "Spec 2", "Wholesale", "Market" }; if (TypePicker.SelectedIndex == -1) { s = new string[] { "ItemType", "Brand", "Spec 1", "Spec 2", "Wholesale", "Market" }; } } else if (TypePicker.SelectedIndex == -1) { s = new string[] { "ItemType", "Spec 1", "Spec 2", "Wholesale", "Market" }; } int[] Spacing = new int[] { 1, 1, 1, 1, 1, 1 }; if (!(bool)EditMode.IsChecked) { if (s.Length == 5) { Spacing = new int[] { 1, 2, 1, 1, 1 }; } else if (s.Length == 4) { Spacing = new int[] { 2, 2, 1, 1 }; } } GridFiller.rapidFillSpacedRowHeightLocked(s, TSection, Spacing, new int[] { 25, 0 }); }
public static void Start(string pMatrixSize) { string path = @"D:\Mariell\Documents\2020\Analisis\Project1\Files\" + pMatrixSize + ".txt"; //"C:\Users\Kenneth SF\OneDrive - Estudiantes ITCR\TEC\2020\I Semestre\Análisis de Algoritmos\Proyectos\Proyecto_1\10x10_4.txt"; //Reads the file and converts it into two list, one for the rows and the other for the columns ReadFile(path, rowList, columnList); var nonogramMatrix = new int[rowList.Count, columnList.Count]; FinalNonogram = new int[rowList.Count, columnList.Count]; GridFiller.StartExe(nonogramMatrix, rowList, columnList); Utilities.CleanMatrix(FinalNonogram); /*** * CHANGE ALL OF THIS * * GridFiller.StartExe(nonogramMatrix,rowList,columnList); * Console.WriteLine(); * Utilities.CleanMatrix(FinalNonogram); * if (Utilities.HasSolution(FinalNonogram)) * Utilities.Print2DArray(FinalNonogram); * else * Console.WriteLine("El Nonograma no posee solución"); */ }
public void populateFields(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); this.entryDict = new List <DataPair>(); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["Index"].Count; i++) { DataPair dataPair = new DataPair(int.Parse(dictionary["IDKey"][i]), dictionary["Value"][i], dictionary["Index"][i]); dataPair.Value.Text = dictionary["Value"][i]; dataPair.Value.Placeholder = "Value here"; dataPair.Value.FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)); dataPair.Value.VerticalOptions = LayoutOptions.CenterAndExpand; dataPair.Value.HorizontalOptions = LayoutOptions.StartAndExpand; dataPair.Index.Text = dictionary["Index"][i]; dataPair.Index.Placeholder = "Index here"; dataPair.Index.FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)); dataPair.Index.VerticalOptions = LayoutOptions.CenterAndExpand; dataPair.Index.HorizontalOptions = LayoutOptions.EndAndExpand; ViewCell viewCell = new ViewCell(); StackLayout stackLayout = new StackLayout { Orientation = StackOrientation.Horizontal }; this.entryDict.Add(dataPair); List <View> list = new List <View>(); list.Add(dataPair.Value); list.Add(dataPair.Index); GridFiller.rapidFillPremadeObjects(list, TSection, new bool[] { true, true }); } } }
private void Formularz_Load(object sender, EventArgs e) { GridFiller.FillProductsGrid(ProductsGrid); GridFiller.FillPricesGrid(CenyGrid); GridFiller.FillPriceListsGrid(CennikiGrid); GridFiller.FillSummaryGrid(PodsumowanieGrid); }
public void populatePunches(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); if (dictionary.Count > 0) { GridFiller.PurgeGrid(logGrid); string[] list = new string[3]; for (int i = 0; i < dictionary["IDKey"].Count; i++) { list[0] = FormatFunctions.PrettyDate(dictionary["Note"][i]); list[2] = FormatFunctions.PrettyDate(dictionary["State"][i]); list[1] = FormatFunctions.PrettyDate(dictionary["TimeStamp"][i]); if (list[2] != "less") { GridFiller.rapidFillColorized(list, logGrid, bool.Parse(list[2])); } else { list[2] = "Location Log"; GridFiller.rapidFill(list, logGrid); } } } }
public void populatePage(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); entryDict = new List <DataPair>(); NameDisplay.Content = FormatFunctions.PrettyDate(dictionary["Name"][0]); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["Index"].Count; i++) { DataPair dataPair = new DataPair(int.Parse(dictionary["FID"][i]), dictionary["value"][i], dictionary["Index"][i]); dataPair.Value.Text = FormatFunctions.PrettyDate(dictionary["value"][i]); dataPair.Value.ToolTip = "Value here"; dataPair.Index.Text = FormatFunctions.PrettyDate(dictionary["Index"][i]); dataPair.Index.ToolTip = "Index here"; List <UIElement> list = new List <UIElement>() { dataPair.Index, dataPair.Value }; int[] space = new int[] { 2, 2 }; bool[] box = new bool[] { true, true }; GridFiller.rapidFillSpacedPremadeObjects(list, mainGrid, space, box); this.entryDict.Add(dataPair); } } //this.populateFileList(); }
public void populateList(string result) { //DatabaseFunctions.SendToDebug("Beginning populating daily tasks"); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); if (dictionary.Count > 1) { for (int i = 0; i < dictionary["Name"].Count; i++) { string text = dictionary["Name"][i] ?? ""; SecurityButton dataButton = new SecurityButton(int.Parse(dictionary["IDKey"][i]), new string[] { "Employee" }) { Text = text, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)), VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand }; dataButton.Clicked += this.onClicked; List <View> list = new List <View>(); list.Add(dataButton); GridFiller.rapidFillPremadeObjects(list, tasksList, new bool[] { true, true }); } } //DatabaseFunctions.SendToDebug("Finsihed populating daily tasks"); }
public void populatePage(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); entryDict = new List <DataPair>(); NameDisplay.Text = dictionary["Name"][0]; if (dictionary.Count > 0) { for (int i = 0; i < dictionary["Index"].Count; i++) { DataPair dataPair = new DataPair(int.Parse(dictionary["FID"][i]), dictionary["value"][i], dictionary["Index"][i]); dataPair.Value.Text = dictionary["value"][i]; dataPair.Value.Placeholder = "Value here"; dataPair.Value.FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)); dataPair.Value.VerticalOptions = LayoutOptions.CenterAndExpand; dataPair.Value.HorizontalOptions = LayoutOptions.StartAndExpand; dataPair.Index.Text = dictionary["Index"][i]; dataPair.Index.Placeholder = "Index here"; dataPair.Index.FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)); dataPair.Index.VerticalOptions = LayoutOptions.CenterAndExpand; dataPair.Index.HorizontalOptions = LayoutOptions.EndAndExpand; List <View> list = new List <View>() { dataPair.Index, dataPair.Value }; int[] space = new int[] { 2, 2 }; bool[] box = new bool[] { true, true }; GridFiller.rapidFillSpacedPremadeObjects(list, mainGrid, space, box); this.entryDict.Add(dataPair); } } this.populateFileList(); }
public void populateList(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); for (int i = 0; i < dictionary["FName"].Count; i++) { string text = dictionary["FName"][i] ?? ""; Label item = new Label { Content = (text ?? ""), }; DataSwitch item2 = new DataSwitch(int.Parse(dictionary["IDKey"][i])) { }; DataSwitch item3 = new DataSwitch(int.Parse(dictionary["IDKey"][i])) { }; List <UIElement> list = new List <UIElement>() { item, item2, item3 }; GridFiller.rapidFillPremadeObjects(list, TSection, new bool[] { true, true, true }); Favorites.Add(item2); Group.Add(item3); } }
public void setupBoxes(string result) { Labels = new List <Label>(); checkBoxes = new List <UIElement>(); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); uniqueIDs = dictionary["IDKey"]; uniqueNames = dictionary["FName"]; foreach (string s in uniqueIDs) {//Possible roles are: Sales, Installer List <UIElement> elements = new List <UIElement>(); elements.Add(new Label() { Content = s }); elements.Add(new DataDoubleSwitch(int.Parse(s), 0) { HorizontalAlignment = HorizontalAlignment.Center }); //Sales elements.Add(new DataDoubleSwitch(int.Parse(s), 1) { HorizontalAlignment = HorizontalAlignment.Center }); //Installer checkBoxes.AddRange(elements); GridFiller.rapidFillPremadeObjects(elements, BodyGrid, new bool[] { true, false, false }); } checkBoxes = FormatFunctions.scrubOutUnlessWanted(checkBoxes, new DataDoubleSwitch(0, 0), Labels); for (int j = 0; j < uniqueNames.Count; j++) { Labels[j].Content = uniqueNames[j]; } }
public void populateList(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); Dictionary <string, SecurityButton> dictionary2 = new Dictionary <string, SecurityButton>(); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["Name"].Count; i++) { if (!dictionary2.ContainsKey(dictionary["IDKey"][i])) { string text = FormatFunctions.PrettyDate(dictionary["Name"][i]) + " ," + FormatFunctions.PrettyDate(dictionary["Value"][i]); SecurityButton dataButton = new SecurityButton(int.Parse(dictionary["IDKey"][i]), new string[] { "Employee" }) { Content = text, Width = ClientData.sideFrame.Width * 0.925 }; dataButton.Click += this.onClicked; dataButton.Integer2 = int.Parse(dictionary["Stage"][i]); List <UIElement> list = new List <UIElement>() { dataButton }; bool[] box = new bool[] { false }; GridFiller.rapidFillPremadeObjectsStandardHeight(list, dataGrid, box, 25); dictionary2.Add(dictionary["IDKey"][i], dataButton); } else { SecurityButton dataButton2 = dictionary2[dictionary["IDKey"][i]]; dataButton2.Content = dataButton2.Content + " ," + dictionary["Value"][i]; } } } }
public void onClickAddFields(object sender, EventArgs e) { DataPair dataPair = new DataPair(0, "", ""); dataPair.setNew(); dataPair.Value.Text = ""; dataPair.Value.Placeholder = "Index here"; dataPair.Value.FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)); dataPair.Value.VerticalOptions = LayoutOptions.CenterAndExpand; dataPair.Value.HorizontalOptions = LayoutOptions.StartAndExpand; dataPair.Index.Text = ""; dataPair.Index.Placeholder = "Value here"; dataPair.Index.FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)); dataPair.Index.VerticalOptions = LayoutOptions.CenterAndExpand; dataPair.Index.HorizontalOptions = LayoutOptions.EndAndExpand; ViewCell viewCell = new ViewCell(); StackLayout stackLayout = new StackLayout { Orientation = StackOrientation.Horizontal }; List <View> list = new List <View>(); list.Add(dataPair.Value); list.Add(dataPair.Index); GridFiller.rapidFillPremadeObjects(list, TSection, new bool[] { true, true }); this.entryDict.Add(dataPair); }
public void populateResults(string result) { this.PurgeCells(); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result), true); if (dictionary.Count > 1) { for (int i = 0; i < dictionary["uniqueid"].Count; i++) { string text = dictionary["calldate"][i] + " : " + FormatFunctions.PrettyPhone(dictionary["cnam"][i]); SecurityButton dataButton = new SecurityButton(int.Parse(Regex.Replace(dictionary["uniqueid"][i], "^[^.]+.", "")), new string[] { "Manager" }) { Text = text, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)), VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.EndAndExpand }; dataButton.Clicked += onClicked; dataButton.String = dictionary["calldate"][i]; dataButton.String2 = dictionary["recordingfile"][i]; List <View> list = new List <View> { dataButton }; GridFiller.rapidFillPremadeObjects(list, TSection, new bool[] { true }); } } }
public void populateResults(string result) { this.PurgeCells(); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result), true); if (dictionary.Count > 1) { for (int i = 0; i < dictionary["uniqueid"].Count; i++) { string text = dictionary["calldate"][i] + " : " + FormatFunctions.PrettyPhone(dictionary["cnam"][i]); SecurityButton dataButton = new SecurityButton(int.Parse(Regex.Replace(dictionary["uniqueid"][i], "^[^.]+.", "")), new string[] { "Manager" }) { Content = text }; dataButton.Click += onClicked; dataButton.String = dictionary["calldate"][i]; dataButton.String2 = dictionary["recordingfile"][i]; List <UIElement> list = new List <UIElement> { dataButton }; GridFiller.rapidFillPremadeObjects(list, TSection, new bool[] { true }); } } }
public void populateTardiGrid(string result) { GridFiller.PurgeHeader(TardiGrid); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); int sick = 0; int tardy = 0; if (dictionary["IDKey"].Count > 0) { for (int i = 0; i < dictionary["IDKey"].Count; i++) { GridFiller.rapidFill(new string[] { dictionary["RecordType"][i], dictionary["Date"][i], dictionary["Note"][i] }, TardiGrid); if (dictionary["RecordType"][i] == "Sick") { sick++; } else if (dictionary["RecordType"][i] == "Tardy") { tardy++; } } } Sick.Content = "Sick Days: " + sick; Late.Content = "Late Days: " + tardy; }
public virtual void InitEntity <T>(T entity, IEnumerable <BindPropertyInfo> detailsInfo) { // fill properties GridFiller.FillGrid(gridDetails, detailsInfo); // init data context gridDetails.DataContext = entity; }
public void populateLiveFeed(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); if (dictionary.Count > 0) { string[] s = new string[] { dictionary["FName"][0], convertState(dictionary["State"][0]), dictionary["Coordinates"][0], FormatFunctions.PrettyDate(dictionary["TimeStamp"][0]), FormatFunctions.getAgeOfTimestamp(FormatFunctions.PrettyDate(dictionary["TimeStamp"][0])), dictionary["Note"][0] }; GridFiller.rapidFill(s, LiveBody); } }
//@@@@@@@@@@@@@@@ CENY @@@@@@@@@@@@@@@@@\\ private void AddPriceBtn_Click(object sender, EventArgs e) { using (var addform = new AddEditCenyForm(null)) { if (addform.ShowDialog() == DialogResult.Yes) { GridFiller.FillPricesGrid(CenyGrid); } } }
public void populateTableWithAudit(string result) { string[] input = FormatFunctions.SplitToPairs(result); dict = FormatFunctions.createValuePairs(input); if (dict.Count > 0) { string[] total = dict["Total"].ToArray(); int[] idk = Array.ConvertAll <string, int>(dict["IDKey"].ToArray(), int.Parse); GridFiller.rapidAppendData(total, idk, BodyGrid); } }
public void populateTable(string result) { string[] input = FormatFunctions.SplitToPairs(result); dict = FormatFunctions.createValuePairs(input); if (dict.Count > 0) { for (int i = 0; i < dict["Description"].Count; i++) { string[] s = new string[] { dict["Description"][i], dict["Price"][i], dict["Total"][i] }; GridFiller.rapidFill(s, BodyGrid); } } }
public void populatePage(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); entryDict = new List <DataPair>(); if (dictionary.Count > 0) { nameLabel.Text = dictionary["Name"][0]; for (int i = 0; i < dictionary["Index"].Count; i++) { if (dictionary["Index"][i].Contains("hone")) { phoneLabel.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); } else if (dictionary["Index"][i].Contains("alesMan")) { SalemanCombo.SelectedIndex = DatabaseFunctions.findIndexInList(salesmen, dictionary["Value"][i]);//TODO UPDATE with proper index checking } else if (dictionary["Index"][i].Contains("uoteTotal")) { QuoteTotal.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); } else if (dictionary["Index"][i].Contains("ontactDate")) { contactLabel.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); } else { DataPair dataPair = new DataPair(int.Parse(dictionary["FID"][i]), dictionary["Index"][i], dictionary["Value"][i]); dataPair.Value.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); dataPair.Value.Placeholder = "Value here"; dataPair.Index.Text = FormatFunctions.PrettyDate(dictionary["Index"][i]);; dataPair.Index.Placeholder = "Index here"; List <View> list = new List <View>() { dataPair.Index, dataPair.Value }; GridFiller.rapidFillPremadeObjects(list, bottomStack, new bool[] { true, true }); entryDict.Add(dataPair); if (dictionary["Index"][i].Contains("dress")) { address = FormatFunctions.PrettyDate(dictionary["Value"][i]); } } } } FileList fl = new FileList(customer); GridHolder.Children.Add(fl); }
public void populateChat(string result) { GridFiller.PurgeAllGrid(ChatStack); Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); if (dictionary.Count > 0) { for (int i = 0; i < dictionary["Message"].Count; i++) { string[] s = new string[] { FormatFunctions.PrettyDate(dictionary["Timestamp"][i]) + ":" + dictionary["FName"][i] + ":" + FormatFunctions.PrettyDate(dictionary["Message"][i]) }; GridFiller.rapidFill(s, ChatStack); } } }
public void onClickAddFields(object sender, RoutedEventArgs e) { DataPair dataPair = new DataPair(0, "", ""); dataPair.setNew(); dataPair.Value.Text = ""; dataPair.Value.ToolTip = "Index here"; dataPair.Index.Text = ""; dataPair.Index.ToolTip = "Value here"; GridFiller.rapidFillPremadeObjects(new List <UIElement>() { dataPair.Index, dataPair.Value }, mainGrid, new bool[] { true, true }); this.entryDict.Add(dataPair); }
public void onClickAddFields(object sender, EventArgs e) { DataPair dataPair = new DataPair(0, "", ""); dataPair.setNew(); dataPair.Value.Text = ""; dataPair.Index.Text = ""; List <UIElement> list = new List <UIElement>() { dataPair.Index, dataPair.Value }; GridFiller.rapidFillPremadeObjects(list, MainGrid, new bool[] { true, true }); dp.Add(dataPair); }
public void populatePage(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); entryDict = new List <DataPair>(); if (dictionary.Count > 0) { nameLabel.Text = FormatFunctions.PrettyDate(dictionary["Name"][0]); for (int i = 0; i < dictionary["Index"].Count; i++) { if (dictionary["Index"][i].Contains("hone")) { phoneLabel.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); } else if (dictionary["Index"][i].Contains("alesMan")) { SalemanCombo.SelectedIndex = DatabaseFunctions.findIndexInList(salesmen, dictionary["Value"][i]); } else if (dictionary["Index"][i].Contains("uoteTotal")) { QuoteTotal.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); } else if (dictionary["Index"][i].Contains("ontactDate")) { contactLabel.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); } else { DataPair dataPair = new DataPair(int.Parse(dictionary["FID"][i]), dictionary["Index"][i], dictionary["Value"][i]); dataPair.Value.Text = FormatFunctions.PrettyDate(dictionary["Value"][i]); dataPair.Value.ToolTip = "Value here"; dataPair.Index.Text = FormatFunctions.PrettyDate(dictionary["Index"][i]);; dataPair.Index.ToolTip = "Index here"; List <UIElement> list = new List <UIElement>() { dataPair.Index, dataPair.Value }; int[] j = new int[] { 2, 4 }; GridFiller.rapidFillSpacedPremadeObjects(list, bottomStack, j, new bool[] { true, true }); entryDict.Add(dataPair); if (dictionary["Index"][i].Contains("dress")) { address = FormatFunctions.PrettyDate(dictionary["Value"][i]); } } } } }
public void populatePage(string result) { Dictionary <string, List <string> > dictionary = FormatFunctions.createValuePairs(FormatFunctions.SplitToPairs(result)); entryDict = new List <DataPair>(); if (dictionary.Count > 0) { nameLabel.Text = dictionary["Name"][0]; for (int i = 0; i < dictionary["Index"].Count; i++) { if (dictionary["Index"][i].Contains("ook") && dictionary["Value"][i] != "") { datePicker.Date = DateTime.Parse(FormatFunctions.PrettyDate(dictionary["Value"][i])); } else if (dictionary["Index"][i].Contains("otes")) { noteLabel.Text += dictionary["Value"][i]; } else if (dictionary["Index"][i].Contains("dress")) { address = dictionary["Value"][i]; addressLabel.Text = dictionary["Value"][i]; } else { DataPair dataPair = new DataPair(int.Parse(dictionary["FID"][i]), dictionary["Value"][i], dictionary["Index"][i]); dataPair.Value.Text = dictionary["Value"][i]; dataPair.Value.Placeholder = "Value here"; dataPair.Index.Text = dictionary["Index"][i]; dataPair.Index.Placeholder = "Index here"; List <View> list = new List <View>() { dataPair.Index, dataPair.Value }; GridFiller.rapidFillPremadeObjectsStandardHeight(list, bodyGrid, new bool[] { true, true }, 50); entryDict.Add(dataPair); if (dictionary["Index"][i].Contains("hone")) { phoneLabel.Text = dictionary["Value"][i]; } } } } FileList fl = new FileList(customer); GridHolder.Children.Add(fl); }