Beispiel #1
0
        public SAV_EventFlags()
        {
            InitializeComponent();

            DragEnter += tabMain_DragEnter;
            DragDrop  += tabMain_DragDrop;

            flags     = SAV.EventFlags;
            Constants = SAV.EventConsts;

            CB_Stats.Items.Clear();
            for (int i = 0; i < Constants.Length; i++)
            {
                CB_Stats.Items.Add(i.ToString());
            }

            TLP_Flags.SuspendLayout();
            TLP_Const.SuspendLayout();
            TLP_Flags.Scroll += Util.PanelScroll;
            TLP_Const.Scroll += Util.PanelScroll;
            TLP_Flags.Controls.Clear();
            TLP_Const.Controls.Clear();
            addFlagList(getStringList("flags"));
            addConstList(getStringList("const"));

            TLP_Flags.ResumeLayout();
            TLP_Const.ResumeLayout();

            Util.TranslateInterface(this, Main.curlanguage);

            CB_Stats.SelectedIndex = 0;
            nud.Maximum            = flags.Length - 1;
            nud.Text = "0";
        }
Beispiel #2
0
        public SAV_EventFlags(SaveFile sav)
        {
            InitializeComponent();
            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
            SAV = (Origin = sav).Clone();

            DragEnter += Main_DragEnter;
            DragDrop  += Main_DragDrop;

            flags     = SAV.GetEventFlags();
            Constants = SAV.GetEventConsts();

            CB_Stats.Items.Clear();
            for (int i = 0; i < Constants.Length; i++)
            {
                CB_Stats.Items.Add(i.ToString());
            }

            TLP_Flags.SuspendLayout();
            TLP_Const.SuspendLayout();
            TLP_Flags.Scroll += WinFormsUtil.PanelScroll;
            TLP_Const.Scroll += WinFormsUtil.PanelScroll;
            TLP_Flags.Controls.Clear();
            TLP_Const.Controls.Clear();
            AddFlagList(GetStringList("flags"));
            AddConstList(GetStringList("const"));

            TLP_Flags.ResumeLayout();
            TLP_Const.ResumeLayout();

            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);

            Text = $"{Text} ({gamePrefix.ToUpper()})";

            if (CB_Stats.Items.Count > 0)
            {
                CB_Stats.SelectedIndex = 0;
            }
            else
            {
                L_Stats.Visible = CB_Stats.Visible = MT_Stat.Visible = false;
                tabControl1.TabPages.Remove(GB_Constants);
            }
            NUD_Flag.Maximum     = flags.Length - 1;
            NUD_Flag.Text        = "0";
            c_CustomFlag.Checked = flags[0];
        }
Beispiel #3
0
        public SAV_EventFlags(SaveFile sav)
        {
            SAV = (Origin = sav).Clone();
            InitializeComponent();

            DragEnter += Main_DragEnter;
            DragDrop  += Main_DragDrop;

            flags     = SAV.EventFlags;
            Constants = SAV.EventConsts;

            CB_Stats.Items.Clear();
            for (int i = 0; i < Constants.Length; i++)
            {
                CB_Stats.Items.Add(i.ToString());
            }

            TLP_Flags.SuspendLayout();
            TLP_Const.SuspendLayout();
            TLP_Flags.Scroll += WinFormsUtil.PanelScroll;
            TLP_Const.Scroll += WinFormsUtil.PanelScroll;
            TLP_Flags.Controls.Clear();
            TLP_Const.Controls.Clear();
            AddFlagList(GetStringList("flags"));
            AddConstList(GetStringList("const"));

            TLP_Flags.ResumeLayout();
            TLP_Const.ResumeLayout();

            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);

            Text = $"Event Flag Editor ({gamePrefix.ToUpper()})";


            CB_Stats.SelectedIndex = 0;
            NUD_Flag.Maximum       = flags.Length - 1;
            NUD_Flag.Text          = "0";
        }