示例#1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            ProgramWnd progWnd = new ProgramWnd(null);
            if (progWnd.ShowDialog() != true)
                return;

            if (!App.client.AddProgram(progWnd.ID, Program.guid))
                MessageBox.Show(Translate.fmt("msg_already_exist"), App.mName, MessageBoxButton.OK, MessageBoxImage.Exclamation);
        }
示例#2
0
        private void progGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ProgEntry entry = (progGrid.SelectedItem as ProgEntry);
            if (entry == null)
                return;

            ProgramWnd progWnd = new ProgramWnd(entry.Prog.ID);
            if (progWnd.ShowDialog() != true)
                return;

            // no editing
        }