internal static void NxSetEnumMembers(UIBlock block, string propertyName, string[] value) { PropertyList properties = block.GetProperties(); properties.SetEnumMembers(propertyName, value); properties.Dispose(); }
public UIDialog(DialogMode mode) { m_Mode = mode; m_BackgroundImg = new UIImage(); m_Text = new UIText(); m_Block = new UIBlock(); m_Block.Rect = new Rect(0, 0, Screen.width, Screen.height); Add(m_Block); Add(m_BackgroundImg); Add(m_Text); if (m_Mode == DialogMode.YES_OR_NO) { m_YesButton = new UITextButton(); m_NoButton = new UITextButton(); m_CloseButton = new UIClickButton(); Add(m_YesButton); Add(m_NoButton); Add(m_CloseButton); } else if (m_Mode == DialogMode.TAP_TO_DISMISS) { m_TipText = new UIText(); Add(m_TipText); } SetUIHandler(this); }
public void update_cb(UIBlock block) { // группа станков if (block == _dialog.enum05) { _data.Drawings.SelectedMachineGroup = _dialog.enum05.ValueAsString; initialize_cb(_dialog.enum06); } // станок else if (block == _dialog.enum06) { _data.Drawings.SelectedMachine = _dialog.enum06.ValueAsString; _dialog.group1.Enable = _dialog.enum06.Enable; _dialog.group2.Enable = _dialog.enum06.Enable; _dialog.group3.Enable = _dialog.enum06.Enable; } else if (block == _dialog.toggle0) { update_enable_gr(_dialog.group1.Members, _dialog.toggle0.Value); } else if (block == _dialog.toggle01) { update_enable_gr(_dialog.group2.Members, _dialog.toggle01.Value); } else if (block == _dialog.toggle02) { update_enable_gr(_dialog.group3.Members, _dialog.toggle02.Value); } }
internal static void NxSetInteger(UIBlock block, string propertyName, int value) { PropertyList properties = block.GetProperties(); properties.SetInteger(propertyName, value); properties.Dispose(); }
internal static void NxSetDouble(UIBlock block, string propertyName, double value) { PropertyList properties = block.GetProperties(); properties.SetDouble(propertyName, value); properties.Dispose(); }
internal static string NxGetString(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); string str = properties.GetString(propertyName); properties.Dispose(); return(str); }
internal static TaggedObject[] NxGetObjectArray(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); TaggedObject[] taggedObjectVector = properties.GetTaggedObjectVector(propertyName); properties.Dispose(); return(taggedObjectVector); }
internal static TaggedObject NxGetObject(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); TaggedObject taggedObject = properties.GetTaggedObject(propertyName); properties.Dispose(); return(taggedObject); }
internal static bool NxGetLogical(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); bool logical = properties.GetLogical(propertyName); properties.Dispose(); return(logical); }
internal static int NxGetBits(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); int num2 = SnapPointsStateSet.Chop17(properties.GetBits(propertyName)); properties.Dispose(); return(num2); }
internal static string NxGetFile(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); string file = properties.GetFile(propertyName); properties.Dispose(); return(file); }
internal static string[] NxGetEnumMembers(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); string[] enumMembers = properties.GetEnumMembers(propertyName); properties.Dispose(); return(enumMembers); }
internal static string NxGetEnumAsString(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); string enumAsString = properties.GetEnumAsString(propertyName); properties.Dispose(); return(enumAsString); }
internal static int NxGetEnum(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); int num = properties.GetEnum(propertyName); properties.Dispose(); return(num); }
internal static double[] NxGetDoubleArray(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); double[] doubleVector = properties.GetDoubleVector(propertyName); properties.Dispose(); return(doubleVector); }
internal static double NxGetDouble(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); double num = properties.GetDouble(propertyName); properties.Dispose(); return(num); }
internal static string[] NxGetStringArray(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); string[] strings = properties.GetStrings(propertyName); properties.Dispose(); return(strings); }
internal static Vector NxGetVector(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); Vector vector = properties.GetVector(propertyName); properties.Dispose(); return(vector); }
internal static void NxSetPoint(UIBlock block, string propertyName, Position value) { PropertyList properties = block.GetProperties(); Point3d pointSc = new Point3d(value.X, value.Y, value.Z); properties.SetPoint(propertyName, pointSc); properties.Dispose(); }
internal static int NxGetInteger(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); int integer = properties.GetInteger(propertyName); properties.Dispose(); return(integer); }
public GameObject MakeGameObjectBlock(Block block, Transform parent) { GameObject go = Instantiate(Resources.Load <GameObject>("UI/Block"), parent); UIBlock ui = go.GetComponent <UIBlock>(); ui.block = block; return(go); }
internal static void NxSetLogical(UIBlock block, string propertyName, bool value) { PropertyList properties = block.GetProperties(); properties.GetPropertyNames(); properties.SetLogical(propertyName, value); properties.Dispose(); }
internal static int[] NxGetIntegerArray(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); int[] integerVector = properties.GetIntegerVector(propertyName); properties.Dispose(); return(integerVector); }
internal static Position NxGetPoint(UIBlock block, string propertyName) { PropertyList properties = block.GetProperties(); Position point = properties.GetPoint(propertyName); properties.Dispose(); return(point); }
internal static void NxSetVector(UIBlock block, string propertyName, Vector value) { PropertyList properties = block.GetProperties(); Vector3d vector = new Vector3d(value.X, value.Y, value.Z); properties.SetVector(propertyName, vector); properties.Dispose(); }
public override void UpdateSpecify(UIBlock ui) { if (ui is SpecifyVector) { SpecifyVector sv = ui as SpecifyVector; sv.Vector = this.Matr.GetZAxis(); sv.Point = this.CenterPt; } }
void BreakBlock(UIBlock block) { if (Board.ContainsValue(block)) // MAke sure block is a part of the board { Vector2 key = block.BoardPos; // Store the position since thats our key value Board[key] = null; // Set that block to null indicating a blank } Destroy(block.gameObject); // Destroy the game object }
internal static void NxSetString(UIBlock block, string propertyName, string value) { if (propertyName != "BlockID") { PropertyList properties = block.GetProperties(); properties.SetString(propertyName, value); properties.Dispose(); } }
private void initialize_cb(UIBlock block) { // группа станков if (block == _dialog.enum05) { if (!_dialog.enum05.GetEnumMembers().Any()) { _dialog.enum05.SetEnumMembers(_data.Additional.MachineGroup); } if (!_dialog.enum05.GetEnumMembers().Any()) { _ui.NXMessageBox.Show("Не получен список станков", NXMessageBox.DialogType.Error, "Не удалось получить список станков для работы! Проверьте директорию с настройками!"); } if (_dialog.enum05.GetEnumMembers().Any() && _dialog.enum05.GetEnumMembers().Contains(_data.Additional.SelectedMachineGroup)) { _dialog.enum05.ValueAsString = _data.Additional.SelectedMachineGroup; } else if (_dialog.enum05.GetEnumMembers().Any()) { _dialog.enum05.ValueAsString = _data.Additional.MachineGroup.First(); } _dialog.enum05.Enable = _dialog.enum05.GetEnumMembers().Any(); } else if (block == _dialog.enum06) { _dialog.enum06.SetEnumMembers(_data.Additional.MachineNames); if (_dialog.enum06.GetEnumMembers().Any() && !string.IsNullOrEmpty(_data.Additional.SelectedMachine) && _dialog.enum06.GetEnumMembers().Contains(_data.Additional.SelectedMachine)) { _dialog.enum06.ValueAsString = _data.Additional.SelectedMachine; } _dialog.enum06.Enable = _dialog.enum06.GetEnumMembers().Any(); update_cb(_dialog.enum06); } else if (block == _dialog.enum07) { var strings = _data.Additional.DrawingsFromats.Where(df => df.DrawingType == 1 && df.IsFirstSheet).Select(df => df.ToString()).ToArray(); _dialog.enum07.SetEnumMembers(strings); //_data.Drawings.CardsFormat.Where(f => f.Key == 1).Select(f => f.Value.ToString()).ToArray()); } else if (block == _dialog.enum09) { var strings = _data.Additional.DrawingsFromats.Where(df => df.DrawingType == 2 && df.IsFirstSheet).Select(df => df.ToString()).ToArray(); _dialog.enum09.SetEnumMembers(strings); //_data.Drawings.CardsFormat.Where(f => f.Key == 2).Select(f => f.Value.ToString()).ToArray()); } else if (block == _dialog.enum011) { _dialog.enum011.SetEnumMembers( //_data.Drawings.CardsFormat.Where(f => f.Key == 3).Select(f => f.Value.ToString()).ToArray()); _data.Additional.DrawingsFromats.Where(df => df.DrawingType == 3 && df.IsFirstSheet).Select(df => df.ToString()).ToArray()); } }
public override void UpdateSpecify(UIBlock ui) { if (ui is SpecifyOrientation) { SpecifyOrientation so = ui as SpecifyOrientation; so.Origin = this.CenterPt; so.XAxis = this.Matr.GetXAxis(); so.YAxis = this.Matr.GetYAxis(); } }
//sets up the renderer, modifier and start material void Start () { render = GetComponent<Renderer> (); render.material = inactive; modifier = GetComponent<InstrumentModifier> (); //get adjacent UIBlocks above = GetAdjacent(Vector3.up); forward = GetAdjacent(Vector3.forward); back = GetAdjacent(Vector3.back); below = GetAdjacent(Vector3.down); }