Пример #1
0
        //

        public StoreDocumentWindow()
        {
            InitializeComponent();

            WindowTitle = EditorLocalization.Translate("StoreDocumentWindow", WindowTitle);
            EditorThemeUtility.ApplyDarkThemeToForm(panelToolbar);
        }
        public ScriptDropDownControl(HCItemProperty itemProperty)
        {
            InitializeComponent();

            Resizable             = true;
            UseFormDropDownHolder = true;
            //DoubleBuffered = true;
            ResizeRedraw = true;
            //MinimumSize = Size;
            //MaximumSize = new Size( Size.Width * 2, Size.Height * 2 );

            AddOkCancelButtons(out _, out _);

            this.itemProperty = itemProperty;

            propertyItemForUndoSupport = itemProperty.GetItemInHierarchyToRestoreValues();
            propertyItemForUndoSupport.SaveValuesToRestore();

            try
            {
                scriptEditorControl.Initialize(new HCItemPropertyScriptAdapter(itemProperty));
            }
            catch (Exception exc)
            {
                Log.Warning("Script editor control init failed: \n\n" + exc.ToString());
                Enabled = false;
            }

            EditorThemeUtility.ApplyDarkThemeToForm(this);
        }
Пример #3
0
        /////////////////////////////////////

        public SpecifyParametersForm(string caption, object optionalObjectProvider, CheckDelegate checkHandler = null, OKDelegate okHandler = null)
        {
            this.checkHandler = checkHandler;
            this.okHandler    = okHandler;

            InitializeComponent();

            if (optionalObjectProvider != null)
            {
                hierarchicalContainer1.SetData(null, new object[] { optionalObjectProvider });
            }
            else
            {
                hierarchicalContainer1.SetData(null, new object[] { objectImpl });
            }

            if (string.IsNullOrEmpty(caption))
            {
                Text = EngineInfo.NameWithVersion;
            }
            else
            {
                Text = caption;
            }

            labelError.Text = "";

            EditorThemeUtility.ApplyDarkThemeToForm(this);
            labelError.ForeColor = Color.Red;
        }
Пример #4
0
        //

        public ObjectSettingsHeader_ObjectInfo()
        {
            InitializeComponent();

            buttonTypeSettings.Values.Image = EditorResourcesCache.Type;

            if (IsDesignerHosted)
            {
                return;
            }

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            toolTip1.SetToolTip(buttonTypeSettings, EditorLocalization.Translate("SettingsWindow", "Type Settings"));
            toolTip1.SetToolTip(buttonTypeSettingsDefaultValue, EditorLocalization.Translate("SettingsWindow", "Reset Type Settings to default."));

            if (kryptonLabel1.Height < kryptonLabel1.PreferredSize.Height)
            {
                kryptonLabel1.Height = kryptonLabel1.PreferredSize.Height;
            }
            if (kryptonLabel2.Height < kryptonLabel2.PreferredSize.Height)
            {
                kryptonLabel2.Height = kryptonLabel2.PreferredSize.Height;
            }
        }
