예제 #1
0
        public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
        {
            statusLabel = pluginStatusText;
            GetFfxivPlugin();
            var subs = ffxivPlugin.GetType().GetProperty("DataSubscription").GetValue(ffxivPlugin, null);
            var networkReceivedDelegateType = typeof(NetworkReceivedDelegate);
            var networkReceivedDelegate     = Delegate.CreateDelegate(networkReceivedDelegateType, (object)this, "NetworkReceived", true);

            subs.GetType().GetEvent("NetworkReceived").AddEventHandler(subs, networkReceivedDelegate);
            control = new PluginControl();
            pluginScreenSpace.Text = "Housing Check";
            bindingSource1         = new BindingSource {
                DataSource = HousingList
            };
            control.dataGridView1.DataSource = bindingSource1;
            pluginScreenSpace.Controls.Add(control);
            statusLabel.Text = "Working :D";
            initialized      = true;
        }
예제 #2
0
        public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
        {
            statusLabel = pluginStatusText;
            GetFfxivPlugin();
            control = new PluginControl();
            pluginScreenSpace.Text = "Housing Check";
            bindingSource1         = new BindingSource {
                DataSource = HousingList
            };
            control.dataGridView1.DataSource = bindingSource1;
            pluginScreenSpace.Controls.Add(control);

            var subs = ffxivPlugin.GetType().GetProperty("DataSubscription").GetValue(ffxivPlugin, null);
            var networkReceivedDelegateType = typeof(NetworkReceivedDelegate);
            var networkReceivedDelegate     = Delegate.CreateDelegate(networkReceivedDelegateType, (object)this, "NetworkReceived", true);

            subs.GetType().GetEvent("NetworkReceived").AddEventHandler(subs, networkReceivedDelegate);
            initialized = true;
            OtterThread = new BackgroundWorker
            {
                WorkerSupportsCancellation = true
            };
            OtterThread.DoWork += OtterUpload;
            OtterThread.RunWorkerAsync();
            statusLabel.Text = "Working :D";
            control.LoadSettings();
            control.buttonUploadOnce.Click      += ButtonUploadOnce_Click;
            control.buttonCopyToClipboard.Click += ButtonCopyToClipboard_Click;
            control.buttonSaveToFile.Click      += ButtonSaveToFile_Click;
            control.buttonJsonSave.Click        += ButtonJsonSave_Click;
            control.buttonJsonLoad.Click        += ButtonJsonLoad_Click;
            if (control.checkBoxAutoSaveAndLoad.Checked == true)
            {
                JsonLoad();
            }
            string tips = "本插件免费,发布及更新地址 https://file.bluefissure.com/FFXIV/ 或 https://bbs.nga.cn/read.php?tid=25465725 ,勿从其他渠道(闲鱼卖家或神秘群友)获取以避免虚拟财产受到损失。";

            MessageBox.Show(tips);
            Log("Info", tips);
        }
예제 #3
0
        public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
        {
            statusLabel = pluginStatusText;
            GetFfxivPlugin();
            control = new PluginControl();
            pluginScreenSpace.Text = "房屋信息记录";
            bindingSource1         = new BindingSource {
                DataSource = HousingList
            };
            control.dataGridView1.DataSource      = bindingSource1;
            control.dataGridView1.UserDeletedRow += OnTableUpdated;
            control.Dock = DockStyle.Fill;
            pluginScreenSpace.Controls.Add(control);

            var subs = ffxivPlugin.GetType().GetProperty("DataSubscription").GetValue(ffxivPlugin, null);
            var networkReceivedDelegateType = typeof(NetworkReceivedDelegate);
            var networkReceivedDelegate     = Delegate.CreateDelegate(networkReceivedDelegateType, (object)this, "NetworkReceived", true);

            subs.GetType().GetEvent("NetworkReceived").AddEventHandler(subs, networkReceivedDelegate);
            initialized = true;

            AutoSaveThread = new BackgroundWorker
            {
                WorkerSupportsCancellation = true
            };
            AutoSaveThread.DoWork += AutoSaveWorker;
            AutoSaveThread.RunWorkerAsync();
            statusLabel.Text = "Working :D";
            control.LoadSettings();
            control.buttonUploadOnce.Click      += ButtonUploadOnce_Click;
            control.buttonCopyToClipboard.Click += ButtonCopyToClipboard_Click;
            control.buttonSaveToFile.Click      += ButtonSaveToFile_Click;
            PrepareDir();
            //恢复上次列表
            LoadHousingList();
        }