/// <summary> /// コンストラクタ /// </summary> /// <param name="main">メインのフォームへの参照</param> /// <param name="info">管理対象の<see cref="UIWindow"/>を持つ<see cref="WindowInfo"/></param> public WindowEditter(MainEdittor main, WindowInfo info) { this.main = main; info.HandleForm = this; this.info = info; InitializeComponent(); Init(); inited = true; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="main"><see cref="MainEdittor"/>への参照</param> /// <param name="info">操作対象の<see cref="DrawingRectangleInfo"/>のインスタンス</param> /// <exception cref="ArgumentNullException"><paramref name="main"/>または<paramref name="info"/>がnull</exception> public DrawingTriangleForm(MainEdittor main, DrawingTriangleInfo info) { this.main = main ?? throw new ArgumentNullException(); this.info = info ?? throw new ArgumentNullException(); info.HandleForm = this; InitializeComponent(); Init(); inited = true; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="main">メインのフォームへの参照</param> /// <param name="info">管理対象の<see cref="UIText"/>を持つ<see cref="TextObjInfo"/></param> public TextEdittor(MainEdittor main, TextObjInfo info) { this.main = main; info.HandleForm = this; this.info = info; InitializeComponent(); Init(); inited = true; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="main"><see cref="MainEdittor"/></param>への参照 /// <exception cref="ArgumentNullException"><paramref name="main"/>がnull</exception> private ElementWindow(MainEdittor main) { mainEdittor = main ?? throw new ArgumentNullException(); SingleInstance = this; InitializeComponent(); ResetObjComboBox(); ResetAdditionalComboBox(); ComboBox_Obj_Type.DataSource = EnumHelper.GetNames <UITypes>(); ComboBox_Add_Type.DataSource = EnumHelper.GetNames <DrawingAdditionalMode>(); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="main"><see cref="MainEdittor"/>への参照</param> /// <param name="info">操作対象の<see cref="DrawingLineInfo"/>のインスタンス</param> /// <exception cref="ArgumentNullException"><paramref name="main"/>または<paramref name="info"/>がnull</exception> public DrawingLineForm(MainEdittor main, DrawingLineInfo info) { this.main = main ?? throw new ArgumentNullException(); this.info = info ?? throw new ArgumentNullException(); info.HandleForm = this; InitializeComponent(); Init(); ComboBox_AlphaBlend.SelectedIndexChanged += new EventHandler(ComboBox_AlphaBlend_SelectedIndexChanged); inited = true; }
/// <summary> /// インスタンスを生成して表示する /// </summary> /// <param name="main">メインのエディターへの参照</param> /// <exception cref="ArgumentNullException"><paramref name="main"/>がnull</exception> public static bool CreateAndShow(MainEdittor main) { if (!Instanced) { var a = new ElementWindow(main); DataBase.Forms.Add(a); a.Show(); return(true); } return(false); }
static void Main(string[] args) { Engine.Initialize("NewProject", 640, 480, new EngineOption()); Engine.File.AddRootPackage("DefaultResource.pack"); DataBase.Initialize(640, 480, "NewProject"); using (var form = new MainEdittor()) { form.Show(); Engine.ChangeScene(DataBase.MainScene); while (ContinueUpdating & Engine.DoEvents()) { Application.DoEvents(); Engine.Update(); } } Engine.Terminate(); }
/// <summary> /// コンストラクタ /// </summary> public MainEdittor() { SingleInstance = this; InitializeComponent(); }
/// <summary> /// フォームが閉じられたときの挙動 /// </summary> private void MainEdittor_FormClosed(object sender, FormClosedEventArgs e) { DataBase.CloseAllWindow(); Program.ContinueUpdating = false; SingleInstance = null; }