Пример #1
0
 private void справкаToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var helpform = new HelpForm())
     {
         helpform.ShowDialog();
     }
 }
Пример #2
0
 private void HelpForm(object sender, HelpEventArgs hlpevent)
 {
     using (var helpform = new HelpForm())
     {
         helpform.ShowDialog();
     }
 }
Пример #3
0
 private void MenuViewHelp_Click(object sender, EventArgs e)
 {
     if (HelpForm == null || HelpForm.IsDisposed)
     {
         HelpForm = new HelpForm();
     }
     HelpForm.ShowDialog();
 }
Пример #4
0
        /// <summary>
        /// This event is fired when the 'HelpButton' is clicked.
        /// </summary>
        private void HelpButton_Click(object sender, EventArgs e)
        {
            // Create the helpForm
            HelpForm helpForm = new HelpForm();

            // Show the helpForm
            helpForm.ShowDialog();
        }
Пример #5
0
        /// <summary>
        /// This event is fired when the 'HelpButton' is clicked.
        /// </summary>
        private void HelpButton_Click(object sender, System.EventArgs e)
        {
            // Create a new instance of a 'HelpForm' object.
            HelpForm helpForm = new HelpForm();

            // Show the HelpForm
            helpForm.ShowDialog();
        }
Пример #6
0
        private void commentDémarrerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HelpForm hf = new HelpForm("Commencez par créer une classe ainsi qu'une salle. " +
                                       "Rendez-vous ensuite dans l'onglet 'Mes plans de classe' pour en créer un. " +
                                       "\r\n\r\nAttention ! La salle devra contenir plus de places que d'élèves...",
                                       "Comment démarrer ?");

            hf.ShowDialog();
        }
Пример #7
0
        private void helpAffinityLnkLbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            HelpForm hf = new HelpForm("Une affinité de bavardage entre deux élèves implique qu'ils ne pourront pas être côte-à-côte." +
                                       "\r\n\r\nPour ajouter des affinités de bavardage à un élève :" +
                                       "\r\n1. Sélectionnez un élève dans la liste des élèves de la classe." +
                                       "\r\n2. Sélectionnez un élève dans le menu déroulant." +
                                       "\r\n3. Cliquez sur Ajouter." +
                                       "\r\n\r\n À noter : une affinité de bavardage est réciproque entre les deux élèves.",
                                       "Affinités de bavardage");

            hf.ShowDialog();
        }
