/// <summary> /// 이미지가 레이어에 드랍되었을 때, 이미지가 레이어에 추가되는 이벤트를 발생시킨다. /// </summary> /// <param name="drgevent">The <see cref="DragEventArgs"/> instance containing the event data.</param> public void Image_DragDrop(DragEventArgs drgevent) { bool imageFileValid = LayersCtrl.CheckImageFileExt(out string path, drgevent); if (imageFileValid) { this.AddImage(NemonicApp.GetImage(path), path); } }
public TemplateElement(TabCtrl control, string path, Action hide) : base(control, path) { InitializeComponent(); this.Item = Button_Template; this.Item.DoubleClick += Item_DoubleClick; this.Item.KeyDown += Item_KeyDown; this.Item.BackgroundImage = NemonicApp.GetImage(this.RootPath); this.Item.BackgroundImageLayout = ImageLayout.Zoom; this.Title = Label_Title; this.Title.Text = Path.GetFileNameWithoutExtension(this.RootPath); this.HideSettings = hide; }
/// <summary> /// 메모에 이미지를 추가 /// </summary> public void SpawnImage() { DialogResult result = openImageDialog.ShowDialog(); if (result == DialogResult.OK) { string path = openImageDialog.FileName; Bitmap target = NemonicApp.GetImage(path); if (target != null) { this.LayersCtrl.AddImage(target, path); } } }