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();
            }
        }
Esempio n. 2
0
        /////////////////////////////////////

        public SelectTypeWindow()
        {
            InitializeComponent();

            WindowTitle = EditorLocalization.Translate("SelectTypeWindow", WindowTitle);
            EditorLocalization.TranslateForm("SelectTypeWindow", this);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        private void PackagesDocumentWindow_Load(object sender, EventArgs e)
        {
            if (WinFormsUtility.IsDesignerHosted(this))
            {
                return;
            }

            //contentBrowser1.ImageHelper.AddImage( "DefaultDisabled",
            //	ToolStripRenderer.CreateDisabledImage( Properties.Resources.Default_16 ),
            //	ToolStripRenderer.CreateDisabledImage( Properties.Resources.Default_32 ) );

            try
            {
                if (!Directory.Exists(PackageManager.PackagesFolder))
                {
                    Directory.CreateDirectory(PackageManager.PackagesFolder);
                }
            }
            catch (Exception e2)
            {
                Log.Warning(e2.Message);
            }

            PerformRefreshList();
            UpdatePackageControls();

            EditorLocalization.TranslateForm("PackagesWindow", kryptonSplitContainer2.Panel1);
            EditorLocalization.TranslateForm("PackagesWindow", this);

            timer1.Start();

            UpdateControls();

            EditorAPI.ClosingApplicationChanged += EditorAPI_ClosingApplicationChanged;
        }
Esempio n. 5
0
        public ContentBrowserSearchForm()
        {
            InitializeComponent();

            DarkThemeUtility.ApplyToForm(this);
            Text = EditorLocalization.Translate("ContentBrowser.SearchForm", Text);
            EditorLocalization.TranslateForm("ContentBrowser.SearchForm", this);
        }
Esempio n. 6
0
        private void StartPageWindow_Load(object sender, EventArgs e)
        {
            if (WinFormsUtility.IsDesignerHosted(this))
            {
                return;
            }

            EditorLocalization.TranslateForm("StartPageWindow", this);

            timer1.Start();

            UpdateControls();
        }
Esempio n. 7
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);
        }
Esempio n. 8
0
        private void StartPageWindow_Load(object sender, EventArgs e)
        {
            if (WinFormsUtility.IsDesignerHosted(this))
            {
                return;
            }

            EditorLocalization.TranslateForm("StartPageWindow", this);

            timer1.Start();

            UpdateControls();

            if (EditorActions.GetByName("Store") != null && EditorActions.GetByName("Store").CompletelyDisabled)
            {
                kryptonButtonOpenStore.Visible = false;
            }
        }
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public ObjectSettingsWindow()
        {
            InitializeComponent();

            objectsBrowser1.Options.FilteringModeButton          = false;
            objectsBrowser1.Options.DisplayPropertiesSortFilesBy = false;
            objectsBrowser1.Options.DisplayPropertiesOpenButton  = false;

            if (EditorAPI.DarkTheme)
            {
                kryptonSplitContainer1.StateNormal.Back.Color1 = Color.FromArgb(54, 54, 54);

                //var container = child as KryptonSplitContainer;
                //if( container != null )
                //	container.StateNormal.Back.Color1 = Color.FromArgb( 40, 40, 40 );
            }

            EditorLocalization.TranslateForm("ObjectSettingsWindow", this);
        }
Esempio n. 10
0
        /////////////////////////////////////

        public ComponentTypeSettingsForm(DocumentInstance document, Component component)
        {
            this.document  = document;
            this.component = component;

            InitializeComponent();

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

            hierarchicalContainer1.OverrideGroupDisplayName += HierarchicalContainer1_OverrideGroupDisplayName;

            DarkThemeUtility.ApplyToForm(this);

            Text = EditorLocalization.Translate("TypeSettingsForm", Text);
            EditorLocalization.TranslateForm("TypeSettingsForm", this);
        }
Esempio n. 11
0
        //

        public TipsWindow()
        {
            InitializeComponent();

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

            WindowTitle = EditorLocalization.Translate("TipsWindow", WindowTitle);
            EditorLocalization.TranslateForm("TipsWindow", panel2);

            BackColor = Color.FromArgb(54, 54, 54);
            if (EditorAPI.DarkTheme)
            {
                panel2.BackColor = BackColor;
            }
            else
            {
                panel2.BackColor = Color.FromArgb(240, 240, 240);                  //SystemColors.Control;
            }
            kryptonCheckBoxShowTipsAtStartup.Checked = EditorSettingsSerialization.ShowTipsAsStartup;
        }
Esempio n. 12
0
        private void BackstageMenu_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }
            if (EditorUtility.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);

                kryptonLinkLabel1.LabelStyle = LabelStyle.Custom1;
                kryptonLinkLabel1.StateCommon.ShortText.Color1 = Color.FromArgb(230, 230, 230);

                //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 );

                    DarkThemeUtility.ApplyToForm(page);
                }

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

            //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( kryptonPageAbout, "Backstage" );
            }

            LoginLoad();

            timer1.Start();
        }
Esempio n. 13
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();
        }