Beispiel #1
0
 public ProfileController(EmailSender emailSender, SettingsKeeper settingsKeeper, SignInManager <IdentityUser <int> > signInManager, UserManager <IdentityUser <int> > userManager)
 {
     _emailSender    = emailSender;
     _settingsKeeper = settingsKeeper;
     _signInManager  = signInManager;
     _userManager    = userManager;
 }
Beispiel #2
0
 public HomeController(IWebHostEnvironment webHostEnvironment, EmailSender emailSender, NaniWebContext naniWebContext, ReCaptcha reCaptcha, SettingsKeeper settingsKeeper)
 {
     _webHostEnvironment = webHostEnvironment;
     _emailSender        = emailSender;
     _naniWebContext     = naniWebContext;
     _reCaptcha          = reCaptcha;
     _settingsKeeper     = settingsKeeper;
 }
Beispiel #3
0
 public OthersController(IWebHostEnvironment webHostEnvironment, NaniWebContext naniWebContext, SettingsKeeper settingsKeeper, SignInManager <IdentityUser <int> > signInManager, UserManager <IdentityUser <int> > userManager)
 {
     _webHostEnvironment = webHostEnvironment;
     _naniWebContext     = naniWebContext;
     _settingsKeeper     = settingsKeeper;
     _signInManager      = signInManager;
     _userManager        = userManager;
 }
 public ChapterManagerController(DiscordBot discordBot, FirebaseCloudMessaging firebaseCloudMessaging, IWebHostEnvironment webHostEnvironment, MangadexUploader mangadexUploader, NaniWebContext naniWebContext,
                                 RedditPoster redditPoster, SettingsKeeper settingsKeeper)
 {
     _discordBot             = discordBot;
     _firebaseCloudMessaging = firebaseCloudMessaging;
     _webHostEnvironment     = webHostEnvironment;
     _mangadexUploader       = mangadexUploader;
     _naniWebContext         = naniWebContext;
     _redditPoster           = redditPoster;
     _settingsKeeper         = settingsKeeper;
 }
        public AddComputerToDomain()
        {
            serverConnectSettings = new SettingsKeeper();
            cmsconnector          = new CMSConnector(serverConnectSettings.Api_key, serverConnectSettings.Server_name);
            InitializeComponent();
            List <ClientClass> clients = cmsconnector.GetDomainClients();

            if (clients != null)
            {
                chooseClientCombobox.Items.AddRange(clients.ToArray());
            }
        }
Beispiel #6
0
        //#####################################################################################################
        //Основная точка входа -------------------------------------------------------------------------------!
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //Создаем модель
            Model = new StackerModel();

            //инициализируем менеджер заявок
            OrderManager = Model.OrderManager;
            //Определяем его источником данных для списка
            OrdersLitsView.ItemsSource = OrderManager.Orders;

            //инициализируем хранилище настроек
            Settings = Model.Settings;

            //Настраиваем вид списка заявок
            ListViewSetUp();
            //Настраиваем визуальные компоненты
            SetUpComponents();

            if (Model.IsConnected)
            {
                //подписываемся на события модели
                Model.CraneState.CommandDone      += CommandDone;
                Model.CraneState.ErrorAppeared    += ErrorAppeared;
                Model.CraneState.CoordinateReaded += UpdateCoordinate;
                Model.CraneState.StateWordChanged += SomethingChanged;
                //источник данных для списка ошибок
                ErrorListBox.ItemsSource = Model.CraneState.ErrorList;
                //проверяем при старте наличие ящика на платформе и устанавливаем активные кнопки
                bool isBin = Model.Crane.ChekBinOnPlatform();
                TakeAwaySemiAutoButton.IsEnabled = isBin;
                BringSemiAutoButton.IsEnabled    = !isBin;
                BringAutoButton.IsEnabled        = !isBin;
            }
            else if (!Settings.CloseOrInform)
            {
                Application.Current.Shutdown(-1);
            }
            //прописываем обработчики для кнопок
            SetEventHandlers();
            OrderManager.Orders.CollectionChanged += OrdersCollectionChanged;
            OrderManager.StartTimer();
        }
Beispiel #7
0
 public SettingsManagerController(IWebHostEnvironment webHostEnvironment, SettingsKeeper settingsKeeper)
 {
     _webHostEnvironment = webHostEnvironment;
     _settingsKeeper     = settingsKeeper;
 }