private void LoadBrd() { string emsg; List <DateTime> v = ExamBoard.DBSel(out emsg); if (v == null) { spMain.Opacity = 0.5; WPopup.s.ShowDialog(emsg); spMain.Opacity = 1; return; } bool dark = true; Color c = new Color(); c.A = 0xff; c.B = c.G = c.R = 0xf0; lbxBrd.Items.Clear(); foreach (DateTime dt in v) { ListBoxItem it = new ListBoxItem(); it.Content = dt.ToString(DT.__); dark = !dark; if (dark) { it.Background = new SolidColorBrush(c); } lbxBrd.Items.Add(it); } }
public Operation1() { InitializeComponent(); mState = NetCode.Srvr1DatRetriving; mClnt = new Client2(ClntBufHndl, ClntBufPrep, true); mServer = new Server2(SrvrBufHndl); mServer.SrvrPort = 23821; mCbMsg = new UICbMsg(); bRunning = true; mBrd = new ExamBoard(); if (!System.IO.File.Exists("Room.txt") || !int.TryParse(System.IO.File.ReadAllText("Room.txt"), out uRId)) { uRId = 0; } vfbLock = new List <SortedList <int, bool> >(); System.Timers.Timer aTimer = new System.Timers.Timer(2000); // Hook up the Elapsed event for the timer. aTimer.Elapsed += UpdateSrvrMsg; aTimer.AutoReset = true; aTimer.Enabled = true; }
private void InsertBoard(object sender, RoutedEventArgs e) { DateTime dt; if (DT.To_(tbxBrd.Text, DT._, out dt)) { spMain.Opacity = 0.5; WPopup.s.ShowDialog(Txt.s._[(int)TxI.BOARD_NOK]); spMain.Opacity = 1; } else { ExamBoard eb = new ExamBoard(); eb.mDt = dt; string msg; if (0 < eb.DBIns(out msg)) { spMain.Opacity = 0.5; WPopup.s.ShowDialog(Txt.s._[(int)TxI.BOARD_OK]); spMain.Opacity = 1; LoadBrd(); tbxBrd.Text = string.Empty; } else { spMain.Opacity = 0.5; WPopup.s.ShowDialog(msg); spMain.Opacity = 1; } } }
public ExamBoardModel(ExamBoard model) : base(model) { Abbreviation = model.Abbreviation; FullName = model.FullName; Code = model.Code; Domestic = model.Domestic; UseEdi = model.UseEdi; Active = model.Active; }
public Prep0() { InitializeComponent(); mSelQCat = IUx._0; mDBQS = new QuestSheet(); mTmpQS = new QuestSheet(); mBrd = new ExamBoard(); vChk = new List <CheckBox>(); }
public Archieve() { InitializeComponent(); mCbMsg = new UICbMsg(); mBrd = new ExamBoard(); bRunning = true; tbiSelected = null; }
public Operation0() { InitializeComponent(); mServer = new Server2(SrvrBufHndl); mCbMsg = new UICbMsg(); mBrd = new ExamBoard(); bRunning = true; tbiSelected = null; }
private void LoadBrd() { string emsg; List <DateTime> v = ExamBoard.DBSel(out emsg); if (v == null) { spMain.Opacity = 0.5; WPopup.s.ShowDialog(emsg); spMain.Opacity = 1; return; } lbxBrd.Items.Clear(); foreach (DateTime dt in v) { ListBoxItem it = new ListBoxItem(); it.Content = dt.ToString(DT.__); lbxBrd.Items.Add(it); } }