// Constructors public ShapePropertiesCon(WorldCon worldCon) : base(worldCon) { AppCon.InitControlTheme(ShapePropertiesEdit.SelectionToolbar); _selectionCon = new SelectionCon(worldCon); InitCommonControls(ShapePropertiesEdit.TableLayoutPanel); InitLocalControls(); }
public static void Remove(WorldCon worldCon) { WorldCons.Remove(worldCon); if (WorldCons.Count == 0) { Close(); } }
// Public methods public static WorldCon AddNewWorldCon() { var worldCon = new WorldCon(); WorldCons.Add(worldCon); worldCon.Show(); worldCon.RefreshGraphicsMode(); return(worldCon); }
// Constructors public OptionsCon(WorldCon worldCon) : base(worldCon) { _optionsDialog = new OptionsDialog { Text = Resources.OptionsDialog.Format(Application.ProductName) }; _optionsDialog.cbTheme.Items.AddRange(typeof(Theme).GetDescriptions().Reverse().Cast <object>().ToArray()); _optionsDialog.btnFilesFolder.Click += BtnFilesFolder_Click; _optionsDialog.btnTemplatesFolder.Click += BtnTemplatesFolder_Click; }
// Constructors protected SdiCon(WorldCon worldCon, string filter, string subKeyName) : base(worldCon, subKeyName) { _openFileDialog = new OpenFileDialog { Filter = filter, Title = Resources.OpenFileDialog_Title }; _saveFileDialog = new SaveFileDialog { Filter = filter, Title = Resources.SaveFileDialog_Title }; }
private void OnLoad() { WorldCon.ConnectCons(false); Scene.WorldCon = WorldCon; Scene.AttachShapes(); CommandCon.Clear(); WorldCon.ConnectCons(true); SceneCon.RecreateSceneControl(); SignalsCon.Load(); Reset(); }
// Constructors protected MruCon(WorldCon worldCon, string subKeyName) : base(worldCon) { if (string.IsNullOrWhiteSpace(subKeyName)) { throw new ArgumentNullException(nameof(subKeyName)); } _subKeyName = string.Format( CultureInfo.InvariantCulture, @"Software\{0}\{1}\{2}", Application.CompanyName, Application.ProductName, subKeyName); RefreshRecentMenu(); }
// Constructors public SignalCon(WorldCon worldCon, Signal signal) : base(worldCon) { if (signal == null) { throw new ArgumentNullException(nameof(signal)); } SignalEdit = new SignalEdit(); Index = Scene.Signals.IndexOf(signal); NameEditor.AutoSize = true; NameEditor.Text = signal.Name; InitRanges(signal); InitSlider(AmplitudeSlider, AmpGaugeMin, AmpGaugeMax, AmpGaugeSmall, AmpGaugeLarge, AmplitudeToGauge(signal.Amplitude)); InitSlider(FrequencySlider, FreqGaugeMin, FreqGaugeMax, FreqGaugeSmall, FreqGaugeLarge, FrequencyToGauge(signal.Frequency)); SignalsForm.AddButton.CloneTo(SignalEdit.WaveTypeButton, ToolStripCloneOptions.None); AppCon.InitControlTheme(Toolbar); UpdateAllProperties(); }
// Constructors protected CodeCon(WorldCon worldCon) : base(worldCon) { LoadShaderCode(); AppCon.InitControlTheme(CodeEdit.HorizontalToolbar, CodeEdit.VerticalToolbar, CodeEdit.PopupEditMenu); ShowRuler = false; ShowLineNumbers = false; ShowDocumentMap = false; SplitType = SplitType.None; var items = CodeEdit.tbShader.DropDownItems; items[0].Tag = ShaderType.VertexShader; items[1].Tag = ShaderType.TessControlShader; items[2].Tag = ShaderType.TessEvaluationShader; items[3].Tag = ShaderType.GeometryShader; items[4].Tag = ShaderType.FragmentShader; items[5].Tag = ShaderType.ComputeShader; }
private void UpdateUI() { if (_updateCount > 0) { return; } string undo = CanUndo ? $"Undo {UndoAction}" : "Undo", redo = CanRedo ? $"Redo {RedoAction}" : "Redo"; WorldForm.EditUndo.Enabled = WorldForm.tbUndo.Enabled = CanUndo; WorldForm.EditRedo.Enabled = WorldForm.tbRedo.Enabled = CanRedo; WorldForm.EditUndo.Text = $"&{undo}"; WorldForm.EditRedo.Text = $"&{redo}"; WorldForm.tbUndo.ToolTipText = $"{undo} (^Z)"; WorldForm.tbRedo.ToolTipText = $"{redo} (^Y)"; WorldCon.ModifiedChanged(); }
public AboutCon(WorldCon worldCon) : base(worldCon) { var asm = Assembly.GetExecutingAssembly(); AboutDialog.Text = Resources.AboutDialog.Format(Application.ProductName); AboutDialog.lblProductName.Text = Application.ProductName; AboutDialog.lblDescription.Text = asm.GetCustomAttribute <AssemblyDescriptionAttribute>().Description; AboutDialog.lblVersion.Text = Application.ProductVersion; AboutDialog.lblAuthor.Text = Application.CompanyName; AboutDialog.lblCopyright.Text = asm.GetCustomAttribute <AssemblyCopyrightAttribute>().Copyright; /* * var info = AppCon.WorldCons[0].GLInfo; * AboutDialog.lblOpenGLVersion.Text = info.Number; * AboutDialog.lblGLSLVersion.Text = info.Shader; * AboutDialog.lblVendorName.Text = info.Vendor; * AboutDialog.lblRendererName.Text = info.Renderer; */ }
public CameraCon(WorldCon worldCon) : base(worldCon) => SetDefaultCamera();
// Constructors public ScenePropertiesCon(WorldCon worldCon) : base(worldCon) { InitCommonControls(ScenePropertiesEdit.TableLayoutPanel); InitLocalControls(); }
// Constructors public SignalPropertiesCon(WorldCon worldCon) : base(worldCon) { }
private void Reset() { SetDefaultCamera(); WorldCon.UpdateAllProperties(); }
// Constructors public ShapeCodeCon(WorldCon worldCon) : base(worldCon) { }
// Constructors public JsonCon(WorldCon worldCon) : base(worldCon, Settings.Default.FileFilter, "LibraryMRU") { }
// Constructors protected DockingCon(WorldCon worldCon) : base(worldCon) { }
// Constructors protected PropertiesCon(WorldCon worldCon) : base(worldCon) { }
// Constructors public FullScreenCon(WorldCon worldCon) : base(worldCon) { }
// Constructors public SelectionCon(WorldCon worldCon) : base(worldCon) { }
// Constructors public SceneCon(WorldCon worldCon) : base(worldCon) { }
// Constructors public SignalsCon(WorldCon worldCon) : base(worldCon) { }
// Constructors public RenderCon(WorldCon worldCon) : base(worldCon) => _stopwatch.Start();
// Constructors public ClockCon(WorldCon worldCon) : base(worldCon) => UpdateTimeControls();
// Constructors public CommandCon(WorldCon worldCon) : base(worldCon) { }
// Constructors public HotkeysCon(WorldCon worldCon) : base(worldCon) { }
// Constructors protected LocalCon(WorldCon worldCon) => WorldCon = worldCon;