///////////////////////////////////////// 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); }
///////////////////////////////////// public SelectTypeWindow() { InitializeComponent(); WindowTitle = EditorLocalization.Translate("SelectTypeWindow", WindowTitle); EditorLocalization.TranslateForm("SelectTypeWindow", this); }
// 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; } }
// public StoreDocumentWindow() { InitializeComponent(); WindowTitle = EditorLocalization.Translate("StoreDocumentWindow", WindowTitle); EditorThemeUtility.ApplyDarkThemeToForm(panelToolbar); }
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); }
// protected override void OnInit() { { var textInfo = ProcedureForm.CreateText("Easy HDR file import"); // Specify web of file path to a file." ); textInfo.Bold = true; ProcedureForm.AddRow(new ProcedureUI.Control[] { textInfo }); } { var textInfo = ProcedureForm.CreateText("Specify web or file path to a file, click Import."); ProcedureForm.AddRow(new ProcedureUI.Control[] { textInfo }); } editLink = ProcedureForm.CreateEdit("https://hdrihaven.com/files/hdris/qwantani_1k.hdr"); //editLink.TextChanged ProcedureForm.AddRow(new ProcedureUI.Control[] { editLink }); buttonImport = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Import")); buttonImport.Click += ButtonImport_Click; ProcedureForm.AddRow(new ProcedureUI.Control[] { buttonImport }); { var textInfo = ProcedureForm.CreateText("Huge set of 100% Free HDRIs, for Everyone"); // Specify web of file path to a file." ); textInfo.Bold = true; ProcedureForm.AddRow(new ProcedureUI.Control[] { textInfo }); } buttonHDRIHaven = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Go to HDRI Haven"), ProcedureUI.Button.SizeEnum.Long); buttonHDRIHaven.Click += ButtonHDRIHaven_Click; ProcedureForm.AddRow(new ProcedureUI.Control[] { buttonHDRIHaven }); }
public MessageLogWindow() { InitializeComponent(); toolStripButtonClear.Image = EditorResourcesCache.Delete; toolStripButtonOptions.Image = EditorResourcesCache.Options; Log.Handlers.InfoHandler += Handlers_InfoHandler; //Log.Handlers.InvisibleInfoHandler += Handlers_InvisibleInfoHandler; Log.Handlers.WarningHandler += Handlers_WarningHandler; Log.Handlers.ErrorHandler += Handlers_ErrorHandler; //configure list contentBrowser1.SetData(new ContentBrowser.Item[0], false); contentBrowser1.ImageHelper.AddImage("Info", Properties.Resources.Info_16, Properties.Resources.Info_32); contentBrowser1.ImageHelper.AddImage("Warning", Properties.Resources.Warning_16, Properties.Resources.Warning_32); contentBrowser1.ImageHelper.AddImage("Error", Properties.Resources.Error_16, Properties.Resources.Error_32); Config_Load(); EngineConfig.SaveEvent += Config_SaveEvent; WindowTitle = EditorLocalization.Translate("Windows", WindowTitle); toolStripButtonOptions.Text = EditorLocalization.Translate("MessageLogWindow", toolStripButtonOptions.Text); toolStripButtonClear.Text = EditorLocalization.Translate("MessageLogWindow", toolStripButtonClear.Text); if (EditorAPI.DarkTheme) { toolStrip1.Renderer = DarkThemeUtility.GetToolbarToolStripRenderer(); } }
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(); } }
// protected override void OnInit() { buttonUpdate = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Update")); buttonUpdate.Click += ButtonUpdate_Click; ProcedureForm.AddRow(new ProcedureUI.Control[] { buttonUpdate }); }
public void AddOkCancelButtons(out KryptonButton buttonOK, out KryptonButton buttonCancel) { var size = DpiHelper.Default.ScaleValue(new Size(94, 26)); buttonOK = new KryptonButton(); buttonOK.Size = size; buttonOK.Text = "OK"; buttonOK.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonOK.Location = new Point(Width - size.Width - buttonOK.Width - 20, Height - buttonOK.Height - 10); buttonOK.Click += (s, e) => ParentHolder.Close(true); Controls.Add(buttonOK); buttonCancel = new KryptonButton(); buttonCancel.Size = size; buttonCancel.Text = "Cancel"; buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonCancel.Location = new Point(Size - buttonCancel.Size - new Size(10, 10)); buttonCancel.Click += (s, e) => ParentHolder.Close(false); Controls.Add(buttonCancel); Height += buttonCancel.Height + 10; buttonOK.Text = EditorLocalization.Translate("General", buttonOK.Text); buttonCancel.Text = EditorLocalization.Translate("General", buttonCancel.Text); }
/////////////////////////////////////////////// protected override void OnInit() { buttonRender = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Render")); buttonRender.Click += ButtonCalculate_Click; ProcedureForm.AddRow(new ProcedureUI.Control[] { buttonRender }); }
public override void InitDocumentWindow(DocumentInstance document, object objectOfWindow, bool openAsSettings, Dictionary <string, object> windowTypeSpecificOptions) { base.InitDocumentWindow(document, objectOfWindow, openAsSettings, windowTypeSpecificOptions); if (objectsBrowser1 != null) { objectsBrowser1.Init(this, objectOfWindow, /*null, */ null); } //!!!! //special for Project Settings if (document.SpecialMode == "ProjectSettingsUserMode") { ReadOnlyHierarchy = true; } if (document.SpecialMode == "ProjectSettingsUserMode") { kryptonButtonClose.Values.Text = EditorLocalization.Translate("General", "Cancel"); } else { kryptonButtonOK.Enabled = false; kryptonButtonOK.Visible = false; kryptonButtonApply.Enabled = false; kryptonButtonApply.Visible = false; } if (document.SpecialMode == "ProjectSettingsUserMode") { objectsBrowser1.OverrideItemText += ObjectsBrowser1_OverrideItemText; } }
// 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); }
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; }
public ContentBrowserSearchForm() { InitializeComponent(); DarkThemeUtility.ApplyToForm(this); Text = EditorLocalization.Translate("ContentBrowser.SearchForm", Text); EditorLocalization.TranslateForm("ContentBrowser.SearchForm", this); }
//System.Drawing.Font richTextBox1FontOriginal; //string richTextBox1FontCurrent = ""; ////!!!!не заюзано //public delegate void ProcessCmdKeyEventDelegate( OutputWindow sender, ref Message msg, Keys keyData, ref bool handled ); //public event ProcessCmdKeyEventDelegate ProcessCmdKeyEvent; // public DebugInfoWindow() { InitializeComponent(); contentBrowserData.RemoveTreeViewIconsColumn(); WindowTitle = EditorLocalization.Translate("Windows", WindowTitle); }
// public ObjectsWindow() { InitializeComponent(); //Config_Load(); EngineConfig.SaveEvent += Config_SaveEvent; WindowTitle = EditorLocalization.Translate("Windows", WindowTitle); }
// public SettingsHeader_ObjectInfo() { InitializeComponent(); buttonTypeSettings.Values.Image = EditorResourcesCache.Type; toolTip1.SetToolTip(buttonTypeSettings, EditorLocalization.Translate("SettingsWindow", "Type Settings")); toolTip1.SetToolTip(buttonTypeSettingsDefaultValue, EditorLocalization.Translate("SettingsWindow", "Reset Type Settings to default.")); }
// protected override void OnInit() { buttonUpload = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Upload")); buttonUpload.Click += ButtonUpload_Click; buttonUploadAndPublish = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Upload and Publish"), ProcedureUI.Button.SizeEnum.Long); buttonUploadAndPublish.Click += ButtonUploadAndPublish_Click; ProcedureForm.AddRow(new ProcedureUI.Control[] { buttonUpload, buttonUploadAndPublish }); }
//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); }
// protected override void OnInit() { buttonStart = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Start")); buttonStart.Click += ButtonStart_Click; buttonStop = ProcedureForm.CreateButton(EditorLocalization.Translate("General", "Stop")); buttonStop.Click += ButtonStop_Click; ProcedureForm.AddRow(new ProcedureUI.Control[] { buttonStart, buttonStop }); }
// protected override void OnInit() { buttonUpdate = ProcedureForm.CreateButton(EditorLocalization.Translate("Terrain", "Update")); buttonUpdate.Click += ButtonUpdate_Click; buttonResizeMasks = ProcedureForm.CreateButton(EditorLocalization.Translate("Terrain", "Resize Masks")); buttonResizeMasks.Click += ButtonResizeMasks_Click; ProcedureForm.AddRow(new ProcedureUI.Control[] { buttonUpdate, buttonResizeMasks }); }
// public PreviewWindow() { if (instance != null) { Log.Fatal("PreviewWindow: Constructor: instance != null."); } instance = this; InitializeComponent(); WindowTitle = EditorLocalization.Translate("Windows", WindowTitle); }
// public SettingsCell_Properties() { InitializeComponent(); toolStripButtonEvents.Image = EditorResourcesCache.Events; toolStripButtonProperties.Image = EditorResourcesCache.Properties; toolStripButtonProperties.Text = EditorLocalization.Translate("SettingsWindow", toolStripButtonProperties.Text); toolStripButtonEvents.Text = EditorLocalization.Translate("SettingsWindow", toolStripButtonEvents.Text); toolStrip1.Renderer = EditorThemeUtility.GetToolbarToolStripRenderer(); }
// 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.")); }
public void ButtonTypeInit() { buttonType = new KryptonButton(); buttonType.Location = new Point(0, DpiHelper.Default.ScaleValue(3)); buttonType.Size = DpiHelper.Default.ScaleValue(new Size(22, 18)); buttonType.TabIndex = 6; propertyToolTip.SetToolTip(buttonType, EditorLocalization.Translate("SettingsWindow", "Select a class type.")); buttonType.Values.Text = "..."; buttonType.Visible = false; Controls.Add(buttonType); }
private void StartPageWindow_Load(object sender, EventArgs e) { if (WinFormsUtility.IsDesignerHosted(this)) { return; } EditorLocalization.TranslateForm("StartPageWindow", this); timer1.Start(); UpdateControls(); }
private void HierarchicalContainer1_OverridePropertyDisplayName(HierarchicalContainer sender, HCItemProperty property, ref string displayName) { try { if (Provider.DocumentWindow.Document.SpecialMode == "ProjectSettingsUserMode") { displayName = EditorLocalization.Translate("ProjectSettings.Property", displayName); } else { displayName = EditorLocalization.Translate("Object.Property", displayName); } } catch { } }
private void HierarchicalContainer1_OverrideMemberDescription(HierarchicalContainer sender, HCItemMember member, ref string description) { try { if (Provider.DocumentWindow.Document.SpecialMode == "ProjectSettingsUserMode") { description = EditorLocalization.Translate("ProjectSettings.Description", description); } else { description = EditorLocalization.Translate("Object.Description", description); } } catch { } }
internal protected virtual void OnShowTitleContextMenu(IDocumentWindow caller, KryptonContextMenuItems items) { if (!string.IsNullOrEmpty(RealFileName)) { //var documentWindow = caller as DocumentWindow; //var workspaceWindow = caller as WorkspaceWindow; //bool isFirstLevel = ( documentWindow != null && !documentWindow.IsWindowInWorkspace ) || workspaceWindow != null; //if( isFirstLevel ) { items.Items.Add(new KryptonContextMenuItem(EditorLocalization.Translate("General", "Find in Resources window"), (s, e) => { EditorAPI.SelectFilesOrDirectoriesInMainResourcesWindow(new string[] { RealFileName }); EditorAPI.SelectDockWindow(EditorAPI.FindWindow <ResourcesWindow>()); })); } //!!!! //!!!!только редактору сцен //if( caller is DocumentWindow ) //{ // var item = new KryptonContextMenuItem( EditorLocalization.Translate( "General", "Use Camera" ), null ); // var items2 = new List<KryptonContextMenuItemBase>(); // items2.Add( new KryptonContextMenuItem( "Default", ( s, e ) => // { // //EditorAPI.SelectFilesOrDirectoriesInMainResourcesWindow( new string[] { RealFileName } ); // } ) ); // items2.Add( new KryptonContextMenuItem( "Camera 1", ( s, e ) => // { // //EditorAPI.SelectFilesOrDirectoriesInMainResourcesWindow( new string[] { RealFileName } ); // } ) ); // items2.Add( new KryptonContextMenuItem( "Camera 2", ( s, e ) => // { // //EditorAPI.SelectFilesOrDirectoriesInMainResourcesWindow( new string[] { RealFileName } ); // } ) ); // item.Items.Add( new KryptonContextMenuItems( items2.ToArray() ) ); // items.Items.Add( item ); //} } }