Esempio n. 1
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            //throw new NotImplementedException();
            Console.WriteLine("DEBUG - DialogoMiCaminoVM - OnDialogOpened");
            string resumen = parameters.GetValue <string>("resumen");

            Message = parameters.GetValue <string>("message") + "  " + resumen;

            MiCamino miCamino = parameters.GetValue <MiCamino>("miCamino");

            etapas      = "";
            alturaLabel = 15;

            listaEtapas = miCamino.DameListaEtapas();
        }
Esempio n. 2
0
        public override void OnDialogOpened(IDialogParameters parameters)
        {
            if (parameters.ContainsKey("Value"))
            {
                SourceName     = parameters.GetValue <string>("SourceName");
                BaseLanguage   = parameters.GetValue <LanguageStruct>("Base");
                TargetLanguage = parameters.GetValue <LanguageStruct>("Target");

                var lang = parameters.GetValue <LanguageTextListDto>("Value");

                Key         = lang.Key;
                BaseValue   = lang.BaseValue;
                TargetValue = lang.TargetValue;
            }
        }
Esempio n. 3
0
        public override void OnDialogOpened(IDialogParameters parameters)
        {
            base.OnDialogOpened(parameters);

            OriginalImage = parameters?.GetValue <byte[]>(ParameterNames.SelectedImage);
            SelectedImage = new ImageParameter();
        }
        public void OnDialogOpened(IDialogParameters parameters)
        {
            if (parameters == null)
            {
                return;
            }

            Title   = parameters.GetValue <string>(DialogParameterKeys.Title);
            Message = parameters.GetValue <string>(DialogParameterKeys.Message);
            MsgDialogButtonType bType = parameters.GetValue <MsgDialogButtonType>(DialogParameterKeys.ButtonType);

            UpdateMsgBoxButtons(bType);
            MsgDialogType dialogType = parameters.GetValue <MsgDialogType>(DialogParameterKeys.DialogType);

            UpdateMsgDialogType(dialogType);
        }
        public void OnDialogOpened(IDialogParameters parameters)
        {
            Title = "Job Report";
            JDP   = parameters.GetValue <IJobDirectoryProvider>("JDP");

            Jobs = JDP.GetAllJobs();
        }
        public void OnDialogOpened(IDialogParameters parameters)
        {
            _logger.Info("Opened");

            if (parameters.GetValue <string>("Title") != null)
            {
                Title = parameters.GetValue <string>("Title");
            }

            if (parameters.GetValue <GameSettings>("GameSettings") != null)
            {
                _configurationManager = new ConfigurationManager <GameSettings>(parameters.GetValue <GameSettings>("GameSettings"));
            }

            RaisePropertyChanged(nameof(Settings));
        }
