public EditorLauncher(IPERunArgs args) { // インスタンスの作成 Current = new EditorStates(); Editor = new Editor(args, Current, Run); Form = new FormEditor(Editor, Current); DrawContext = new DxContext(Form.DrawTargetControl) { RefreshRate = 120 }; // Editorへの入力 Editor.ToolBox.Device = DrawContext.Device; // Formへの入力 Form.DrawContext = DrawContext; Form.CatchException += OnThrowException; Form.AddProcessWhenClosing((sender, e) => { e.Cancel = true; if (Editor.CanContinueClosing()) { StopDraw(); } }); // フィールドの初期値を明示 isDrawing = false; }
public FormMain() { InitializeComponent(); DxContext = DxContext.GetInstance(splitContainer1.Panel2); Process = new TestDrawProcess(); Process.Camera = new DxCameraOrthographic() { ViewVolumeArea = (4, 4), ViewVolumeDepth = (0, 1) }; }
private void splitContainer1_Panel2_ClientSizeChanged(object sender, EventArgs e) { DxContext?.ChangeResolution(); }