Пример #5
0
        public NewObjectWindow()
        {
            InitializeComponent();

            //KryptonSplitContainer childs layout broken. see comments in kryptonsplitcontainer.cs. Also Anchors works strange in .NET Core.
            panelName.Width = panelName.Parent.Width - DpiHelper.Default.ScaleValue(9);

            //options
            if (sharedOptions != null)
            {
                contentBrowser1.Options = sharedOptions;
            }
            else
            {
                if (!Config_Load())
                {
                    ////var data = new ContentBrowser.ResourcesModeDataClass();
                    ////data.selectionMode = ResourceSelectionMode.None;
                    //contentBrowser1.Init( null, null, /*data, */null );
                    contentBrowser1.Options.PanelMode        = ContentBrowser.PanelModeEnum.TwoPanelsSplitHorizontally;
                    contentBrowser1.Options.SplitterPosition = 3.0 / 5.0;
                }

                sharedOptions = contentBrowser1.Options;
            }

            CloseByEscape = true;

            WindowTitle = EditorLocalization.Translate("NewObjectWindow", WindowTitle);
            EditorLocalization.TranslateForm("NewObjectWindow", eUserControl1);

            EditorThemeUtility.ApplyDarkThemeToForm(eUserControl1);
            EditorThemeUtility.ApplyDarkThemeToForm(panelName);
        }
        public ContentBrowserOptionsForm(ContentBrowser browser)
        {
            Browser = browser;

            InitializeComponent();

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            Text = EditorLocalization.Translate("ContentBrowser", Text);
            EditorLocalization.TranslateForm("ContentBrowser", this);

            hierarchicalContainer1.OverridePropertyDisplayName += HierarchicalContainer1_PropertyDisplayNameOverride;
            hierarchicalContainer1.OverridePropertyEnumItem    += HierarchicalContainer1_OverridePropertyEnumItem;

            if (EditorLocalization.WideLanguage)
            {
                hierarchicalContainer1.SplitterRatio = 0.5f;
            }

            if (Browser != null)
            {
                object[] objects = new object[1];
                objects[0] = Browser.Options;
                hierarchicalContainer1.SetData(null, objects);

                //fix delayed update
                hierarchicalContainer1.UpdateItems();
            }
        }
Пример #7
0
        /////////////////////////////////////////

        public PackagesWindow()
        {
            InitializeComponent();

            if (WinFormsUtility.IsDesignerHosted(this))
            {
                return;
            }

            if (EditorAPI.DarkTheme)
            {
                EditorThemeUtility.ApplyDarkThemeToForm(kryptonSplitContainer1.Panel1);
                EditorThemeUtility.ApplyDarkThemeToForm(kryptonSplitContainer1.Panel2);
            }

            double distance = 22.0 * EditorAPI.DPIScale;

            kryptonSplitContainer2.Panel1MinSize    = (int)distance;
            kryptonSplitContainer2.SplitterDistance = (int)distance;

            if (EditorAPI.DPIScale >= 2)
            {
                this.buttonUpdateList.Values.Image = global::NeoAxis.Properties.Resources.Refresh_32;
            }

            WindowTitle = EditorLocalization.Translate("PackagesWindow", WindowTitle);
        }
Пример #8
0
        //

        public OKCancelTextBoxForm(string labelText, string textBoxText, string caption, CheckDelegate checkHandler, OKDelegate okHandler)
        {
            this.checkHandler = checkHandler;
            this.okHandler    = okHandler;

            InitializeComponent();

            this.labelText.Text = labelText;
            textBoxName.Text    = textBoxText;

            if (string.IsNullOrEmpty(caption))
            {
                Text = EngineInfo.NameWithVersion;
            }
            else
            {
                Text = caption;
            }

            labelError.Text = "";

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            buttonOK.Text     = EditorLocalization.Translate("General", buttonOK.Text);
            buttonCancel.Text = EditorLocalization.Translate("General", buttonCancel.Text);
        }
Пример #9
0
        public RangeDropDownControl(HCItemProperty itemProperty)
        {
            InitializeComponent();

            AddOkCancelButtons(out _, out _);

            this.itemProperty = itemProperty;

            rangeAttr = (RangeAttribute)itemProperty.Property.GetCustomAttributes(typeof(RangeAttribute)).FirstOrDefault();
            if (rangeAttr == null)
            {
                rangeAttr = new RangeAttribute(0, 100);                   // default
            }
            SetupUIApplicableRange();

            minTrackBar.ValueChanged += new EventHandler(anyTrackBar_ValueChanged);
            maxTrackBar.ValueChanged += new EventHandler(anyTrackBar_ValueChanged);

            object obj = ReferenceUtility.GetUnreferencedValue(itemProperty.GetValues()[0]);

            value = RangeConverter.ObjectToRange(obj);

            propertyItemForUndoSupport = itemProperty.GetItemInHierarchyToRestoreValues();
            propertyItemForUndoSupport.SaveValuesToRestore();

            UpdateTrackBarsAndTextBoxes();

            EditorThemeUtility.ApplyDarkThemeToForm(this);
        }
        public ContentBrowserSearchForm()
        {
            InitializeComponent();

            EditorThemeUtility.ApplyDarkThemeToForm(this);
            Text = EditorLocalization.Translate("ContentBrowser.SearchForm", Text);
            EditorLocalization.TranslateForm("ContentBrowser.SearchForm", this);
        }
