Exemplo n.º 1
0
        public void saveContent(string loginName, TextBox[] textInputs, RichTextBox memo, Button[] buttons)
        {
            List <string> changes = new List <string>();

            if (string.IsNullOrWhiteSpace(textInputs[0].Text))
            {
                MessageBox.Show("Der Name darf nicht leer sein", "Speichern nicht möglich", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                foreach (TextBox input in textInputs)
                {
                    string text = input.Text;
                    changes.Add(text);
                }

                foreach (string line in memo.Lines)
                {
                    changes.Add(line);
                }
                UseXML_old uxml = new UseXML_old();
                uxml.loadXML();
                if (uxml.saveLogin(loginName, changes))
                {
                    setLockContent(false, textInputs, memo);

                    lockEdit(true, buttons);
                }
            }
        }
Exemplo n.º 2
0
        public void setContent(string loginName, TextBox[] textInputs, RichTextBox memo)
        {
            clearContent(textInputs, memo);

            UseXML_old uxml = new UseXML_old();

            uxml.loadXML();
            List <string> content = uxml.getContent(loginName);

            fillFields(content, textInputs, memo);
        }
Exemplo n.º 3
0
        public LoginView()
        {
            mountedText = new string[] { "Mount", "Dismount" };

            InitializeComponent();

            btTrueCMountDism.Text = mountedText[1];

            uxml = new UseXML_old();
            uxml.loadXML();

            uc1      = new InfoControl(this);
            uc1.Dock = DockStyle.Fill;

            pLoginAction.Controls.Add(uc1);

            searchNames = new List <string>();
            tmpNames    = uxml.getLogins();

            listBoxNames.DataSource = tmpNames;
        }