Esempio n. 7
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            var list = parameters.GetValue <List <BookIraModel> >("collection");

            Calculation = new CalculationModel
            {
                IznosSPdv            = list.Sum(x => x.IznosSPdv),
                OslobodjenoPdvEU     = list.Sum(x => x.OslobodjenoPdvEU),
                OslobodjenoPdvOstalo = list.Sum(x => x.OslobodjenoPdvOstalo),
                ProlaznaStavka       = list.Sum(x => x.ProlaznaStavka),
                PoreznaOsnovica0     = list.Sum(x => x.PoreznaOsnovica0),
                PoreznaOsnovica5     = list.Sum(x => x.PoreznaOsnovica5),
                PoreznaOsnovica10    = list.Sum(x => x.PoreznaOsnovica10),
                PoreznaOsnovica13    = list.Sum(x => x.PoreznaOsnovica13),
                PoreznaOsnovica23    = list.Sum(x => x.PoreznaOsnovica23),
                PoreznaOsnovica25    = list.Sum(x => x.PoreznaOsnovica25),
                Pdv5      = list.Sum(x => x.Pdv5),
                Pdv10     = list.Sum(x => x.Pdv10),
                Pdv13     = list.Sum(x => x.Pdv13),
                Pdv23     = list.Sum(x => x.Pdv23),
                Pdv25     = list.Sum(x => x.Pdv25),
                UkupniPdv = list.Sum(x => x.UkupniPdv)
            };
            Calculation.OsnovicaUkupno = Calculation.PoreznaOsnovica5
                                         + Calculation.PoreznaOsnovica13
                                         + Calculation.PoreznaOsnovica25;
        }
 public void OnDialogOpened(IDialogParameters parameters)
 {
     if (parameters.ContainsKey("Content"))
     {
         Content = parameters.GetValue <string>("Content");
     }
 }
        public void OnDialogOpened(IDialogParameters parameters)
        {
            var refPattern  = JsonSerializer.Deserialize <List <Point> >(parameters.GetValue <string>("patternA"));
            var movePattern = JsonSerializer.Deserialize <List <Point> >(parameters.GetValue <string>("patternB"));

            var centers = new List <Point>();

            for (var i = 1; i < refPattern.Count; i++)
            {
                centers.Add((Point)(refPattern[i] - movePattern[i]));
            }

            PlotModelPatternA.Series.Add(PlotModelHelper.CreateScatterSerie(centers));
            PlotModelPatternA.Series.Add(PlotModelHelper.CreateHotZone(centers[0], 1500, OxyColors.Red));
            PlotModelPatternA.InvalidatePlot(true);
        }
Esempio n. 10
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            var list = parameters.GetValue <List <BookUraRestModel> >("collection");

            Calculation = new CalculationModel
            {
                ZaUplatu          = list.Sum(x => x.ZaUplatu),
                PoreznaOsnovica0  = list.Sum(x => x.PoreznaOsnovica0),
                PoreznaOsnovica5  = list.Sum(x => x.PoreznaOsnovica5),
                PoreznaOsnovica10 = list.Sum(x => x.PoreznaOsnovica10),
                PoreznaOsnovica13 = list.Sum(x => x.PoreznaOsnovica13),
                PoreznaOsnovica23 = list.Sum(x => x.PoreznaOsnovica23),
                PoreznaOsnovica25 = list.Sum(x => x.PoreznaOsnovica25),
                PretporezT5       = list.Sum(x => x.PretporezT5),
                PretporezT10      = list.Sum(x => x.PretporezT10),
                PretporezT13      = list.Sum(x => x.PretporezT13),
                PretporezT23      = list.Sum(x => x.PretporezT23),
                PretporezT25      = list.Sum(x => x.PretporezT25),
                UkupniPretporez   = list.Sum(x => x.UkupniPretporez),
                IznosSPorezom     = list.Sum(x => x.IznosSPorezom)
            };
            Calculation.OsnovicaUkupno = Calculation.PoreznaOsnovica5
                                         + Calculation.PoreznaOsnovica13
                                         + Calculation.PoreznaOsnovica25;
        }
        protected override void PostDialogOpened(IDialogParameters pms)
        {
            entryVM = pms.GetValue <EntryViewModel>("Entry");
            RaisePropertyChanged("FileVisibility");
            RaisePropertyChanged("FolderVisibility");
            RaisePropertyChanged("Name");
            RaisePropertyChanged("Icon");
            RaisePropertyChanged("Type");
            RaisePropertyChanged("Size");
            RaisePropertyChanged("EntryPath");
            RaisePropertyChanged("HashedName");
            RaisePropertyChanged("FolderContains");

            IEntry entry = entryVM.Owner;

            if (entry is FileEntry)
            {
                var bundles = (entry as FileEntry).BundleEntries;
                foreach (var pair in bundles)
                {
                    var e = new PackageFileViewModel(pair.Value);
                    Bundles.Add(e);
                }
            }
        }
 public override void OnDialogOpened(IDialogParameters parameters)
 {
     if (parameters.ContainsKey("Value"))
     {
         AuditLog = parameters.GetValue <AuditLogListDto>("Value");
     }
 }
