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使用的更多相关文章

  1. C#数组,List,Dictionary的相互转换

    本篇文章会向大家实例讲述以下内容: 将数组转换为List 将List转换为数组 将数组转换为Dictionary 将Dictionary 转换为数组 将List转换为Dictionary 将Dicti ...

  2. ASP.NET Aries JSAPI 文档说明:AR.DataGrid、AR.Dictionary

    AR.Global 文档 1:对象或属性: 名称 类型 说明 DG 对象 DataGrid操作对象 //datagrid集合,根据ID取出DataGrid对象,将Json当数组用. Items: ne ...

  3. WebAPI接口返回ArrayList包含Dictionary对象正确解析

    一.问题提出 为了减少流量,将key-value(键值对)直接输出到Dictionary<string, string>,接口返回结果如下: 其中{}里面内容如下: 上图显示600是键,4 ...

  4. Linq在Array,List,Dictionary中的应用

    Linq在Array,List,Dictionary中的应用 今天在实际工作中需要对array,list,dictionary进行排序,试一试linq,发现非常好用,代码如下: using Syste ...

  5. python之最强王者(8)——字典(dictionary)

    1.Python 字典(Dictionary) 字典是另一种可变容器模型,且可存储任意类型对象. 字典的每个键值(key=>value)对用冒号(:)分割,每个对之间用逗号(,)分割,整个字典包 ...

  6. Swift3 - String 字符串、Array 数组、Dictionary 字典的使用

    Swift相关知识,本随笔为 字符串.数组.字典的简单使用,有理解.使用错误的地方望能指正. ///************************************************** ...

  7. [LeetCode] Alien Dictionary 另类字典

    There is a new alien language which uses the latin alphabet. However, the order among letters are un ...

  8. Dictionary

    命名空间:System.Collections.Generic(程序集:mscorlib) Dictionary<TKey, TValue> 类   一般用法:通过key获取value,k ...

  9. 关于 Dictionary<string,string>,和List<T>在View的使用

    在MVC中Dictionary<string,string>如何应用到View页面中呢,例: <input type="text" name=key value= ...

随机推荐

  1. Oracle中字符串截取常用方法总结

    substr 函数:截取字符串  语法:SUBSTR(string,start, [length]) string:表示源字符串,即要截取的字符串. start:开始位置,从1开始查找.如果start ...

  2. 缓存反向代理-Varnish

    简介 Varnish是一款高性能.开源的缓存反向代理服务器.它从客户端接受请求,并尝试从缓存中响应请求,如果无法从缓存中提供响应,Varnish 向后端服务器发起请求,获取响应,将响应存储在缓存中,然 ...

  3. python__PIP : 安装第三方库

    pipy国内镜像目前有: http://pypi.douban.com/  豆瓣 http://pypi.hustunique.com/  华中理工大学 http://pypi.sdutlinux.o ...

  4. 分布式时间同步ntp安装

    直接执行:sudo yum install ntp或者sudo -y install ntp

  5. 前端css之float浮动

    浮动的准则,先找前一个块标签,在确认有否清除浮动的条件或者是距离的情况下,如果这一行能摆得下,就继续紧贴前一个标签 如果摆不下,就会另起一行 浮动只有左边和右边 如果是块标签,设置浮动,先把displ ...

  6. ACM1002:A + B Problem II

    Problem Description I have a very simple problem for you. Given two integers A and B, your job is to ...

  7. C语言:一个数组中只有两个数字是出现一次

    //1.一个数组中只有两个数字是出现一次, //其他所有数字都出现了两次. //找出这两个数字,编程实现.a //^=单独两个数的^结果 //单独出现的两个数不同位的标记 //position: ^结 ...

  8. C语言调整数组使奇数全部都位于偶数前面

    //输入一个整数数组,实现一个函数,//来调整该数组中数字的顺序使得数组中所有的奇数 位于数组的前半部分,//所有偶数 位于数组的后半部分. #include<stdio.h>#inclu ...

  9. ACM数据结构-并查集

    ACM数据结构-并查集   并查集,在一些有N个元素的集合应用问题中,我们通常是在开始时让每个元素构成一个单元素的集合,然后按一定顺序将属于同一组的元素所在的集合合并,其间要反复查找一个元素在哪个集合 ...

  10. MySQL入门第三天(下)——存储过程与存储引擎

    一.存储过程 1.简介 原始的SQL执行的流程: 通过存储过程,便可以简化以上流程,那么存储过程是什么,如何进行性能提高呢? 是什么? 存储过程是可编程的函数,在数据库中创建并保存,可以由SQL语句和 ...