20c0108c
wutaian
xx
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office.Interop.PowerPoint;
using GeneralLib;
namespace SunVoteARSPPT
{
public partial class PanelGradeCount : UserControl, IPanel, IPanelChange
{
TagSet mTagSet = null;
public TagSet TagSet
{
get { return mTagSet; }
set
{
mTagSet = value;
ucResponsePara.TagSet = value;
ucKeypadPara.TagSet = value;
}
}
public PanelGradeCount()
{
InitializeComponent();
FrmSystemSet.LanguageSetEvent += new FrmSystemSet.LanguageSetEventHander(FrmSystemSet_LanguageSetEvent);
FrmVoteBar.PanelEnabledEvent += new FrmVoteBar.PanelEnabledEventHander(FrmVoteBar_PanelEnabledEvent);
//设置控件大小
//杨斌 2015-04-10
ucResponsePara.ShowSet(true, true);
ucKeypadPara.Top = ucResponsePara.Bottom + 6;
this.Height = ucKeypadPara.Bottom;
//GlobalInfo.SysLanguage.SetLanguage(this.Name, this);
//杨斌 2012-06-11
switch (GlobalInfo.OEMLogo)
{
case OEMLogos.oem3eAnalyzer:
//ucKeypadPara.Visible = false;
//if (ucKeypadPara.cboSubmitMode.SelectedIndex != 0)
// ucKeypadPara.cboSubmitMode.SelectedIndex = 0;
//this.Height = ucResponsePara.Bottom;
break;
case OEMLogos.SunVote:
default:
break;
}
}
void FrmVoteBar_PanelEnabledEvent(bool enabled)
{
this.Enabled = enabled;
}
void FrmSystemSet_LanguageSetEvent()
{
GlobalInfo.SysLanguage.SetLanguage(this.Name, this);
}
private void btnChartSet_Click(object sender, EventArgs e)
{
new FrmChartSet().ShowDialog();
}
public Color PanelColor
{
get
{
return this.BackColor;
}
set
{
this.BackColor = value;
gbxChoise.BackColor = value;
ucResponsePara.BackColor = value;
ucKeypadPara.BackColor = value;
}
}
private void btnOptionText_Click(object sender, EventArgs e)
{
new FrmOptionTextSelect().ShowDialog();//杨斌 2013-01-24
}
/// <summary>
/// 加载参数面板数据
/// </summary>
public void LoadData()
{
try
{
ucResponsePara.LoadData();
ucKeypadPara.LoadData();
ControlOper.TrySetNumericUpDownValue(nudOptionCount, TagSet.LoadValue(TagKey.Grade_OptionCount, nudOptionCount.Value).ToInt);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void PanelGradeCount_Load(object sender, EventArgs e)
{
GlobalInfo.SysLanguage.SetLanguage(this.Name, this);
}
private void nudOptionCount_ValueChanged(object sender, EventArgs e)
{
//2012-06-08 选项个数改变时需要重新设置图表高度
Globals.SunVoteARSAddIn.PPTEdit.CountChange = true;
TagSet.SetValue(TagKey.Grade_OptionCount, nudOptionCount.Value);
//修改标志 2012-05-2 赵丽 保存当前图表的位置
PPTOper.SaveChartPosition(Globals.SunVoteARSAddIn.PPTEdit.SlideEdit, TagSet);
if (!Globals.SunVoteARSAddIn.PPTEdit.LockOptionTextChange)//判断是否选项文本在修改,杨斌 2012-03-05
{
Globals.SunVoteARSAddIn.PPTEdit.ModifyOptionText(Convert.ToInt32(nudOptionCount.Value));
}
//2012-11-21 数据字体根据选项个数变化 赵丽
PPTOper.SetFontSize(Convert.ToInt32(nudOptionCount.Value), TagSet);
Globals.SunVoteARSAddIn.PPTEdit.InitChart(true, Globals.SunVoteARSAddIn.PPTEdit.SlideEdit, autoFit: true);
}
#region IPanelChange 成员
public void ChangeData(TagKey tagKey, object value)
{
if (tagKey == TagKey.Grade_OptionCount)
ControlOper.TrySetNumericUpDownValue(nudOptionCount, TagSet.LoadValue(tagKey, nudOptionCount.Value).ToInt);
}
#endregion
}
}
|