Exemplo n.º 1
0
        /// <summary>
        /// Überträgt eine Session aus dem Teamverzeichnis und fügt die Benutzerspezifischen Werte ein
        /// </summary>
        /// <param name="sessionName">Name der Session</param>
        /// <param name="from">Pfad zu der Session im Team Repository</param>
        /// <param name="repository">Das genutzte Repository</param>
        public static void TransferSessionFromTeamFolder(string sessionName, string from, ISessionRepository repository)
        {
            FolderSetup.SetupDirectory();

            if (!repository.CheckSessionExists(sessionName))
            {
                repository.AddSession(from);
            }

            SetUserSpecificConfiguration(sessionName);
        }
Exemplo n.º 2
0
        private void frmSettings_Load(object sender, EventArgs e)
        {
            FolderSetup.SetupDirectory();

            lblStoredSessions.Text     = string.Format(lblStoredSessions.Text, Directory.GetFiles(ApplicationSettings.LocalRepositoryPath).Length);
            txtStoredSessionsPath.Text = ApplicationSettings.LocalRepositoryPath;

            lblVersion.Text  = string.Format(lblVersion.Text, Application.ProductVersion);
            lblVersion2.Text = string.Format(lblVersion2.Text, Application.ProductVersion);

            LoadSettings();
        }
Exemplo n.º 3
0
        private void addSessionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (FolderSetup.SetupDirectory())
            {
                OpenFileDialog open = new OpenFileDialog();
                open.Title       = "Select Session File(s)";
                open.Multiselect = true;

                DialogResult result = open.ShowDialog();
                FileTools.GetSelectedSessionsFromFolder(open, result, localRepository, trvSessions);
            }

            SaveChanges();
        }
Exemplo n.º 4
0
        private void transferToPersonalListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try {
                FolderSetup.SetupDirectory();

                if (!trvSessions.DoesNodeExist(trvRegistrySessions.SelectedNode.Text))
                {
                    TreeNode node = FileTools.CreateNewServerNode(trvRegistrySessions.SelectedNode.Text);

                    trvSessions.Nodes[0].Nodes.Add(node);

                    SaveChanges();
                }
                else
                {
                    Program.LogWriter.Log("The Session you try to add is already in the list and won't be added again!");
                }
            } catch (Exception ex) {
                Program.LogWriter.Log("Could not transfer Session to personal List because {0}", ex.Message);
            }
        }