Esempio n. 13
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            ViewCTextBox = parameters.GetValue <string>(nameof(ViewCTextBox));

            //MyLabel = navigationContext.Parameters.GetValue<string>(nameof(MyLabel));
            //throw new NotImplementedException();
        }
Esempio n. 14
0
        /// <inheritdoc />
        public override void OnDialogOpened(IDialogParameters parameters)
        {
            var title = parameters.GetValue <string>(LoadedPluginsDialogParameterNames.Title);

            if (title != null)
            {
                Title = title;
            }
            var loadedPlugins = parameters.GetValue <IEnumerable <PluginViewModel> >(LoadedPluginsDialogParameterNames.LoadedPlugins);

            if (loadedPlugins != null)
            {
                LoadedPlugins.Clear();
                LoadedPlugins.AddRange(loadedPlugins);
            }
        }
Esempio n. 15
0
 public void OnDialogOpened(IDialogParameters parameters)
 {
     /* -------------------------------------------------------------
     *  이 창이 열릴 때 동작합니다. 파라미터를 받을 경우 여기서 받는다.
     *  ------------------------------------------------------------- */
     ViewCTextBox = parameters.GetValue <String>(nameof(ViewCTextBox));
 }
        public override void OnDialogOpened(IDialogParameters parameters)
        {
            if (parameters != null)
            {
                GraphInfo = parameters.GetValue <RoomLineGraphInfo>("model");

                if (parameters.TryGetValue("id", out int reportId))
                {
                    TemperatureGraphInfo = RoomLineGraphInfo.CreateDefault();
                    HumidityGraphInfo    = RoomLineGraphInfo.CreateDefault();
                    Task.Run(async() =>
                    {
                        var collection = await _roomRepository.FilterRooms(reportId, GraphInfo.ActiveDevice.Id);
                        if (collection.Count() > 0)
                        {
                            TemperatureGraphInfo = FillTemperatureModel(collection);
                            HumidityGraphInfo    = FillHumidityModel(collection);
                        }
                    });
                }

                Title = $"{GraphInfo?.ActiveDevice?.Nick} {GraphInfo?.ActiveDevice?.IPAddress}";
                InitializeAnnotations();
                SetSettings();
            }
        }
 public override void OnDialogOpened(IDialogParameters parameters)
 {
     base.OnDialogOpened(parameters);
     if (parameters.GetValue <IEnumerable <string> >(nameof(this.FileNames)) is IEnumerable <string> fileNames)
     {
         this.FileNames.AddRange(fileNames);
     }
     if (parameters.GetValue <string>(nameof(this.DiffSourcePath)) is string diffSourcePath)
     {
         this.DiffSourcePath.Value = diffSourcePath;
     }
     if (parameters.GetValue <string>(nameof(this.DiffDestinationPath)) is string diffDestinationPath)
     {
         this.DiffDestinationPath.Value = diffDestinationPath;
     }
 }
 public override void OnDialogOpened(IDialogParameters parameters)
 {
     if (parameters.ContainsKey("Value"))
     {
         var dynamicProperty = parameters.GetValue <DynamicPropertyDto>("Value");
         Model = Map <DynamicPropertyModel>(dynamicProperty);
     }
 }
Esempio n. 19
0
 public void OnDialogOpened(IDialogParameters parameters)
 {
     //to constants
     if (parameters.ContainsKey("SharePinCommand"))
     {
         QrCodeData = parameters.GetValue <string>("SharePinCommand");
     }
 }
Esempio n. 20
0
 public override void OnDialogOpened(IDialogParameters parameters)
 {
     base.OnDialogOpened(parameters);
     if (parameters.Keys.Contains("icon"))
     {
         IconSource = Helpers.ImageConverter.GerBitmapSource(parameters.GetValue <Icon>("icon"));
     }
 }
