private GameObject GetPrefabOfDock(DockInfo dock) { if (dock.locked > 0) { return this.lockedDockPrefab; } if (dock.startTime == 0) { return this.notUsingdockPrefab; } if (dock.IsFinished) { return this.finishedDockPrefab; } return this.inUsingDockPrefab; }
/// <summary> /// 验证-添加道口 /// </summary> /// <param name="info"></param> /// <returns></returns> public long InsertInfo(DockInfo info) { ///道口代码②、道口名称③在同一仓库代码④范围内不允许重复,必填项 int dockCnt = dal.GetCounts("[DOCK] = N'" + info.Dock + "' and [WM_NO] = N'" + info.WmNo + "'"); if (dockCnt > 0) { throw new Exception("Err_:MC:0x00000687"); //同一仓库下道口代码不允许重复 } int dockNameCnt = dal.GetCounts("[DOCK_NAME] = N'" + info.DockName + "' and [WM_NO] = N'" + info.WmNo + "'"); if (dockNameCnt > 0) { throw new Exception("Err_:MC:0x00000688"); //同一仓库下道口名称不允许重复 } return(dal.Add(info)); }
public Sniffer(bool started = false) { Started = started; _itemInfo = new ItemInfo(_itemMaster, _itemInventory); _shipInfo = new ShipInfo(_shipMaster, _shipInventory, _itemInventory); _conditionTimer = new ConditionTimer(_shipInfo); _dockInfo = new DockInfo(_shipInventory, _materialInfo); _akashiTimer = new AkashiTimer(_shipInfo, _dockInfo, _presetDeck); _airBase = new AirBase(_itemInfo); _battleInfo = new BattleInfo(_shipInfo, _itemInfo, _airBase); _logger = new Logger(_shipInfo, _itemInfo, _battleInfo); _questInfo = new QuestInfo(_questCountList); _questCounter = new QuestCounter(_questInfo, _itemInventory, _shipInventory, _battleInfo); _miscTextInfo = new MiscTextInfo(_shipInfo, _itemInfo); _haveState = new List <IHaveState> { _achievement, _materialInfo, _conditionTimer, _exMapInfo, _questInfo }; AdditionalData = new AdditionalData(); }
public override void OnDocked(DockObject requestor, DockPlacement position, object data) { /* we only add support for DockPlacement.Center docking * strategy here... for the rest use our parent class' method */ if (position == DockPlacement.Center) { /* we can only dock simple (not compound) items */ if (requestor.IsCompound) { requestor.Freeze(); dockInfo = new DockInfo(position, data); requestor.Foreach(new Callback(DockChild)); requestor.Thaw(); } else { DockItem requestorItem = requestor as DockItem; Widget label = requestorItem.TabLabel; if (label == null) { label = new Label(requestorItem.LongName); requestorItem.TabLabel = label; } int tabPosition = -1; if (data is Int32) { tabPosition = Convert.ToInt32(data); } ((Notebook)Child).InsertPage(requestor, label, tabPosition); requestor.DockObjectFlags |= DockObjectFlags.Attached; } } else { base.OnDocked(requestor, position, data); } }
public static void SerializeDockState(IAppContext context) { var panels = context.DockPanels; panels.Lock(); foreach (var panel in panels) { Debug.Print(panel.Caption); Debug.Print("Hidden: " + panel.AutoHidden); Debug.Print("Visible: " + panel.Visible); Debug.Print("Style: " + panel.DockState); //bool hidden = panel.Hidden; //if (hidden) //{ // panel.Hidden = false; //} //bool visible = panel.Visible; //if (!visible) //{ // panel.Visible = true; //} var host = panel.Control.Parent as DockHost; if (host != null) { var dhc = host.InternalController as DockHostController; if (dhc != null) { DockInfo di = dhc.GetSerCurrentDI(); if (di != null) { Rectangle r; if (dhc.bInAutoHide) { r = dhc.DINew.rcDockArea; } else { r = dhc.LayoutRect; } Debug.Print("Child host count: " + dhc.ChildHostCount); Debug.Print("Controller name: " + di.ControlleName); Debug.Print("Style: " + di.dStyle); Debug.Print("x: {0}; y: {1}; w: {2}; h: {3}", r.X, r.Y, r.Width, r.Height); //Debug.Print("x: {0}; y: {1}; w: {2}; h: {3}", r2.X, r2.Y, r2.Width, r2.Height); Debug.Print("Priority: " + di.nPriority); Debug.Print("DockIndex: " + di.nDockIndex); } } } //if (!visible) //{ // panel.Visible = false; //} //if (hidden) //{ // panel.Hidden = true; //} Debug.Print("--------------"); } panels.Unlock(); }
public override void OnDocked(DockObject requestor, DockPlacement position, object data) { /* we only add support for DockPlacement.Center docking strategy here... for the rest use our parent class' method */ if (position == DockPlacement.Center) { /* we can only dock simple (not compound) items */ if (requestor.IsCompound) { requestor.Freeze (); dockInfo = new DockInfo (position, data); requestor.Foreach (new Callback (DockChild)); requestor.Thaw (); } else { DockItem requestorItem = requestor as DockItem; Widget label = requestorItem.TabLabel; if (label == null) { label = new Label (requestorItem.LongName); requestorItem.TabLabel = label; } int tabPosition = -1; if (data is Int32) tabPosition = Convert.ToInt32 (data); ((Notebook)Child).InsertPage (requestor, label, tabPosition); requestor.DockObjectFlags |= DockObjectFlags.Attached; } } else { base.OnDocked (requestor, position, data); } }