public TeacherApplication() { //AgeAtLastDateOfSubmission = DateTime.UtcNow - DateOfBirth; IsApplicationFinalised = Decision.No; IsPaperApplicationReceived = Decision.No; IsSelectedForExam = SelectionStatus.Pending; }
public void OnStartDragSelection(Point2D startPoint) { _status = SelectionStatus.SingleSelecting; _startPoint = startPoint; _endPoint = startPoint; SelectionGui.SelectionRectangle = SelectionRect; }
public PopulationCreator(Arguments arguments, int popSize, bool goConvolutionMod, SelectionConfig selectionConfig, SelectionStatus selectionStatus) { _arguments = arguments; _convolutionMode = goConvolutionMod; _selectionConfig = selectionConfig; _selectionStatus = selectionStatus; _arguments = arguments; _populationSize = popSize; _csharpCompiler = new CsharpCompiler(); _randomProvider = new RandomProvider(selectionConfig.Operators, selectionConfig.MaxConstantsCount, _arguments.Rows); Individual = new Individual[_populationSize]; if (goConvolutionMod) { _populationSize = _selectionConfig.MaxConstantsCount * 3 - 3; } else { _selectionProvider = new MixSelection(Individual, _selectionStatus.Log, _randomProvider, _selectionConfig.Operators) { MutationChance = _selectionConfig.MutationChance, GrowSpeed = _selectionConfig.GrowSpeed, } }; GenotypeKids = new string[_populationSize]; }
public void SetStatusUnSelected() { _objectSelectState = SelectionStatus.UnSelected; btnRoateBack.Visible = false; btnRoateFront.Visible = false; }
internal Field(Model.Field modelField, PropertyMatcherViewModel viewModel, ConnectionDirection direction) { ModelField = modelField; ViewModel = viewModel; Direction = direction; _selectionStatus = SelectionStatus.NotSelected; Disconnect = new DisconnectCommand(this); }
public buttonUserControl() { InitializeComponent(); _objectSelectState = SelectionStatus.UnSelected; // this.Mous += new MouseButtonEventHandler(Control_MouseLeftButtonDown); // this.MouseLeftButtonDown += new MouseButtonEventHandler(Control_MouseLeftButtonDown); //this.MouseLeftButtonUp += new MouseButtonEventHandler(Control_MouseLeftButtonUp); this.MouseMove += new MouseEventHandler(Control_MouseMove); }
// Use this for initialization void Start() { current_resource = init_resource; current_hp = init_hp; resourceText.text = "Gold: " + current_resource.ToString(); HPtext.text = "HP: " + current_hp.ToString(); type_display.text = ""; hp_atk_display.text = ""; Gameover.text = ""; mouse = false; selectionStatus = SelectionStatus.none; }
public void SetSelected(Color i_Color) { // Update status. m_Status = SelectionStatus.Selected; // Update appearence. SetHighlightColor(i_Color); SetOverlayColor(i_Color); SetOverlayAlpha(0.5f); }
public void SetAvailable() { // Update status. m_Status = SelectionStatus.Available; // Update appearence. SetHighlightColor(Color.white); SetOverlayColor(Color.white); SetOverlayAlpha(0f); }
public void SetSelectionStatus(SelectionStatus status) { if (status == SelectionStatus.Auto) { GApp.Frame.StatusBar.IndicateAutoSelectionMode(); } else if (status == SelectionStatus.Free) { GApp.Frame.StatusBar.IndicateFreeSelectionMode(); } else { GApp.Frame.StatusBar.ClearSelectionMode(); } }
public E3ApplicationInfo() { applicationDispatcher = new ApplicationDispatcher(); applicationDispatcher.Select(); status = applicationDispatcher.SelectedStatus; if (status == SelectionStatus.Selected) { processId = applicationDispatcher.SelectedProcessId; title = applicationDispatcher.SelectedProjectTitle; } else { processId = 0; title = String.Empty; } }
public void OnDragSelection(Point2D point) { _endPoint = point; var rect = SelectionRect; // If either dimension is under 50 pixels, don't show the box selector. if (_status != SelectionStatus.MultiSelecting && UseBoxSelection(rect)) { _status = SelectionStatus.MultiSelecting; // Note that the box can be scaled down after this. SelectionGui.SelectionBoxVisible = true; } SelectionGui.SelectionRectangle = rect; }
public Connection(Field input, Field output, Creator createdBy, SelectionStatus selectionStatus) { if (input == null) { throw new ArgumentNullException(nameof(input)); } Input = input; if (output == null) { throw new ArgumentNullException(nameof(output)); } Output = output; CreatedBy = createdBy; _selectionStatus = selectionStatus; }
public void OnEndDragSelection() { _selectedObjects.Clear(); SelectionGui.SelectedObjects.Clear(); if (_status == SelectionStatus.SingleSelecting) { SingleSelect(); } else { MultiSelect(); } SelectionGui.SelectionBoxVisible = false; _status = SelectionStatus.NotSelecting; }
private void DrawSelectionInfo() { SelectionStatus selectionStatus = Utility.IsSelectionValid(); if (selectionStatus != SelectionStatus.Valid) { DrawInvalidSelectionInfo(selectionStatus); } else { Transform[] selection = Selection.transforms; string label = (selection.Length == 1) ? selection[0].name : string.Format("{0} UI Elements", selection.Length); EditorGUILayout.LabelField(label, EditorStyles.centeredGreyMiniLabel); } EditorGUILayout.Space(); }
internal void Select() { List<Process> e3Processes = Process.GetProcessesByName("E3.series").ToList<Process>(); e3Processes.RemoveAll(process => !IsAppropriateProcess(process)); SelectedProcessId = 0; SelectedProjectTitle = String.Empty; e3Application app; e3Job job; switch (e3Processes.Count) { case 0: SelectedStatus = SelectionStatus.None; break; case 1: SelectedStatus = SelectionStatus.Selected; SelectedProcessId = e3Processes[0].Id; app = e3Dispatcher.GetE3ByProcessId(SelectedProcessId) as e3Application; job = app.CreateJobObject(); SelectedProjectTitle = job.GetName(); Marshal.FinalReleaseComObject(job); break; default: int selectedIndex = undefinedSelectionIndex; List<string> projectNames = new List<string>(e3Processes.Count); foreach (Process process in e3Processes) { app = e3Dispatcher.GetE3ByProcessId(process.Id) as e3Application; job = app.CreateJobObject(); projectNames.Add(job.GetName()); Marshal.FinalReleaseComObject(job); } ApplicationSelectingWindow window = new ApplicationSelectingWindow(projectNames, new Action<int>(index=>selectedIndex = index)); window.ShowDialog(); if (selectedIndex != undefinedSelectionIndex) { SelectedStatus = SelectionStatus.Selected; SelectedProcessId = e3Processes[selectedIndex].Id; SelectedProjectTitle = projectNames[selectedIndex]; } else SelectedStatus = SelectionStatus.NoSelected; break; } }
protected static void TryOpenSelection() { DefaultAsset[] folders = Selection.GetFiltered <DefaultAsset>(SelectionMode.Assets); if (folders.Length == 0) { selectionStatus = SelectionStatus.NONE; return; } if (folders.Length > 1) { selectionStatus = SelectionStatus.TOO_MANY; return; } string path = AssetDatabase.GetAssetPath(folders[0]); folderImporter = AssetImporter.GetAtPath(path); userData = folderImporter.userData; if (AssetDatabase.IsValidFolder(path)) { selectionStatus = SelectionStatus.VALID; } else { selectionStatus = SelectionStatus.NONE; } ResourceUtil.Refresh(); customStyles = new StyleGrid(ResourceUtil.CustomStylesPath, 64.0F + 16.0F, 8.0F); FolderInspector[] openedWindows = Resources.FindObjectsOfTypeAll <FolderInspector>(); if (openedWindows.Length > 0) { currentWindow = openedWindows[0]; } if (CanOpenWindow()) { OpenWindow(); } }
private void DrawInvalidSelectionInfo(SelectionStatus selectionStatus) { GUIStyle warn = GUI.skin.GetStyle("WarningOverlay"); EditorGUI.BeginDisabledGroup(true); string message; switch (selectionStatus) { case SelectionStatus.NothingSelected: message = "Nothing selected"; break; case SelectionStatus.ParentIsNull: case SelectionStatus.ParentIsNoRectTransform: message = "Objects must be inside a Canvas."; break; case SelectionStatus.ContainsNoRectTransform: message = "All objects must have a RectTransform."; break; case SelectionStatus.UnequalParents: message = "Objects must have the same parent."; break; case SelectionStatus.Valid: // Function should never be called when selection is valid. message = "Unknown problem discovered."; break; default: Debug.LogError("Invalid SelectionStatus: " + selectionStatus); throw new ArgumentOutOfRangeException(); } EditorGUILayout.BeginHorizontal(); GUILayout.Space(5); GUILayout.TextArea(message, warn); GUILayout.Space(5); EditorGUILayout.EndHorizontal(); }
public SelectionManager(int populationSize, Arguments arguments, bool isConvolutionMode, SelectionConfig selectionConfig, params ISelectionLifeCycle[] selectionLifeCycles) { PopulationSize = ParityHlp.ToEven(populationSize); Arguments = arguments; SelectionConfig = selectionConfig; var selectionStatusBuilder = new SelectionStatusBuilder(SelectionConfig); selectionStatusBuilder.Core(); selectionStatusBuilder.AddProgressBar(); selectionStatusBuilder.AddClassCodeCollector(CollectCodeLog); selectionStatusBuilder.AddPhenotypeLog(CollectPhenotypesLog); selectionStatusBuilder.AddGraphPointsCollector(CollectGraphPoint); Status = selectionStatusBuilder.GetResult(); _populationLifeCycles = selectionLifeCycles.ToList(); _populationCreator = new PopulationCreator(Arguments, PopulationSize, isConvolutionMode, selectionConfig, Status); }
/***************************************************************************************** ***************************************************************************************** ***************************************************************************************** ***************************************************************************************** ***************************************************************************************** * Internal implementations and template methods of this component. Great part of the * magic will actually go here. These are all related to the rendering of the component. ***************************************************************************************** ***************************************************************************************** ***************************************************************************************** ***************************************************************************************** *****************************************************************************************/ /** * This method re-renders the items accordingly. Is called by Reset, Rewind and Move* methods. * There will be display items not being rendered (And instead being hidden) when no data is * present for them in the items list. * * Also standard buttons will be enabled/disabled, and perhaps more custom user implementation * will be run in the lifecycle given by this method. */ private void RenderItems() { for (int i = 0; i < itemDisplays.Length; i++) { int endIndex = pagingType == PagingType.LOOPONG ? (position + i) % items.Count : position + i; if (endIndex < items.Count) { ListItem item = items[endIndex]; GameObject display = itemDisplays[i]; SelectionStatus status = (selectedItems.Count > 0 && selectedItems.Last.Equals(item) ? SelectionStatus.YES_ACTIVE : (selectedItems.Contains(item) ? SelectionStatus.YES : SelectionStatus.NO)); bool selectable = ItemIsSelectable(item); RenderItem(item, display, selectable, status); itemDisplays[i].SetActive(true); } else { itemDisplays[i].SetActive(false); } } RefreshStandardButtons(); RenderExtraDetails(); }
private void pbxImage_MouseLeave(object sender, EventArgs e) { if (this.Status.Equals(SelectionStatus.Selected)) return; this.Status = SelectionStatus.Normal; SetStyle(); }
public void Reset() { m_status = SelectionStatus.Free; m_overLaySpriteRenderer.gameObject.SetActive(false); SetColor(m_interactableColor); }
public SelectionStatusBuilder(SelectionConfig selectionConfig) { _selectionStatus = new SelectionStatus(selectionConfig); }
private void AccordionItem_Click(object sender, EventArgs e) { this.Status = SelectionStatus.Selected; SetStyle(); }
/** * This protected method must be implemented! It will render a chunk of * data elements on the game objects in `itemDisplays`. Each element in * `itemDisplays` will also be styled depending on whether it is selected * or not. */ protected abstract void RenderItem(ListItem source, GameObject destination, bool isSelectable, SelectionStatus selectionStatus);
private void InitControl() { Icon = null; BorderColor = Color.Empty; normalBackColor = Color.Empty; hoverBackColor = Color.Empty; activeBackColor = Color.Empty; normalForeColor = SystemColors.ControlText; hoverForeColor = SystemColors.ControlText; activeForeColor = SystemColors.ControlText; normalBackgroundImage = null; hoverBackgroundImage = null; activeBackgroundImage = null; Status = SelectionStatus.Normal; }
private void pbxImage_Click(object sender, EventArgs e) { this.Status = SelectionStatus.Selected; SetStyle(); }
private void pbxImage_MouseEnter(object sender, EventArgs e) { if (this.Status.Equals(SelectionStatus.Selected)) return; this.Status = SelectionStatus.Hover; SetStyle(); }
private void SetStatusSelected() { _objectSelectState = SelectionStatus.Selected; btnRoateBack.Visible = true; btnRoateFront.Visible = true; }
public void SetSelectionStatus(SelectionStatus selectionStatus) { this.selectionStatus = selectionStatus; }
public void SetSelectionStatus(SelectionStatus status) { if(status==SelectionStatus.Auto) GApp.Frame.StatusBar.IndicateAutoSelectionMode(); else if(status==SelectionStatus.Free) GApp.Frame.StatusBar.IndicateFreeSelectionMode(); else GApp.Frame.StatusBar.ClearSelectionMode(); }
protected override void Render(DrawingContext ctx) { if (Core == null || Core.IsDisposed) { return; } base.Render(ctx); IMRATextItemInfo item = ViewParent?.Core; ITextBoxCore core = ViewParent?.TextCore; WinTextLine text = ViewParent?.TextLine; if (core == null) { return; } ITextPosition start = core.SelectedStart; ITextPosition end = core.SelectedEnd; if (start.CompareTo(end) == 0) { ITextPosition pos = start.NextSeek(); RenderBracket(ctx, pos); RenderDefaultMatch(ctx, pos); pos = pos.PrevSeek(); RenderBracket(ctx, pos); RenderDefaultMatch(ctx, pos); } if (start.Line == end.Line && start.Column == end.Column) { status = start.Line == item.Line ? SelectionStatus.Caret : SelectionStatus.None; } else if (item.Line >= start.Line && item.Line <= end.Line) { status = SelectionStatus.Range; } else { status = SelectionStatus.None; } switch (status) { case SelectionStatus.None: break; case SelectionStatus.Caret: { if (!blinkshow && !forceshow) { break; } int index = start.Column - 1; TextBounds bound = text.GetTextBounds(index, 1).FirstOrDefault(); Brush brush = null; double thickness = 1.0; ViewParent.TextCore.DictBrush.TryGetValue("foreground_rawtext_caret", out brush); ViewParent.TextCore.DictValue.TryGetValue("rawtext_caret_thickness", out thickness); Pen pen = new Pen(brush, thickness); Point p1 = bound.Rectangle.TopLeft; Point p2 = bound.Rectangle.BottomLeft; p1.Y -= 2; p1.X += ViewParent.TextCore.View.MarginLeft; p2.X += ViewParent.TextCore.View.MarginLeft; ctx.DrawLine(pen, p1, p2); } break; case SelectionStatus.Range: { //int left = start.Column - 1; //int right = end.Column - 1; if (start.Line < item.Line) { start = Core.Start; } if (end.Line > item.Line) { end = Core.End; } //if (right - left <= 0) break; //TextBounds bound = text.GetTextBounds(left, right - left).FirstOrDefault(); Brush brush = null; //Rect rect = bound.Rectangle; ViewParent.TextCore.DictBrush.TryGetValue("background_rawtext_selected", out brush); //rect.X += ViewParent.TextCore.View.MarginLeft; //ctx.DrawRectangle(brush, null, rect); DrawTextRectangle(ctx, brush, null, start, end); } break; } }