Ejemplo n.º 1
0
 public AllocateOrderApplyCtrl(AllocateType type)
 {
     InitializeComponent();
     IsShowOnePage = true;
     Init();
     curAllocateType = type;
     LoadConfig();
 }
    // constructor - no parameter -> set default;
    public FurnitureData()
    {
        functionType = FunctionType.Default;
        id           = 0;
        file         = null;
        name         = null;
        guide        = null;
        height       = 0;
        widthX       = 0;
        widthZ       = 0;
        functionType = FunctionType.Default;
        step         = 0;

        allocateType = AllocateType.Default;
    }
Ejemplo n.º 3
0
        private void Init()
        {
            MenuPermission         = RolePermissionMenuEnum.调拨;
            skinComboBoxShopID.Tag = RolePermissionMenuEnum.限;
            if (IsPos)
            {
                PriceColumn.ReadOnly     = true;
                SalePriceColumn.ReadOnly = true;
                priceDataGridViewTextBoxColumn.ReadOnly = true;
                SalePrice.ReadOnly   = true;
                skinLabelNotice.Text = "下表的数量可以修改";
            }

            if (!HasPermission(RolePermissionMenuEnum.调拨, RolePermissionEnum.单据时间))
            {
                dateTimePicker_Start.Enabled = false;
            }
            dataGridViewPagingSumCtrl1 = new DataGridViewPagingSumCtrl(this.dataGridView1);
            dataGridViewPagingSumCtrl1.Initialize();
            dataGridViewPagingSumCtrl1.ShowRowCounts = false;
            if (order != null)
            {
                dateTimePicker_Start.Value = order.CreateTime;
                this.curAllocateType       = (AllocateType)Enum.Parse(typeof(AllocateType), order?.AllocateType.ToString());
            }

            dataGridViewPagingSumCtrl2 = new DataGridViewPagingSumCtrl(this.dataGridView2, new String[] {
                xSDataGridViewTextBoxColumn.DataPropertyName,
                sDataGridViewTextBoxColumn.DataPropertyName,
                mDataGridViewTextBoxColumn.DataPropertyName,
                lDataGridViewTextBoxColumn.DataPropertyName,
                xLDataGridViewTextBoxColumn.DataPropertyName,
                xL2DataGridViewTextBoxColumn.DataPropertyName,
                xL3DataGridViewTextBoxColumn.DataPropertyName,
                xL4DataGridViewTextBoxColumn.DataPropertyName,
                xL5DataGridViewTextBoxColumn.DataPropertyName,
                xL6DataGridViewTextBoxColumn.DataPropertyName,
                fDataGridViewTextBoxColumn.DataPropertyName,
                SumCount.DataPropertyName,
                SumMoney.DataPropertyName
            });

            dataGridViewPagingSumCtrl2.SpecAutoSizeModeColumns(new DataGridViewColumn[] { costumeIDDataGridViewTextBoxColumn });
            dataGridViewPagingSumCtrl2.ShowRowCounts = false;
            dataGridViewPagingSumCtrl2.Initialize();

            dataGridView2.AutoGenerateColumns = false;
        }
    // constructor - all parameter -> set up data
    public FurnitureData(int _type, int _id, string _file, string _name, string _guide, int _price, int _height, int _widthX, int _widthZ, int _step, int[] _firstDataTable, int[] _secondDataTable, int _slotLength, AllocateType _allocateType)
    {
        functionType    = ReturnType(_type);
        id              = _id;
        file            = _file;
        name            = _name;
        guide           = _guide;
        price           = _price;
        height          = _height;
        widthX          = _widthX;
        widthZ          = _widthZ;
        step            = _step;
        firstDataTable  = _firstDataTable;
        secondDataTable = _secondDataTable;
        slotLength      = _slotLength;

        // allocate function type
        switch (_type)
        {
        case 1:
            functionType = FunctionType.CreateObject;
            break;

        case 2:
            functionType = FunctionType.SellObject;
            break;

        case 3:
            functionType = FunctionType.DecorateObject;
            break;

        case 4:
            functionType = FunctionType.StorageObject;
            break;

        default:
            Debug.Log("error");
            break;
        }

        allocateType = _allocateType;
    }
Ejemplo n.º 5
0
Archivo: EFI.cs Proyecto: loqix/RoseOS
 public unsafe Status AllocatePages(AllocateType type, MemoryType memType, ulong pages, ref IntPtr addr) {
     fixed(IntPtr *_addr = &addr)
     return((Status)RawCalliHelper.StdCall(_AllocatePages, type, memType, pages, _addr));
 }