2021-03-17 18:14:48 +01:00
|
|
|
|
using Advanced_Combat_Tracker;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
2021-08-16 19:04:55 +02:00
|
|
|
|
using System.Net;
|
2021-03-17 18:14:48 +01:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace DutyContent
|
|
|
|
|
{
|
|
|
|
|
public partial class DcControl : UserControl, IActPluginV1
|
|
|
|
|
{
|
|
|
|
|
public static string PluginName => "DutyContent";
|
|
|
|
|
|
|
|
|
|
private static DcControl _self;
|
|
|
|
|
public static DcControl Self => _self;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
private ActPluginData _ffxiv_plugin_data;
|
|
|
|
|
|
|
|
|
|
private bool _is_form_loaded;
|
|
|
|
|
private bool _is_plugin_initializing;
|
|
|
|
|
private TabPage _act_tab;
|
|
|
|
|
private Label _act_label;
|
|
|
|
|
|
2021-03-20 19:43:05 +01:00
|
|
|
|
private System.Timers.Timer _save_timer;
|
|
|
|
|
private System.Timers.Timer _update_timer;
|
2021-03-17 18:14:48 +01:00
|
|
|
|
private ThirdParty.NativeMethods.ProcessHandle _game_process;
|
2021-03-20 19:43:05 +01:00
|
|
|
|
private long _game_connection_tick = DateTime.Now.Ticks;
|
2021-03-17 18:14:48 +01:00
|
|
|
|
private bool _game_exist;
|
|
|
|
|
private bool _game_active;
|
|
|
|
|
private string _game_zone;
|
2021-08-16 19:04:55 +02:00
|
|
|
|
private IPAddress _game_ipaddr = IPAddress.None;
|
2021-03-17 18:14:48 +01:00
|
|
|
|
|
2021-06-07 01:48:23 +02:00
|
|
|
|
//
|
|
|
|
|
private const int IntervalGameActive = 50;
|
|
|
|
|
private const int IntervalGameExist = 300;
|
|
|
|
|
private const int IntervalGameNone = 500;
|
|
|
|
|
|
2021-03-17 18:14:48 +01:00
|
|
|
|
//
|
|
|
|
|
public DcControl()
|
|
|
|
|
{
|
|
|
|
|
_self = this;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
RegisterActAssemblies();
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
foreach (var f in Application.OpenForms)
|
|
|
|
|
{
|
|
|
|
|
if (f == ActGlobals.oFormActMain)
|
|
|
|
|
{
|
|
|
|
|
_is_form_loaded = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
Tab.DutyForm dutyform = new Tab.DutyForm();
|
|
|
|
|
tabPageDuty.Controls.Add(dutyform.Controls[0]);
|
|
|
|
|
|
2021-06-03 13:54:27 +02:00
|
|
|
|
Tab.PingForm pingform = new Tab.PingForm();
|
|
|
|
|
tabPagePing.Controls.Add(pingform.Controls[0]);
|
|
|
|
|
|
2021-03-17 18:14:48 +01:00
|
|
|
|
Tab.ConfigForm configform = new Tab.ConfigForm();
|
|
|
|
|
tabPageConfig.Controls.Add(configform.Controls[0]);
|
2021-08-14 16:35:53 +02:00
|
|
|
|
|
|
|
|
|
Tab.LogForm logform = new Tab.LogForm();
|
|
|
|
|
tabPageLog.Controls.Add(logform.Controls[0]);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
public void RegisterActAssemblies()
|
|
|
|
|
{
|
|
|
|
|
var pin = ActGlobals.oFormActMain.ActPlugins.FirstOrDefault(x => x.pluginFile.Name.Equals("DutyContent.dll"));
|
|
|
|
|
DcConfig.PluginPath = pin?.pluginFile.DirectoryName;
|
|
|
|
|
|
|
|
|
|
DcConfig.DataPath = Path.Combine(DcConfig.PluginPath, "Data");
|
|
|
|
|
DcConfig.ConfigPath = Path.Combine(DcConfig.PluginPath, "DutyContent.config");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
public void InitPlugin(TabPage tab, Label label)
|
|
|
|
|
{
|
|
|
|
|
_act_tab = tab;
|
|
|
|
|
_act_label = label;
|
|
|
|
|
|
|
|
|
|
if (_is_form_loaded)
|
|
|
|
|
ActPluginInitialize();
|
|
|
|
|
else
|
|
|
|
|
ActGlobals.oFormActMain.Shown += OFormActMain_Shown;
|
|
|
|
|
|
|
|
|
|
var actinfo = System.Reflection.Assembly.GetAssembly(typeof(ActGlobals));
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Logger.I(5, actinfo.GetName().Version);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
|
|
|
|
|
if (_ffxiv_plugin_data == null)
|
|
|
|
|
{
|
|
|
|
|
_ffxiv_plugin_data = ActGlobals.oFormActMain.ActPlugins.Where(x =>
|
|
|
|
|
x.pluginFile.Name.ToUpper().Contains("FFXIV_ACT_PLUGIN") &&
|
|
|
|
|
x.lblPluginStatus.Text.ToUpper().Contains("FFXIV PLUGIN STARTED."))
|
|
|
|
|
.Select(x => x)
|
|
|
|
|
.FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_ffxiv_plugin_data == null)
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Logger.E(2); // FFXIV plugin is missing!
|
2021-03-17 18:14:48 +01:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var ids = ((FFXIV_ACT_Plugin.FFXIV_ACT_Plugin)_ffxiv_plugin_data.pluginObj).DataSubscription;
|
|
|
|
|
ids.NetworkReceived -= FFXIVPlugin_NetworkReceived;
|
|
|
|
|
ids.NetworkReceived += FFXIVPlugin_NetworkReceived;
|
|
|
|
|
ids.ZoneChanged -= FFXIVPlugin_ZoneChanged;
|
|
|
|
|
ids.ZoneChanged += FFXIVPlugin_ZoneChanged;
|
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Logger.I(6, System.Diagnostics.FileVersionInfo.GetVersionInfo(_ffxiv_plugin_data.pluginFile.FullName).FileVersion);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-20 19:43:05 +01:00
|
|
|
|
_save_timer = new System.Timers.Timer() { Interval = 5000 };
|
|
|
|
|
_save_timer.Elapsed += (sender, e) =>
|
|
|
|
|
{
|
|
|
|
|
DcConfig.SaveConfig();
|
|
|
|
|
_save_timer.Enabled = false;
|
|
|
|
|
};
|
|
|
|
|
|
2021-06-07 01:48:23 +02:00
|
|
|
|
_update_timer = new System.Timers.Timer() { Interval = IntervalGameExist };
|
2021-03-20 19:43:05 +01:00
|
|
|
|
_update_timer.Elapsed += (sender, e) =>
|
2021-03-17 18:14:48 +01:00
|
|
|
|
{
|
|
|
|
|
UpdateAndCheckProc();
|
2021-06-18 14:08:43 +02:00
|
|
|
|
_update_timer.Interval = _game_exist ? _game_active ?
|
2021-06-07 01:48:23 +02:00
|
|
|
|
IntervalGameActive : IntervalGameExist : IntervalGameNone;
|
2021-03-17 18:14:48 +01:00
|
|
|
|
};
|
2021-03-20 19:43:05 +01:00
|
|
|
|
_update_timer.Start();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
public void DeInitPlugin()
|
|
|
|
|
{
|
2021-03-20 19:43:05 +01:00
|
|
|
|
_update_timer.Stop();
|
|
|
|
|
_save_timer.Stop();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
|
|
|
|
|
DcConfig.PluginEnable = false;
|
|
|
|
|
|
2021-06-18 14:08:43 +02:00
|
|
|
|
Tab.UpdateNotifyForm.Self?.PluginDeinitialize();
|
2021-06-03 13:54:27 +02:00
|
|
|
|
Tab.PingForm.Self?.PluginDeinitialize();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
Tab.DutyForm.Self?.PluginDeinitialize();
|
|
|
|
|
Tab.ConfigForm.Self?.PluginDeinitialize();
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Tab.LogForm.Self?.PluginDeinitialize();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
DcConfig.SaveConfig();
|
|
|
|
|
|
|
|
|
|
_act_tab = null;
|
|
|
|
|
|
|
|
|
|
if (_act_label != null)
|
|
|
|
|
{
|
|
|
|
|
_act_label.Text = "Closed";
|
|
|
|
|
_act_label = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OFormActMain_Shown(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
_is_form_loaded = true;
|
|
|
|
|
ActPluginInitialize();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
private void ActPluginInitialize()
|
|
|
|
|
{
|
|
|
|
|
if (_is_plugin_initializing)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
_is_plugin_initializing = true;
|
|
|
|
|
_act_label.Text = "Starting...";
|
|
|
|
|
|
|
|
|
|
//
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Locale.Initialize(Properties.Resources.DefaultMessage);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Logger.I(4, DcConfig.PluginVersion.ToString());
|
2021-03-20 19:43:05 +01:00
|
|
|
|
|
2021-06-14 11:45:49 +02:00
|
|
|
|
DcConfig.LoadConfig();
|
2021-06-23 14:07:40 +02:00
|
|
|
|
ShowStatusBarAsConfig(true);
|
|
|
|
|
|
2021-03-17 18:14:48 +01:00
|
|
|
|
DcConfig.ReadLanguage(true);
|
|
|
|
|
DcContent.ReadContent();
|
2021-06-18 14:08:43 +02:00
|
|
|
|
DcConfig.ReadPacket();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
|
|
|
|
|
UpdateUiLocale();
|
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
lblStatusLeft.Text = Locale.Text(99, DcConfig.PluginVersion); // once here
|
2021-06-23 14:07:40 +02:00
|
|
|
|
|
2021-03-17 18:14:48 +01:00
|
|
|
|
//
|
|
|
|
|
Dock = DockStyle.Fill;
|
|
|
|
|
_act_tab.Controls.Add(this);
|
|
|
|
|
|
|
|
|
|
//
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Tab.LogForm.Self?.PluginInitialize();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
Tab.ConfigForm.Self?.PluginInitialize();
|
|
|
|
|
Tab.DutyForm.Self?.PluginInitialize();
|
2021-06-03 13:54:27 +02:00
|
|
|
|
Tab.PingForm.Self?.PluginInitialize();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
tabMain.SelectedTab = tabPageDuty;
|
|
|
|
|
|
2021-06-18 14:08:43 +02:00
|
|
|
|
//
|
|
|
|
|
if (DcConfig.DataRemoteUpdate)
|
|
|
|
|
{
|
|
|
|
|
var tag = Updater.CheckPluginUpdate(out string body);
|
|
|
|
|
if (tag > DcConfig.PluginTag)
|
|
|
|
|
{
|
|
|
|
|
Tab.UpdateNotifyForm frm = new Tab.UpdateNotifyForm(tag, body);
|
|
|
|
|
frm.PluginInitialize();
|
|
|
|
|
frm.UpdateUiLocale();
|
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
TabPage tp = new TabPage(Locale.Text(206));
|
2021-06-18 14:08:43 +02:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
// why? sometimes trouble
|
|
|
|
|
tp.Controls.Add(frm.Controls[0]);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Logger.Ex(ex);
|
2021-06-18 14:08:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tabMain.TabPages.Add(tp);
|
2021-06-23 14:07:40 +02:00
|
|
|
|
|
|
|
|
|
if (DcConfig.LastUpdatedPlugin < tag)
|
|
|
|
|
{
|
|
|
|
|
tabMain.SelectedTab = tp;
|
|
|
|
|
|
|
|
|
|
DcConfig.LastUpdatedPlugin = tag;
|
|
|
|
|
DcConfig.SaveConfig();
|
|
|
|
|
}
|
2021-06-18 14:08:43 +02:00
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
Logger.C(Color.Aquamarine, 207, DcConfig.PluginTag, tag);
|
2021-06-18 14:08:43 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-17 18:14:48 +01:00
|
|
|
|
//
|
|
|
|
|
DcConfig.PluginEnable = true;
|
|
|
|
|
|
|
|
|
|
_is_plugin_initializing = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
private void TabMain_DrawItem(object sender, DrawItemEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
var g = e.Graphics;
|
|
|
|
|
TabPage p = tabMain.TabPages[e.Index];
|
|
|
|
|
Rectangle r = tabMain.GetTabRect(e.Index);
|
|
|
|
|
StringFormat s = new StringFormat()
|
|
|
|
|
{
|
|
|
|
|
Alignment = StringAlignment.Near,
|
|
|
|
|
LineAlignment = StringAlignment.Center,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Brush b, h;
|
|
|
|
|
Font f;
|
|
|
|
|
|
|
|
|
|
if (tabMain.SelectedIndex == e.Index)
|
|
|
|
|
{
|
2021-08-14 16:35:53 +02:00
|
|
|
|
f = new Font(tabMain.Font.FontFamily, 14.0f, FontStyle.Bold, GraphicsUnit.Pixel);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
#if false
|
|
|
|
|
b = new SolidBrush(Color.Black);
|
|
|
|
|
h = SystemBrushes.Window;
|
|
|
|
|
#else
|
|
|
|
|
b = new SolidBrush(Color.White);
|
|
|
|
|
h = SystemBrushes.Highlight;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
//else if (p.col)
|
|
|
|
|
else
|
|
|
|
|
{
|
2021-08-14 16:35:53 +02:00
|
|
|
|
f = new Font(tabMain.Font.FontFamily, 14.0f, FontStyle.Regular, GraphicsUnit.Pixel);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
b = new SolidBrush(Color.DarkSlateGray);
|
|
|
|
|
h = SystemBrushes.Control;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g.FillRectangle(h, r);
|
|
|
|
|
g.DrawString(p.Text, f, b, r, new StringFormat(s));
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-20 19:43:05 +01:00
|
|
|
|
//
|
2021-06-18 14:08:43 +02:00
|
|
|
|
public void RefreshSaveConfig(int interval = 5000)
|
2021-03-20 19:43:05 +01:00
|
|
|
|
{
|
|
|
|
|
_save_timer.Enabled = false;
|
|
|
|
|
_save_timer.Interval = interval;
|
|
|
|
|
_save_timer.Start();
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-17 18:14:48 +01:00
|
|
|
|
//
|
|
|
|
|
private void UpdateAndCheckProc()
|
|
|
|
|
{
|
|
|
|
|
if (_game_process == null || _game_process.Process.HasExited)
|
|
|
|
|
{
|
|
|
|
|
_game_exist = false;
|
|
|
|
|
_game_active = false;
|
|
|
|
|
|
|
|
|
|
// will be update game status next time
|
|
|
|
|
var p = (from x in Process.GetProcessesByName("ffxiv_dx11") where !x.HasExited && x.MainModule != null && x.MainModule.ModuleName == "ffxiv_dx11.exe" select x).FirstOrDefault<Process>();
|
|
|
|
|
|
|
|
|
|
if (p != null && p.HasExited)
|
|
|
|
|
p = null;
|
|
|
|
|
|
|
|
|
|
if (((_game_process == null) != (p == null)) ||
|
|
|
|
|
(_game_process != null && p != null && _game_process.Process.Id != p.Id))
|
|
|
|
|
{
|
|
|
|
|
_game_process = p != null ? new ThirdParty.NativeMethods.ProcessHandle(p) : null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_game_exist = true;
|
|
|
|
|
|
2021-03-20 19:43:05 +01:00
|
|
|
|
//
|
2021-03-17 18:14:48 +01:00
|
|
|
|
var fgw = ThirdParty.NativeMethods.GetForegroundWindow();
|
|
|
|
|
ThirdParty.NativeMethods.GetWindowThreadProcessId(fgw, out int id);
|
|
|
|
|
_game_active = _game_process.Process.Id == id;
|
2021-03-20 19:43:05 +01:00
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
var now = DateTime.Now.Ticks;
|
|
|
|
|
var delta = now - _game_connection_tick;
|
|
|
|
|
var span = new TimeSpan(delta);
|
|
|
|
|
|
|
|
|
|
if (span.TotalSeconds > 2)
|
|
|
|
|
{
|
|
|
|
|
_game_connection_tick = now;
|
2021-08-16 19:04:55 +02:00
|
|
|
|
DcConfig.Connections.BuildConnections(_game_process.Process, out var retaddr);
|
|
|
|
|
|
|
|
|
|
if (!_game_ipaddr.Equals(retaddr))
|
|
|
|
|
{
|
|
|
|
|
if (!retaddr.Equals(IPAddress.None))
|
|
|
|
|
Logger.I(42, retaddr);
|
|
|
|
|
else
|
|
|
|
|
Logger.I(42, Locale.Text(43));
|
|
|
|
|
|
|
|
|
|
_game_ipaddr = retaddr;
|
|
|
|
|
Tab.DutyForm.Self?.ResetContentItems();
|
|
|
|
|
}
|
2021-03-20 19:43:05 +01:00
|
|
|
|
}
|
2021-03-17 18:14:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var zone = ActGlobals.oFormActMain.CurrentZone;
|
|
|
|
|
if (_game_zone == null || !zone.Equals(_game_zone))
|
|
|
|
|
_game_zone = zone;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
private void FFXIVPlugin_NetworkReceived(string connection, long epoch, byte[] message)
|
|
|
|
|
{
|
|
|
|
|
if (message.Length < 32)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
Tab.DutyForm.Self?.PacketHandler(connection, message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
private void FFXIVPlugin_ZoneChanged(uint zone_id, string zone_name)
|
|
|
|
|
{
|
|
|
|
|
Tab.DutyForm.Self?.ZoneChanged(zone_id, zone_name);
|
2021-06-23 14:07:40 +02:00
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
lblStatusLeft.Text = Locale.Text(34, zone_name, zone_id);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
public void UpdateUiLocale()
|
|
|
|
|
{
|
2021-06-19 14:07:01 +02:00
|
|
|
|
ThirdParty.FontUtilities.SimpleChangeFont(this, DcConfig.UiFontFamily, true);
|
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
_act_label.Text = Locale.Text(1); // Duty ready
|
|
|
|
|
_act_tab.Text = Locale.Text(0); // FFXIV dc
|
2021-06-18 14:08:43 +02:00
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
tabPageDuty.Text = Locale.Text(300);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
Tab.DutyForm.Self?.UpdateUiLocale();
|
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
tabPagePing.Text = Locale.Text(400);
|
2021-06-03 13:54:27 +02:00
|
|
|
|
Tab.PingForm.Self?.UpdateUiLocale();
|
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
tabPageConfig.Text = Locale.Text(200);
|
2021-03-17 18:14:48 +01:00
|
|
|
|
Tab.ConfigForm.Self?.UpdateUiLocale();
|
2021-06-18 14:08:43 +02:00
|
|
|
|
|
2021-08-14 16:35:53 +02:00
|
|
|
|
tabPageLog.Text = Locale.Text(500);
|
|
|
|
|
Tab.LogForm.Self?.UpdateUiLocale();
|
|
|
|
|
|
2021-06-18 14:08:43 +02:00
|
|
|
|
Tab.UpdateNotifyForm.Self?.UpdateUiLocale();
|
2021-03-17 18:14:48 +01:00
|
|
|
|
}
|
2021-06-23 14:07:40 +02:00
|
|
|
|
|
|
|
|
|
//
|
2021-08-16 19:04:55 +02:00
|
|
|
|
public void ShowStatusBarAsConfig(bool force = false)
|
2021-06-23 14:07:40 +02:00
|
|
|
|
{
|
|
|
|
|
if (DcConfig.StatusBar)
|
|
|
|
|
{
|
|
|
|
|
if (!lblStatusLeft.Visible || force)
|
|
|
|
|
{
|
2021-08-14 16:35:53 +02:00
|
|
|
|
tabMain.Dock = DockStyle.None;
|
2021-06-23 14:07:40 +02:00
|
|
|
|
lblStatusLeft.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (lblStatusLeft.Visible || force)
|
|
|
|
|
{
|
|
|
|
|
lblStatusLeft.Visible = false;
|
2021-08-14 16:35:53 +02:00
|
|
|
|
tabMain.Dock = DockStyle.Fill;
|
2021-06-23 14:07:40 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-03-17 18:14:48 +01:00
|
|
|
|
}
|
|
|
|
|
}
|