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= ...
随机推荐
- 不用注解,获取spring容器里的bean(ApplicaitonContext)
以静态变量保存Spring ApplicationContext, 可在任何代码任何地方任何时候取出ApplicaitonContext. 使用方法:SpringContextHolder.getBe ...
- c++string标准输入和getline()整行读入
1.使用标准IO操作读写string对象 我们都知道,使用标准iostream操作来读写int ,double等内置类型的值,同样,我们也可以使用IO操作来读写string对象. c++ code: ...
- chromium之message_pump_win之二
接下来分析 MessagePumpForUI上一篇分析MessagePumpWin,可以参考chromium之message_pump_win之一 根据对MessagePumpWin的分析,Messa ...
- mysql_config_editor的使用
从Mysql5.6.6 开始mysql_config_editor允许存储加密的身份验证文件.mylogin.cnf 如果不想每次登录服务器都输入数据库的密码可以使用该功能 mysql_config_ ...
- Tomcat性能监控
Tomcat性能监控工具很多,这里介绍两种1.JMeter 2.probe,使用这两种工具都需要在tomcat的安装目录/conf/tomcat-users.xml添加 <tomcat-user ...
- ubuntu下安装应用(搜狗输入法)
- 帝国CMS如何禁止内容关键字替换ALT和title中的关键词为链接
很多帝国cms用户喜欢使用关键字替换来实现文章自动内链的方法. 为什么要用关键词替换功能呢?这关系到站内优化,下面直接进入正题. 解决办法:打开e/class/functions.php 查找 '/' ...
- Go语言中的变量
1 概述 变量(Variable)是程序运行过程中,内容可以变化(修改)的量,变量的功能是存储用户的数据,是计算机语言中能储存计算结果或能表示值抽象概念.变量,是通过变量的标识符定位值的过程.变量的内 ...
- R语言爬虫:爬取百度百科词条
抓取目标:抓取花儿与少年的百度百科中成员信息 url <- "http://baike.baidu.com/item/%E8%8A%B1%E5%84%BF%E4%B8%8E%E5%B0 ...
- JetBrains Makes its Products Free for Students(JetBrains 对学生免费了)
只要你有大学有些 后缀是 .edu的 如:@buaa.edu.cn,用你的邮箱注册,就可以免费试用 JetBrains了 下面是详细注册步骤: Hello everyone, If you’re o ...