コード例 #1
0
            public AltnRowControl(AlternateController Parent, AlternateRowItems row)
            {
                this.Row = row;

                Controller = new RouteFinderSelection(
                    Row.IcaoTxtBox,
                    false,
                    Row.RwyComboBox,
                    new ComboBox(),
                    new Button(),
                    row,
                    Parent.appOptionsLocator,
                    () => Parent.airwayNetwork.AirportList,
                    () => Parent.airwayNetwork.WptList,
                    new ProcedureFilter());

                OptionMenu = new ActionContextMenu(
                    Parent.appOptionsLocator,
                    Parent.airwayNetwork,
                    Parent.destSidProvider,
                    Controller,
                    new CountryCodeCollection().ToLocator(),
                    Parent.windCalcGetter,
                    Row.DisLbl,
                    DistanceDisplayStyle.Short,
                    () => Row.RouteTxtBox.Text,
                    (s) => Row.RouteTxtBox.Text = s,
                    Parent.layoutPanel.FindForm());
            }
コード例 #2
0
ファイル: ActionListView.cs プロジェクト: mengflyQ/act
    public bool DrawHeader(bool fold, bool isSelect)
    {
        GUILayout.BeginHorizontal();
        GUI.changed      = false;
        GUI.contentColor = EditorGUIUtility.isProSkin ? new Color(1f, 1f, 1f, 0.7f) : new Color(0f, 0f, 0f, 0.7f);



        string text = fold ? "\u25BC" + (char)0x200a : "\u25BA" + (char)0x200a;


        if (childList.Count == 0)
        {
            text = string.Empty;
        }

        if (!GUILayout.Toggle(true, text, "PreToolbar2",
                              GUILayout.MaxWidth(10f)))
        {
            fold         = !fold;
            isChangeName = false;
        }

        if (isChangeName)
        {
            name = EditorGUILayout.TextField(name, GUILayout.MinWidth(200));
        }
        else
        {
            if (GUILayout.Button(name, EditorStyles.label, GUILayout.MinWidth(200)))
            {
                if (Event.current.button == 0)
                {
                    if (GetSelectNodalLevel() == this)
                    {
                        isChangeName = true;
                    }
                    SetSelectNodalLevel(this);
                }
                else if (Event.current.button == 1)
                {
                    ActionContextMenu.AddItem("Add Child", false, OnMenuCallback, null);
                    ActionContextMenu.Show();
                }
            }
        }

        GUI.contentColor = Color.white;
        GUILayout.EndHorizontal();

        GUI.backgroundColor = Color.white;
        return(fold);
    }
コード例 #3
0
        private void SetRouteActionControl()
        {
            routeActionMenu = new ActionContextMenu(
                appOptionsLocator,
                airwayNetwork,
                origController,
                destController,
                checkedCodesLocator,
                () => GetWindCalculator(),
                routeDisLbl,
                DistanceDisplayStyle.Long,
                () => mainRouteRichTxtBox.Text,
                s => mainRouteRichTxtBox.Text = s,
                ParentForm);

            routeActionMenu.Subscribe();
            showRouteActionsBtn.Click += (s, e) =>
                                         routeActionMenu.Show(showRouteActionsBtn, new Point(0, showRouteActionsBtn.Height));
        }
コード例 #4
0
ファイル: ActionListView.cs プロジェクト: mengflyQ/act
 private void OnMenuCallback(object userData)
 {
     isfold = true;
     ownerWindow.CreateNodal(name + "(Child)", this);
     ActionContextMenu.Clear();
 }
コード例 #5
0
 public void OnContextMenuOpening(ActionExecutionContext context)
 {
     ActionContextMenu.OnContextMenuOpeningInTreeView((ITreeViewDisplayable)context.Source.DataContext, (ContextMenuEventArgs)context.EventArgs);
 }