/// <summary> /// Initializes map control instance /// </summary> public MapCtl() { SuspendLayout(); Dock = DockStyle.Fill; Font = new Font(Font.FontFamily, 9f); BackColor = ColorTranslator.FromHtml("#233e3b"); ForeColor = ColorTranslator.FromHtml("#1d3331"); TrackColor = Color.Black; SelectedTrackColor = ColorTranslator.FromHtml("#ff2200"); DetailTextColor = ColorTranslator.FromHtml("#ff0044"); SwitchColor = Color.Orange; RoadColor = ColorTranslator.FromHtml("#1d3331"); RiverColor = ColorTranslator.FromHtml("#2d536f"); CrossColor = RoadColor; GridColor = ColorTranslator.FromHtml("#ddeddd"); GridZeroColor = ColorTranslator.FromHtml("#bbcccc"); DotColor = ColorTranslator.FromHtml("#ff2200"); ResizeRedraw = true; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true); ResumeLayout(); FitScale = CurrentScale = 0.01f; CtlCenter = new PointF(Width / 2, Height / 2); Selection = new SelectionClass(this); BeginLoad(); }
public void SpawnSubSelector(SelectionClass pclass) { SelectorOptions options = new SelectorOptions(sub_options [(int)pclass], pclass); if (child != null) { try { Destroy(child.gameObject); } catch { } } sbyte pos = (sbyte)options.selection_class; GameObject selectorobj = Instantiate(GameObject.Find("map_subselector")); selectorobj.transform.SetParent(SceneGlobals.map_canvas.transform); SubSelector new_child = Loader.EnsureComponent <SubSelector>(selectorobj); new_child.targets = targets; new_child.options = options; new_child.InitSub(); new_child.targets = targets; new_child.Position = UpperLeft + new Vector2(width + new_child.width / 2, -new_child.head_height); new_child.draggable = false; new_child.transform.SetParent(transform, true); child = new_child; }
/// <summary> /// Конструктор класса /// </summary> /// <param name="uidoc"></param> public CombMarkService(UIDocument uidoc) { _uiDoс = uidoc; _doc = uidoc.Document; _activeView = _doc.ActiveView; _selector = new SelectionClass(uidoc); Initialize(); }
public SelectorOptions(ushort p_options, SelectionClass p_class) { source_data = Globals.selector_data; value = p_options; selection_class = p_class; switch (p_class) { case SelectionClass.Reference: options_possible = source_data.reference_options; icons_possible = source_data.reference_icons; flags_possible = source_data.reference_flags; functions_possible = source_data.reference_function_pointers; break; case SelectionClass.Target: options_possible = source_data.target_options; icons_possible = source_data.target_icons; flags_possible = source_data.target_flags; functions_possible = source_data.target_function_pointers; break; case SelectionClass.Info: options_possible = source_data.info_options; icons_possible = source_data.info_icons; flags_possible = source_data.info_flags; functions_possible = source_data.info_function_pointers; break; default: case SelectionClass.Command: options_possible = source_data.command_options; icons_possible = source_data.command_icons; flags_possible = source_data.command_flags; functions_possible = source_data.command_function_pointers; break; } }