Esempio n. 1
0
        private void Button_ClickAddManifestHead(object sender, RoutedEventArgs e)
        {
            if (!string.IsNullOrEmpty(TextBox_ManifestHeadName.Text))
            {
                KeyValue kv = new KeyValue();
                kv.key = TextBox_ManifestHeadName.Text;

                ManifestHeadList.Add(kv);

                ManifestHeadList = ManifestHeadList;

                TextBox_ManifestHeadName.Text = "";
            }
        }
Esempio n. 2
0
        private void Button_ClickDeleteManifestHead(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            string key = (string)btn.Tag;

            for (int i = 0; i < ManifestHeadList.Count; i++)
            {
                if (ManifestHeadList[i].key == key)
                {
                    ManifestHeadList.RemoveAt(i);
                }
            }

            ManifestHeadList = ManifestHeadList;
        }