internal SessionForm() { ClearedPackets = false; InitializeComponent(); // Apply themes toolStripExtender.DefaultRenderer = new ToolStripProfessionalRenderer(); toolStripExtender.SetStyle(mMenu, VisualStudioToolStripExtender.VsVersion.Vs2015, Config.Instance.Theme.DockSuiteTheme); toolStripExtender.SetStyle(mPacketContextMenu, VisualStudioToolStripExtender.VsVersion.Vs2015, Config.Instance.Theme.DockSuiteTheme); ThemeApplier.ApplyTheme(Config.Instance.Theme, Controls); ThemeApplier.ApplyTheme(Config.Instance.Theme, mPacketContextMenu.Controls); ScaleColumns(); Saved = false; // Last column fills to ListView width ListView.Resize += (sender, e) => { ListView.ColumnHeaderCollection columns = ((PacketListView)sender).Columns; columns[columns.Count - 1].Width = -2; }; ListView.ColumnWidthChanged += (sender, e) => { ListView.ColumnHeaderCollection columns = ((PacketListView)sender).Columns; columns[columns.Count - 1].Width = -2; }; }
public SplashForm() { InitializeComponent(); ThemeApplier.ApplyTheme(Config.Instance.Theme, this); centerX = this.Size.Width / 2; centerY = this.Size.Height / 2; centerX -= pictureBox1.Size.Width / 2; centerY -= pictureBox1.Size.Height / 2; }
public ScriptForm(string path, MaplePacket packet) { this.path = path; Packet = packet; InitializeComponent(); ThemeApplier.ApplyTheme(Config.Instance.Theme, this); Text = packet != null ? $"Script 0x{packet.Opcode:X4}, {(packet.Outbound ? "Outbound" : "Inbound")}" : "Common Script"; }
public void SetTheme() { for (int i = 0; i < themeToggle.Length; i++) { if (themeToggle[i].isOn) { themeVal = i; themeName.text = GlobalTheme.ThemeName((ThemeType)i); break; } } ThemeApplier.UpdateTheme((ThemeType)themeVal); }
public SetupForm() { InitializeComponent(); ThemeApplier.ApplyTheme(Config.Instance.Theme, this); Text = "MapleShark " + Program.AssemblyVersion; chkDarkMode.Checked = Config.Instance.WindowTheme == Config.ThemeType.Dark; bool configured = false; int activeConnection = -1; foreach (LibPcapLiveDevice device in LibPcapLiveDeviceList.Instance) { if (!device.IsActive()) { continue; } string description = device.Interface.Description; string friendlyName = device.Interface.FriendlyName ?? description; int index = mInterfaceCombo.Items.Add(new DeviceEntry { Name = friendlyName, Device = device, }); if (device.IsConnected()) { activeConnection = index; } // Load selected device from config if (!configured && device.Interface.Name == Config.Instance.Interface) { mInterfaceCombo.SelectedIndex = index; configured = true; } } if (!configured) { mInterfaceCombo.SelectedIndex = activeConnection; } mLowPortNumeric.Value = Config.Instance.LowPort; mHighPortNumeric.Value = Config.Instance.HighPort; }
public Greetings() { InitializeComponent(); ThemeApplier.Apply(ThemeLoader.Load(), this); }
public void ApplyTheme() { BackColor = Config.Instance.Theme.DockSuiteTheme.ColorPalette.MainWindowActive.Background; ThemeApplier.ApplyTheme(Config.Instance.Theme, Controls); }
public ImportOpsForm() { InitializeComponent(); ThemeApplier.ApplyTheme(Config.Instance.Theme, this); }
public SessionInfoForm() { InitializeComponent(); ThemeApplier.ApplyTheme(Config.Instance.Theme, this); }