Esempio n. 21
0
 public void OnDialogOpened(IDialogParameters parameters)
 {
     MessageText = parameters.GetValue <string>("message");
     if (MessageText == null)
     {
         MessageText = "Da li ste sigurni da želite brisati podatke?";
     }
 }
Esempio n. 22
0
        public override void OnDialogOpened(IDialogParameters parameters)
        {
            if (parameters.ContainsKey("Value"))
            {
                Input = parameters.GetValue <OrganizationListModel>("Value");
            }
            else
            {
                IsNewOrganization = true;
                Input             = new OrganizationListModel();
            }

            if (parameters.ContainsKey("ParentId"))
            {
                ParentId = parameters.GetValue <long>("ParentId");
            }
        }
 public void OnDialogOpened(IDialogParameters parameters)
 {
     StartDate    = parameters.GetValue <DateTime>("dolazak");
     EndDate      = StartDate.Date.AddDays(2);
     DateChanged += CreateNewReservationDialogViewModel_OnDateChanged;
     Initialize  += CreateNewReservationDialogViewModel_Initialize;
     OnInitialize();
 }
Esempio n. 24
0
        public virtual void OnDialogOpened(IDialogParameters parameters)
        {
            var path = parameters.GetValue <string>("path");

            System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(path);
            _files = dir.GetFiles();
            RaisePropertyChanged(nameof(Files));
        }
Esempio n. 25
0
 public override void OnDialogOpened(IDialogParameters parameters)
 {
     if (parameters.ContainsKey("Value"))
     {
         var flatPermissions = parameters.GetValue <ListResultDto <FlatPermissionWithLevelDto> >("Value");
         var permissions     = flatPermissions.Items.Select(t => t as FlatPermissionDto).ToList();
         treesService.CreatePermissionTrees(permissions, new List <string>());
     }
 }
Esempio n. 26
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            SolidColorBrush brush = parameters.GetValue <SolidColorBrush>(nameof(ColorPicker.SelectedBrush));

            if (brush != null)
            {
                _picker.SelectedBrush = brush;
            }
        }
Esempio n. 27
0
        public static void ShowOpenDialog(this IDialogService service, IDialogParameters parameters, Action <IDialogResult> callback)
        {
            var openDialog = new OpenFileDialog
            {
                Title         = parameters.GetValue <string>(Dialog.Title),
                Filter        = parameters.GetValue <string>(Dialog.File.Filter),
                ValidateNames = true
            };

            var dialogResult = new DialogResult(openDialog.ShowDialog());

            if (dialogResult.Result.GetValueOrDefault())
            {
                dialogResult.Parameters.Add(Dialog.File.Target, openDialog.FileName);
            }

            callback?.Invoke(dialogResult);
        }
Esempio n. 28
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            ConfigVcselDriverReply reply = parameters.GetValue <ConfigVcselDriverReply>("ConfigVcselDriverReply");

            MaxIBias = (UInt32)(Math.Round(reply.MaxIBiasMicroAmp / 1000.0 / TickFrequency) * TickFrequency);
            MaxISw   = (UInt32)(Math.Round(reply.MaxISwitchMicroAmp / 1000.0 / TickFrequency) * TickFrequency);
            IBias    = (UInt32)(Math.Round(reply.IBiasMicroAmp / 1000.0 / TickFrequency) * TickFrequency);
            ISw      = (UInt32)(Math.Round(reply.ISwitchMicroAmp / 1000.0 / TickFrequency) * TickFrequency);
        }
Esempio n. 29
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            var messageId = parameters.GetValue <int>(MailParameters.MessageId);

            if (messageId != 0)
            {
                Message = MailService.GetMessage(messageId);
            }
        }
Esempio n. 30
0
        public void OnDialogOpened(IDialogParameters parameters)
        {
            var param = parameters.Count > 0 ? parameters.GetValue<string>(parameters.Keys.First()) : null;
            this.packageInstallLocation = param;

#pragma warning disable 4014
            this.CurrentVolume.Load(this.GetCurrentVolume(param));
#pragma warning restore 4014
        }