当前位置: 首页>>代码示例>>C#>>正文


C# AppSettings.getSubjectName方法代码示例

本文整理汇总了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)) + "%";
        }
开发者ID:karthikb351,项目名称:vitinfo2,代码行数:54,代码来源:subjectDetails.xaml.cs

示例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"); }
        }
开发者ID:karthikb351,项目名称:vitinfo2,代码行数:26,代码来源:MainViewModel.cs


注:本文中的AppSettings.getSubjectName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。