Пример #1
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            if (SyncList.SelectedItem == null)
            {
                LogLine("Nothing selected to edit.");
                return;
            }
            SyncForm syncForm = new SyncForm((FileSync)SyncList.SelectedItem);

            syncForm.ShowDialog(); // blocking

            StoreFSFile();         // maybe don't need this here.
            SyncList.Refresh();
        }
Пример #2
0
        private void AddBtn_Clicked(object sender, EventArgs e)
        {
            SyncForm syncForm = new SyncForm();

            syncForm.ShowDialog(); // blocking

            FileSync fs = syncForm.FileSync;

            if (string.IsNullOrWhiteSpace(fs.SrcMacro))
            {
                return;
            }
            if (string.IsNullOrWhiteSpace(fs.DestPath))
            {
                return;
            }

            SyncList.Items.Add(fs);

            StoreFSFile(); // maybe don't need this here.
        }