Beispiel #1
0
    void OnEnable()
    {
        featureStyle = (FeatureStyle)target;
        styleEditor  = featureStyle.Editor as StyleEditor;

        if (styleEditor == null)
        {
            styleEditor         = new StyleEditor(featureStyle);
            featureStyle.Editor = styleEditor;
        }
    }
        public static void OpenStyleEditor()
        {
            if (_styleEditor == null)
            {
                _styleEditor         = new StyleEditor();
                _styleEditor.Closed += (sender, args) => _styleEditor = null;
            }

            if (_styleEditor.IsLoaded)
            {
                _styleEditor.Activate();
            }
            else
            {
                AcApp.ShowModalWindow(AcApp.MainWindow.Handle, _styleEditor, false);
            }
        }
Beispiel #3
0
        public Options ComposeStyleEditor(IEnumerable <IStyle> styles, Action <object, EventArgs <IStyle> > styleChanged)
        {
            options = new Options();
            options.ApplyButton.Visible = false;

            var editor = new StyleEditor();

            editor.Dock = DockStyle.Fill;

            editor.PropertyValueChanged += (s, e) => styleChanged?.Invoke(s, e);

            options.OptionChanger = editor;

            options.SuspendLayout();
            options.ContentPanel.Size = editor.Size;
            options.ContentPanel.Controls.Add(editor);

            options.OptionList.SelectedItem = null;

            options.OptionList.Items.Clear();
            editor.Top = options.OptionList.Bottom + 1;

            var optionList = new List <IStyle> (styles);

            foreach (object o in styles)
            {
                options.OptionList.Items.Add(o.ToString());
            }
            options.OptionList.SelectedIndexChanged += (s, e) => {
                if (options.OptionList.SelectedIndex != -1)
                {
                    editor.SelectedObject = optionList[options.OptionList.SelectedIndex];
                }
            };
            options.OptionList.SelectedIndex = 0;

            options.ClientSize = ControlSize(options).Size;

            options.ResumeLayout(true);
            Application.DoEvents();
            options.ClientSize = ControlSize(options).Size;
            Application.DoEvents();
            return(options);
        }
Beispiel #4
0
 private void ShowStyleEditor(ConceptUsecase useCase)
 {
     var editor = new StyleEditor();
 }
Beispiel #5
0
        private void style_Click(object sender, EventArgs e)
        {
            StyleEditor se = new StyleEditor();

            se.Load(tabs);
        }
Beispiel #6
0
        private void StyleEditorClick(object sender, EventArgs e)
        {
            var dt = new StyleEditor();

            dock.Put(dt);
        }
 private void style_Click(object sender, EventArgs e)
 {
     StyleEditor se = new StyleEditor();
     se.Load(tabs);
 }