Dictionary tabPage使用
public override bool AccptChange()
{
//if (oldvalue == null || oldvalue.Count <= 0)
//{
// return true;
//}
Dictionary<string, object>[] g = new Dictionary<string, object>[];
g[] = new Dictionary<string, object>();
g[] = new Dictionary<string, object>();
g[] = new Dictionary<string, object>();
g[] = new Dictionary<string, object>();
foreach (var item in oldvalue)
{
string tabitem = item.Key.ToString().Remove();
if (tabitem == "Do1")
{
if (rdcheck1.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(list);
if (SetSetting(g[],))
{
return true;
}
return false;
}
}
if (tabitem == "Do2")
{
if (rdcheck2.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(listDO2);
if (SetSetting(g[],))
{
this.tabPage2.Parent = this.tabControl1;
this.tabPage1.Parent = null;
this.tabPage3.Parent = null;
this.tabPage4.Parent = null;
return true;
}
return false;
}
}
if (tabitem == "Do3")
{
if (rdcheck3.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(listDO3);
if (SetSetting(g[],))
{
return true;
}
return false;
}
}
if (tabitem == "Do4")
{
if (rd4check.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(listDO4);
if (SetSetting(g[],))
{
return true;
}
return false;
}
}
}
return false;
}
public override bool CancelChange()
{
//if (oldvalue == null || oldvalue.Count <= 0)
//{
// return false;
//}
Dictionary<string, object>[] g = new Dictionary<string, object>[];
g[] = new Dictionary<string, object>();
g[] = new Dictionary<string, object>();
g[] = new Dictionary<string, object>();
g[] = new Dictionary<string, object>();
foreach (var item in oldvalue)
{
string tabitem = item.Key.ToString().Remove();
if (tabitem == "Do1")
{
if (rdcheck1.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(list);
if (SetSetting(g[], ))
{
this.tabPage1.Parent = this.tabControl1;
this.tabPage2.Parent = null;
this.tabPage3.Parent = null;
this.tabPage4.Parent = null;
return true;
}
return false;
}
}
if (tabitem == "Do2")
{
if (rdcheck2.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(listDO2);
if (SetSetting(g[], ))
{
this.tabPage2.Parent = this.tabControl1;
this.tabPage1.Parent = null;
this.tabPage3.Parent = null;
this.tabPage4.Parent = null;
return true;
}
return false;
}
}
if (tabitem == "Do3")
{
if (rdcheck3.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(listDO3);
if (SetSetting(g[], ))
{
return true;
}
return false;
}
}
if (tabitem == "Do4")
{
if (rd4check.Checked)
{
g[].Add(item.Key, item.Value);
g[] = FillControl.GetValueNew(listDO4);
if (SetSetting(g[], ))
{
return true;
}
return false;
}
}
}
return false;
}
收藏于 --
Dictionary tabPage使用的更多相关文章
- C#数组,List,Dictionary的相互转换
本篇文章会向大家实例讲述以下内容: 将数组转换为List 将List转换为数组 将数组转换为Dictionary 将Dictionary 转换为数组 将List转换为Dictionary 将Dicti ...
- ASP.NET Aries JSAPI 文档说明:AR.DataGrid、AR.Dictionary
AR.Global 文档 1:对象或属性: 名称 类型 说明 DG 对象 DataGrid操作对象 //datagrid集合,根据ID取出DataGrid对象,将Json当数组用. Items: ne ...
- WebAPI接口返回ArrayList包含Dictionary对象正确解析
一.问题提出 为了减少流量,将key-value(键值对)直接输出到Dictionary<string, string>,接口返回结果如下: 其中{}里面内容如下: 上图显示600是键,4 ...
- Linq在Array,List,Dictionary中的应用
Linq在Array,List,Dictionary中的应用 今天在实际工作中需要对array,list,dictionary进行排序,试一试linq,发现非常好用,代码如下: using Syste ...
- python之最强王者(8)——字典(dictionary)
1.Python 字典(Dictionary) 字典是另一种可变容器模型,且可存储任意类型对象. 字典的每个键值(key=>value)对用冒号(:)分割,每个对之间用逗号(,)分割,整个字典包 ...
- Swift3 - String 字符串、Array 数组、Dictionary 字典的使用
Swift相关知识,本随笔为 字符串.数组.字典的简单使用,有理解.使用错误的地方望能指正. ///************************************************** ...
- [LeetCode] Alien Dictionary 另类字典
There is a new alien language which uses the latin alphabet. However, the order among letters are un ...
- Dictionary
命名空间:System.Collections.Generic(程序集:mscorlib) Dictionary<TKey, TValue> 类 一般用法:通过key获取value,k ...
- 关于 Dictionary<string,string>,和List<T>在View的使用
在MVC中Dictionary<string,string>如何应用到View页面中呢,例: <input type="text" name=key value= ...
随机推荐
- input和div模仿select,带输入提示
有时候我们需要select和input的结合体,即可以使用下拉框,同时也可以用来输入,输入的同时显示可选的下拉选项 先上html代码 <div class="input-group i ...
- 811. Subdomain Visit Count (5月23日)
解答 class Solution { public: vector<string> subdomainVisits(vector<string>& cpdomains ...
- 利用clear清除浮动的一些问题
下面这段代码是用来清除浮动带来的高度塌陷问题 .clearfix:before { content: "."; display: block; height: 0; clear: ...
- button onclick实现跳转的常用方法
1.onclick="javascript:window.location.href='aa.htm' " 2.onclick="location='URL' " ...
- ElasticSearch5插件安装
http://blog.csdn.net/napoay/article/details/53896348 #更新 sudo yum update -y sudo rpm -ivh http://dl. ...
- STM32_1 搭建工程框架
搭建系统框架 -- 创建系统文件夹 -- 拷贝stm32库文件 -- 将文件添加至工程 -- 配置工程环境 1. 创建工程文件夹 找一个工程目录,我就在 stm32/Code 下创建一个模板工程Tem ...
- postgresql 日期类型处理实践
---- 日期+1 select date '2018-01-14' + integer '1'; 结果: 2018-01-15 ---- 日期+1 后 转 20180101 日期字符串 select ...
- Multimodal Machine Learning:A Survey and Taxonomy 综述阅读笔记
该笔记基于:Multimodal Machine Learning:A Survey and Taxonomy 该论文是一篇对多模态机器学习领域的总结和分类,且发表于2017年,算是相当新的综述了.老 ...
- WPF 应用程序资源、内容和数据文件
MSDN相关介绍: http://msdn.microsoft.com/zh-cn/library/aa970494(v=vs.100).aspx 内容文件(Content Files)内容文件简单的 ...
- P1199 三国游戏
题目描述 小涵很喜欢电脑游戏,这些天他正在玩一个叫做<三国>的游戏. 在游戏中,小涵和计算机各执一方,组建各自的军队进行对战.游戏中共有 N 位武将(N为偶数且不小于 4),任意两个武将之 ...