Code Severity Description Project File Line Suppression State
CS0234 Error The type or namespace name 'Core' does not exist in the namespace 'Intersect.Client' (are you missing an assembly reference?) Intersect.Server E:\DuAnGame\Intersect\MMORPG\Intersect-Engine-prerelease\Intersect.Client\Interface\Game\EventWindow.cs 1 Active
Spoiler
Code Severity Description Project File Line Suppression State
CS0234 Error The type or namespace name 'Framework' does not exist in the namespace 'Intersect.Client' (are you missing an assembly reference?) Intersect.Server E:\DuAnGame\Intersect\MMORPG\Intersect-Engine-prerelease\Intersect.Client\Interface\Game\EventWindow.cs 2 Active
pls help me. error "EventWindow.cs"
Spoiler
using Intersect.Client.Core;
using Intersect.Client.Framework.File_Management;
using Intersect.Client.Framework.Gwen;
using Intersect.Client.Framework.Gwen.Control;
using Intersect.Client.Framework.Gwen.Control.EventArguments;
using Intersect.Client.General;
using Intersect.Client.Localization;
using Intersect.Client.Networking;
//Init
public EventWindow(Canvas gameCanvas)
{
//Event Dialog Window
mEventDialogWindow = new ImagePanel(gameCanvas, "EventDialogueWindow");
mEventDialogWindow.Hide();
Interface.InputBlockingElements.Add(mEventDialogWindow);
mEventFace = new ImagePanel(mEventDialogWindow, "EventFacePanel");
mEventDialogArea = new ScrollControl(mEventDialogWindow, "EventDialogArea");
mEventDialogLabelTemplate = new Label(mEventDialogArea, "EventDialogLabel");
mEventDialogLabel = new RichLabel(mEventDialogArea);
mEventDialogAreaNoFace = new ScrollControl(mEventDialogWindow, "EventDialogAreaNoFace");
mEventDialogLabelNoFaceTemplate = new Label(mEventDialogAreaNoFace, "EventDialogLabel");
mEventDialogLabelNoFace = new RichLabel(mEventDialogAreaNoFace);
mEventResponse1 = new Button(mEventDialogWindow, "EventResponse1");
mEventResponse1.Clicked += EventResponse1_Clicked;
mEventResponse2 = new Button(mEventDialogWindow, "EventResponse2");
mEventResponse2.Clicked += EventResponse2_Clicked;
mEventResponse3 = new Button(mEventDialogWindow, "EventResponse3");
mEventResponse3.Clicked += EventResponse3_Clicked;
mEventResponse4 = new Button(mEventDialogWindow, "EventResponse4");
mEventResponse4.Clicked += EventResponse4_Clicked;
mEventResponse5 = new Button(mEventDialogWindow, "EventResponse5");
mEventResponse5.Clicked += EventResponse5_Clicked;
mEventResponse6 = new Button(mEventDialogWindow, "EventResponse6");
mEventResponse6.Clicked += EventResponse6_Clicked;
mEventResponse7 = new Button(mEventDialogWindow, "EventResponse7");
mEventResponse7.Clicked += EventResponse7_Clicked;
mEventResponse8 = new Button(mEventDialogWindow, "EventResponse8");
mEventResponse8.Clicked += EventResponse8_Clicked;
mEventResponse9 = new Button(mEventDialogWindow, "EventResponse9");
mEventResponse9.Clicked += EventResponse9_Clicked;
mEventResponse10 = new Button(mEventDialogWindow, "EventResponse10");
mEventResponse10.Clicked += EventResponse10_Clicked;
}
//Update
public void Update()
{
if (mEventDialogWindow.IsHidden)
{
Interface.InputBlockingElements.Remove(this);
}
else
{
if (!Interface.InputBlockingElements.Contains(this))
{
Interface.InputBlockingElements.Add(this);
}
}
if (Globals.EventDialogs.Count > 0)
{
if (mEventDialogWindow.IsHidden)
{
base.Show();
mEventDialogWindow.Show();
mEventDialogWindow.MakeModal();
mEventDialogArea.ScrollToTop();
mEventDialogWindow.BringToFront();
var faceTex = Globals.ContentManager.GetTexture(
GameContentManager.TextureType.Face, Globals.EventDialogs[0].Face
);
var responseCount = 0;
var maxResponse = 1;
if (Globals.EventDialogs[0].Opt1.Length > 0)
{
responseCount++;
}
if (Globals.EventDialogs[0].Opt2.Length > 0)
{
responseCount++;
maxResponse = 2;
}
if (Globals.EventDialogs[0].Opt3.Length > 0)
{
responseCount++;
maxResponse = 3;
}
if (Globals.EventDialogs[0].Opt4.Length > 0)
{
responseCount++;
maxResponse = 4;
}
if (Globals.EventDialogs[0].Opt5.Length > 0)
{
responseCount++;
maxResponse = 5;
}
if (Globals.EventDialogs[0].Opt6.Length > 0)
{
responseCount++;
maxResponse = 6;
}
if (Globals.EventDialogs[0].Opt7.Length > 0)
{
responseCount++;
maxResponse = 7;
}
if (Globals.EventDialogs[0].Opt8.Length > 0)
{
responseCount++;
maxResponse = 8;
}
if (Globals.EventDialogs[0].Opt9.Length > 0)
{
responseCount++;
maxResponse = 9;
}
if (Globals.EventDialogs[0].Opt10.Length > 0)
{
responseCount++;
maxResponse = 10;
}
Question
mem981
Code Severity Description Project File Line Suppression State
CS0234 Error The type or namespace name 'Core' does not exist in the namespace 'Intersect.Client' (are you missing an assembly reference?) Intersect.Server E:\DuAnGame\Intersect\MMORPG\Intersect-Engine-prerelease\Intersect.Client\Interface\Game\EventWindow.cs 1 Active
Code Severity Description Project File Line Suppression State
CS0234 Error The type or namespace name 'Framework' does not exist in the namespace 'Intersect.Client' (are you missing an assembly reference?) Intersect.Server E:\DuAnGame\Intersect\MMORPG\Intersect-Engine-prerelease\Intersect.Client\Interface\Game\EventWindow.cs 2 Active
pls help me. error "EventWindow.cs"
using Intersect.Client.Core;
using Intersect.Client.Framework.File_Management;
using Intersect.Client.Framework.Gwen;
using Intersect.Client.Framework.Gwen.Control;
using Intersect.Client.Framework.Gwen.Control.EventArguments;
using Intersect.Client.General;
using Intersect.Client.Localization;
using Intersect.Client.Networking;
namespace Intersect.Client.Interface.Game
{
public class EventWindow : Base
{
private ScrollControl mEventDialogArea;
private ScrollControl mEventDialogAreaNoFace;
private RichLabel mEventDialogLabel;
private RichLabel mEventDialogLabelNoFace;
private Label mEventDialogLabelNoFaceTemplate;
private Label mEventDialogLabelTemplate;
//Window Controls
private ImagePanel mEventDialogWindow;
private ImagePanel mEventFace;
private Button mEventResponse1;
private Button mEventResponse2;
private Button mEventResponse3;
private Button mEventResponse4;
private Button mEventResponse5;
private Button mEventResponse6;
private Button mEventResponse7;
private Button mEventResponse8;
private Button mEventResponse9;
private Button mEventResponse10;
//Init
public EventWindow(Canvas gameCanvas)
{
//Event Dialog Window
mEventDialogWindow = new ImagePanel(gameCanvas, "EventDialogueWindow");
mEventDialogWindow.Hide();
Interface.InputBlockingElements.Add(mEventDialogWindow);
mEventFace = new ImagePanel(mEventDialogWindow, "EventFacePanel");
mEventDialogArea = new ScrollControl(mEventDialogWindow, "EventDialogArea");
mEventDialogLabelTemplate = new Label(mEventDialogArea, "EventDialogLabel");
mEventDialogLabel = new RichLabel(mEventDialogArea);
mEventDialogAreaNoFace = new ScrollControl(mEventDialogWindow, "EventDialogAreaNoFace");
mEventDialogLabelNoFaceTemplate = new Label(mEventDialogAreaNoFace, "EventDialogLabel");
mEventDialogLabelNoFace = new RichLabel(mEventDialogAreaNoFace);
mEventResponse1 = new Button(mEventDialogWindow, "EventResponse1");
mEventResponse1.Clicked += EventResponse1_Clicked;
mEventResponse2 = new Button(mEventDialogWindow, "EventResponse2");
mEventResponse2.Clicked += EventResponse2_Clicked;
mEventResponse3 = new Button(mEventDialogWindow, "EventResponse3");
mEventResponse3.Clicked += EventResponse3_Clicked;
mEventResponse4 = new Button(mEventDialogWindow, "EventResponse4");
mEventResponse4.Clicked += EventResponse4_Clicked;
mEventResponse5 = new Button(mEventDialogWindow, "EventResponse5");
mEventResponse5.Clicked += EventResponse5_Clicked;
mEventResponse6 = new Button(mEventDialogWindow, "EventResponse6");
mEventResponse6.Clicked += EventResponse6_Clicked;
mEventResponse7 = new Button(mEventDialogWindow, "EventResponse7");
mEventResponse7.Clicked += EventResponse7_Clicked;
mEventResponse8 = new Button(mEventDialogWindow, "EventResponse8");
mEventResponse8.Clicked += EventResponse8_Clicked;
mEventResponse9 = new Button(mEventDialogWindow, "EventResponse9");
mEventResponse9.Clicked += EventResponse9_Clicked;
mEventResponse10 = new Button(mEventDialogWindow, "EventResponse10");
mEventResponse10.Clicked += EventResponse10_Clicked;
}
//Update
public void Update()
{
if (mEventDialogWindow.IsHidden)
{
Interface.InputBlockingElements.Remove(this);
}
else
{
if (!Interface.InputBlockingElements.Contains(this))
{
Interface.InputBlockingElements.Add(this);
}
}
if (Globals.EventDialogs.Count > 0)
{
if (mEventDialogWindow.IsHidden)
{
base.Show();
mEventDialogWindow.Show();
mEventDialogWindow.MakeModal();
mEventDialogArea.ScrollToTop();
mEventDialogWindow.BringToFront();
var faceTex = Globals.ContentManager.GetTexture(
GameContentManager.TextureType.Face, Globals.EventDialogs[0].Face
);
var responseCount = 0;
var maxResponse = 1;
if (Globals.EventDialogs[0].Opt1.Length > 0)
{
responseCount++;
}
if (Globals.EventDialogs[0].Opt2.Length > 0)
{
responseCount++;
maxResponse = 2;
}
if (Globals.EventDialogs[0].Opt3.Length > 0)
{
responseCount++;
maxResponse = 3;
}
if (Globals.EventDialogs[0].Opt4.Length > 0)
{
responseCount++;
maxResponse = 4;
}
if (Globals.EventDialogs[0].Opt5.Length > 0)
{
responseCount++;
maxResponse = 5;
}
if (Globals.EventDialogs[0].Opt6.Length > 0)
{
responseCount++;
maxResponse = 6;
}
if (Globals.EventDialogs[0].Opt7.Length > 0)
{
responseCount++;
maxResponse = 7;
}
if (Globals.EventDialogs[0].Opt8.Length > 0)
{
responseCount++;
maxResponse = 8;
}
if (Globals.EventDialogs[0].Opt9.Length > 0)
{
responseCount++;
maxResponse = 9;
}
if (Globals.EventDialogs[0].Opt10.Length > 0)
{
responseCount++;
maxResponse = 10;
}
mEventResponse1.Name = "";
mEventResponse2.Name = "";
mEventResponse3.Name = "";
mEventResponse4.Name = "";
mEventResponse5.Name = "";
mEventResponse6.Name = "";
mEventResponse7.Name = "";
mEventResponse8.Name = "";
mEventResponse9.Name = "";
mEventResponse10.Name = "";
switch (maxResponse)
{
case 1:
mEventDialogWindow.Name = "EventDialogWindow_1Response";
mEventResponse1.Name = "Response1Button";
break;
case 2:
mEventDialogWindow.Name = "EventDialogWindow_2Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
break;
case 3:
mEventDialogWindow.Name = "EventDialogWindow_3Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
break;
case 4:
mEventDialogWindow.Name = "EventDialogWindow_4Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
mEventResponse4.Name = "Response4Button";
break;
case 5:
mEventDialogWindow.Name = "EventDialogWindow_5Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
mEventResponse4.Name = "Response4Button";
mEventResponse5.Name = "Response5Button";
break;
case 6:
mEventDialogWindow.Name = "EventDialogWindow_6Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
mEventResponse4.Name = "Response4Button";
mEventResponse5.Name = "Response5Button";
mEventResponse6.Name = "Response6Button";
break;
case 7:
mEventDialogWindow.Name = "EventDialogWindow_7Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
mEventResponse4.Name = "Response4Button";
mEventResponse5.Name = "Response5Button";
mEventResponse6.Name = "Response6Button";
mEventResponse7.Name = "Response7Button";
break;
case 8:
mEventDialogWindow.Name = "EventDialogWindow_8Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
mEventResponse4.Name = "Response4Button";
mEventResponse5.Name = "Response5Button";
mEventResponse6.Name = "Response6Button";
mEventResponse7.Name = "Response7Button";
mEventResponse8.Name = "Response8Button";
break;
case 9:
mEventDialogWindow.Name = "EventDialogWindow_9Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
mEventResponse4.Name = "Response4Button";
mEventResponse5.Name = "Response5Button";
mEventResponse6.Name = "Response6Button";
mEventResponse7.Name = "Response7Button";
mEventResponse8.Name = "Response8Button";
mEventResponse9.Name = "Response9Button";
break;
case 10:
mEventDialogWindow.Name = "EventDialogWindow_10Responses";
mEventResponse1.Name = "Response1Button";
mEventResponse2.Name = "Response2Button";
mEventResponse3.Name = "Response3Button";
mEventResponse4.Name = "Response4Button";
mEventResponse5.Name = "Response5Button";
mEventResponse6.Name = "Response6Button";
mEventResponse7.Name = "Response7Button";
mEventResponse8.Name = "Response8Button";
mEventResponse9.Name = "Response9Button";
mEventResponse10.Name = "Response10Button";
break;
}
mEventDialogWindow.LoadJsonUi(
GameContentManager.UI.InGame, Graphics.Renderer.GetResolutionString()
);
if (faceTex != null)
{
mEventFace.Show();
mEventFace.Texture = faceTex;
mEventDialogArea.Show();
mEventDialogAreaNoFace.Hide();
}
else
{
mEventFace.Hide();
mEventDialogArea.Hide();
mEventDialogAreaNoFace.Show();
}
if (responseCount == 0)
{
mEventResponse1.Show();
mEventResponse1.SetText(Strings.EventWindow.Continue);
mEventResponse2.Hide();
mEventResponse3.Hide();
mEventResponse4.Hide();
mEventResponse5.Hide();
mEventResponse6.Hide();
mEventResponse7.Hide();
mEventResponse8.Hide();
mEventResponse9.Hide();
mEventResponse10.Hide();
}
else
{
if (Globals.EventDialogs[0].Opt1 != "")
{
mEventResponse1.Show();
mEventResponse1.SetText(Globals.EventDialogs[0].Opt1);
}
else
{
mEventResponse1.Hide();
}
if (Globals.EventDialogs[0].Opt2 != "")
{
mEventResponse2.Show();
mEventResponse2.SetText(Globals.EventDialogs[0].Opt2);
}
else
{
mEventResponse2.Hide();
}
if (Globals.EventDialogs[0].Opt3 != "")
{
mEventResponse3.Show();
mEventResponse3.SetText(Globals.EventDialogs[0].Opt3);
}
else
{
mEventResponse3.Hide();
}
if (Globals.EventDialogs[0].Opt4 != "")
{
mEventResponse4.Show();
mEventResponse4.SetText(Globals.EventDialogs[0].Opt4);
}
else
{
mEventResponse4.Hide();
}
if (Globals.EventDialogs[0].Opt5 != "")
{
mEventResponse5.Show();
mEventResponse5.SetText(Globals.EventDialogs[0].Opt5);
}
else
{
mEventResponse5.Hide();
}
if (Globals.EventDialogs[0].Opt6 != "")
{
mEventResponse6.Show();
mEventResponse6.SetText(Globals.EventDialogs[0].Opt6);
}
else
{
mEventResponse6.Hide();
}
if (Globals.EventDialogs[0].Opt7 != "")
{
mEventResponse7.Show();
mEventResponse7.SetText(Globals.EventDialogs[0].Opt7);
}
else
{
mEventResponse7.Hide();
}
if (Globals.EventDialogs[0].Opt8 != "")
{
mEventResponse8.Show();
mEventResponse8.SetText(Globals.EventDialogs[0].Opt8);
}
else
{
mEventResponse8.Hide();
}
if (Globals.EventDialogs[0].Opt9 != "")
{
mEventResponse9.Show();
mEventResponse9.SetText(Globals.EventDialogs[0].Opt9);
}
else
{
mEventResponse9.Hide();
}
if (Globals.EventDialogs[0].Opt10 != "")
{
mEventResponse10.Show();
mEventResponse10.SetText(Globals.EventDialogs[0].Opt10);
}
else
{
mEventResponse10.Hide();
}
}
mEventDialogWindow.SetSize(
mEventDialogWindow.Texture.GetWidth(), mEventDialogWindow.Texture.GetHeight()
);
if (faceTex != null)
{
mEventDialogLabel.ClearText();
mEventDialogLabel.Width = mEventDialogArea.Width -
mEventDialogArea.GetVerticalScrollBar().Width;
mEventDialogLabel.AddText(
Globals.EventDialogs[0].Prompt, mEventDialogLabelTemplate.TextColor,
mEventDialogLabelTemplate.CurAlignments.Count > 0
? mEventDialogLabelTemplate.CurAlignments[0]
: Alignments.Left, mEventDialogLabelTemplate.Font
);
mEventDialogLabel.SizeToChildren(false, true);
mEventDialogArea.ScrollToTop();
}
else
{
mEventDialogLabelNoFace.ClearText();
mEventDialogLabelNoFace.Width = mEventDialogAreaNoFace.Width -
mEventDialogAreaNoFace.GetVerticalScrollBar().Width;
mEventDialogLabelNoFace.AddText(
Globals.EventDialogs[0].Prompt, mEventDialogLabelNoFaceTemplate.TextColor,
mEventDialogLabelNoFaceTemplate.CurAlignments.Count > 0
? mEventDialogLabelNoFaceTemplate.CurAlignments[0]
: Alignments.Left, mEventDialogLabelNoFaceTemplate.Font
);
mEventDialogLabelNoFace.SizeToChildren(false, true);
mEventDialogAreaNoFace.ScrollToTop();
}
}
}
}
//Input Handlers
void EventResponse10_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(10, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse9_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(9, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse8_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(8, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse7_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(7, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse6_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(6, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse5_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(5, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse4_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(4, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse3_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(3, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
void EventResponse2_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(2, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
public void EventResponse1_Clicked(Base sender, ClickedEventArgs arguments)
{
var ed = Globals.EventDialogs[0];
if (ed.ResponseSent != 0)
{
return;
}
PacketSender.SendEventResponse(1, ed);
mEventDialogWindow.RemoveModal();
mEventDialogWindow.IsHidden = true;
ed.ResponseSent = 1;
base.Hide();
}
}
}
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now