2013-07-07 2 views
3

neodynamic 이미지 draw sdk를 사용하고 빌드에서이 오류가 계속 발생합니다. 아무 것도 나는 현재 가지고있는 코드입니다타입 또는 네임 스페이스 이름 'Neodynamic'을 찾을 수 없습니다 (사용 지시문 또는 어셈블리 참조가 누락 되었습니까?)

using System; 
    using System.Collections.Generic; 
    using System.ComponentModel; 
    using System.Data; 
    using System.Drawing; 
    using System.Text; 
    using System.Windows.Forms; 
    using DevPro.Data.Enums; 
    using YGOPro_Launcher.CardDatabase; 
    using System.IO; 
    using System.Reflection; 
    using System.Data.SQLite; 
    using DevPro_CardManager.Properties; 
    using Neodynamic.SDK; 

namespace Outlaws_CardManager 
{ 
    public partial class cardmaker : Form 
    { 
     public cardmaker() 
     { 
      InitializeComponent(); 
      TopLevel = false; 
      Dock = DockStyle.Fill; 
      Visible = true; 
     } 

     private void GenerateCard() 
     { 
      //Get the info to create the card 
      string cardname = ""; 
      string cardid = ""; 
      string level = ""; 
      string race = ""; 
      string attribute = ""; 
      string atk = ""; 
      string def = ""; 
      string type1 = ""; 
      string type2 = ""; 
      string stype = ""; 
      string traptype = ""; 
      string mainpicture = ""; 
      string layout = "Left"; 

      if (!String.IsNullOrEmpty(CardName.Text)) 
      { 
       cardname = CardName.Text; 
      } 
      if (!String.IsNullOrEmpty(CardID.Text)) 
      { 
       cardid = CardID.Text; 
      } 
      if (!String.IsNullOrEmpty(ATK.Text)) 
      { 
       atk = ATK.Text; 
      } 
      if (!String.IsNullOrEmpty(DEF.Text)) 
      { 
       def = DEF.Text; 
      } 

      ImageDraw imgDraw = new ImageDraw(); 
      //Basic settings for Card 
      imgDraw.Canvas.AutoSize = false; 
      imgDraw.ImageFormat = ImageDrawFormat.Png; 
      //Set card size 
      imgDraw.Canvas.Width = 400; 
      imgDraw.Canvas.Height = 250; 

      //Create main decorative shape element 
      RectangleShapeElement rect1 = new RectangleShapeElement(); 
      rect1.X = 10; 
      rect1.Y = 10; 
      rect1.Width = 380; 
      rect1.Height = 230; 

      rect1.Roundness = 20; 
      rect1.StrokeWidth = 0; 
      //Set background 
      rect1.Fill.BackgroundColor = Color.Black; 
      //Add element to output image 
      imgDraw.Elements.Add(rect1); 



      //Create top decorative shape element 
      RectangleShapeElement rect2 = new RectangleShapeElement(); 
      rect2.X = 20; 
      rect2.Y = 20; 
      rect2.Width = 360; 
      rect2.Height = 170; 
      rect2.Roundness = 10; 
      rect2.StrokeWidth = 0; 
      rect2.Fill.BackgroundColor = Color.White; 
      //Add element to output image 
      imgDraw.Elements.Add(rect2); 

      //Create bottom decorative shape element 
      RectangleShapeElement rect3 = new RectangleShapeElement(); 
      rect3.X = 30; 
      rect3.Y = 130; 
      rect3.Width = 340; 
      rect3.Height = 100; 
      rect3.Roundness = 10; 
      rect3.StrokeWidth = 1; 
      rect3.StrokeFill.BackgroundColor = Color.Black; 
      rect3.Fill.BackgroundColor = Color.White; 
      //Add element to output image 
      imgDraw.Elements.Add(rect3); 





      //Create an ImageElement to wrap the user logo 
      if (mainpicture.Length > 0 && System.IO.File.Exists(mainpicture)) 
      { 
       ImageElement imgElemLogo = new ImageElement(); 
       //Get user logo from disk 
       imgElemLogo.Source = ImageSource.File; 
       imgElemLogo.SourceFile = mainpicture; 
       //Logo Layout 
       if (layout == "Right") 
       { 
        imgElemLogo.X = 40; 
        imgElemLogo.Y = 40; 
       } 
       else 
       { 
        imgElemLogo.X = 400 - (50 + 40); //Canvas Width - (Logo Width + X Margin) 
        imgElemLogo.Y = 40; 
       } 
       //Apply Resize logo 
       Resize resizeLogo = new Resize(); 
       resizeLogo.Width = 50; 
       resizeLogo.LockAspectRatio = LockAspectRatio.WidthBased; 
       imgElemLogo.Actions.Clear(); 
       imgElemLogo.Actions.Add(resizeLogo); 
       //Add element to output image 
       imgDraw.Elements.Add(imgElemLogo); 
      } 


      //Create TextElement objects for each fields 

      if (cardname.Length > 0) 
      { 
       TextElement txtElemName = new TextElement(); 
       txtElemName.AutoSize = false; 
       txtElemName.Font.Name = "Arial"; 
       txtElemName.Font.Size = 14f; 
       txtElemName.Font.Unit = FontUnit.Point; 
       txtElemName.Font.Bold = true; 
       txtElemName.ForeColor = System.Drawing.Color.Black; 
       txtElemName.Text = cardname; 
       txtElemName.TextQuality = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; 
       txtElemName.X = 40; 
       txtElemName.Y = 40; 
       txtElemName.Width = 320; 
       txtElemName.Height = 20; 
       if (layout == "Left") 
       { 
        txtElemName.TextAlignment = ContentAlignment.MiddleLeft; 
       } 
       else 
       { 
        txtElemName.TextAlignment = ContentAlignment.MiddleRight; 
       } 
       //Add element to output image 
       imgDraw.Elements.Add(txtElemName); 
      } 

      if (cardid.Length > 0) 
      { 
       TextElement txtElemJob = new TextElement(); 
       txtElemJob.AutoSize = false; 
       txtElemJob.Font.Name = "Arial"; 
       txtElemJob.Font.Size = 10f; 
       txtElemJob.Font.Unit = FontUnit.Point; 
       txtElemJob.ForeColor = System.Drawing.Color.Black; 
       txtElemJob.Text = cardid; 
       txtElemJob.TextQuality = System.Drawing.Text.TextRenderingHint.AntiAlias; 
       txtElemJob.X = 40; 
       txtElemJob.Y = 64; 
       txtElemJob.Width = 320; 
       txtElemJob.Height = 14; 
       if (layout == "Left") 
       { 
        txtElemJob.TextAlignment = ContentAlignment.MiddleLeft; 
       } 
       else 
       { 
        txtElemJob.TextAlignment = ContentAlignment.MiddleRight; 
       } 
       //Add element to output image 
       imgDraw.Elements.Add(txtElemJob); 
      } 

      if (atk.Length > 0) 
      { 
       TextElement txtElemAddress = new TextElement(); 
       txtElemAddress.AutoSize = false; 
       txtElemAddress.Font.Name = "Times New Roman"; 
       txtElemAddress.Font.Italic = true; 
       txtElemAddress.Font.Size = 11f; 
       txtElemAddress.Font.Unit = FontUnit.Point; 
       txtElemAddress.ForeColor = System.Drawing.Color.Black; 
       txtElemAddress.Text = atk + "\n" + race; 
       txtElemAddress.TextQuality = System.Drawing.Text.TextRenderingHint.AntiAlias; 
       txtElemAddress.X = 40; 
       txtElemAddress.Y = 130; 
       txtElemAddress.Width = 160; 
       txtElemAddress.Height = 50; 
       if (layout == "Left") 
       { 
        txtElemAddress.TextAlignment = ContentAlignment.MiddleLeft; 
       } 
       else 
       { 
        txtElemAddress.TextAlignment = ContentAlignment.MiddleRight; 
       } 
       //Add element to output image 
       imgDraw.Elements.Add(txtElemAddress); 
      } 

      if (attribute.Length > 0 || atk.Length > 0) 
      { 
       TextElement txtElemPhone = new TextElement(); 
       txtElemPhone.AutoSize = false; 
       txtElemPhone.Font.Name = "Georgia"; 
       txtElemPhone.Font.Size = 10f; 
       txtElemPhone.Font.Unit = FontUnit.Point; 
       txtElemPhone.ForeColor = System.Drawing.Color.Black; 
       txtElemPhone.Text = "Phone: " + attribute + "\n" + atk; 
       txtElemPhone.TextQuality = System.Drawing.Text.TextRenderingHint.AntiAlias; 
       txtElemPhone.X = 200; 
       txtElemPhone.Y = 180; 
       txtElemPhone.Width = 160; 
       txtElemPhone.Height = 50; 
       if (layout == "Right") 
       { 
        txtElemPhone.TextAlignment = ContentAlignment.MiddleLeft; 
       } 
       else 
       { 
        txtElemPhone.TextAlignment = ContentAlignment.MiddleRight; 
       } 
       //Add element to output image 
       imgDraw.Elements.Add(txtElemPhone); 
      } 

      //generate image card and preview it 
      CardImg.Image = imgDraw.GetOutputImage(); 
     } 

    } 
} 

누구나 이런 문제가 있었는지 전에 어떻게 설명하십시오.

+0

의 스냅 샷이 프로젝트에 DLL을 참조나요입니까? –

+0

예 dll을 참조한 – outlaw1994

+0

내 참조에 대한 사진 http://img442.imageshack.us/img442/9840/ufm8.png – outlaw1994

답변

2

프로젝트의 대상 프레임 워크와 참조 된 어셈블리 프레임 워크 버전이 호환되지 않는 경우 이러한 문제가 발생할 수 있습니다. 내가 가정 수 있으므로

그래서, 당신은 다음 단계를 수행해야합니다

프로젝트에서 마우스 오른쪽 클릭 -> 속성 -> 대상 프레임 워크 -> 물론이 있는지 확인 하지 세트 클라이언트 프로파일에을 선택하고 .NET Framework 4 또는 4.5을 선택하는 경우 (참조 된 어셈블리 대상 FW에 따라). 업데이트

: 여기는 설정

Target framework settings

+0

고마워요 .net 4로 설정해 주셔서 감사합니다. – outlaw1994

+0

@user2551972 오신 것을 환영합니다! –

관련 문제

 관련 문제