public ACTTabPageControl(ACTPlugin plugin_)
        {
            InitializeComponent();

            plugin = plugin_;
            updateFromOverlayMove = false;

            var settings = plugin.Settings;

            settings.AddControlSetting("ResourcesDir", textBoxResourceDir);
            settings.AddControlSetting("OverlayX", udOverlayX);
            settings.AddControlSetting("OverlayY", udOverlayY);
            settings.AddControlSetting("NumberOfRowsToDisplay", udNumRows);
            settings.AddControlSetting("MoveOverlayByDrag", checkBoxMoveOverlayByDrag);
            settings.AddControlSetting("ShowOverlayButtons", checkBoxShowOverlayButtons);

            plugin.TimelineView.Move += TimelineView_Move;
            plugin.TimelineView.TimelineFontChanged += TimelineView_TimelineFontChanged;
            plugin.TimelineView.ColumnWidthChanged  += TimelineView_ColumnWidthChanged;
            plugin.TimelineView.OpacityChanged      += TimelineView_OpacityChanged;
            plugin.Controller.CurrentTimeUpdate     += Controller_CurrentTimeUpdate;
            plugin.Controller.TimelineUpdate        += Controller_TimelineUpdate;
            plugin.Controller.PausedUpdate          += Controller_PausedUpdate;
            TimelineView_TimelineFontChanged(this, null);
            TimelineView_ColumnWidthChanged(this, null);
            TimelineView_OpacityChanged(this, null);
            Controller_TimelineUpdate(this, null);
            Controller_PausedUpdate(this, null);
        }
Exemplo n.º 2
0
        public ACTTabPageControl(ACTPlugin plugin_)
        {
            InitializeComponent();

            plugin = plugin_;
            updateFromOverlayMove = false;

            var settings = plugin.Settings;
            settings.AddControlSetting("ResourcesDir", textBoxResourceDir);
            settings.AddControlSetting("OverlayX", udOverlayX);
            settings.AddControlSetting("OverlayY", udOverlayY);
            settings.AddControlSetting("NumberOfRowsToDisplay", udNumRows);
            settings.AddControlSetting("MoveOverlayByDrag", checkBoxMoveOverlayByDrag);
            settings.AddControlSetting("ShowOverlayButtons", checkBoxShowOverlayButtons);
            settings.AddControlSetting("PlaySoundByACT", checkBoxPlaySoundByACT);

            plugin.TimelineView.Move += TimelineView_Move;
            plugin.TimelineView.TimelineFontChanged += TimelineView_TimelineFontChanged;
            plugin.TimelineView.ColumnWidthChanged += TimelineView_ColumnWidthChanged;
            plugin.TimelineView.OpacityChanged += TimelineView_OpacityChanged;
            plugin.Controller.CurrentTimeUpdate += Controller_CurrentTimeUpdate;
            plugin.Controller.TimelineUpdate += Controller_TimelineUpdate;
            plugin.Controller.PausedUpdate += Controller_PausedUpdate;
            TimelineView_TimelineFontChanged(this, null);
            TimelineView_ColumnWidthChanged(this, null);
            TimelineView_OpacityChanged(this, null);
            Controller_TimelineUpdate(this, null);
            Controller_PausedUpdate(this, null);
        }
Exemplo n.º 3
0
 public TimelineAutoLoader(ACTPlugin _plugin)
 {
     plugin         = _plugin;
     timer          = new Timer();
     timer.Interval = 5000;
     timer.Tick    += timer_CheckCurrentZone;
 }
Exemplo n.º 4
0
        public TimelineController(ACTPlugin plugin_)
        {
            plugin = plugin_;

            solidBar = false;

            DefaultBarColor          = Color.FromArgb(64, 80, 176);
            DefaultBarEmColor        = Color.Red;
            DefaultDurationBackColor = Color.FromArgb(247, 154, 0);
            DefaultDurationColor     = Color.White;
            DefaultFontColor         = Color.White;
            DefaultFontStrokeColor   = Color.Black;

            barColor          = DefaultBarColor;
            barEmColor        = DefaultBarEmColor;
            durationBackColor = DefaultDurationBackColor;
            durationColor     = DefaultDurationColor;
            fontColor         = DefaultFontColor;
            FontStrokeColor   = DefaultFontStrokeColor;

            timer          = new Timer();
            timer.Tick    += (object sender, EventArgs e) => { Synchronize(); };
            timer.Interval = 50;
            timer.Start();

            relativeClock = new RelativeClock();
            Paused        = true;

            keywordsEnd = new string[]
            {
                "00:0139:",
                // zone changed
                "01:Changed Zone",
                // lot started
                "입찰을 진행하십시오.",
                "Cast your lot.",
                "ロットを行ってください。",
                // dungeon ended
                "공략을 종료했습니다.",
                "has ended.",
                "の攻略を終了した。",
                // ready-check
                "준비 확인을 시작했습니다.",
                "initiated a ready check.",
                "レディチェックを開始しました。"
            };

            ActGlobals.oFormActMain.OnLogLineRead += act_OnLogLineRead;
        }