Пример #11
0
        //HCItemProperty propertyItemForUndoSupport;

        //

        public ColorValuePoweredSelectForm()
        {
            InitializeComponent();

            Text              = EditorLocalization.Translate("ColorValuePoweredSelectForm", Text);
            buttonOK.Text     = EditorLocalization.Translate("General", buttonOK.Text);
            buttonCancel.Text = EditorLocalization.Translate("General", buttonCancel.Text);

            EditorThemeUtility.ApplyDarkThemeToForm(this);
        }
Пример #12
0
        //

        public KryptonRibbonGroupSliderControl()
        {
            InitializeComponent();

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            if (kryptonLabel1.Height < kryptonLabel1.PreferredSize.Height)
            {
                kryptonLabel1.Height = kryptonLabel1.PreferredSize.Height;
            }
        }
Пример #13
0
        //

        public HCGridEvent()
        {
            InitializeComponent();

            buttonEditEventHandlers.Values.Image = EditorResourcesCache.Edit;
            buttonAddEventHandler.Values.Image   = EditorResourcesCache.New;

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            eventToolTip.SetToolTip(buttonAddEventHandler, EditorLocalization.Translate("SettingsWindow", "Add event handler."));
            eventToolTip.SetToolTip(buttonEditEventHandlers, EditorLocalization.Translate("SettingsWindow", "Edit event handlers."));
        }
Пример #14
0
        //

        public HCGridProperty()
        {
            InitializeComponent();

            //DoubleBuffered = true;
            ResizeRedraw = true;

            EditorThemeUtility.ApplyDarkThemeToForm(this);
            EditorThemeUtility.ApplyDarkThemeToToolTip(propertyToolTip);

            //!!!!
            //BackColor = Random.Generate(ColorValue.Zero, ColorValue.One).ToColor();
        }
Пример #15
0
        public RangeDropDownControl()
        {
            InitializeComponent();

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            if (minLabel.Height < minLabel.PreferredSize.Height)
            {
                minLabel.Height = minLabel.PreferredSize.Height;
            }
            if (maxLabel.Height < maxLabel.PreferredSize.Height)
            {
                maxLabel.Height = maxLabel.PreferredSize.Height;
            }
        }
Пример #16
0
        //!!!!deleted
        //bool closing;

        //!!!!
        //System.Drawing.Font richTextBox1FontOriginal;
        //string richTextBox1FontCurrent = "";

        //

        public DockWindow()
        {
            InitializeComponent();

            if (IsDesignerHosted)
            {
                return;
            }

            EditorThemeUtility.ApplyDarkThemeToForm(this);
            //if( EditorAPI.DarkTheme )
            //{
            //	BackColor = Color.FromArgb( 54, 54, 54 );
            //}
        }
        public MessageLogOptionsForm()
        {
            InitializeComponent();

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            Text = Translate(Text);

            hierarchicalContainer1.OverridePropertyDisplayName += HierarchicalContainer1_PropertyDisplayNameOverride;
            hierarchicalContainer1.OverridePropertyEnumItem    += HierarchicalContainer1_OverridePropertyEnumItem;

            if (EditorLocalization.WideLanguage)
            {
                hierarchicalContainer1.SplitterRatio = 0.5f;
            }
        }
Пример #18
0
        /////////////////////////////////////////

        public ImportWindow()
        {
            InitializeComponent();

            //KryptonSplitContainer childs layout broken. see comments in kryptonsplitcontainer.cs. Also Anchors works strange in .NET Core.
            panelName.Width = panelName.Parent.Width - DpiHelper.Default.ScaleValue(8);

            buttonDestinationFolderBrowse.Values.Image = EditorResourcesCache.SelectFolder;

            CloseByEscape = true;

            WindowTitle = EditorLocalization.Translate("ImportWindow", WindowTitle);
            EditorLocalization.TranslateForm("ImportWindow", eUserControl1);

            EditorThemeUtility.ApplyDarkThemeToForm(eUserControl1);
            EditorThemeUtility.ApplyDarkThemeToForm(panelName);
        }
