本文整理汇总了C#中AppSettings.getSubjectName方法的典型用法代码示例。如果您正苦于以下问题:C# AppSettings.getSubjectName方法的具体用法?C# AppSettings.getSubjectName怎么用?C# AppSettings.getSubjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppSettings
的用法示例。
在下文中一共展示了AppSettings.getSubjectName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadAll
private void loadAll()
{
t1 = 0.0;
t2 = 0.0;
AppSettings dat = new AppSettings();
dat.loadAttendance(subnum);
Marks_Data m = new Marks_Data();
m.Subject = "Subject Code";
m.Slot = dat.getSubjectCode();
details.Items.Add(m);
m = new Marks_Data();
m.Subject = "Type";
m.Slot = dat.getType();
details.Items.Add(m);
m = new Marks_Data();
m.Subject = "Slot";
m.Slot = dat.getSlot();
details.Items.Add(m);
m = new Marks_Data();
m.Subject = "Attended";
m.Slot = Convert.ToString(dat.getAttended());
details.Items.Add(m);
m = new Marks_Data();
m.Subject = "Conducted";
m.Slot = Convert.ToString(dat.getConducted());
details.Items.Add(m);
m = new Marks_Data();
m.Subject = "Percentage";
m.Slot = Convert.ToString(dat.getPercentage());
details.Items.Add(m);
List<String> lst = new List<String>();
lst = dat.getDetails();
int i = lst.Count-1;
while (i >= 0) {
m = new Marks_Data();
m.Subject = lst[i-1];
m.Slot = lst[i];
moreDetais.Items.Add(m);
i -= 2;
}
controller.Title = dat.getSubjectName();
attended = Convert.ToDouble(dat.getAttended());
conducted = Convert.ToDouble(dat.getConducted());
lbl_percent.Text = Convert.ToString(Math.Round((attended / conducted) * 100,1)) + "%";
}
示例2: reloadData
private void reloadData()
{
try
{
this.Items.Clear();
AppSettings dat = new AppSettings();
string st_num;
dat.TryGetSetting<string>("NUMBEROFSUBJECTS", out st_num);
Debug.WriteLine(st_num);
for (int i = 0; i <= Convert.ToInt32(st_num); i++)
{
dat.loadAttendance(i);
this.Items.Add(new ItemViewModel() { LineOne = dat.getSubjectName(), LineTwo = dat.getSlot(), LineThree = dat.getPercentage() });
}
var currentPage = ((App)Application.Current).RootFrame.Content as Microsoft.Phone.Controls.PhoneApplicationPage;
MainPage m = (MainPage)currentPage;
m.hidePrg();
m.Controller.Visibility = Visibility.Visible;
m.textBlock2.Visibility = Visibility.Collapsed;
m.refresh.Visibility = Visibility.Visible;
loadedit = true;
}
catch (Exception ex) { MessageBox.Show("Error occured while loading attendance"); }
}