// Constructors public ShapePropertiesCon(WorldCon worldCon) : base(worldCon) { AppCon.InitControlTheme(ShapePropertiesEdit.SelectionToolbar); _selectionCon = new SelectionCon(worldCon); InitCommonControls(ShapePropertiesEdit.TableLayoutPanel); InitLocalControls(); }
private WorldCon GetNewWorldCon() { if (AppCon.Options.OpenInNewWindow) { return(AppCon.AddNewWorldCon()); } if (!JsonCon.SaveIfModified()) { return(null); } JsonCon.Clear(); SetDefaultCamera(); return(WorldCon); }
// 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 SignalsForm NewSignalsForm() { _signalsForm = new SignalsForm { TabText = Resources.SignalsForm_TabText, Text = Resources.SignalsForm_Text, ToolTipText = Resources.SignalsForm_Text }; Init(_signalsForm.AddButton, WaveType.Constant); Init(_signalsForm.WaveTypeSlider, WaveType.Constant); Init(_signalsForm.WaveTypeSine, WaveType.Sine); Init(_signalsForm.WaveTypeSquare, WaveType.Square); Init(_signalsForm.WaveTypeTriangle, WaveType.Triangle); Init(_signalsForm.WaveTypeRampUp, WaveType.RampUp); Init(_signalsForm.WaveTypeRampDown, WaveType.RampDown); AppCon.InitControlTheme(Toolbar); return(_signalsForm); }
// Public methods public override void Connect(bool connect) { base.Connect(connect); if (connect) { ConnectEventHandlers(true); ConnectCons(true); CommandCon.Clear(); Clock.Tick += Clock_Tick; ClockStartup(); } else { ClockShutdown(); Clock.Tick -= Clock_Tick; RenderCon.InvalidateProgram(); CommandCon.Clear(); ConnectCons(false); ConnectEventHandlers(false); AppCon.Remove(this); } }
private void FileExit_Click(object sender, EventArgs e) => AppCon.Close();
private void InitControlTheme() => AppCon.InitControlTheme( WorldPanel, WorldForm.MainMenu, WorldForm.PopupMenu, WorldForm.Toolbar, WorldForm.StatusBar);