public EventCommandOptions(ShowOptionsCommand refCommand, EventPage refPage, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            mCurrentPage = refPage;
            InitLocalization();
            txtShowOptions.Text     = mMyCommand.Text;
            txtShowOptionsOpt1.Text = mMyCommand.Options[0];
            txtShowOptionsOpt2.Text = mMyCommand.Options[1];
            txtShowOptionsOpt3.Text = mMyCommand.Options[2];
            txtShowOptionsOpt4.Text = mMyCommand.Options[3];
            cmbFace.Items.Clear();
            cmbFace.Items.Add(Strings.General.none);
            cmbFace.Items.AddRange(GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Face));
            if (cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face)) > -1)
            {
                cmbFace.SelectedIndex = cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face));
            }
            else
            {
                cmbFace.SelectedIndex = 0;
            }

            UpdateFacePreview();
        }
Esempio n. 2
0
        void btn_Click(object sender, EventArgs e)
        {
            FrmEvent fe = new FrmEvent();

            fe.MyPK = this.FK_MapData + "_" + this.Event;
            fe.RetrieveFromDBSources();

            string doc = this.Pub1.GetTextBoxByID("TB_Doc").Text.Trim();

            fe                = (FrmEvent)this.Pub1.Copy(fe);
            fe.MyPK           = this.FK_MapData + "_" + this.Event;
            fe.DoDoc          = doc;
            fe.FK_Event       = this.Event;
            fe.FK_MapData     = this.FK_MapData;
            fe.HisDoType      = (EventDoType)this.Pub1.GetDDLByID("DDL_EventDoType").SelectedItemIntVal;
            fe.MsgOKString    = this.Pub1.GetTextBoxByID("TB_MsgOK").Text;
            fe.MsgErrorString = this.Pub1.GetTextBoxByID("TB_MsgErr").Text;

            //DLL参数.
            if (fe.HisDoType == BP.Sys.EventDoType.SpecClass)
            {
                fe.MonthedDLL   = this.Pub1.GetDDLByID("DDL_MonthedDLL").SelectedItemStringVal;
                fe.MonthedClass = this.Pub1.GetDDLByID("DDL_MonthedClass").SelectedItemStringVal;
                fe.MonthedName  = this.Pub1.GetDDLByID("DDL_MonthedName").SelectedItemStringVal;
                fe.MonthedParas = this.Pub1.GetTextBoxByID("TB_MonthedParas").Text;
            }

            fe.Save();

            this.Response.Redirect("ActionEvent.aspx?NodeID=" + this.NodeID + "&MyPK=" + fe.MyPK + "&Event=" + this.Event + "&FK_MapData=" + this.FK_MapData + "&tk=" + new Random().NextDouble(), true);
        }
Esempio n. 3
0
        public EventCommandVariable(SetVariableCommand refCommand, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            mLoading     = true;
            InitLocalization();

            //Numerics
            cmbNumericCloneGlobalVar.Items.Clear();
            cmbNumericCloneGlobalVar.Items.AddRange(ServerVariableBase.Names);
            cmbNumericClonePlayerVar.Items.Clear();
            cmbNumericClonePlayerVar.Items.AddRange(PlayerVariableBase.Names);

            //Booleans
            cmbBooleanCloneGlobalVar.Items.Clear();
            cmbBooleanCloneGlobalVar.Items.AddRange(ServerVariableBase.Names);
            cmbBooleanClonePlayerVar.Items.Clear();
            cmbBooleanClonePlayerVar.Items.AddRange(PlayerVariableBase.Names);

            if (mMyCommand.VariableType == VariableTypes.ServerVariable)
            {
                rdoGlobalVariable.Checked = true;
            }
            else
            {
                rdoPlayerVariable.Checked = true;
            }

            mLoading = false;
            InitEditor();
        }