Exemplo n.º 5
0
        public ACTTabPageControl(ACTPlugin plugin_)
        {
            InitializeComponent();

            languagePatch(Controls);

            plugin = plugin_;
            updateFromOverlayMove = false;

            var settings = plugin.Settings;

            settings.AddControlSetting("ResourcesDir", textBoxResourceDir);

            settings.AddControlSetting("PlaySoundByACT", checkBoxPlaySoundByACT);
            settings.AddControlSetting("Autostop", checkBoxAutoStop);
            settings.AddControlSetting("Autoload", checkBoxAutoloadAfterChangeZone);
            settings.AddControlSetting("Autohide", checkBoxAutohide);

            udOverlayXList                 = new List <NumericUpDown>();
            udOverlayYList                 = new List <NumericUpDown>();
            udNumRowsList                  = new List <NumericUpDown>();
            udBarHeightList                = new List <NumericUpDown>();
            udBarWidthList                 = new List <NumericUpDown>();
            trackBarOpacityList            = new List <TrackBar>();
            buttonFontSelectList           = new List <Button>();
            CheckBoxOverlayVisibleList     = new List <CheckBox>();
            checkBoxReverseOrderList       = new List <CheckBox>();
            checkBoxMoveOverlayByDragList  = new List <CheckBox>();
            checkBoxShowOverlayButtonsList = new List <CheckBox>();
            checkBoxOver10List             = new List <CheckBox>();
            checkBoxUnder10List            = new List <CheckBox>();
            checkBoxShowCastingList        = new List <CheckBox>();
            checkBoxPopupList              = new List <CheckBox>();
            labelCurrOpacityList           = new List <Label>();

            for (int i = 0; i < NumberOfOverlays; i++)
            {
                string numbering = i > 0 ? (i + 1).ToString() : "";

                NumericUpDown udOverlayXTemp                 = (NumericUpDown)this.GetType().GetField("udOverlayX" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                NumericUpDown udOverlayYTemp                 = (NumericUpDown)this.GetType().GetField("udOverlayY" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                NumericUpDown udNumRowsTemp                  = (NumericUpDown)this.GetType().GetField("udNumRows" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                NumericUpDown udBarHeightTemp                = (NumericUpDown)this.GetType().GetField("udBarHeight" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                NumericUpDown udBarWidthTemp                 = (NumericUpDown)this.GetType().GetField("udBarWidth" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                TrackBar      trackBarOpacityTemp            = (TrackBar)this.GetType().GetField("trackBarOpacity" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                Button        buttonFontSelectTemp           = (Button)this.GetType().GetField("buttonFontSelect" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      CheckBoxOverlayVisibleTemp     = (CheckBox)this.GetType().GetField("CheckBoxOverlayVisible" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      checkBoxReverseOrderTemp       = (CheckBox)this.GetType().GetField("checkBoxReverseOrder" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      checkBoxMoveOverlayByDragTemp  = (CheckBox)this.GetType().GetField("checkBoxMoveOverlayByDrag" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      checkBoxShowOverlayButtonsTemp = (CheckBox)this.GetType().GetField("checkBoxShowOverlayButtons" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      checkBoxOver10Temp             = (CheckBox)this.GetType().GetField("checkBoxOver10" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      checkBoxUnder10Temp            = (CheckBox)this.GetType().GetField("checkBoxUnder10" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      checkBoxShowCastingTemp        = (CheckBox)this.GetType().GetField("checkBoxShowCasting" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                CheckBox      checkBoxPopupTemp              = (CheckBox)this.GetType().GetField("checkBoxPopup" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
                Label         labelCurrOpacityTemp           = (Label)this.GetType().GetField("labelCurrOpacity" + numbering, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);

                udOverlayXList.Add(udOverlayXTemp);
                udOverlayYList.Add(udOverlayYTemp);
                udNumRowsList.Add(udNumRowsTemp);
                udBarHeightList.Add(udBarHeightTemp);
                udBarWidthList.Add(udBarWidthTemp);
                trackBarOpacityList.Add(trackBarOpacityTemp);
                buttonFontSelectList.Add(buttonFontSelectTemp);
                CheckBoxOverlayVisibleList.Add(CheckBoxOverlayVisibleTemp);
                checkBoxReverseOrderList.Add(checkBoxReverseOrderTemp);
                checkBoxMoveOverlayByDragList.Add(checkBoxMoveOverlayByDragTemp);
                checkBoxShowOverlayButtonsList.Add(checkBoxShowOverlayButtonsTemp);
                checkBoxOver10List.Add(checkBoxOver10Temp);
                checkBoxUnder10List.Add(checkBoxUnder10Temp);
                checkBoxShowCastingList.Add(checkBoxShowCastingTemp);
                checkBoxPopupList.Add(checkBoxPopupTemp);
                labelCurrOpacityList.Add(labelCurrOpacityTemp);

                settings.AddControlSetting("OverlayX" + numbering, udOverlayXTemp);
                settings.AddControlSetting("OverlayY" + numbering, udOverlayYTemp);
                settings.AddControlSetting("NumberOfRowsToDisplay" + numbering, udNumRowsTemp);
                settings.AddControlSetting("BarHeight" + numbering, udBarHeightTemp);
                settings.AddControlSetting("BarWidth" + numbering, udBarWidthTemp);
                settings.AddControlSetting("FontString" + numbering, buttonFontSelectTemp);
                settings.AddControlSetting("OpacityPercentage" + numbering, trackBarOpacityTemp);
                settings.AddControlSetting("OverlayVisible" + numbering, CheckBoxOverlayVisibleTemp);
                settings.AddControlSetting("ReverseOrder" + numbering, checkBoxReverseOrderTemp);
                settings.AddControlSetting("MoveOverlayByDrag" + numbering, checkBoxMoveOverlayByDragTemp);
                settings.AddControlSetting("ShowOverlayButtons" + numbering, checkBoxShowOverlayButtonsTemp);
                settings.AddControlSetting("Over10" + numbering, checkBoxOver10Temp);
                settings.AddControlSetting("Under10" + numbering, checkBoxUnder10Temp);
                settings.AddControlSetting("ShowCasting" + numbering, checkBoxShowCastingTemp);
                settings.AddControlSetting("PopupMode" + numbering, checkBoxPopupTemp);

                plugin.TimelineViewList[i].Move += TimelineView_Move;
                plugin.TimelineViewList[i].TimelineFontChanged += TimelineView_TimelineFontChanged;
                plugin.TimelineViewList[i].ColumnWidthChanged  += TimelineView_ColumnWidthChanged;
                plugin.TimelineViewList[i].OpacityChanged      += TimelineView_OpacityChanged;
            }

            settings.AddControlSetting("BarColor", textBoxBarColor);
            settings.AddControlSetting("BarEmColor", textBoxBarEmColor);
            settings.AddControlSetting("DurationBackColor", textBoxDurationBackColor);
            settings.AddControlSetting("DurationColor", textBoxDurationColor);
            settings.AddControlSetting("FontColor", textBoxFontColor);
            settings.AddControlSetting("FontStrokeColor", textBoxFontStrokeColor);
            settings.AddControlSetting("SolidBar", checkBoxSolidBar);

            plugin.Controller.BarColorUpdate          += Controller_BarColorUpdate;
            plugin.Controller.BarEmColorUpdate        += Controller_BarEmColorUpdate;
            plugin.Controller.DurationBackColorUpdate += Controller_DurationBackColorUpdate;
            plugin.Controller.DurationColorUpdate     += Controller_DurationColorUpdate;
            plugin.Controller.FontColorUpdate         += Controller_FontColorUpdate;
            plugin.Controller.FontStrokeColorUpdate   += Controller_FontStrokeColorUpdate;
            plugin.Controller.SolidBarUpdate          += Controller_SolidBarUpdate;

            plugin.Controller.CurrentTimeUpdate += Controller_CurrentTimeUpdate;
            plugin.Controller.TimelineUpdate    += Controller_TimelineUpdate;
            plugin.Controller.PausedUpdate      += Controller_PausedUpdate;

            TimelineView_TimelineFontChanged(this, null);
            TimelineView_ColumnWidthChanged(this, null);
            TimelineView_OpacityChanged(this, null);

            Controller_BarColorUpdate(this, null);
            Controller_BarEmColorUpdate(this, null);
            Controller_DurationBackColorUpdate(this, null);
            Controller_DurationColorUpdate(this, null);
            Controller_FontColorUpdate(this, null);
            Controller_FontStrokeColorUpdate(this, null);

            Controller_SolidBarUpdate(this, null);

            Controller_TimelineUpdate(this, null);
            Controller_PausedUpdate(this, null);

            checkBoxPlaySoundByACT_CheckedChanged(this, null);
            checkBoxAutoStop_CheckedChanged(this, null);
            checkBoxAutoloadAfterChangeZone_CheckedChanged(this, null);
            checkBoxAutohide_CheckedChanged(this, null);

            if (plugin.Controller.TimelineTxtFilePath == null || plugin.Controller.TimelineTxtFilePath == "")
            {
                trackBar.Enabled     = false;
                buttonRewind.Enabled = false;
                buttonPause.Enabled  = false;
                buttonPlay.Enabled   = false;
            }
            else
            {
                trackBar.Enabled     = true;
                buttonRewind.Enabled = true;
                buttonPause.Enabled  = false;
                buttonPlay.Enabled   = true;
            }
        }