Пример #1
0
        public FirmwaresConfig(
            IDialogController dialogController,
            FirmwareManager firmwareManager,
            IDictionary <string, string> firmwareUserSpecifications,
            PathEntryCollection pathEntries,
            bool retryLoadRom    = false,
            string reloadRomPath = null)
        {
            _firmwareUserSpecifications = firmwareUserSpecifications;
            _pathEntries     = pathEntries;
            DialogController = dialogController;
            Manager          = firmwareManager;

            InitializeComponent();

            tbbGroup.Image
                          = tbbScan.Image
                          = tbbOrganize.Image
                          = tbbImport.Image
                          = tbbClose.Image
                          = tbbCloseReload.Image
                          = tbbOpenFolder.Image = Properties.Resources.Placeholder;

            // prep ImageList for ListView
            foreach (var kvp in StatusIcons.OrderBy(static kvp => kvp.Key))
        public TestSavedRequestDialog(IDialogController controller)
            : base(new TestSavedRequestDialogService(), controller)
        {
            var validationDialog = new ValidationDisplayDialog(this);

            SubDialogs = SubDialogs.Union(new[] { validationDialog }).ToArray();
        }
Пример #3
0
 public static bool ShowMessageBox2(
     this IDialogController dialogController,
     string text,
     string?caption   = null,
     EMsgBoxIcon?icon = null,
     bool useOKCancel = false)
 => dialogController.ShowMessageBox2(owner: null, text: text, caption: caption, icon: icon, useOKCancel: useOKCancel);
Пример #4
0
    public static DialogView Create(IDialogController controller, string name, List <DialogRecord> topics, IList <CharacterService> services, float disposition)
    {
        // Display the Npc's name
        var instance = Instantiate(UIManager.DialogUI);

        instance.controller = controller;

        instance.title.text = name;
        instance.chargeUI.Initialize(disposition, 100);

        // Display the services
        foreach (var service in services)
        {
            var clone = Instantiate(instance.topicPrefab, instance.servicesParent);
            clone.Initialize(service.ServiceName, () => controller.DisplayService(service));
        }

        // Display the current topics
        instance.currentTopics = topics;
        var sortedTopics = topics.OrderBy(topic => topic.name);

        foreach (var topic in sortedTopics)
        {
            var clone = Instantiate(instance.topicPrefab, instance.topicsParent);
            clone.Initialize(topic.name, () => controller.DisplayTopic(topic));
        }

        return(instance);
    }
Пример #5
0
        public CustomisationImportDialog(XrmCustomisationImportService service, IDialogController dialogController, XrmRecordService lookupService)
            : base(service, dialogController, lookupService)
        {
            var validationDialog = new CustomisationImportValidationDialog(this, Request);

            SubDialogs = SubDialogs.Union(new[] { validationDialog }).ToArray();
        }
        public ImportRecordsDialog(ImportRecordsService service, IDialogController dialogController)
            : base(service, dialogController)
        {
            var validationDialog = new ImportXmlValidationDialog(this, Request);

            SubDialogs = SubDialogs.Union(new[] { validationDialog }).ToArray();
        }
Пример #7
0
 public UpdateAssemblyDialog(IDialogController dialogController, IVisualStudioService visualStudioService, XrmRecordService xrmRecordService, XrmPackageSettings packageSettings)
     : base(dialogController)
 {
     VisualStudioService = visualStudioService;
     Service             = xrmRecordService;
     PackageSettings     = packageSettings;
 }
Пример #8
0
 protected DialogViewModel(IDialogController controller)
     : base(controller.ApplicationController)
 {
     Controller            = controller;
     Controller.MainDialog = this;
     OnCancel = Controller.Close;
 }
Пример #9
0
 public BatchRun(IDialogController dialogController, Config config, Func <CoreComm> createCoreComm)
 {
     _config          = config;
     _createCoreComm  = createCoreComm;
     DialogController = dialogController;
     InitializeComponent();
 }
Пример #10
0
 public SynclessRecordingTools(Config config, IGameInfo game, IDialogController dialogController)
 {
     _config          = config;
     DialogController = dialogController;
     _game            = game;
     InitializeComponent();
 }
Пример #11
0
 private GBPrefs(IDialogController dialogController)
 {
     DialogController = dialogController;
     InitializeComponent();
     gbPrefControl1.DialogParent = this;
     Icon = Properties.Resources.GambatteIcon;
 }
 public ManagePluginTriggersDialog(ManagePluginTriggersService service, IDialogController dialogController, IVisualStudioService visualStudioService, XrmRecordService xrmRecordService, XrmPackageSettings packageSettings)
     : base(service, dialogController, lookupService: xrmRecordService, nextButtonLabel: "Save")
 {
     PackageSettings     = packageSettings;
     VisualStudioService = visualStudioService;
     XrmRecordService    = xrmRecordService;
 }
Пример #13
0
 public SoundConfig(IDialogController dialogController, Config config, Func <ESoundOutputMethod, IEnumerable <string> > getDeviceNamesCallback)
 {
     _config = config;
     _getDeviceNamesCallback = getDeviceNamesCallback;
     DialogController        = dialogController;
     InitializeComponent();
 }
        public AutonumberDialog(XrmRecordService xrmRecordService, IDialogController dialogController)
            : base(dialogController)
        {
            XrmRecordService = xrmRecordService;

            OverideCompletionScreenMethod = () => { };
        }
Пример #15
0
    void Initialize()
    {
        foreach (var screen in settings.screensPrefabs)
        {
            var screenInstance   = Instantiate(screen);
            var screenController = screenInstance.GetComponent <IScreenController>();
            if (screenController != null)
            {
                IDialogController dialog = screenController as IDialogController;
                if (dialog != null)
                {
                    dialogLayer.RegisterScreen(screen.name, dialog, screenInstance.transform);

                    continue;
                }

                IPanelController panel = screenController as IPanelController;
                if (panel != null)
                {
                    panelLayer.RegisterScreen(screen.name, panel, screenInstance.transform);
                }
            }
        }
        UIManagerSetEmitter.EmitEvent();
    }
Пример #16
0
        public MainChartViewModel(IForecastProvider forecastProvider, IDialogController dialogController,
                                  ICsvFileCreator csvFileCreator, IDateFormater dateFormater, TimeSpan timeSpan)
        {
            //Один шаг зума увеличивает на 0,8 текущего диапозона, отсчитаем 3 зума назад
            _startScale    = Math.Round(RangeMaxScale / 1.8 / 1.8, 3);
            _timeSpanTicks = timeSpan.Ticks;

            IsDataSated       = false;
            _dialogController = dialogController;
            _csvFileCreator   = csvFileCreator;

            _forecastProvider = forecastProvider;
            _forecastProvider.OnForecastUpdated    += OnForecastUpdated;
            _forecastProvider.OnConnectionLost     += OnConnectionLosted;
            _forecastProvider.OnConnectionRestored += OnConnectionRestored;

            dateFormatter       = dateFormater.DateFormatter;
            simpleDateFormatter = dateFormater.SimpleDateFormatter;


            ForecastMapper = Mappers.Xy <Forecast>()
                             .X(item => item.ForecastTime.Ticks)
                             .Y(item => item.IsForecast ? item.ForecastPower : Double.NaN);
            MeasurementsMapper = Mappers.Xy <Forecast>()
                                 .X(item => item.ForecastTime.Ticks)
                                 .Y(item => !item.IsForecast ? item.ForecastPower : item.ForecastPower);
            AllDataMapper = Mappers.Xy <Forecast>()
                            .X(item => item.ForecastTime.Ticks)
                            .Y(item => item.ForecastPower);
        }
 public DeployAssemblyDialog(DeployAssemblyService service, IDialogController dialogController, IVisualStudioService visualStudioService, XrmRecordService xrmRecordService, XrmPackageSettings packageSettings)
     : base(service, dialogController, null, nextButtonLabel: "Deploy")
 {
     VisualStudioService = visualStudioService;
     PackageSettings     = packageSettings;
     XrmRecordService    = xrmRecordService;
 }
Пример #18
0
 public ViewSqlRecordDialog(ISqlRecordMetadataService recordService, IDialogController dialogController, string type, string id, Action onCancel)
     : base(dialogController)
 {
     OnCancel      = onCancel;
     Id            = id;
     Type          = type;
     RecordService = recordService;
 }
Пример #19
0
 public EditSubtitlesForm(IDialogController dialogController, IMovie movie, bool readOnly)
 {
     _selectedMovie   = movie;
     _readOnly        = readOnly;
     DialogController = dialogController;
     InitializeComponent();
     Icon = Properties.Resources.TAStudioIcon;
 }
        /// <summary>
        /// this one internal so the navigation resolver doesnt use it
        /// </summary>
        internal XrmPackageSettingsDialog(IDialogController dialogController, XrmPackageSettings objectToEnter, IVisualStudioService visualStudioService, XrmRecordService xrmRecordService, string saveButtonLabel)
            : base(dialogController, xrmRecordService, objectToEnter, saveButtonLabel : saveButtonLabel)
        {
            XrmRecordService    = xrmRecordService;
            VisualStudioService = visualStudioService;

            AddRedirectToConnectionEntryIfNotConnected(visualStudioService);
        }
Пример #21
0
        public ImportCsvsDialog(ImportCsvsService service,
                                IDialogController dialogController, XrmRecordService lookupService)
            : base(service, dialogController, lookupService, nextButtonLabel: "Import")
        {
            var validationDialog = new ImportCsvsValidationDialog(this, Request);

            SubDialogs = SubDialogs.Union(new[] { validationDialog }).ToArray();
        }
Пример #22
0
 private ColorChooserForm(IDialogController dialogController, Config config, IGameInfo game)
 {
     _config          = config;
     _game            = game;
     DialogController = dialogController;
     InitializeComponent();
     Icon = Properties.Resources.GambatteIcon;
 }
Пример #23
0
        public static T DoWithTempMute <T>(this IDialogController dialogController, Func <T> action)
        {
            dialogController.StopSound();
            var ret = action();

            dialogController.StartSound();
            return(ret);
        }
Пример #24
0
        public ImportExcelDialog(ImportExcelService service,
                                 IDialogController dialogController, XrmRecordService lookupService)
            : base(service, dialogController, lookupService)
        {
            var validationDialog = new ImportExcelValidationDialog(this, Request);

            SubDialogs = SubDialogs.Union(new[] { validationDialog }).ToArray();
        }
 public ZxSpectrumJoystickSettings(IDialogController dialogController, ISettingsAdapter settable)
 {
     _settable        = settable;
     _syncSettings    = (ZXSpectrum.ZXSpectrumSyncSettings)_settable.GetSyncSettings();
     DialogController = dialogController;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
        public AppXrmConnectionEntryDialog(IDialogController applicationController)
            :       base(applicationController)
        {
            ObjectToEnter = new SavedXrmRecordConfiguration();
            var configEntryDialog = new ObjectEntryDialog(ObjectToEnter, this, ApplicationController, saveButtonLabel: "Next");

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
Пример #27
0
 public CrudDialog(IDialogController dialogController, IRecordService recordService)
     : base(dialogController)
 {
     RecordService = recordService;
     //this is so that the completion screen isnt loaded when the dialog completes
     //this dialog just loads the query into the ui and does not have a 'completion'
     OverideCompletionScreenMethod = () => { };
 }
 public AddScheduleDetailsDialog(int contractNo)
 {
     InitializeComponent();
     _controller                    = new AddSchedulDetailsController(contractNo);
     _controller.CloseDialog       += OnCloseDialog;
     DataContext                    = _controller;
     dgDetails.InitializingNewItem += dgDetails_InitializingNewItem;
 }
Пример #29
0
        public XrmSettingsDialog(IDialogController dialogController)
            : base(dialogController)
        {
            SettingsObject = new EncryptedXrmConfiguration();
            var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, null,
                                                          null);

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
        public PageContentItem(string name, object content, IDialogController dialogController, StackPanel contextElements)
        {
            IsActive = true;
            Name     = name;
            Content  = content;

            DialogController = dialogController;
            ContextElements  = contextElements;
        }
Пример #31
0
        public SscOperations(ISsmsOperations ssmsOperations,
            ApplicationDispatcher dispatcher, 
            ICredentialsManager credentialsManager,
            IDialogController dialogController,
            SscEndpoints sscEndpoints,
            IFavoriteScriptsStore favoriteStore)
        {
            m_SsmsOperations = ssmsOperations;
            m_Dispatcher = dispatcher;
            m_CredentialsManager = credentialsManager;
            m_DialogController = dialogController;
            m_SscEndpoints = sscEndpoints;
            m_FavoriteStore = favoriteStore;

            #if DEBUG
            //Trust all SSL issues when debugging. Obviously this is terrible as we are now susceptible to MITM attacks.
            ServicePointManager.ServerCertificateValidationCallback =
                ((sender, certificate, chain, sslPolicyErrors) => true);
            #endif
        }