コード例 #1
0
        private void ReviseFile(object sender, RoutedEventArgs e)
        {
            FileAndDirAttributes files = (FileAndDirAttributes)DirsAndFiles.SelectedItem;
            string path = files.FileDirectory + "\\" + files.FileName;

            System.Windows.Forms.OpenFileDialog file = new System.Windows.Forms.OpenFileDialog();
            if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                FileData.AddFileVersion(path, file.FileName);
                MessageBox.Show("Confirmation.", "Version added successfully.");
            }
        }
コード例 #2
0
        /**********************************
         * Menu items
         *********************************/
        private void AddToMyFiles(object sender, RoutedEventArgs e)
        {
            string path = "";

            System.Windows.Forms.OpenFileDialog file = new System.Windows.Forms.OpenFileDialog();
            if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                path = file.FileName;
                FileData.AddMyFile(path);
                FileData.AddFileVersion(path, path);
                MessageBox.Show("Confirmation.", "File added successfully.");
            }
        }