示例#1
0
        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;
            };
        }
示例#2
0
        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;
        }
示例#3
0
        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";
        }
示例#4
0
 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);
 }
示例#5
0
        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;
        }
示例#6
0
 public Greetings()
 {
     InitializeComponent();
     ThemeApplier.Apply(ThemeLoader.Load(), this);
 }
示例#7
0
 public void ApplyTheme()
 {
     BackColor = Config.Instance.Theme.DockSuiteTheme.ColorPalette.MainWindowActive.Background;
     ThemeApplier.ApplyTheme(Config.Instance.Theme, Controls);
 }
示例#8
0
        public ImportOpsForm()
        {
            InitializeComponent();

            ThemeApplier.ApplyTheme(Config.Instance.Theme, this);
        }
示例#9
0
 public SessionInfoForm()
 {
     InitializeComponent();
     ThemeApplier.ApplyTheme(Config.Instance.Theme, this);
 }