Beispiel #1
0
        /// <summary>
        /// Metodo general de logging, la salida la hace en LogForm
        /// </summary>
        /// <param name="str">Formated string; Ex: "String and parameters {0} {1} {2}"</param>
        /// <param name="args">Resto de la salida, los parametros que estan entre llaves {}; Ej: 10, var, "end"</param>
        public static void outString(string str, params object[] args)
        {
            if (!LogEnabled)
            {
                return;
            }

            LogForm.WriteLine(String.Format(str, args));
        }
Beispiel #2
0
        private int _searchLastFound = -1; // Ultimo index del item encontrado

        public MainForm()
        {
            InitializeComponent();
            _captures = new List <CaptureRecord>();
            notifyIcon.ContextMenuStrip = trayMenuStrip;

            // Load settings
            if (!Settings.FormSize.IsEmpty)
            {
                StartPosition = FormStartPosition.Manual;
                Location      = Settings.FormLocation;
                Size          = Settings.FormSize;

                if (Settings.FormState == FormWindowState.Maximized)
                {
                    WindowState = FormWindowState.Maximized;
                }

                if (Settings.LogOpened)
                {
                    LogForm.Show();
                }

                Output.LogEnabled = Settings.LogEnabled;

                _isViewAsHexOn  = Settings.ViewAsHex;
                _isAutoScrollOn = Settings.AutoScroll;
                splitContainerTabsAndHex.SplitterDistance  = Settings.SpliterDistanceTabsAndHex;
                splitFilterAndConversions.SplitterDistance = Settings.SpliterDistanceFilterAndConversions;
            }

            InitListViews();

            Resize += OnResize;
            Closed += frmMainClosed;

            FilterManager.LoadTempFilterList();
            LoadFilterItems();
            LoadSendListItems();
            LoadHotKeys();
            UpdateControls();
        }
Beispiel #3
0
 private void tsmiViewLog_Click(object sender, EventArgs e)
 {
     LogForm.Show();
 }
Beispiel #4
0
 /// <summary>
 /// Metodo de logging de errores, la salida la hace en LogForm
 /// </summary>
 /// <param name="str">String formateado; Ej: "String and parameters {0} {1} {2}"</param>
 /// <param name="args">Resto de la salida, los parametros que estan entre llaves {}; Ej: 10, var, "end"</param>
 public static void outError(string str, params object[] args)
 {
     LogForm.WriteLine("ERROR: " + String.Format(str, args), Color.Red);
 }