private void button_reloadClasses_Click(object sender, EventArgs e) { if (Global.loadSchoolInfo() == 1) { //重置默认第一个班级 Classes[] classlist = Global.g_szClasses; if (classlist.Length > 0) { m_classlist.Clear(); comboBox_classlist.Text = ""; comboBox_classlist.Items.Clear(); m_classlist = m_db.getClassBySchoolid(Global.getSchoolID()); foreach (Classes c in m_classlist) { if (c.name == "" || c.orderid == 0) { continue; } comboBox_classlist.Items.Add(c.name); if (classid == c.id) { comboBox_classlist.SelectedIndex = comboBox_classlist.Items.Count - 1; } } if (Global.IsPublicClassroom()) { comboBox_classlist.Items.Add("公共教室"); } MessageBox.Show("班级更新成功!", "提示"); } } }
public void loadCfg() { Log.Info(Global.toString()); textBox_wifi.Text = Global.getWiFi(); textBox_wifi.Enabled = false; textBox_schoolname.Text = Global.getSchoolname(); classid = Global.getClassID(); classname = Global.getClassname(); //get Class list { m_classlist.Clear(); comboBox_classlist.Text = ""; comboBox_classlist.Items.Clear(); m_classlist = m_db.getClassBySchoolid(Global.getSchoolID()); if (Global.IsPublicClassroom()) { comboBox_classlist.Items.Add("公共教室"); comboBox_classlist.SelectedIndex = comboBox_classlist.Items.Count - 1; button_reloadClasses.Visible = false; } else { foreach (Classes c in m_classlist) { if (c.name == "" || c.orderid == 0) { continue; } comboBox_classlist.Items.Add(c.name); if (classid == c.id) { comboBox_classlist.SelectedIndex = comboBox_classlist.Items.Count - 1; } } } } if (Global.getClassname() == "") { Classes c = m_db.getClassById(Global.getClassID()); if (c != null) { Global.setClassname(c.name); Global.setClassID(c.id); } } }
public void loadNofityForm(string msg, int bHide, int seconds) { if (this.InvokeRequired) { InvokeLoadNofityForm cb = new InvokeLoadNofityForm(loadNofityForm); this.Invoke(cb, new object[] { msg, bHide, seconds }); return; } string classname = Global.getClassname(); if (Global.IsPublicClassroom()) { classname = "公共教室"; } string title = Global.getSchoolname() + " - " + classname + ""; }
public void loadNofityForm(string msg, int bHide, int seconds) { if (this.InvokeRequired) { InvokeLoadNofityForm cb = new InvokeLoadNofityForm(loadNofityForm); this.Invoke(cb, new object[] { msg, bHide, seconds }); return; } string classname = Global.getClassname(); if (Global.IsPublicClassroom()) { classname = "公共教室"; } string title = Global.getSchoolname() + " - " + classname + ""; if (fNotify != null) { if (bHide == 1) { fNotify.Hide(); } else { fNotify.updateForm(title, msg); if (!FormNotify.m_PPTImgExporting) { fNotify.Show(); } } } else { fNotify = new FormNotify(title, msg, seconds); if (!FormNotify.m_PPTImgExporting) { fNotify.Show(); } } }
public void loadCfg() { Log.Info(Global.toString()); textBox_wifi.Text = Global.getWiFi(); textBox_wifi.Enabled = false; textBox_schoolname.Text = Global.getSchoolname(); classid = Global.getClassID(); classname = Global.getClassname(); //get Class list { m_classlist.Clear(); comboBox_classlist.Text = ""; comboBox_classlist.Items.Clear(); m_classlist = m_db.getClassBySchoolid(Global.getSchoolID()); if (Global.IsPublicClassroom()) { comboBox_classlist.Items.Add("公共教室"); comboBox_classlist.SelectedIndex = comboBox_classlist.Items.Count - 1; button_reloadClasses.Visible = false; } else { foreach (Classes c in m_classlist) { if (c.name == "" || c.orderid == 0) { continue; } comboBox_classlist.Items.Add(c.name); if (classid == c.id) { comboBox_classlist.SelectedIndex = comboBox_classlist.Items.Count - 1; } } } } if (Global.getClassname() == "") { Classes c = m_db.getClassById(Global.getClassID()); if (c != null) { Global.setClassname(c.name); Global.setClassID(c.id); } } textBox_hdip.Text = Global.getHDIP(); //////////////////////////////// ArrayList iplist = Util.GetInternalIPList(); if (iplist.Count == 1) { textBox_360ip.Text = (string)iplist[0]; } else { foreach (string ip in iplist) { string ip_4 = ip.Substring(ip.LastIndexOf(".") + 1); if (ip == "172.18.201.3") { textBox_360ip.Text = ip; break; } } } }