Пример #19
0
        //

        public HCGridProperty()
        {
            InitializeComponent();

            //DoubleBuffered = true;
            ResizeRedraw = true;

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            if (labelName.Height < labelName.PreferredHeight)
            {
                labelName.Height = labelName.PreferredHeight;
            }

            //!!!!
            //BackColor = Random.Generate(ColorValue.Zero, ColorValue.One).ToColor();
        }
Пример #20
0
        /////////////////////////////////////

        public ComponentTypeSettingsForm(DocumentInstance document, Component component)
        {
            //debug = true;

            this.document  = document;
            this.component = component;

            InitializeComponent();

            if (WinFormsUtility.IsDesignerHosted(this))
            {
                return;
            }

            hierarchicalContainer1.OverrideGroupDisplayName += HierarchicalContainer1_OverrideGroupDisplayName;

            EditorThemeUtility.ApplyDarkThemeToForm(this);

            Text = EditorLocalization.Translate("TypeSettingsForm", Text);
            EditorLocalization.TranslateForm("TypeSettingsForm", this);
        }
Пример #21
0
        public ColorValuePoweredSelectControl(HCItemProperty itemProperty)
        {
            InitializeComponent();
            AddOkCancelButtons(out okButton, out cancelButton);

            this.itemProperty = itemProperty;

            powered = ReferenceUtility.GetUnreferencedType(itemProperty.Property.Type.GetNetType()) == typeof(ColorValuePowered);

            var values = itemProperty.GetValues();

            if (values == null)
            {
                return;
            }

            //!!!!multiselection
            var value = values[0];

            ColorValuePowered initValue;

            bool readOnly;

            {
                var  netType         = itemProperty.Property.Type.GetNetType();
                bool isReferenceType = ReferenceUtility.IsReferenceType(netType);

                bool       referenceSpecified = false;
                IReference iReference         = null;
                if (isReferenceType && value != null)
                {
                    iReference         = (IReference)value;
                    referenceSpecified = !string.IsNullOrEmpty(iReference.GetByReference);
                }

                readOnly = referenceSpecified;
            }

            if (powered)
            {
                initValue = (ColorValuePowered)ReferenceUtility.GetUnreferencedValue(value);
            }
            else
            {
                var c = (ColorValue)ReferenceUtility.GetUnreferencedValue(value);
                initValue = new ColorValuePowered(c.Red, c.Green, c.Blue, c.Alpha, 1);
            }

            //for( int n = 0; n < propertyOwners.Length; n++ )
            //{
            //	ColorValue v = (ColorValue)property.GetValue( propertyOwners[ n ], null );

            //	if( n != 0 )
            //	{
            //		if( value != v )
            //		{
            //			value = new ColorValue( 1, 1, 1 );
            //			break;
            //		}
            //	}
            //	else
            //		value = v;
            //}

            bool noAlpha = itemProperty.Property.GetCustomAttributes(typeof(ColorValueNoAlphaAttribute), true).Length != 0;

            ApplicableRangeColorValuePowerAttribute powerRange = null;

            if (powered)
            {
                var array = itemProperty.Property.GetCustomAttributes(typeof(ApplicableRangeColorValuePowerAttribute), true);
                if (array.Length != 0)
                {
                    powerRange = (ApplicableRangeColorValuePowerAttribute)array[0];
                }
            }

            Init(initValue, noAlpha, powered, powerRange, readOnly);

            propertyItemForUndoSupport = itemProperty.GetItemInHierarchyToRestoreValues();
            propertyItemForUndoSupport.SaveValuesToRestore();

            EditorThemeUtility.ApplyDarkThemeToForm(this);
        }
Пример #22
0
        //

        public ColorValuePoweredSelectControl()
        {
            InitializeComponent();
            AddOkCancelButtons(out okButton, out cancelButton);
            EditorThemeUtility.ApplyDarkThemeToForm(this);
        }
Пример #23
0
        public RangeDropDownControl()
        {
            InitializeComponent();

            EditorThemeUtility.ApplyDarkThemeToForm(this);
        }
