public WMIObjectPropertyTable(ISWbemObject wmiObjIn, PropertyFilters propFiltersIn, GridMode gridModeIn, bool showOperatorsIn, bool showOriginIn, bool showKeysIn) { try { if (wmiObjIn == null) { throw (new ArgumentNullException("wmiObj")); } wmiObj = wmiObjIn; propFilters = propFiltersIn; gridMode = gridModeIn; showOperators = showOperatorsIn; showOrigin = showOriginIn; showKeys = showKeysIn; Initialize(); } catch (Exception exc) { MessageBox.Show(WMISys.GetString("WMISE_Exception", exc.Message, exc.StackTrace)); } }
public CurtGrids() : base("CurtGrids", "CurtGrids", "Create Grids/Mullions for input to CurtWall component", "Extra", "Hummingbird") { this.gridMode = GridMode.UGridFull; this.Menu_UFullGridClicked(null, null); this.Message = "U Full Grid Line"; this.Hidden = false; }
/// <summary> /// Set the global Grid-Mode /// </summary> /// <param name="newGridMode"></param> public static Vector3 GetGridVector(GridMode newGridMode) { gridMode = newGridMode; switch (gridMode) { case GridMode.none: return(Vector3.zero); case GridMode.TenthGrid: return(new Vector3(0.1f, 0.1f, 0.1f)); case GridMode.QuarterGrid: return(new Vector3(0.25f, 0.25f, 0.25f)); case GridMode.HalfGrid: return(new Vector3(0.5f, 0.5f, 0.5f)); case GridMode.Default: return(Vector3.one); case GridMode.Five: return(new Vector3(5f, 5f, 5f)); case GridMode.Ten: return(new Vector3(10f, 10f, 10f)); case GridMode.Custom: return(customGrid); default: return(Vector3.one); } }
/// <summary> /// Converts a grid mode enum value to JSON /// </summary> /// <param name="mode">Grid mode enum value</param> /// <returns>Grid mode in JSON format</returns> private static JValue ConvertGridModeEnumValueToJson(GridMode mode) { JValue value; switch (mode) { case GridMode.None: value = new JValue(false); break; case GridMode.Autoplace: value = new JValue("autoplace"); break; case GridMode.NoAutoplace: value = new JValue("no-autoplace"); break; default: throw new InvalidCastException(string.Format(Strings.Common_EnumValueToCodeConversionFailed, mode.ToString(), typeof(GridMode))); } return(value); }
public MultiFuncWindow() { InitializeComponent(); SubGrid = new Grid[4] { SubGrid_1, SubGrid_2, SubGrid_3, SubGrid_4 }; DisplayMode = GridMode.Two; }
public override bool Read(GH_IReader reader) { int num = 0; // Was 2 with lines? Maybe 0? reader.TryGetInt32("GridMode", ref num); this.gridMode = (GridMode)num; return(base.Read(reader)); }
private void Menu_UFullGridClicked(object sender, EventArgs e) { if (this.gridMode != GridMode.UGridFull) { this.RecordUndoEvent("U Full Grid"); this.gridMode = GridMode.UGridFull; this.ExpireSolution(true); } }
private void Menu_UPartMullClicked(object sender, EventArgs e) { if (this.gridMode != GridMode.UMullionPart) { this.RecordUndoEvent("U Part Mull"); this.gridMode = GridMode.UMullionPart; this.ExpireSolution(true); } }
private void Menu_VPartGridClicked(object sender, EventArgs e) { if (this.gridMode != GridMode.VGridPart) { this.RecordUndoEvent("V Part Grid"); this.gridMode = GridMode.VGridPart; this.ExpireSolution(true); } }
public DataGridForm(EbMobileDataGrid dataGrid) { mode = GridMode.New; this.dataGrid = dataGrid; InitializeComponent(); CreateForm(); SetValues(); }
public override void ToJSON(JObject ParentObject) { ParentObject["viewname"] = View.ViewName; ParentObject["gridmode"] = GridMode.ToString(); ParentObject["maxrows"] = MaxRows; ParentObject["viewid"] = View.SessionViewId.ToString(); ParentObject["width"] = Width; ParentObject["hasHeader"] = HasHeader; }
private void Menu_VFullMullClicked(object sender, EventArgs e) { if (this.gridMode != GridMode.VMullionFull) { this.RecordUndoEvent("V Full Mull"); this.gridMode = GridMode.VMullionFull; this.ExpireSolution(true); } }
public override void InitializeTile(Vector2 tileDimensions, GridMode gridMode, GridInfo currentGridInfo) { base.InitializeTile(tileDimensions, gridMode, currentGridInfo); if (anomalySpriteRenderer != null) { anomalySpriteRenderer.size = tileDimensions; } }
void Start() { var gridWidth = 5; var gridHeight = 5; grid = new GridMode(gridWidth, gridHeight); pathFindingGrid = new PathFinding(new int2(gridWidth, gridHeight), debug: false); mouseInputs = new List <Vector3>(); }
public override void InitializeTile(Vector2 tileDimensions, GridMode gridMode) { base.InitializeTile(tileDimensions, gridMode); PlacePlanetRenderer(); if (newPlanetTile != null) { newPlanetTile(this); } }
public SpecCurvWindow() { InitializeComponent(); DisplayMode = GridMode.One; u[0] = this.Curve_1; u[1] = this.Curve_2; u[2] = this.Curve_3; u[3] = this.Curve_4; u[0].ScreenIndex = 0; u[1].ScreenIndex = 1; u[2].ScreenIndex = 2; u[3].ScreenIndex = 3; }
public SpecImgWindow() { InitializeComponent(); u[0] = ImageView_A; u[1] = ImageView_B; u[2] = ImageView_C; u[3] = ImageView_D; u[0].ScreenIndex = 0; u[1].ScreenIndex = 1; u[2].ScreenIndex = 2; u[3].ScreenIndex = 3; DisplayMode = GridMode.One; }
/// <summary> /// Creates C_AdvancedDataGrid control in specified mode /// </summary> public C_AdvancedDataGrid(GridMode mode) { InitializeComponent(); basegrid = null; excel_on = false; initialized = false; try { this.Initialize(mode); } catch (Exception ex) { this.ErrorMessage("Failed to initialize the control. " + Environment.NewLine + ex.ToString()); } }
public DataGridForm(EbMobileDataGrid dataGrid, MobileTableRow row, string name) { InitializeComponent(); mode = GridMode.Edit; rowName = name; this.dataGrid = dataGrid; SaveAndContinue.IsVisible = false; Grid.SetColumn(SaveAndClose, 0); Grid.SetColumnSpan(SaveAndClose, 3); Grid.SetColumn(CancelAndClose, 3); Grid.SetColumnSpan(CancelAndClose, 3); CreateForm(); FillValue(row); }
//Fonction pour initialiser les components de la tuile, lorsqu'elle spawn public virtual void InitializeTile(Vector2 tileDimensions, GridMode gridMode) { this.tileDimensions = tileDimensions; _spriteRenderer.size = tileDimensions; _boxCollider.size = tileDimensions; Vector2 colliderOffset = new Vector2(); colliderOffset = tileDimensions / 2f; colliderOffset.y = -colliderOffset.y; _boxCollider.offset = colliderOffset; _currentGridMode = gridMode; _debugCanvas.GetComponent <RectTransform>().sizeDelta = tileDimensions; ToggleGridMode(_currentGridMode); AssignCheckeredSprite(); }
static void SetGridMode(GridMode gridMode) { if (gridMode == GridMode.SabreCSG) { CSGGrid.Activate(); } else { CSGGrid.Deactivate(); } if (gridMode == GridMode.Unity) { ShowOrHideUnityGrid(true); } else { ShowOrHideUnityGrid(false); } }
private void btnGrid_Click(object sender, EventArgs e) { if (this.mGridMode == GridMode.Background) { this.mGridMode = GridMode.Foreground; } else if (this.mGridMode == GridMode.Foreground) { this.mGridMode = GridMode.None; } else if (this.mGridMode == GridMode.None) { this.mGridMode = GridMode.Background; } this.panMap.Invalidate(); }
protected virtual void ToggleGridMode(GridMode newGridMode) { switch (newGridMode) { case GridMode.WorldMap: _spriteRenderer.sprite = worldMapSprite; ToggleLifetimeText(false); ToggleHeatText(false); break; case GridMode.Debug: _spriteRenderer.sprite = debugSprite; ToggleLifetimeText(true); ToggleHeatText(true); break; default: break; } }
public void ToggleGridMode() { switch (_currentGridMode) { case GridMode.WorldMap: _currentGridMode = GridMode.Debug; break; case GridMode.Debug: _currentGridMode = GridMode.WorldMap; break; default: break; } if (newGridMode != null) { newGridMode(_currentGridMode); } }
internal void Add(IPowerable mod) { if (mod is IPowerSupply) { Producers.Add(mod as IPowerSupply); if (mod is IVariablePowerSupply) { VariableProducers.Add(mod as IVariablePowerSupply); Data.RatedCapacityWatts += (mod as IVariablePowerSupply).MaximumWattsGenerated; } else { Data.RatedCapacityWatts += (mod as IPowerSupply).WattsGenerated; } } else if (mod is IPowerConsumer) { Consumers.Add(mod as IPowerConsumer); //consumers need to have their HasPower state refreshed switch (Mode) { case GridMode.BatteryDrain: case GridMode.BatteryRecharge: case GridMode.Nominal: (mod as IPowerConsumer).TurnOnPower(); break; } } if (mod is IBattery) { Batteries.Add(mod as IBattery); Data.InstalledBatteryWatts += (mod as IBattery).EnergyContainer.TotalCapacityWatts; } mod.PowerGridInstanceID = this.PowerGridInstanceID; Mode = GridMode.Unknown; }
public WMIObjectPropertyTable(ManagementBaseObject mgmtObjIn, PropertyFilters propFiltersIn, GridMode gridModeIn, bool showOperatorsIn, bool showOriginIn, bool showKeysIn, bool showSelectionBoxesIn, bool showValuesIn, bool expandEmbeddedIn, bool showEmbeddedObjValueIn) { try { if (mgmtObjIn == null) { throw (new ArgumentNullException("mgmtObjIn")); } mgmtObj = mgmtObjIn; propFilters = propFiltersIn; gridMode = gridModeIn; showOperators = showOperatorsIn; showOrigin = showOriginIn; showKeys = showKeysIn; showSelectionBoxes = showSelectionBoxesIn; showValues = showValuesIn; expandEmbedded = expandEmbeddedIn; showEmbeddedObjValue = showEmbeddedObjValueIn; Initialize(); } catch (Exception exc) { MessageBox.Show(WMISys.GetString("WMISE_Exception", exc.Message, exc.StackTrace)); } }
protected override void ToggleGridMode(GridMode newGridMode) { base.ToggleGridMode(newGridMode); if (anomalySpriteRenderer == null) { return; } switch (newGridMode) { case GridMode.WorldMap: anomalySpriteRenderer.enabled = true; break; case GridMode.Debug: anomalySpriteRenderer.enabled = false; break; default: break; } }
internal void ChangeMode(GridMode mode) { GridMode lastMode = currentGridMode; currentGridMode = mode; switch (mode) { case GridMode.Ngrams: NodeList.Visibility = Visibility.Visible; GlyphList.Visibility = Visibility.Collapsed; TransitionGrid.Visibility = Visibility.Visible; WordGrid.Visibility = Visibility.Collapsed; break; case GridMode.Script: NodeList.Visibility = Visibility.Collapsed; GlyphList.Visibility = Visibility.Visible; TransitionGrid.Visibility = Visibility.Collapsed; WordGrid.Visibility = Visibility.Collapsed; break; case GridMode.Orthography: NodeList.Visibility = Visibility.Collapsed; GlyphList.Visibility = Visibility.Visible; TransitionGrid.Visibility = Visibility.Collapsed; WordGrid.Visibility = Visibility.Collapsed; break; default: NodeList.Visibility = Visibility.Collapsed; GlyphList.Visibility = Visibility.Collapsed; TransitionGrid.Visibility = Visibility.Collapsed; WordGrid.Visibility = Visibility.Visible; break; } }
public MapGridVisual() { //Compiler will complain about ifstatement unreachable code due to gridsize constant //But we want it handle changes by dev to the constant #pragma warning disable CS0162 if (GridSize % 2 == 0) { gridMode = GridMode.Even; } else { gridMode = GridMode.Odd; } #pragma warning restore CS0162 Tiles = new List <MapTileVisual>(); TileSize = 32; mapZoom = 18; translateOnZoom = true; CompositionTarget.Rendering += CompositionTarget_Rendering; //Application.Current.MainWindow.Loaded += MainWindow_Loaded; InitGrid(); }
// Fonction pour initialiser les components de la tuile, lorsqu'elle spawn public virtual void InitializeTile(Vector2 tileDimensions, GridMode gridMode, GridInfo currentGridInfo) { AssignGridInfo(currentGridInfo); InitializeTile(tileDimensions, gridMode); }
private static extern void Internal_SetMode(IntPtr thisPtr, GridMode mode);
/// <summary> /// Changes how is the grid drawn. /// </summary> /// <param name="mode">Determines orientation and position of the grid so it suits the camera in the provided mode. /// </param> internal void SetMode(GridMode mode) { Internal_SetMode(mCachedPtr, mode); }
private void buttonSwap(GridMode mode, bool isSplitRow) { if (mode == GridMode.Allocations) { if (isSplitRow) { btnRemSplit.Visible = false; btnUnSplit.Visible = true; btnViewSwap.Visible = true; btnSplitTrans.Visible = false; } else { btnRemSplit.Visible = false; btnUnSplit.Visible = false; btnViewSwap.Visible = false; btnSplitTrans.Visible = true; } } else { btnRemSplit.Visible = true; btnUnSplit.Visible = true; btnViewSwap.Visible = true; btnSplitTrans.Visible = true; } }
private void gridModeSwap(GridMode newMode, string splitFilter) { if (newMode == GridMode.Allocations) { floatingCombo_LostFocus(null, null); previewPanelSwap(false, null); dataGridView1.DataSource = allocations.Tables["Allocation"]; btnViewSwap.Text = "View Split"; btnSplitTrans.Text = "Split"; btnPrint.Visible = true; btnSave.Visible = true; btnOpen.Visible = true; if (isAdminVersion) { adminToolStrip.Visible = true; } } else if(newMode == GridMode.Splits) { floatingCombo_LostFocus(null, null); previewPanelSwap(true, dataGridView1.CurrentRow); dataGridView1.DataSource = allocations.Tables["Split"]; allocations.Tables["Split"].DefaultView.RowFilter = "ChargeID = '" + splitFilter + "'"; if (allocations.Tables["Split"].Rows.Count > 0) { checkSplitAmounts(); } btnViewSwap.Text = "View Transactions"; btnSplitTrans.Text = "Add Split"; btnPrint.Visible = false; btnSave.Visible = false; btnOpen.Visible = false; adminToolStrip.Visible = false; } else { // do nothing } }