private void PositionList_SelectedIndexChanged(object sender, EventArgs e) { if (PositionList.SelectedIndex != -1) { ChangeHeader.Visible = false; AddSectionBtn.Visible = false; SetTemplateBtn.Enabled = false; SaveTemplateBtn.Enabled = false; MySql sql = new MySql(); sql.OpenConnection(); Position pos = (Position)PositionList.SelectedItem; _currentFeed.Position = pos; List <Applicant> app = sql.GetAppByPosition(pos._positionId); ApplicantList.Items.Clear(); foreach (Applicant p in app) { ApplicantList.Items.Add(p); } sql.CloseConnection(); _currentFeed.Applicant = null; _currentFeed.Header = null; _currentFeed.Sections.Clear(); ContentTable.Controls.Remove(ContentTable.GetControlFromPosition(0, 0)); SectionTable.Controls.Clear(); PDFDisplay.DocumentText = ""; SaveFeedbackBtn.Text = "Save Feedback"; } }
public bool FinishArrayItem() { if (ContentTable.Count > 1) { return(Program.ReportFailure("Unexpected failure")); } Debug.Assert(ContentTypeTable.Count == ContentTable.Count); foreach (KeyValuePair <string, object> Entry in ContentTable) { string Key = Entry.Key; Debug.Assert(ContentTypeTable.ContainsKey(Key)); if (ItemCollection.Count > 0) { if (ContentTypeTable[Key] != LastItemType) { return(Program.ReportFailure("Mixed array types")); } } ItemCollection.Add(Entry.Value); LastItemType = ContentTypeTable[Key]; } ContentTable.Clear(); ContentTypeTable.Clear(); return(true); }
private void ContentTable_MouseDoubleClick(object sender, MouseEventArgs e) { var device = _devices[ContentTable.HitTest(e.Location).Item.Index]; var infoForm = new DetailedDeviceInfo(device); infoForm.Show(); }
private void MonitorForm_Load(object sender, EventArgs e) { btnHome.Image = btnImages.Images[0]; _backPanel.Dock = DockStyle.Fill; BodyContainer.Panel2.Controls.Add(_backPanel); TaskManager.LoadTask(); //ContentPanel ContentTable.ColumnStyles.Clear(); ContentTable.RowStyles.Clear(); //ContentPanel.c ContentTable.ColumnCount = 1; ContentTable.RowCount = 2; ContentTable.Refresh(); //ContentTable.RowStyles. //ContentTable.Width = splitContainer2.Panel2.Width; for (int i = 0; i < 1; i++) { ContentTable.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); ClientBar client = new ClientBar(); client.SetPanelEvent(_panelEvent); //web.Height = (int)ContentTable.RowStyles[i].Height; ContentTable.Controls.Add(client); _webList.Add(i, client); //ColumnStyles sty = new ColumnStyle(); //ColumnStyles //ontentTable.ColumnStyles.Add( } }
private void CloseWebWindow(JobWindowControl control) { _backPanel.Controls.Clear(); _parentPanel.Controls.Add(control); _parentPanel.Controls.SetChildIndex(control, control.Position); _backPanel.SendToBack(); ContentTable.BringToFront(); }
private void FillHeader() { //check whether all the applicants for this position is completed. bool enable = !CheckPositionIsCompleted(); HeaderPlacement place = new HeaderPlacement(enable); ContentTable.Controls.Remove(ContentTable.GetControlFromPosition(0, 0)); foreach (HeaderItem item in _currentFeed.Header.HeaderItems) { if (item.InputType.Equals("Query")) { switch (item.ValueItem[0]) { case "<Applicant Name>": item.ValueItem.Clear(); item.ValueItem.Add(_currentFeed.Applicant.Name); break; case "<Applied Position>": item.ValueItem.Clear(); item.ValueItem.Add(_currentFeed.Position._positionName); break; case "<Reviewer Name>": item.ValueItem.Clear(); item.ValueItem.Add(Reviewer.Name); break; case "<Application Type>": item.ValueItem.Clear(); item.ValueItem.Add(_currentFeed.Applicant.ApplyType); break; case "<Applicant Email>": item.ValueItem.Clear(); item.ValueItem.Add(_currentFeed.Applicant.Email); break; case "<Application Status>": item.ValueItem.Clear(); item.ValueItem.Add(_currentFeed.Applicant.ApplyType); break; case "<Review Date>": item.ValueItem.Clear(); item.ValueItem.Add(_currentFeed.Applicant.Date); break; } } place.AddItem(item); } ContentTable.Controls.Add(place, 0, 0); SaveFeedbackBtn.Enabled = enable; }
private void ShowWebWindow(JobWindowControl control, Control parent) { _parentPanel = parent; _backPanel.Controls.Clear(); _backPanel.Controls.Add(control); control.Dock = DockStyle.Fill; ContentTable.SendToBack(); _backPanel.BringToFront(); _backPanel.Refresh(); }
private void UpdateTableContent(object sender, EventArgs e) { _watcher.Stop(); Toggle.Invoke((Action)ToggleButton); _devices = GetAllDevicesInfo.Devices; ContentTable.Invoke((Action)FillTheTableWithContent); Toggle.Invoke((Action)ToggleButton); _watcher.Start(); }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); if (User != null) { NameLabel.Text = User.Name; StatusLabel.Text = User.Status; EmailLabel.Text = User.Email; string[] name = User.Name.Split(' '); UserInitials.Text = char.ToUpper(name[0][0]).ToString() + char.ToUpper(name[1][0]).ToString(); if (File.Exists(Constants.Images + User.UserId + ".jpg")) { UserInitials.Text = string.Empty; UserPicture.Image = UIImage.FromFile(Constants.Images + User.UserId + ".jpg"); } else if (User.HasPicture == 1) { new Thread(async() => { await RemoteService.GetUserPicture(User, Constants.Images); InvokeOnMainThread(() => { if (File.Exists(Constants.Images + User.UserId + ".jpg")) { UserInitials.Text = string.Empty; UserPicture.Image = UIImage.FromFile(Constants.Images + User.UserId + ".jpg"); } }); }).Start(); } else { UserInitials.Text = char.ToUpper(name[0][0]).ToString() + char.ToUpper(name[1][0]).ToString(); UserPicture.Image = UIImage.FromFile("Images/[email protected]"); } } AlertsTicketsSegmentedControl.SelectedSegment = 0; ContentTable.RowHeight = UITableView.AutomaticDimension; ContentTable.EstimatedRowHeight = 113f; new Thread(new ThreadStart(async() => { List <Alert> alerts = await RemoteService.GetAlerts(User.Email); InvokeOnMainThread(() => { if (alerts != null) { ContentTable.Source = new UserInfoAlertsTicketsTableSource(alerts); ContentTable.ReloadData(); } }); })).Start(); }
public bool SetContent(string key, object?value, Json.Token jsonType) { if (ContentTable.ContainsKey(key)) { return(Program.ReportFailure($"Key '{key}' already parsed for object")); } Debug.Assert(!ContentTypeTable.ContainsKey(key)); ContentTable.Add(key, value !); ContentTypeTable.Add(key, jsonType); return(true); }
public bool FinishArray(string key, ParsingContext arrayContext) { if (ContentTable.ContainsKey(key)) { return(Program.ReportFailure($"Key '{key}' already parsed for object")); } Debug.Assert(!ContentTypeTable.ContainsKey(key)); ContentTable.Add(key, arrayContext.ItemCollection); ContentTypeTable.Add(key, arrayContext.LastItemType); return(true); }
public bool RecordContext() { ContextList.Add(this); if (ObjectKey.Length > 0) { if (!RecordContextInStringTable(ObjectKeyTable, ObjectKey, ErrorControl.Normal)) { return(false); } if (ContentTable.ContainsKey("Name") && FieldTableStore.IsTypeWithName(ObjectType)) { if (!RecordContextInStringTable(ObjectNameTable, ContentTable["Name"], ErrorControl.IgnoreIfFound)) { return(false); } } if (ContentTable.ContainsKey("InternalName") && FieldTableStore.IsTypeWithInternalName(ObjectType)) { if (!RecordContextInStringTable(ObjectInternalNameTable, ContentTable["InternalName"], ErrorControl.Normal)) { return(false); } } } else { if (!KeylessObjectTable.ContainsKey(ObjectType)) { KeylessObjectTable.Add(ObjectType, new List <ParsingContext>()); } List <ParsingContext> TypedContextList = KeylessObjectTable[ObjectType]; TypedContextList.Add(this); } if (ContentTable.ContainsKey("Id")) { if (!RecordContextInIntTable(ObjectIdTable, ContentTable["Id"])) { return(false); } } return(true); }
partial void ValueChanged(UISegmentedControl scontrol) { if (scontrol.SelectedSegment == 0) { Console.WriteLine("You selected the first item"); ContentTable.EstimatedRowHeight = 113f; new Thread(new ThreadStart(async() => { List <Alert> alerts = await RemoteService.GetAlerts(User.Email); InvokeOnMainThread(() => { if (alerts != null) { ContentTable.Source = new UserInfoAlertsTicketsTableSource(alerts); ContentTable.ReloadData(); } }); })).Start(); } else { Console.WriteLine("You selected the second item"); ContentTable.EstimatedRowHeight = 76f; new Thread(new ThreadStart(async() => { List <Ticket> tickets = await RemoteService.GetTickets(User.UserId); InvokeOnMainThread(() => { if (tickets != null) { ContentTable.Source = new UserInfoAlertsTicketsTableSource(tickets); ContentTable.ReloadData(); } }); })).Start(); } }
void ReleaseDesignerOutlets() { if (AlertsTicketsSegmentedControl != null) { AlertsTicketsSegmentedControl.Dispose(); AlertsTicketsSegmentedControl = null; } if (ContentTable != null) { ContentTable.Dispose(); ContentTable = null; } if (EmailLabel != null) { EmailLabel.Dispose(); EmailLabel = null; } if (NameLabel != null) { NameLabel.Dispose(); NameLabel = null; } if (StatusLabel != null) { StatusLabel.Dispose(); StatusLabel = null; } if (UserPicture != null) { UserPicture.Dispose(); UserPicture = null; } }
public HtmlTable(List <TModel> models, string tblClass) { _models = models; _tblClass = tblClass; _tbl = new ContentTable(models.Count); }
public override Content ToContent(ExportCount c) { if (c == ExportCount.MULTI) { DataTable t = new DataTable(); t.Columns.Add("ID"); t.Columns.Add("Name"); foreach (Worker item in this.GetFullList()) { t.Rows.Add(new string[] { item.NiceID, item.Name }); } Content ct = new ContentTable(DataType.Table, t); return ct; } else { throw new NotImplementedException(); } }
public Content ToContent(ExportCount c) { if (c == ExportCount.SINGLE) { return new ContentTable(DataType.Table, GetData()); } else { DataTable t = new DataTable(); t.Columns.Add("Name"); foreach (Report item in Reports) { t.Rows.Add(new string[] { item.Text }); } Content ct = new ContentTable(DataType.Table, t); return ct; } }