Пример #24
0
        //

        public KryptonRibbonGroupSliderControl()
        {
            InitializeComponent();

            EditorThemeUtility.ApplyDarkThemeToForm(this);
        }
Пример #25
0
        private void BackstageMenu_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }
            if (WinFormsUtility.IsDesignerHosted(this))
            {
                return;
            }

            if (EditorAPI.DarkTheme)
            {
                kryptonNavigator1.StateCommon.Panel.Color1      = Color.FromArgb(10, 10, 10);
                kryptonNavigator1.StateSelected.Tab.Back.Color1 = Color.FromArgb(60, 60, 60);
                kryptonNavigator1.StatePressed.Tab.Back.Color1  = Color.FromArgb(60, 60, 60);
                kryptonNavigator1.StateTracking.Tab.Back.Color1 = Color.FromArgb(50, 50, 50);

                //kryptonNavigator1.StateSelected.Tab.Back.Color1 = Color.FromArgb( 70, 70, 70 );
                //kryptonNavigator1.StatePressed.Tab.Back.Color1 = Color.FromArgb( 60, 60, 60 );
                //kryptonNavigator1.StateTracking.Tab.Back.Color1 = Color.FromArgb( 60, 60, 60 );
                kryptonButtonBack.StateCommon.Back.Color1 = Color.FromArgb(10, 10, 10);

                BackColor = Color.FromArgb(10, 10, 10);

                //kryptonNavigator1.StateCommon.Panel.Color1 = Color.FromArgb( 40, 40, 40 );
                //kryptonNavigator1.StateSelected.Tab.Back.Color1 = Color.FromArgb( 54, 54, 54 );

                //kryptonNavigator1.StateCommon.Panel.Color1 = Color.FromArgb( 54, 54, 54 );
                //kryptonNavigator1.StateSelected.Tab.Back.Color1 = Color.FromArgb( 70, 70, 70 );
                //kryptonNavigator1.StatePressed.Tab.Back.Color1 = Color.FromArgb( 60, 60, 60 );
                //kryptonNavigator1.StateTracking.Tab.Back.Color1 = Color.FromArgb( 60, 60, 60 );
                //kryptonButtonBack.StateCommon.Back.Color1 = Color.FromArgb( 54, 54, 54 );

                foreach (var page in kryptonNavigator1.Pages)
                {
                    //page.StateCommon.Page.Color1 = Color.FromArgb( 80, 80, 80 );
                    page.StateCommon.Page.Color1 = Color.FromArgb(40, 40, 40);

                    //page.StateCommon.Page.Color1 = Color.FromArgb( 54, 54, 54 );

                    EditorThemeUtility.ApplyDarkThemeToForm(page);
                }

                kryptonLabelLoginError.StateCommon.ShortText.Color1           = Color.Red;
                kryptonLabelInstallPlatformTools.StateCommon.ShortText.Color1 = Color.Red;

                labelExTokenTransactions.StateCommon.Back.Color1 = Color.FromArgb(40, 40, 40);

                //restore colors after apply the dark theme
                kryptonLinkLabel1.LabelStyle = LabelStyle.Custom1;
                kryptonLinkLabel1.StateCommon.ShortText.Color1 = Color.FromArgb(0, 110, 190);

                //restore colors after apply the dark theme
                kryptonLinkLabelTokenWhatIsIt.LabelStyle = LabelStyle.Custom1;
                kryptonLinkLabelTokenWhatIsIt.StateCommon.ShortText.Color1 = Color.FromArgb(0, 110, 190);
            }

            //translate
            {
                foreach (var page in kryptonNavigator1.Pages)
                {
                    page.Text = Translate(page.Text);
                }

                EditorLocalization.TranslateForm("Backstage", kryptonPageInfo);
                EditorLocalization.TranslateForm("Backstage", kryptonPageNew);
                EditorLocalization.TranslateForm("Backstage", kryptonPageBuild);
                EditorLocalization.TranslateForm("Backstage", kryptonPageLogin);
            }

            LoginLoad();

            timer1.Start();
        }