public override void OnFinishResize(RectTransform panel) { base.OnFinishResize(panel); InspectorManager.PanelWidth = this.Rect.rect.width; InspectorManager.OnPanelResized(panel.rect.width); }
public override void CreateInspector(InspectorManager inspector) { //_inspectorViewModel = new InspectorViewModel(); //_inspectorWindow = new InspectorWindow { DataContext = _inspectorViewModel, Padding = _windowPadding }; //_inspectorUI = new InspectorUI(_inspectorWindow, _inspectorViewModel); //var inspectorTemplate = new DataTemplate(typeof(InspectorWindowViewModel), parent => //{ // _inspectorWindow.Parent = parent; // return _inspectorWindow; //}); //_gearsetUI.Resources.Add(inspectorTemplate.DataTemplateKey, inspectorTemplate); //_inspectorViewModel.Top = 25; //_inspectorViewModel.Left = 0; //_inspectorViewModel.Opacity = 1f; //_inspectorViewModel.Width = 400; //_inspectorViewModel.Height = 200; //_ownedWindowContent.Add(_inspectorViewModel); //_widgetWindowViewModel.InspectorWindowVisible = inspector.Config.Visible; //SetWindowVisibility(_inspectorViewModel, inspector.Config.Visible); }
public void ChangeView(InspectorManager manager, IViewWrapper viewWrapper) { handleChange = true; bool showImage = false; bool showFont = false; //NSPopUpButton var fontData = manager.Delegate.GetFont(viewWrapper); if (fontData?.Font != null) { var currentFontName = ((NSFont)fontData.Font.NativeObject).FontName; if (currentFontName == ".AppleSystemUIFont") { currentFontName = "HelveticaNeue"; } var name = fonts.FirstOrDefault(s => s.ToString() == currentFontName); fontsCombobox.Select(name); fontSizeTextView.IntValue = (int)fontData.Size; showFont = true; } if (viewWrapper.NativeObject is NSImageView || viewWrapper.NativeObject is NSButton) { showImage = true; } imageButtonVisible = showImage; fontButtonsVisible = showFont; handleChange = false; }
/// <summary> /// Initializiation /// </summary> private void Start() { if (Instance != null) { CustomLogger.Instance.Error(LogMessages.MULTIPLE_INSTANCES); return; } Instance = this; Active = false; Cost_Row_Prototype.SetActive(false); Upkeep_Row_Prototype.SetActive(false); Delta_Row_Prototype.SetActive(false); Storage_Row_Prototype.SetActive(false); Services_Row_Prototype.SetActive(false); cost_rows = new List <GameObject>(); upkeep_rows = new List <GameObject>(); delta_rows = new List <GameObject>(); storage_rows = new List <GameObject>(); service_rows = new List <GameObject>(); highlighted_tiles = new List <Tile>(); current_row_id = 0; Button.ButtonClickedEvent click = new Button.ButtonClickedEvent(); click.AddListener(new UnityAction(Pause)); Pause_Button.onClick = click; Button.ButtonClickedEvent click2 = new Button.ButtonClickedEvent(); click2.AddListener(new UnityAction(Delete)); Delete_Button.onClick = click2; Button.ButtonClickedEvent click3 = new Button.ButtonClickedEvent(); click3.AddListener(new UnityAction(Add_Peasant_Worker)); Worker_Peasant_Plus_Button.onClick = click3; Button.ButtonClickedEvent click4 = new Button.ButtonClickedEvent(); click4.AddListener(new UnityAction(Add_Citizen_Worker)); Worker_Citizen_Plus_Button.onClick = click4; Button.ButtonClickedEvent click5 = new Button.ButtonClickedEvent(); click5.AddListener(new UnityAction(Add_Noble_Worker)); Worker_Noble_Plus_Button.onClick = click5; Button.ButtonClickedEvent click6 = new Button.ButtonClickedEvent(); click6.AddListener(new UnityAction(Remove_Peasant_Worker)); Worker_Peasant_Minus_Button.onClick = click6; Button.ButtonClickedEvent click7 = new Button.ButtonClickedEvent(); click7.AddListener(new UnityAction(Remove_Citizen_Worker)); Worker_Citizen_Minus_Button.onClick = click7; Button.ButtonClickedEvent click8 = new Button.ButtonClickedEvent(); click8.AddListener(new UnityAction(Remove_Noble_Worker)); Worker_Noble_Minus_Button.onClick = click8; Button.ButtonClickedEvent click9 = new Button.ButtonClickedEvent(); click9.AddListener(new UnityAction(Show_Settings)); Settings_Button.onClick = click9; }
private void OnCellClicked(int index) { if (index >= UiInspector.LastHitObjects.Count) { return; } InspectorManager.Inspect(UiInspector.LastHitObjects[index]); }
private void Awake() { inspectorManager = inspectorArea.GetComponent <InspectorManager>(); previewCamera.GetComponent <FlyCameraController>().enabled = true; inspectorCamera.GetComponent <FlyCameraController>().enabled = false; materialDatabase = GetComponent <MaterialDatabase>(); plantDatabase = GetComponent <PlantDatabase>(); }
// UI Listeners private void OnGameObjectButtonClicked() { if (!ComponentRef) { ExplorerCore.LogWarning("Component reference is null or destroyed!"); return; } InspectorManager.Inspect(ComponentRef.gameObject); }
private static void InspectClipboard() { if (Current.IsNullOrDestroyed()) { Notification.ShowMessage("Cannot inspect a null or destroyed object!"); return; } InspectorManager.Inspect(Current); }
public override void CreateInspector(InspectorManager inspectorManager) { if (CreateUI == false) { return; } InspectorNode.ExtensionMethodTypes.Add(typeof(InspectorExtensionsMethods)); _inspectorUI = new InspectorUI(inspectorManager.Config, _windows); }
private void OnCellClicked(int dataIndex) { if (m_context == SearchContext.StaticClass) { InspectorManager.Inspect(currentResults[dataIndex] as Type); } else { InspectorManager.Inspect(currentResults[dataIndex]); } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
/// <summary> /// Initializiation /// </summary> private void Start() { if (Instance != null) { CustomLogger.Instance.Error(LogMessages.MULTIPLE_INSTANCES); return; } Instance = this; target = null; default_action = null; Active = false; }
private void Start() { ObjectNameUI.color = Color.clear; // toggles this script off this.gameObject.GetComponent <Inspector>().enabled = false; _manager = GameObject.FindObjectOfType <InspectorManager>(); var objectTransform = transform; _initialPosition = objectTransform.localPosition; _initialRotation = objectTransform.localRotation; }
// Start is called before the first frame update void Awake() { Instance = this; UnityEngine.Events.UnityAction [] actions = new UnityEngine.Events.UnityAction[2]; actions[0] = () => { SwitchStatsAndActions(true); }; actions[1] = () => { SwitchStatsAndActions(false); }; actionsStatsButton.InitActions(actions, 0); actions[0].Invoke(); myPanel.AddActionToButton(new UnityAction(() => { if (GameManager.Instance.representationManager.currentRepresentation == GameManager.Instance.representationManager.buildingsRepresentation) { (GameManager.Instance.representationManager.buildingsRepresentation as MapRepresentation).DeselectAll(); } })); }
public void InitializeManager(InspectorContext context, ToolbarService service) { LoadModules(context); var over = new MacBorderedWindow(CGRect.Empty, NSColor.Green); var next = new MacBorderedWindow(CGRect.Empty, NSColor.Red); var previous = new MacBorderedWindow(CGRect.Empty, NSColor.Blue); var acc = new MacAccessibilityWindow(new CGRect(10, 10, 600, 700)); var ins = new InspectorWindow(this, new CGRect(10, 10, 600, 700));; var tool = new MacToolbarWindow(this, new CGRect(10, 10, 100, 700)); tool.ShowToolkit(false); var manager = new InspectorManager(this, over, next, previous, acc, ins, tool); context.Initialize(manager, false); service.SetDelegate(this); }
private void DoBind() { //var predicate = PredicateBuilder.True<SubStatusMaster>(); List <InspectorMaster> lst = InspectorManager.GetAll(); if (lst.Count > 0) { lvData.DataSource = lst; lvData.DataBind(); dvData.Visible = true; PagerRow.Visible = true; } else { dvData.Visible = false; PagerRow.Visible = false; } }
protected void lvData_ItemCommand(object sender, ListViewCommandEventArgs e) { lblError.Text = string.Empty; lblSave.Text = string.Empty; lblMessage.Text = string.Empty; lblMessage.Visible = false; lblError.Visible = false; lblSave.Visible = false; if (e.CommandName.Equals("DoEdit")) { int id = Convert.ToInt32(e.CommandArgument); hdId.Value = id.ToString(); Label lblName = (Label)e.Item.FindControl("lblName"); txtName.Text = lblName.Text; } else if (e.CommandName.Equals("DoDelete")) { // In Case of delete try { var list = CheckPrimaryValue.CheckPrimaryValueExists(0, 0, 0, 0, 0, Convert.ToInt32(e.CommandArgument), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (list.ToList().Count > 0) { lblMessage.Text = "Inspector is used so you can't delete !!!"; lblMessage.Visible = true; return; } var inspector = InspectorManager.GetById(Convert.ToInt32(e.CommandArgument)); inspector.Status = false; InspectorManager.Save(inspector); btnCancel_Click(null, null); lblSave.Text = "Record Deleted Sucessfully."; lblSave.Visible = true; } catch (Exception ex) { lblError.Text = "Record Not Deleted."; lblError.Visible = true; } } }
protected void btnSave_Click(object sender, EventArgs e) { lblError.Text = string.Empty; lblError.Visible = false; lblSave.Text = string.Empty; lblSave.Visible = false; lblMessage.Visible = false; lblMessage.Text = string.Empty; try { using (TransactionScope scope = new TransactionScope()) { bool exists = InspectorManager.IsExist(txtName.Text.Trim(), Convert.ToInt32(hdId.Value)); if (exists) { lblMessage.Text = "Inspector Name already exists."; lblMessage.Visible = true; txtName.Focus(); return; } InspectorMaster inspector = InspectorManager.GetById(Convert.ToInt32(hdId.Value)); inspector.InspectorName = txtName.Text; inspector.Status = true; InspectorManager.Save(inspector); saveMsg = hdId.Value == "0" ? "Record Saved Sucessfully." : "Record Updated Sucessfully."; btnCancel_Click(null, null); lblSave.Text = saveMsg; lblSave.Visible = true; scope.Complete(); } //btnCancel_Click(null, null); //lblSave.Visible = true; //lblSave.Text = "Record Saved Sucessfully."; } catch (Exception ex) { lblError.Visible = true; lblError.Text = "Record Not Saved !!!"; } }
public abstract void CreateInspector(InspectorManager inspectorManager);
public static void Inspect(Type type) => InspectorManager.Inspect(type);
public static void Inspect(object obj) => InspectorManager.Inspect(obj);
public override void OnSelectMouseInspect() { InspectorManager.Inspect(lastHitObject); }
void _OnRegisterAsset() { ImporterManager.AddImporter(new ImporterMaterial()); InspectorManager.RegisterInspector(new InspectorComponent()); }
public override void CreateInspector(InspectorManager inspectorManager) { }
protected virtual void InspectClicked() { InspectorManager.Inspect(Occupant.Value, this.Occupant); }
void Awake() { _main = this; allInspectors = new List <BaseInspectorWindow>(); }
//public int HalfWidth => (int)(0.5f * Rect.rect.width) - 75; //public int AdjustedKeyWidth => HalfWidth - 50; //public int AdjustedRightWidth => HalfWidth; private void KeyInspectClicked() { InspectorManager.Inspect((Occupant as CacheKeyValuePair).DictKey, this.Occupant); }
public override void Update() { InspectorManager.Update(); }
public void Show() { InspectorManager.Inspect(proto); }
void Awake() { _InspectorManager = this; StartCoroutine("StartAutoStm"); }