private void chatButton_Click(object sender, EventArgs e) { if (mn == null) { mn = new ChatBox.MainWindow(Properties.Settings.Default.courseid); } mn.LectureId = Properties.Settings.Default.courseid; TopMost = false; mn.ShowDialog(); }
//bool flag = false; public SlideShow() { InitializeComponent(); timer = new DispatcherTimer(); device = new Device(); stream = new StreamClass(); pptLoader = new PPTFileLoader(); openFileDiag = new OpenFileDialog(); timer.Interval = new TimeSpan(0, 0, 1); openFileDiag.Filter = "Powerpoint file (*.ppt)|*.ppt|All files (*.*)|*.*"; stream.StreamName = Properties.Settings.Default.courseid; desktopStream = false; mn = new ChatBox.MainWindow(Properties.Settings.Default.courseid); }
public Toolbar() { InitializeComponent(); device = new Device(); stream = new StreamClass(); stream.StreamName = Properties.Settings.Default.courseid; desktopStream = false; this.Top = 768 - 100; this.Left = (1369 / 2) - 220; Loaded += Toolbar_Loaded; mn = new ChatBox.MainWindow(Properties.Settings.Default.courseid); mn.Hide(); }
public QuizMenu(ChatBox.MainWindow mn) { InitializeComponent(); chat = mn; durations = new List <int>(); var client = new RestSharp.RestClient("http://" + Config.WebHostIP + ":" + Config.WebHostPort + "/omlate"); var request = new RestSharp.RestRequest("/Instructor/MyCourses", RestSharp.Method.GET); request.AddParameter("instructorID", Properties.Settings.Default.username); RestSharp.IRestResponse response = client.Execute(request); var content = response.Content; var data = JsonConvert.DeserializeObject <List <Dictionary <String, String> > >(content); List <ComboBoxPairs> source = new List <ComboBoxPairs>(); foreach (var d in data) { source.Add(new ComboBoxPairs(d["CourseCode"] + " - " + d["CourseTitle"], d["OfferedCourseID"])); } this.comboBox.DisplayMemberPath = "_Key"; this.comboBox.SelectedValuePath = "_Value"; this.comboBox.ItemsSource = source; this.comboBox.SelectedIndex = 0; }