Exemple #1
0
        private void tabControl1_Click(object sender, EventArgs e)
        {
            if (tbcMain.SelectedIndex == 0)
            {
                Properties.Settings.Default.GatewayIP    = txtTargetIP.Text;
                Properties.Settings.Default.GatewayPort  = txtTargetPort.Text;
                Properties.Settings.Default.GatewayUname = txtTargetUname.Text;
                Properties.Settings.Default.GatewayPwd   = txtTargetPwd.Text;
                Properties.Settings.Default.MaxLogLines  = Convert.ToInt32(txtMaxLogLen.Text);
                Properties.Settings.Default.AutoTruncate = chkAutoTruncate.Checked;
                Properties.Settings.Default.MaxLogLines  = Convert.ToInt32(txtMaxLogLen.Text);
                Properties.Settings.Default.DirList      = txtListDirectories.Text;
                Properties.Settings.Default.FileType     = (int)__filetype;
                Properties.Settings.Default.SendEOF      = chkSendEOF.Checked;
                Properties.Settings.Default.DebugMode    = chkDebug.Checked;

                Properties.Settings.Default.Save();
            }
            else if (tbcMain.SelectedIndex == 1)
            {
                txtTargetIP.Text        = Properties.Settings.Default.GatewayIP;
                txtTargetPort.Text      = Properties.Settings.Default.GatewayPort;
                txtTargetUname.Text     = Properties.Settings.Default.GatewayUname;
                txtTargetPwd.Text       = Properties.Settings.Default.GatewayPwd;
                txtMaxLogLen.Text       = Properties.Settings.Default.MaxLogLines.ToString();
                chkAutoTruncate.Checked = Properties.Settings.Default.AutoTruncate;
                txtMaxLogLen.Text       = Properties.Settings.Default.MaxLogLines.ToString();

                txtListDirectories.Text = Properties.Settings.Default.DirList;
                __filetype = (motInputStuctures)Properties.Settings.Default.FileType;

                chkDebug.Checked   = Properties.Settings.Default.DebugMode;
                chkSendEOF.Checked = Properties.Settings.Default.SendEOF;

                // Find the right Radio Button
                foreach (RadioButton __radio in grpFileType.Controls)
                {
                    if (__radio.TabIndex == (int)__filetype)
                    {
                        __radio.Checked = true;
                        break;
                    }
                }
            }
            else  // Reserved for future use
            {
                return;
            }
        }
Exemple #2
0
        public frmFileSystemData()
        {
            InitializeComponent();

            __logger = LogManager.GetLogger("FilesystemWatcher.Main");
            __logger.Info("MOT Filesystem Watcher Proxy Starting Up");

            // Start the fun
            __execute = new Execute();
            __execute.__event_ui_handler += __update_event_pane;
            __execute.__error_ui_handler += __update_error_pane;

            rtbEvents.Font = new Font("Lucida Console", 7.8F);
            rtbErrors.Font = new Font("Lucida Console", 7.8F);

            txtTargetIP.Text    = Properties.Settings.Default.GatewayIP;
            txtTargetPort.Text  = Properties.Settings.Default.GatewayPort;
            txtTargetUname.Text = Properties.Settings.Default.GatewayUname;
            txtTargetPwd.Text   = Properties.Settings.Default.GatewayPwd;

            txtListDirectories.Text = Properties.Settings.Default.DirList;

            cmbErrorLevel.SelectedIndex = (int)Properties.Settings.Default.ErrorLevel;
            chkAutoTruncate.Checked     = Properties.Settings.Default.AutoTruncate;

            __max_log_len     = Properties.Settings.Default.MaxLogLines;
            txtMaxLogLen.Text = __max_log_len.ToString();

            __filetype = (motInputStuctures)Properties.Settings.Default.FileType;

            chkDebug.Checked   = Properties.Settings.Default.DebugMode;
            chkSendEOF.Checked = Properties.Settings.Default.SendEOF;


            // Find the right Radio Button
            foreach (RadioButton __radio in grpFileType.Controls)
            {
                if (__radio.TabIndex > 0 && __radio.TabIndex == (int)__filetype)
                {
                    __radio.Checked = true;
                    break;
                }
            }
        }
Exemple #3
0
        public motFileSystemListener(string dirName, string address, string port, motInputStuctures __file_type, bool __auto_truncate = false, bool __send_eof = false, bool __debug_mode = false)
        {
            if (!string.IsNullOrEmpty(dirName) || !string.IsNullOrEmpty(address) || !string.IsNullOrEmpty(port))
            {
                this.__file_type     = __file_type;
                this.__debug_mode    = __debug_mode;
                this.__send_eof      = __send_eof;
                this.__auto_truncate = __auto_truncate;

                if (!System.IO.Directory.Exists(dirName))
                {
                    System.IO.Directory.CreateDirectory(dirName);
                }

                //watchDirectory(dirName, address, port);
            }
            else
            {
                throw new ArgumentNullException("NULL parameter");
            }
        }
Exemple #4
0
 private void rbMOTTagged_CheckedChanged(object sender, EventArgs e)
 {
     __filetype = motInputStuctures.__inputTagged;
 }
Exemple #5
0
 private void rbMotDelimited_CheckedChanged(object sender, EventArgs e)
 {
     __filetype = motInputStuctures.__inputDelimted;
 }
Exemple #6
0
 private void rbtBestRx_CheckedChanged(object sender, EventArgs e)
 {
     __filetype = motInputStuctures.__inputPARADA;
 }
Exemple #7
0
 private void rbtJSON_CheckedChanged(object sender, EventArgs e)
 {
     __filetype = motInputStuctures.__inputJSON;
 }
Exemple #8
0
 private void rbtAuto_CheckedChanged(object sender, EventArgs e)
 {
     __filetype = motInputStuctures.__auto;
 }