private string GetDockNameFromPosEnum(ToolBarInitialPos pos) { switch (pos) { case ToolBarInitialPos.Top: default: return("topSandBarDock"); case ToolBarInitialPos.Bottom: return("bottomSandBarDock"); case ToolBarInitialPos.Left: return("leftSandBarDock"); case ToolBarInitialPos.Right: return("rightSandBarDock"); } }
private void CreateToolBar(string name, ToolBarInitialPos initialPos) { TD.SandBar.ToolBar temp = new TD.SandBar.ToolBar(); temp.Name = name; temp.Overflow = ToolBarOverflow.Hide; temp.AllowHorizontalDock = true; temp.AllowRightToLeft = true; temp.AllowVerticalDock = true; temp.Closable = false; temp.Movable = true; temp.Tearable = true; temp.DockLine = 2; ToolBarDef tbd = new ToolBarDef(); tbd.NWNToolsetDockName = GetDockNameFromPosEnum(initialPos); tbd.toolBar = temp; AllToolbars.Add(name, tbd); }
private string GetDockNameFromPosEnum(ToolBarInitialPos pos) { switch (pos) { case ToolBarInitialPos.Top: default: return "topSandBarDock"; case ToolBarInitialPos.Bottom: return "bottomSandBarDock"; case ToolBarInitialPos.Left: return "leftSandBarDock"; case ToolBarInitialPos.Right: return "rightSandBarDock"; } }
private void CreateToolBar(string name, ToolBarInitialPos initialPos) { ToolBar temp = new ToolBar(); temp.Name = name; temp.Overflow = ToolBarOverflow.Hide; temp.AllowHorizontalDock = true; temp.AllowRightToLeft = true; temp.AllowVerticalDock = true; temp.Closable = false; temp.Movable = true; temp.Tearable = true; temp.DockLine = 2; ToolBarDef tbd = new ToolBarDef(); tbd.NWNToolsetDockName = GetDockNameFromPosEnum(initialPos); tbd.toolBar = temp; AllToolbars.Add(name, tbd); }