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= ...
随机推荐
- Window系统Oracle 安装
一:安装Oracle 数据库软件 1.先去官网下载所需文件:http://www.oracle.com/technetwork/database/enterprise-edition/download ...
- iOS 文件下载及断点续传
ios的下载我们可以使用的方法有:NSData.NSURLConnection.NSURLSession还有第三方框架AFNetworking和ASI 利用NSData方法和NSURLConnecti ...
- Flask入门数据库的查询集与过滤器(十一)
1 查询集 : 指数据查询的集合 原始查询集: 不经过任何过滤返回的结果为原始查询集 数据查询集: 将原始查询集经过条件的筛选最终返回的结果 查询过滤器: 过滤器 功能 cls.query.filte ...
- idea 聚合项目里如果子项目引用不到父类的maven应用
idea 聚合项目里如果子项目引用不到父类的maven应用,可以点看子类pom.xml文件,然后右键---->maven----->Reimport即可 点击右边子项目的maven---& ...
- LinkedList的源码分析(基于jdk1.8)
1.初始化 public LinkedList() { } 并未开辟任何类似于数组一样的存储空间,那么链表是如何存储元素的呢? 2.Node类型 存储到链表中的元素会被封装为一个Node类型的结点.并 ...
- pyhton新手学习之增删改查
一 .列表的定义 1.列表的定义 names = [ "xiajiqni", "test", "wangwu","oldb ...
- AtCoder Grant Contest 10.F 博弈
题意:给定一棵树,每个节点有个权值,Alice和Bob轮流进行操作,给定游戏起点指针指向节点C.不断进行下述操作. 1.将当前节点权值-1,然后将指针从该节点移动到相邻节点,出现一方不能移动(即指针指 ...
- pix2code开发笔记
1.软件安装 首先需要安装Python3和pip (1) Python3 环境搭建 Window 平台安装 Python: https://www.python.org/downloads/wind ...
- 从国内下载Linux的CentOS系统
http://mirror.nsc.liu.se/centos-store/7.3.1611/isos/x86_64/
- EL/JSTL-jsp页面更简单的输出方式
1.EL(Expression Language):表达式语言,用于页面输出 格式:${表达式} EL支持四则运算,关系运算[常用eq来比较字符串或判断相等],逻辑运算 EL访问空间内对象,[类.对象 ...