Пример #8
0
        private void OpenReadme()
        {
            //System.Diagnostics.Debugger.Launch();

            var dllPath = new FileInfo((new Uri(this.Assembly.CodeBase)).LocalPath);

            var helpFile = Path.Combine(dllPath.DirectoryName, "ReadMe", "ReadMe.html");

            if (File.Exists(helpFile))
            {
                using (var helpForm = new HelpForm(helpFile))
                {
                    helpForm.Text = "Read Me";
                    helpForm.ShowDialog();
                }
            }
        }
        private void Action(string tag)
        {
            switch (tag)
            {
            case "NEW_PROF":
                //NewProfile();
                break;

            case "CREATE_ENV":
                using (NewEnvForm env = new NewEnvForm()) {
                    if (env.ShowDialog().Equals(DialogResult.OK))
                    {
                        // Check if exist name

                        if (_envVariables.SetEnvironmentVariable(env.EnvName, env.EnvValue))
                        {
                            using (RestartForm r = new RestartForm(env.EnvName, tag)) {
                                if (r.ShowDialog().Equals(DialogResult.OK))
                                {
                                    Application.Restart();
                                }
                                else
                                {
                                    InitEnvironmentVariables();
                                }
                            }
                        }
                    }
                }
                break;

            case "ENV_UPDATE":
                DialogResult resu = MessageBox.Show(string.Format("Are you sure you want to update {0} in environment variable?", txtEnvName.Text), "Update Environment", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (resu.Equals(DialogResult.Yes))
                {
                    if (_envVariables.SetEnvironmentVariable(txtEnvName.Text, txtEnvValue.Text))
                    {
                        using (RestartForm r = new RestartForm(txtEnvName.Text, tag)) {
                            if (r.ShowDialog().Equals(DialogResult.OK))
                            {
                                InitEnvironmentVariables();
                            }
                        }
                    }
                }
                break;

            case "ENV_DELETE":
                DialogResult resd = MessageBox.Show(string.Format("Are you sure you want to delete {0} in environment variable?", txtEnvName.Text), "Delete Environment", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (resd.Equals(DialogResult.Yes))
                {
                    if (_envVariables.DeleteEnvironmentVariable(txtEnvName.Text))
                    {
                        using (RestartForm r = new RestartForm(txtEnvName.Text, tag)) {
                            if (r.ShowDialog().Equals(DialogResult.OK))
                            {
                                InitEnvironmentVariables();
                            }
                        }
                    }
                }
                break;

            case "FIND":
                break;

            case "SAVE":
                if (_isLoading)
                {
                    return;
                }
                using (NewArchive na = new NewArchive()) {
                    if (na.ShowDialog().Equals(DialogResult.OK))
                    {
                    }
                }
                break;

            case "ADD_FILE":
                AddFiles(AddFile.FILES);
                break;

            case "ADD_FOLDER":
                AddFiles(AddFile.FOLDER);
                break;

            case "REFRESH":
                InitWorkspace();
                break;

            case "SERVER_CONFIG":
            case "OPTIONS":
                using (ConfigServerForm config = new ConfigServerForm(tag.Equals("SERVER_CONFIG") ? 1 : 0)) {
                    if (config.ShowDialog().Equals(DialogResult.OK))
                    {
                        InitSettings();
                    }
                }
                break;

            case "EXIT":
                Close();
                break;

            case "ABOUT":
                using (AboutForm about = new AboutForm()) {
                    about.ShowDialog();
                }
                break;

            case "HELP":
                using (HelpForm help = new HelpForm()) {
                    help.ShowDialog();
                }
                break;

            case "TOOLBAR":
                RegConfig.Set <bool>("Toolbar", hideToolbarToolStripMenuItem.Checked);
                toolStripUploader.Visible = hideToolbarToolStripMenuItem.Checked;
                break;

            case "STATUSBAR":
                RegConfig.Set <bool>("Statusbar", hideStatusbarToolStripMenuItem.Checked);
                statusStripUploader.Visible = hideStatusbarToolStripMenuItem.Checked;
                break;

            case "PROFILE_DETAILS":
                break;

            case "PROFILE_EXPLORER":
                RegConfig.Set <bool>("ProfileExplorer", profileExplorerToolStripMenuItem.Checked);
                splitContainer1.Panel1Collapsed = !profileExplorerToolStripMenuItem.Checked;
                break;

            case "LOGS":
                RegConfig.Set <bool>("Logs&Details", logsToolStripMenuItem.Checked);
                splitContainer2.Panel2Collapsed = !logsToolStripMenuItem.Checked;
                break;

            case "CLEAR_WORKSPACE":
                if (_archives != null)
                {
                    if (MessageBox.Show("Workspace will be deleted permanently!\nAre you sure you want to clear all workspace?", "Clear Workspace", MessageBoxButtons.YesNo, MessageBoxIcon.Question).Equals(DialogResult.Yes))
                    {
                        List <Archive> ws = _archives.GetProfiles();
                        if (ws.Count > 0)
                        {
                            foreach (Archive w in ws)
                            {
                            }
                        }
                        _archives.ClearWorkspaces();
                        InitWorkspace();
                    }
                }
                break;

            case "CLEAR_LOGS":
                if (_logs != null)
                {
                    if (MessageBox.Show("Logs will be deleted permanently!\nAre you sure you want to clear all logs?", "Clear Logs", MessageBoxButtons.YesNo, MessageBoxIcon.Question).Equals(DialogResult.Yes))
                    {
                        _logs.ClearAllLog();
                        _logs.Initialize(logsListBox);
                    }
                }
                break;

            case "CLEAR_HISTORY":
                if (_selectedArchive != null)
                {
                    if (MessageBox.Show("History will be deleted permanently!\nAre you sure you want to clear all history?", "Clear History", MessageBoxButtons.YesNo, MessageBoxIcon.Question).Equals(DialogResult.Yes))
                    {
                    }
                }
                break;

            case "SOURCE_EXT":
            case "SOURCE_FOLDER":

                break;

            default:
                break;
            }
        }
Пример #10
0
 private void button6_Click(object sender, EventArgs e)
 {
     f.ShowDialog();
 }
Пример #11
0
        private void btnHelp_Click(object sender, EventArgs e)
        {
            HelpForm customAlert = new HelpForm();

            customAlert.ShowDialog();
        }
        private void Action(string tag)
        {
            switch (tag)
            {
            case "ADD":
                using (NewPasswordForm npf = new NewPasswordForm(_pwds, string.Empty)) {
                    if (npf.ShowDialog().Equals(DialogResult.OK))
                    {
                        _pwds.Add(npf.Credential);
                        InitializePasswords();
                    }
                }
                break;

            case "REMOVE":
                if (!string.IsNullOrEmpty(_selectedId))
                {
                    if (MessageBox.Show(Messages.REMOVE, "Remove Credential", MessageBoxButtons.YesNo, MessageBoxIcon.Warning).Equals(DialogResult.Yes))
                    {
                        _pwds.Delete(_selectedId);
                        InitializePasswords();
                    }
                }
                break;

            case "EDIT":
                if (!string.IsNullOrEmpty(_selectedId))
                {
                    using (NewPasswordForm npf = new NewPasswordForm(_pwds, _selectedId)) {
                        if (npf.ShowDialog().Equals(DialogResult.OK))
                        {
                            _pwds.Update(npf.Credential, _selectedId);
                            InitializePasswords();
                        }
                    }
                }
                break;

            case "CLEAR":
                if (MessageBox.Show(Messages.CLEAR, "Clear Credentials", MessageBoxButtons.YesNo, MessageBoxIcon.Warning).Equals(DialogResult.Yes))
                {
                    _pwds.ClearAll();
                    InitializePasswords();
                }
                break;

            case "COPY":
                Clipboard.SetText(string.Format("{0}\t{1}", lblUsername.Text, lblPassword.Text));
                break;

            case "COPY_USER":
                Clipboard.SetText(lblUsername.Text);
                break;

            case "COPY_PWD":
                Clipboard.SetText(lblPassword.Text);
                break;

            case "RELOAD":
                InitializePasswords();
                break;

            case "SETTINGS":
                using (OptionForm opt = new OptionForm()) {
                    opt.ShowDialog();
                    InitializeSettings();
                    InitializePasswords();
                }
                break;

            case "HELP":
                using (HelpForm h = new HelpForm()) {
                    h.ShowDialog();
                }
                break;

            case "EXIT":
                Close();
                break;

            case "ABOUT":
                using (AboutForm a = new AboutForm()) {
                    a.ShowDialog();
                }
                break;

            case "HIDEPWD":
                if (_hidePassword)
                {
                    if (MessageBox.Show(Messages.SHOW, "Show Password", MessageBoxButtons.YesNo, MessageBoxIcon.Question).Equals(DialogResult.Yes))
                    {
                        RegConfig.Set <bool>("HidePassword", menuHidePwd.Checked);
                        _hidePassword = menuHidePwd.Checked;
                    }
                }
                else
                {
                    RegConfig.Set <bool>("HidePassword", menuHidePwd.Checked);
                    _hidePassword = menuHidePwd.Checked;
                }
                InitializePasswords();
                break;

            case "TOOLBAR":
                RegConfig.Set <bool>("Toolbar", menuToolbar.Checked);
                toolStripPwd.Visible = menuToolbar.Checked;
                break;

            case "STATUS":
                RegConfig.Set <bool>("Statusbar", menuStatus.Checked);
                statusStripPwd.Visible = menuStatus.Checked;
                break;

            case "XPLOOK":
                RegConfig.Set <bool>("XPLook", menuXPLook.Checked);
                Application.Restart();
                break;

            default:
                break;
            }
        }
        private void btnhelp_Click(object sender, EventArgs e)
        {
            HelpForm frmhelp = new HelpForm();

            frmhelp.ShowDialog();
        }
Пример #14
0
        private void Action(string tag)
        {
            switch (tag)
            {
            case "ADD_FORCE":
                if (tabControlBind.SelectedIndex != 0)
                {
                    tabControlBind.SelectedIndex = 0;
                }
                else
                {
                    AddAndForce();
                }
                break;

            case "REMOVE":
                if (listViewBind.SelectedItems.Count > 0 && !string.IsNullOrEmpty(_selectedId))
                {
                    if (MessageBox.Show(string.Format(Messages.REMOVE, _selectedDesc), "Remove Bind Application", MessageBoxButtons.YesNo, MessageBoxIcon.Warning).Equals(DialogResult.Yes))
                    {
                        Cursor.Current = Cursors.WaitCursor;
                        if (_bindings != null)
                        {
                            _bindings.Delete(_selectedId);
                            InitializeBindings();
                        }
                        Cursor.Current = Cursors.Default;
                    }
                }
                break;

            case "CLEAR":
                if (MessageBox.Show(Messages.CLEAR, "Clear Bindings", MessageBoxButtons.YesNo, MessageBoxIcon.Warning).Equals(DialogResult.Yes))
                {
                    Cursor.Current = Cursors.WaitCursor;
                    if (_bindings != null)
                    {
                        _bindings.ClearAll();
                        InitializeBindings();
                    }
                    Cursor.Current = Cursors.Default;
                }
                break;

            case "CLEAR_CMDS":
                listBoxLog.Items.Clear();
                StartCommandPrompt();

                break;

            case "AUTO_BIND":
                if (listViewBind.SelectedItems.Count > 0 && !string.IsNullOrEmpty(_selectedAutoBind))
                {
                    Cursor.Current = Cursors.WaitCursor;
                    if (_bindings != null)
                    {
                        _bindings.SetAutoBind(_selectedId, _selectedAutoBind.Equals("Yes") ? false : true);
                        InitializeBindings();
                    }
                    Cursor.Current = Cursors.Default;
                }
                break;

            case "PING_START":
                if (lblIPAddress.Text.Trim().Length > 0)
                {
                    if (!bgWorker.IsBusy)
                    {
                        string ipToPing = lblIPAddress.Text.Trim();
                        btnPing.Image   = Resources.ping_stop;
                        btnPing.Tag     = "PING_STOP";
                        btnSend.Enabled = cboxCommand.Enabled = false;
                        _isPinging      = true;
                        tabControlBind.SelectedIndex = 2;
                        bgWorker.RunWorkerAsync(new CLIParameters()
                        {
                            Filename  = "CMD",
                            Prefix    = "/C ",
                            Arguments = string.Format("ping {0} -n {1}", ipToPing, _pingCount)
                        });
                    }
                }
                break;

            case "PING_STOP":
                if (bgWorker.IsBusy)
                {
                    btnPing.Image = Resources.ping_start;
                    btnPing.Tag   = "PING_START";
                    _isPinging    = false;
                    bgWorker.CancelAsync();
                }

                break;

            case "BROWSE":
                using (OpenFileDialog ofd = new OpenFileDialog()) {
                    ofd.Filter = "Executable files (*.exe) |*.exe|All Files (*.*)|*.*";
                    if (ofd.ShowDialog().Equals(DialogResult.OK))
                    {
                        txtExeFile.Text = ofd.FileName;
                    }
                }
                break;

            case "OPTIONS":
                using (OptionForm opt = new OptionForm()) {
                    opt.ShowDialog().Equals(DialogResult.OK);
                    InitializeOptions();
                    InitializeForceBindIPFile();
                }
                break;

            case "HELP":
                using (HelpForm h = new HelpForm()) {
                    h.ShowDialog();
                }
                break;

            case "EXIT":
                Close();
                break;

            case "ABOUT":
                using (AboutForm a = new AboutForm()) {
                    a.ShowDialog();
                }
                break;

            case "Toolbar":
                _cfgs.Set <bool>("Toolbar", menuToolbar.Checked);
                toolStripBind.Visible = menuToolbar.Checked;
                break;

            case "Statusbar":
                _cfgs.Set <bool>("Statusbar", menuStatusbar.Checked);
                statusStripBind.Visible = menuStatusbar.Checked;
                break;

            case "Gridlines":
                _cfgs.Set <bool>("Gridlines", menuGridlines.Checked);
                listViewBind.GridLines = menuGridlines.Checked;
                break;

            case "XPLook":
                _cfgs.Set <bool>("XPLook", menuXPLook.Checked);
                Application.Restart();
                break;

            case "CMD_PROMPT":
                new Process {
                    StartInfo =
                    {
                        UseShellExecute = true,
                        FileName        = "cmd",
                        Arguments       = ""
                    }
                }.Start();
                break;

            case "SEND":
                if (cboxCommand.Text.Trim().Length > 0)
                {
                    if (!bgWorker.IsBusy)
                    {
                        btnSend.Enabled = cboxCommand.Enabled = false;
                        bgWorker.RunWorkerAsync(new CLIParameters()
                        {
                            Filename  = "CMD",
                            Prefix    = "/c ",
                            Arguments = cboxCommand.Text.Trim()
                        });
                    }
                }
                else
                {
                    AppendResult("Please enter command...");
                }
                break;

            case "ipconfig":
                SendPredefinedCommand(tag);
                break;

            case "ipconfig /all":
                SendPredefinedCommand(tag);
                break;

            case "ipconfig /release":
                SendPredefinedCommand(tag);
                break;

            case "ipconfig /renew":
                SendPredefinedCommand(tag);
                break;

            case "arp -a":
                SendPredefinedCommand(tag);
                break;

            case "FORCEBIND_SITE":
                Process.Start("https://r1ch.net/projects/forcebindip");
                break;

            case "FORCEBIND_DOWN":
                Process.Start("https://r1ch.net/assets/forcebindip/ForceBindIP-1.32-Setup.exe");
                break;

            case "FORCEBIND_INSTALL":
                try {
                    string installer = Path.Combine(Application.StartupPath, "ForceBindIP", "ForceBindIP-1.32-Setup.exe");
                    if (File.Exists(installer))
                    {
                        Process.Start(installer);
                    }
                } catch (Win32Exception ex) {
                    MessageBox.Show(ex.Message, "ForceBindIP Installation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

                break;

            default:
                break;
            }
        }
        private void helpToolStripButton_Click(object sender, EventArgs e)
        {
            HelpForm helpForm = new HelpForm();

            helpForm.ShowDialog();
        }
        private void Action(string tag)
        {
            switch (tag)
            {
            case "NEW_PROF":
                //NewProfile();
                break;

            case "SAVE_PROF":
                SaveProfile();
                break;

            case "ADD_FILES":
                AddFiles(AddFile.FILES);
                break;

            case "ADD_FOLDER":
                AddFiles(AddFile.FOLDER);
                break;

            case "REFRESH":
                InitWorkspace();
                InitHistory(_workspaceTable);
                break;

            case "UNBIND":
                Unbind();
                break;

            case "SERVER_CONFIG":
            case "OPTIONS":
                using (ConfigServerForm config = new ConfigServerForm(tag.Equals("SERVER_CONFIG") ? 1 : 0)) {
                    if (config.ShowDialog().Equals(DialogResult.OK))
                    {
                        InitSettings();
                    }
                }
                break;

            case "EXIT":
                Close();
                break;

            case "ABOUT":
                using (AboutForm about = new AboutForm()) {
                    about.ShowDialog();
                }
                break;

            case "HELP":
                using (HelpForm help = new HelpForm()) {
                    help.ShowDialog();
                }
                break;

            case "TOOLBAR":
                RegConfig.Set <bool>("Toolbar", hideToolbarToolStripMenuItem.Checked);
                toolStripUploader.Visible = hideToolbarToolStripMenuItem.Checked;
                break;

            case "STATUSBAR":
                RegConfig.Set <bool>("Statusbar", hideStatusbarToolStripMenuItem.Checked);
                statusStripUploader.Visible = hideStatusbarToolStripMenuItem.Checked;
                break;

            case "PROFILE_DETAILS":
                break;

            case "PROFILE_EXPLORER":
                RegConfig.Set <bool>("ProfileExplorer", profileExplorerToolStripMenuItem.Checked);
                splitContainer1.Panel1Collapsed = !profileExplorerToolStripMenuItem.Checked;
                break;

            case "LOGS":
                RegConfig.Set <bool>("Logs&Details", logsToolStripMenuItem.Checked);
                splitContainer2.Panel2Collapsed = !logsToolStripMenuItem.Checked;
                break;

            case "CLEAR_WORKSPACE":
                if (_workspacse != null)
                {
                    if (MessageBox.Show("Workspace will be deleted permanently!\nAre you sure you want to clear all workspace?", "Clear Workspace", MessageBoxButtons.YesNo, MessageBoxIcon.Question).Equals(DialogResult.Yes))
                    {
                        List <Workspace> ws = _workspacse.GetProfiles();
                        if (ws.Count > 0)
                        {
                            foreach (Workspace w in ws)
                            {
                                _history.ClearHistory(w.Name.RemoveNonAlphaNumeric().ToLower());
                            }
                        }
                        _workspacse.ClearWorkspaces();
                        InitWorkspace();
                    }
                }
                break;

            case "CLEAR_LOGS":
                if (_logs != null)
                {
                    if (MessageBox.Show("Logs will be deleted permanently!\nAre you sure you want to clear all logs?", "Clear Logs", MessageBoxButtons.YesNo, MessageBoxIcon.Question).Equals(DialogResult.Yes))
                    {
                        _logs.ClearAllLog();
                        _logs.Initialize(listLogs);
                    }
                }
                break;

            case "CLEAR_HISTORY":
                if (_selectedWorkspace != null)
                {
                    if (MessageBox.Show("History will be deleted permanently!\nAre you sure you want to clear all history?", "Clear History", MessageBoxButtons.YesNo, MessageBoxIcon.Question).Equals(DialogResult.Yes))
                    {
                        _history.ClearHistory();
                        InitHistory(_selectedWorkspace.Name);
                    }
                }
                break;

            case "SOURCE_EXT":
            case "SOURCE_FOLDER":
                using (SourceForm s = new SourceForm(tag)) {
                    if (s.ShowDialog().Equals(DialogResult.OK))
                    {
                        string    extension = s.SourceName.StartsWith(".") ? s.SourceName : "." + s.SourceName;
                        RidSource rs        = new RidSource()
                        {
                            Name = (tag.Equals("SOURCE_EXT")) ? extension : s.SourceName,
                            Type = (tag.Equals("SOURCE_EXT")) ? "Extension" : "Folder"
                        };
                        _ridSources.Add(rs);
                        _ridSources.Initialize(listViewRids);
                        _listSources = _ridSources.GetSources();
                    }
                }
                break;

            default:
                break;
            }
        }
Пример #17
0
        private void toolStripButtonHelp_Click(object sender, EventArgs e)
        {
            var helpDlg = new HelpForm(this);

            helpDlg.ShowDialog(this);
        }
Пример #18
0
        private void buttonHelp_Click(object sender, EventArgs e)
        {
            HelpForm form = new HelpForm();

            form.ShowDialog();
        }
        private void 도움말ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HelpForm form = new HelpForm();

            form.ShowDialog();
        }
 private void helpToolStripButton_Click(object sender, EventArgs e)
 {
     HelpForm helpForm = new HelpForm();
     helpForm.ShowDialog();
 }