예제 #1
0
        private void openSavedConnectionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PinCusionClient.Properties.Settings settings = new PinCusionClient.Properties.Settings();
            var FD = new System.Windows.Forms.OpenFileDialog();

            if (FD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                settings.ConnectionsFile = FD.FileName;
                settings.Save();
                ExtractConnections(FD.FileName);
            }

            loadConnectionsToListBox();
        }
예제 #2
0
        private void openSavedCommandsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PinCusionClient.Properties.Settings settings = new PinCusionClient.Properties.Settings();
            txtCommandHistory.Text = "";
            var FD = new System.Windows.Forms.OpenFileDialog();

            if (FD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                settings.CommandsFile = FD.FileName;
                settings.Save();

                string             fileToOpen = FD.FileName;
                System.IO.FileInfo FilePath   = new System.IO.FileInfo(FD.FileName);
                extractCommandFile(FilePath.FullName);
            }
        }