Esempio n. 4
0
        public EventCommandWarp(WarpCommand refCommand, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            InitLocalization();
            cmbMap.Items.Clear();
            for (var i = 0; i < MapList.OrderedMaps.Count; i++)
            {
                cmbMap.Items.Add(MapList.OrderedMaps[i].Name);
                if (MapList.OrderedMaps[i].MapId == mMyCommand.MapId)
                {
                    cmbMap.SelectedIndex = i;
                }
            }

            if (cmbMap.SelectedIndex == -1)
            {
                cmbMap.SelectedIndex = 0;
            }

            scrlX.Maximum = Options.MapWidth - 1;
            scrlY.Maximum = Options.MapHeight - 1;
            scrlX.Value   = mMyCommand.X;
            scrlY.Value   = mMyCommand.Y;
            lblX.Text     = Strings.Warping.x.ToString(scrlX.Value);
            lblY.Text     = Strings.Warping.y.ToString(scrlY.Value);
            cmbDirection.SelectedIndex = (int)mMyCommand.Direction;
        }
        public string ActionDtl_Save()
        {
            //事件实体.
            FrmEvent en = new FrmEvent();

            en.FK_Node      = this.FK_Node;
            en.FK_Event     = this.GetRequestVal("FK_Event");                           //事件类型.
            en.HisDoTypeInt = this.GetValIntFromFrmByKey("EventDoType");                //执行类型.
            en.MyPK         = this.FK_Node + "_" + en.FK_Event + "_" + en.HisDoTypeInt; //组合主键.
            en.RetrieveFromDBSources();

            en.MsgOKString    = this.GetValFromFrmByKey("MsgOK");    //成功的消息.
            en.MsgErrorString = this.GetValFromFrmByKey("MsgError"); //失败的消息.

            //执行内容.
            if (en.HisDoType == EventDoType.BuessUnit)
            {
                en.DoDoc = this.GetValFromFrmByKey("DDL_Doc");
            }
            else
            {
                en.DoDoc = this.GetValFromFrmByKey("TB_Doc");
            }

            en.Save();

            return("保存成功.");
        }
        public EventGraphicSelector(
            EventGraphic editingGraphic,
            FrmEvent eventEditor,
            EventMoveRouteDesigner moveRouteDesigner = null,
            bool newMoveRouteAction = false
            )
        {
            InitializeComponent();
            mEditingGraphic = editingGraphic;
            mEventEditor    = eventEditor;
            mLoading        = true;
            UpdateGraphicList();
            if (cmbGraphic.Items.IndexOf(mEditingGraphic.Filename) > -1)
            {
                cmbGraphic.SelectedIndex = cmbGraphic.Items.IndexOf(mEditingGraphic.Filename);
            }

            mRouteDesigner  = moveRouteDesigner;
            mNewRouteAction = newMoveRouteAction;
            mLoading        = false;
            InitLocalization();
            cmbGraphicType.SelectedIndex = (int)mEditingGraphic.Type;
            mTmpGraphic.CopyFrom(mEditingGraphic);
            UpdatePreview();
        }
        public EventCommandInput(InputVariableCommand refCommand, FrmEvent editor)
        {
            mLoading = true;
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;

            txtText.Text    = mMyCommand.Text;
            txtTitle.Text   = mMyCommand.Title;
            nudMaxVal.Value = mMyCommand.Maximum;
            nudMinVal.Value = mMyCommand.Minimum;

            if (mMyCommand.VariableType == Enums.VariableTypes.PlayerVariable)
            {
                rdoPlayerVariables.Checked = true;
            }
            else
            {
                rdoGlobalVariables.Checked = true;
            }

            LoadVariableList();
            InitLocalization();
            mLoading = false;
        }
 public EventCommandChangeVital(RestoreMpCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand     = refCommand;
     mEventEditor   = editor;
     nudVital.Value = refCommand.Amount;
     InitLocalization();
 }
 public EventCommandSetAccess(SetAccessCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbAccess.SelectedIndex = (int)mMyCommand.Access;
 }
Esempio n. 10
0
 public EventCommandGiveExperience(GiveExperienceCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     nudExperience.Value = mMyCommand.Exp;
 }
 public EventCommandLabel(LabelCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     txtLabel.Text = mMyCommand.Label;
 }
 public EventCommandChangeGender(ChangeGenderCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbGender.SelectedIndex = (int)mMyCommand.Gender;
 }
 public EventCommandSelfSwitch(SetSelfSwitchCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbSetSwitch.SelectedIndex    = mMyCommand.SwitchId;
     cmbSetSwitchVal.SelectedIndex = Convert.ToInt32(mMyCommand.Value);
 }
        /// <summary>
        /// 执行删除
        /// </summary>
        /// <returns></returns>
        public string ActionDtl_Delete()
        {
            //事件实体.
            FrmEvent en = new FrmEvent();

            en.MyPK = this.MyPK;
            en.Delete();
            return("删除成功.");
        }
Esempio n. 15
0
 public EventCommandWait(WaitCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     nudWait.Value = mMyCommand.Time;
     lblWait.Text  = Strings.EventWait.label;
 }
 public EventCommandOpenCraftingTable(OpenCraftingTableCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbTable.Items.Clear();
     cmbTable.Items.AddRange(CraftingTableBase.Names);
     cmbTable.SelectedIndex = CraftingTableBase.ListIndex(mMyCommand.CraftingTableId);
 }
