public DataControl() { InitializeComponent(); objects = DataHelper.GetObjectsWithGroups(); parameters = DataHelper.GetParameters(); objectsList.DataSource = objects; parametersList.DataSource = parameters; objectsView.CustomUnboundColumnData += new CustomColumnDataEventHandler((sender, e) => UnboundColumnData(sender, e, objects)); objectsView.Columns["cLicField"].GroupIndex = 0; objectsView.Columns["cBranch"].GroupIndex = 1; objectsView.CellValueChanging += OnObjectSelected; parametersView.CustomUnboundColumnData += new CustomColumnDataEventHandler((sender, e) => UnboundColumnData(sender, e, parameters)); parametersView.CellValueChanging += OnParameterSelected; displayObjects = new DisplayObjects(dataTable, dataView, chartControl); displayObjects.DataChanged += EnableButton; dataTable.DataSource = displayObjects.times; dataView.CustomUnboundColumnData += displayObjects.getUnboundColumnData; dataView.CellValueChanged += displayObjects.OnCellValueChanged; dataView.RowCellStyle += displayObjects.OnRowCellStyle; initTimeIntervals(); closeButton.Click += OnCloseButtonClick; }
public TextViewModel AddText(Text text, int position) { var addedText = new TextViewModel(this, text, position); DisplayObjects.Add(addedText); RaiseAddedDisplayObjectEvent(this, addedText); return(addedText); }
public GamePasswordViewModel AddGamePassword(PasswordGameRequirement gamePasword, int position) { var addedPassword = new GamePasswordViewModel(this, gamePasword, position); DisplayObjects.Add(addedPassword); RaiseAddedDisplayObjectEvent(this, addedPassword); return(addedPassword); }
public PictureViewModel AddPicture(Picture picture, int position) { var addedPicture = new PictureViewModel(this, picture, position); DisplayObjects.Add(addedPicture); RaiseAddedDisplayObjectEvent(this, addedPicture); return(addedPicture); }
public PictureViewModel AddPicture(Picture picture) { var addedPicture = new PictureViewModel(this, picture, (int)picture.PositionInIntroduction); DisplayObjects.Add(addedPicture); RaiseAddedDisplayObjectEvent(this, addedPicture); return(addedPicture); }
public TextViewModel AddText(Text text) { var addedText = new TextViewModel(this, text, (int)text.PositionInIntroduction); DisplayObjects.Add(addedText); RaiseAddedDisplayObjectEvent(this, addedText); return(addedText); }
protected void UpdateDisplayObjects(object sender, AddedDisplayObjectEventArgs e) { var newDisplayObjects = DisplayObjects.OrderBy(t => t.Position).ToList(); for (int i = 0; i < newDisplayObjects.Count; i++) { this.DisplayObjects[i] = newDisplayObjects[i]; } }
public void UpdateDisplayObject(DisplayObjectViewModel item) { int index = DisplayObjects.IndexOf(item); if (index != -1) { DisplayObjects.Remove(item); DisplayObjects.Insert(index, item); } }
public DisplayObjectViewModel RemoveDisplayObject(DisplayObject objectToRemove) { foreach (DisplayObjectViewModel displayObject in DisplayObjects) { if (displayObject.BaseObject == objectToRemove) { DisplayObjects.Remove(displayObject); return(displayObject); } } return(null); }
public void draw() { echoTypedEnable = false; logger.log(Logger.Level.INFO, "Drawing screen..."); VT4100.Send(clear); w_data = new DisplayObjects(0, 1, 10, 30, "Data", this); w_objectData = new DisplayObjects(w_data.Left, 1, w_data.Height, 80 - w_data.Width + 1, "Object Data", this); w_vision = new DisplayObjects(0, w_data.Bottom, 11, 80, "Vision", this); w_prompt = new DisplayObjects(0, 20, 3, 80, "Prompt", this); w_data.text("Current AZ:", 0, 0); w_data.text("Current EL:", 0, 1); w_data.text("Desired AZ:", 0, 2); w_data.text("Desired EL:", 0, 3); w_data.text("Moving?", 0, 4); w_data.text("GPS: N/A", 0, 5); w_data.text("Remote power V:", 0, 6); w_objectData.text("Name: ", 0, 0); w_objectData.text("Distance: ", 0, 1); w_objectData.text("Ra/Dec: ", 0, 2); w_objectData.text("Cart.: ", 0, 3); w_objectData.text("AZ: ", 0, 4); w_objectData.text("EL: ", 0, 5); w_objectData.text("LST: ", 35, 0); w_objectData.text("HA: ", 35, 1); w_vision.text("N", 0, 8); w_vision.text("E", 19, 8); w_vision.text("S", 39, 8); w_vision.text("W", 58, 8); w_vision.text("N", 77, 8); w_prompt.text("Command >> ", 0, 0); SetCursorAddress(new CursorAddress { x = 12, y = 21 }); logger.log(Logger.Level.INFO, "Drawing screen done"); inputBuffer.Clear(); echoTypedEnable = true; }
public void RemovePasswordViewModel(GamePasswordViewModel passwordToRemove) { DisplayObjects.Remove(passwordToRemove); }
public void AddPasswordViewModel(GamePasswordViewModel passwordToAdd) { DisplayObjects.Add(passwordToAdd); RaiseAddedDisplayObjectEvent(this, passwordToAdd); }
public void RemoveDisplayObjectViewModel(DisplayObjectViewModel textViewModel) { DisplayObjects.Remove(textViewModel); }
public void AddDisplayObjectViewModel(DisplayObjectViewModel displayObjectViewModel) { DisplayObjects.Add(displayObjectViewModel); RaiseAddedDisplayObjectEvent(this, displayObjectViewModel); }