public TPViewer(TPMonitorController controller) { InitializeComponent(); _controller = controller; this.TopMost = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; // hidden border this.TransparencyKey = this.BackColor = Color.Navy; // the color key to transparent, choose a color that you don't use //this.Opacity = 0.3; controller.CurrentTPUpdate += CurrentTPUpdate; }
public TPViewer(TPMonitorController controller) { InitializeComponent(); this.Icon = Icon.FromHandle(Properties.Resources.army_s_paeon.GetHicon()); _controller = controller; this.ControlBox = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; // hidden border this.TransparencyKey = this.BackColor = Color.Navy; // the color key to transparent, choose a color that you don't use SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); controller.CurrentTPUpdate += CurrentTPUpdate; }
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) { ActGlobals.oFormActMain.UpdateCheckClicked += new FormActMain.NullDelegate(CheckForUpdate); if (ActGlobals.oFormActMain.GetAutomaticUpdatesAllowed()) // If ACT is set to automatically check for updates, check for updates to the plugin new Thread(new ThreadStart(CheckForUpdate)).Start(); // If we don't put this on a separate thread, web latency will delay the plugin init phase pluginScreenSpace.Text = "TPMonitor"; lblStatus = pluginStatusText; // Hand the status label's reference to our local var pluginScreenSpace.Controls.Add(this); // Add this UserControl to the tab ACT provides this.Dock = DockStyle.Fill; // Expand the UserControl to fill the tab's client space controller = new TPMonitorController(this); xmlSettings = new SettingsSerializer(this); // Create a new settings serializer and pass it this instance LoadSettings(); // Load FFXIV plugin's assembly if needed AppDomain.CurrentDomain.AssemblyResolve += (o, e) => { var simpleName = new string(e.Name.TakeWhile(x => x != ',').ToArray()); if (simpleName == "FFXIV_ACT_Plugin") { var query = ActGlobals.oFormActMain.ActPlugins.Where(x => x.lblPluginTitle.Text == "FFXIV_ACT_Plugin.dll"); if (query.Any()) { return System.Reflection.Assembly.LoadFrom(query.First().pluginFile.FullName); } } return null; }; controller.CharFolder = textBoxCharacterFolder.Text; controller.HideWhenDissolve = checkBoxHideWhenDissolve.Checked; controller.HideWhenEnded = checkBoxHideWhenEnded.Checked; controller.ShowMyTP = checkBoxShowMyTP.Checked; controller.IsFixedMode = radioButtonFixed.Checked; controller.ChangedStatus += new EventHandler(this.ChangedStatus); OnChangeLocation(); SetFontName(); if (string.IsNullOrEmpty(textBoxColors.Text)) { SetDefaultColor(); dtColor = GetDataTable(); } SetColorSetting(); buttonApply_Click(this, null); lblStatus.Text = "TPMonitor Plugin Started."; }
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) { pluginScreenSpace.Text = "TPMonitor"; lblStatus = pluginStatusText; // Hand the status label's reference to our local var pluginScreenSpace.Controls.Add(this); // Add this UserControl to the tab ACT provides this.Dock = DockStyle.Fill; // Expand the UserControl to fill the tab's client space xmlSettings = new SettingsSerializer(this); // Create a new settings serializer and pass it this instance LoadSettings(); // Load FFXIV plugin's assembly if needed AppDomain.CurrentDomain.AssemblyResolve += (o, e) => { var simpleName = new string(e.Name.TakeWhile(x => x != ',').ToArray()); if (simpleName == "FFXIV_ACT_Plugin") { var query = ActGlobals.oFormActMain.ActPlugins.Where(x => x.lblPluginTitle.Text == "FFXIV_ACT_Plugin.dll"); if (query.Any()) { return System.Reflection.Assembly.LoadFrom(query.First().pluginFile.FullName); } } return null; }; lblStatus.Text = "Plugin Started."; controller = new TPMonitorController(); controller.CharFolder = textBoxCharacterFolder.Text; controller.PartyListUI = Util.GetPartyListLocation(textBoxCharacterFolder.Text); controller.ChangedStatus += new EventHandler(this.ChangedStatus); SetFontName(); }