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. Java中的IO流(二)

    上一篇<Java中的IO流(一)>把学习IO流的字符流作了一下记录,本篇把字节流记录一下. 一,Java中的字节流 Java中的字节流的操作方式与字符流的操作方式大致相同,连方法名都是类似 ...

  2. http://imgbase64.duoshitong.com/ 图片转换 base64

    base64图片工具介绍: 1.支持 PNG.GIF.JPG.BMP.ICO 格式. 2.将图片转换为Base64编码,可以让你很方便地在没有上传文件的条件下将图片插入其它的网页.编辑器中. 这对于一 ...

  3. 2017年终总结&展望2018年

    转眼就要挥别2017年了,也看到好多人都在叹时间过得好快.对啊,在我的印象中时间过得慢的时期恐怕只有中小学期间了,转眼研究生阶段已经过了一半.如今这个阶段,很多时候忙任务和学东西好不容易觉得自己摸到点 ...

  4. MySQL必知必会 读书笔记三:检索数据和数据排序

    检索数据 SELECT语句 它的用途是从一个或多个表中检索信息. 为了使用SELECT检索表数据,必须至少给出两条信息--想选择什 么,以及从什么地方选择. 检索单个列 SELECT col_1 FR ...

  5. systemd的新特性及常见的systemd unit类型分析

    systemd概述 )systemd是一种新的linux系统服务管理器,用于替换init系统,能够管理系统启动过程和系统服务,一旦启动起来,就将监管整个系统.在centos7系统中,PID1被syst ...

  6. SQL Server 2012 - 数据更新操作

    SELECT * FROM dbo.Student; --1, 插入数据 Insert ,逗号分隔可以同时插入多条 INSERT dbo.Student ( StuID, Class, StuName ...

  7. ASP.NET Core优化MD5加密

    MD5是我们常用的一种加密方式,但是有朋友和我说C#自带的MD5方法碰撞阻力太低,担心安全问题 然后我这里开源一下我日常使用的优化后的MD5加密方法 代码中先创建出MD5对象后对字符串先进行MD5加密 ...

  8. openssl windows平台编译库

    首先感谢http://blog.csdn.net/YAOJINGKAO/article/details/53041165?locationNum=10&fps=1和https://www.cn ...

  9. 1.Python是什么

    前言   这里只是根据个人的理解而谈,庸俗浅薄,不是科学定义,也可以认为是假装自己理解啦,掩耳盗铃罢了.知无涯是多么的恐怖,哈哈 计算机语言   此处的语言不同于我们生活中所说的语言,因为生活中的语言 ...

  10. linux进程篇 (三) 进程间的通信1 管道通信

    通信方式分4大类: 管道通信:无名管道 有名管道 信号通信:发送 接收 和 处理 IPC通信:共享内存 消息队列 信号灯 socke 网络通信 用户空间 进程A <----无法通信----> ...