Esempio n. 1
0
 public static void ShowFileManager(Form owner)
 {
     using (var fileManager = new FileManagerWindow())
     {
         _ = fileManager.ShowDialog(owner);
     }
 }
Esempio n. 2
0
        public MainWindow()
        {
            InitializeComponent();

            if (!File.Exists(@"./Sheets/data.json"))
            {
                FileManagerWindow fmw = new FileManagerWindow();
                MessageBox.Show("Отстутствует таблица! Пожалуйста, выполните загрузку.");
                fmw.ShowDialog();
            }

            excelList      = JsonConvert.DeserializeObject <List <ExcelRow> >(File.ReadAllText(@"./Sheets/data.json"));
            excelListShort = excelList.Cast <ExcelRowShort>().ToList();

            PagedTable.PageIndex = 1;                  //Sets the Initial Index to a default value
            int[] recordsToShow = { 15, 30, 50, 100 }; //This Array can be any number groups

            foreach (int recordGroup in recordsToShow)
            {
                NumberOfRecords.Items.Add(recordGroup);                                      //Fill the ComboBox with the Array
            }
            NumberOfRecords.SelectedItem = 15;                                               //Initialize the ComboBox

            numberOfRecPerPage = Convert.ToInt32(NumberOfRecords.SelectedItem);              //Convert the Combobox Output to type int

            DataTable firstTable = PagedTable.SetPaging(excelListShort, numberOfRecPerPage); //Fill a DataTable with the First set based on the numberOfRecPerPage

            dataGrid.ItemsSource = firstTable.DefaultView;                                   //Fill the dataGrid with the DataTable created previously
            dataGrid.IsReadOnly  = true;                                                     //Makes dataGrid ReadOnly
        }
Esempio n. 3
0
        protected override DependencyObject CreateShell()
        {
            _shell = Container.Resolve <FileManagerWindow>();
            var windowManager = Container.Resolve <IWindowManager>();
            var sanityChecker = Container.Resolve <SanityCheckerViewModel>();

            sanityChecker.CheckAsync(SanityCheckCallback);
            return(_shell);
        }
Esempio n. 4
0
        private void ExcelManagerButton_Click(object sender, RoutedEventArgs e)
        {
            FileManagerWindow fmw = new FileManagerWindow();

            fmw.Show();
        }
Esempio n. 5
0
 public static void ShowFileManager(Form owner)
 {
     using FileManagerWindow fileManagerWindow = new FileManagerWindow();
     fileManagerWindow.ShowDialog(owner);
 }