Esempio n. 17
0
 public EventCommandOpenShop(OpenShopCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbShop.Items.Clear();
     cmbShop.Items.AddRange(ShopBase.Names);
     cmbShop.SelectedIndex = ShopBase.ListIndex(mMyCommand.ShopId);
 }
 public EventCommandSetClass(SetClassCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbClass.Items.Clear();
     cmbClass.Items.AddRange(ClassBase.Names);
     cmbClass.SelectedIndex = ClassBase.ListIndex(mMyCommand.ClassId);
 }
 public EventCommandStartCommonEvent(StartCommmonEventCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbEvent.Items.Clear();
     cmbEvent.Items.AddRange(EventBase.Names);
     cmbEvent.SelectedIndex = EventBase.ListIndex(refCommand.EventId);
 }
Esempio n. 20
0
 public EventCommandCompleteQuestTask(CompleteQuestTaskCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbQuests.Items.Clear();
     cmbQuests.Items.AddRange(QuestBase.Names);
     cmbQuests.SelectedIndex = QuestBase.ListIndex(refCommand.QuestId);
 }
        public EventCommandSetGuildBankSlots(SetGuildBankSlotsCommand refCommand, EventPage refPage, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            mCurrentPage = refPage;
            InitLocalization();

            rdoGlobalVariable.Checked = mMyCommand.VariableType == VariableTypes.ServerVariable;
            SetupAmountInput();
        }
        public EventCommandEquipItems(EquipItemCommand refCommand, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;

            InitLocalization();
            cmbItem.Items.Clear();
            cmbItem.Items.AddRange(ItemBase.Names);
            cmbItem.SelectedIndex = ItemBase.ListIndex(mMyCommand.ItemId);
        }
 public EventCommandEndQuest(EndQuestCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbQuests.Items.Clear();
     cmbQuests.Items.AddRange(QuestBase.Names);
     cmbQuests.SelectedIndex        = QuestBase.ListIndex(refCommand.QuestId);
     chkSkipCompletionEvent.Checked = refCommand.SkipCompletionEvent;
 }
Esempio n. 24
0
        public EventCommandChangePlayerColor(ChangePlayerColorCommand refCommand, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            InitLocalization();

            nudRgbaR.Value = mMyCommand.Color.R;
            nudRgbaG.Value = mMyCommand.Color.G;
            nudRgbaB.Value = mMyCommand.Color.B;
            nudRgbaA.Value = mMyCommand.Color.A;
        }
Esempio n. 25
0
        private void OpenQuestEvent(EventBase evt)
        {
            var editor = new FrmEvent(null)
            {
                MyEvent = evt
            };

            editor.InitEditor(true, true, true);
            editor.ShowDialog();
            Globals.MainForm.BringToFront();
            BringToFront();
        }
 public EventCommandStartQuest(StartQuestCommand refCommand, EventPage page, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mCurrentPage = page;
     mEventEditor = editor;
     InitLocalization();
     cmbQuests.Items.Clear();
     cmbQuests.Items.AddRange(QuestBase.Names);
     cmbQuests.SelectedIndex    = QuestBase.ListIndex(refCommand.QuestId);
     chkShowOfferWindow.Checked = refCommand.Offer;
 }
        public EventCommandChangeName(ChangeNameCommand refCommand, EventPage refPage, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mCurrentPage = refPage;
            mEventEditor = editor;

            cmbVariable.Items.Clear();
            cmbVariable.Items.AddRange(PlayerVariableBase.Names);

            InitLocalization();
        }
Esempio n. 28
0
 public EventCommandChangeSpells(ChangeSpellsCommand refCommand, EventPage refPage, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     mCurrentPage = refPage;
     InitLocalization();
     cmbSpell.Items.Clear();
     cmbSpell.Items.AddRange(SpellBase.Names);
     cmbAction.SelectedIndex = refCommand.Add ? 0 : 1;
     cmbSpell.SelectedIndex  = SpellBase.ListIndex(mMyCommand.SpellId);
 }
Esempio n. 29
0
        public EventCommandGiveExperience(GiveExperienceCommand refCommand, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            InitLocalization();

            rdoVariable.Checked       = mMyCommand.UseVariable;
            rdoGlobalVariable.Checked = mMyCommand.VariableType == VariableTypes.ServerVariable;

            SetupAmountInput();
        }
        private void btnEditTaskEvent_Click(object sender, EventArgs e)
        {
            mMyTask.EditingEvent.Name = Strings.TaskEditor.completionevent.ToString(mMyQuest.Name);
            var editor = new FrmEvent(null)
            {
                MyEvent = mMyTask.EditingEvent
            };

            editor.InitEditor(true, true, true);
            editor.ShowDialog();
            Globals.MainForm.BringToFront();
            BringToFront();
        }