12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- using PDF_Office.Model.CloudDrive;
- using PDF_Office.ViewModels.HomePanel.CloudDrive;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace PDF_Office.Views.HomePanel.CloudDrive
- {
- /// <summary>
- /// CloudFilesContent.xaml 的交互逻辑
- /// </summary>
- public partial class CloudFilesContent : UserControl
- {
- private List<string> list = new List<string>();
- // private GoogleDriveViewModel GoogleDrive = new GoogleDriveViewModel();
- private CloudFilesContentViewModel CloudFilesDrive=>DataContext as CloudFilesContentViewModel;
- private List<CloudDriveItem> CloudeDrives = new List<CloudDriveItem>();
- private CloudType cloudType;
- public CloudFilesContent()
- {
- InitializeComponent();
- this.Loaded += usercontrol_Loaded;
- }
- private void InitCloudDrive()
- {
- var cloudDriveItem = new CloudDriveItem(CloudType.Box);
- CloudeDrives.Add(cloudDriveItem);
- cloudDriveItem = new CloudDriveItem(CloudType.DropBox);
- CloudeDrives.Add(cloudDriveItem);
- cloudDriveItem = new CloudDriveItem(CloudType.GoogleDrive);
- CloudeDrives.Add(cloudDriveItem);
- cloudDriveItem = new CloudDriveItem(CloudType.OneDrive);
- CloudeDrives.Add(cloudDriveItem);
- ListFolder.ItemsSource = CloudeDrives;
- ListFolder.SelectedIndex = 0;
- }
- private void usercontrol_Loaded(object sender, RoutedEventArgs e)
- {
- if(CloudFilesDrive != null)
- {
- CloudFilesDrive.CheckDriveUsers();
- }
- }
- public void SelectCloudTye(CloudType cloudType)
- {
- switch (cloudType)
- {
- case CloudType.GoogleDrive:
- cloudType = CloudType.GoogleDrive;
- break;
- }
- }
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- SelectCloudTye(CloudType.GoogleDrive);
- }
- }
- }
|