コード例 #1
0
        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));
            }
        }
コード例 #2
0
 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;
 }
コード例 #3
0
    /// <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);
        }
    }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
 public MultiFuncWindow()
 {
     InitializeComponent();
     SubGrid = new Grid[4] {
         SubGrid_1, SubGrid_2, SubGrid_3, SubGrid_4
     };
     DisplayMode = GridMode.Two;
 }
コード例 #6
0
        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));
        }
コード例 #7
0
 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);
     }
 }
コード例 #8
0
 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);
     }
 }
コード例 #9
0
 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);
     }
 }
コード例 #10
0
        public DataGridForm(EbMobileDataGrid dataGrid)
        {
            mode          = GridMode.New;
            this.dataGrid = dataGrid;

            InitializeComponent();
            CreateForm();
            SetValues();
        }
コード例 #11
0
 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;
 }
コード例 #12
0
 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);
     }
 }
コード例 #13
0
    public override void InitializeTile(Vector2 tileDimensions, GridMode gridMode, GridInfo currentGridInfo)
    {
        base.InitializeTile(tileDimensions, gridMode, currentGridInfo);

        if (anomalySpriteRenderer != null)
        {
            anomalySpriteRenderer.size = tileDimensions;
        }
    }
コード例 #14
0
    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>();
    }
コード例 #15
0
    public override void InitializeTile(Vector2 tileDimensions, GridMode gridMode)
    {
        base.InitializeTile(tileDimensions, gridMode);
        PlacePlanetRenderer();

        if (newPlanetTile != null)
        {
            newPlanetTile(this);
        }
    }
コード例 #16
0
 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;
 }
コード例 #17
0
 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;
 }
コード例 #18
0
        /// <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());
            }
        }
コード例 #19
0
        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);
        }
コード例 #20
0
ファイル: GridTile.cs プロジェクト: francisruf/headspace
    //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();
    }
コード例 #21
0
        static void SetGridMode(GridMode gridMode)
        {
            if (gridMode == GridMode.SabreCSG)
            {
                CSGGrid.Activate();
            }
            else
            {
                CSGGrid.Deactivate();
            }

            if (gridMode == GridMode.Unity)
            {
                ShowOrHideUnityGrid(true);
            }
            else
            {
                ShowOrHideUnityGrid(false);
            }
        }
コード例 #22
0
        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();
        }
コード例 #23
0
ファイル: GridTile.cs プロジェクト: francisruf/headspace
    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;
        }
    }
コード例 #24
0
ファイル: GridManager.cs プロジェクト: francisruf/headspace
    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);
        }
    }
コード例 #25
0
        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;
        }
コード例 #26
0
        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));
            }
        }
コード例 #27
0
    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;
        }
    }
コード例 #28
0
        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;
            }
        }
コード例 #29
0
        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();
        }
コード例 #30
0
ファイル: GridTile.cs プロジェクト: francisruf/headspace
 // 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);
 }
コード例 #31
0
ファイル: SceneGrid.cs プロジェクト: BearishSun/BansheeEngine
 private static extern void Internal_SetMode(IntPtr thisPtr, GridMode mode);
コード例 #32
0
ファイル: SceneGrid.cs プロジェクト: BearishSun/BansheeEngine
 /// <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);
 }
コード例 #33
0
 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;
     }
 }
コード例 #34
0
        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
            }
        }