public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    BatchList listA = BatchList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            case molAction.Unlock:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                break;

            case molAction.Delete:
                if (ActiveItem == null)
                {
                    return;
                }
                List.RemoveItem(ActiveOID);
                if (FilterType == IFilterType.Filter)
                {
                    BatchList listD = BatchList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
 public void ActivateFeatures()
 {
     if (ActiveItem != null && SelectedLocation != null)
     {
         var vm = new DetailViewModel(
             string.Format("{0}: {1}", ActiveItem.GetType().Name, ActiveItem.DisplayName),
             ActiveItem.GetAsPropertyList()
             );
         var message = new OpenWindow(vm);
         eventAggregator.BeginPublishOnUIThread(message);
     }
     else
     {
     }
 }
        public void Handle(ActivateScreen message)
        {
            if (ActiveItem.GetType() == message.Screen.GetType())
            {
                return;
            }

            if (ActiveItem != mainViewModel)
            {
                DeactivateItem(ActiveItem, true);
            }

            Items.Add(message.Screen);
            ActivateItem(message.Screen);
        }
        public void OpenFamilyMemberTree()
        {
            OpenFamilyMemberTreeVisible  = false;
            CloseFamilyMemberTreeVisible = true;
            FamilyMemberMenuVisible      = true;

            if (ActiveItem != null)
            {
                if (ActiveItem.GetType() != typeof(FamilyMemberTreeViewModel))
                {
                    ActiveItem.TryClose();
                }
            }
            ActivateItem(new FamilyMemberTreeViewModel());
        }
Example #5
0
        public void Handle(Screen message)
        {
            Logger.Debug(String.Format("Showing screen [Type: {0}]", message.GetType()));

            if (ActiveItem != null)
            {
                Logger.Debug(String.Format("Deactivating screen [Type: {0}]", ActiveItem.GetType()));
                DeactivateItem(ActiveItem, true);
            }

            Logger.Debug(String.Format("Activating screen [Type: {0}]", message.GetType()));

            ActivateItem(message);

            Logger.Debug(String.Format("Active screen is [Type: {0}]", ActiveItem.GetType()));
        }
Example #6
0
        public async Task Next()
        {
            if (ActiveItem == null || !ActiveItem.Validate())
            {
                return;
            }

            IsBusy = true;

            if (await ActiveItem?.Next() is IStepsScreen next)
            {
                ActivateItem(next);
            }

            IsBusy = false;
        }
 public virtual bool Drop(ActiveItem item)
 {
     if (active1 == item)
     {
         item.OnDrop(this);
         active1 = null;
         return(true);
     }
     else if (active2 == item)
     {
         item.OnDrop(this);
         active2 = null;
         return(true);
     }
     return(false);
 }
Example #8
0
        public void OpenStudentList1()
        {
            OpenStudentList1Visible = false;
            OpenStudentList2Visible = true;
            CloseStudentListVisible = true;
            StudentMenuVisible      = true;

            if (ActiveItem != null)
            {
                if (ActiveItem.GetType() != typeof(StudentListViewModel))
                {
                    ActiveItem.TryClose();
                }
            }
            ActivateItem(new StudentListViewModel());
        }
        private void Tabla_SelectionChanged(object sender, EventArgs e)
        {
            if (ActiveItem != null)
            {
                if (ActiveItem.Respuestas.Count == 0)
                {
                    ActiveItem.LoadRespuestas();
                }
                Datos_Respuestas.DataSource = ActiveItem.Respuestas;
            }

            foreach (DataGridViewRow row in Respuestas_Grid.Rows)
            {
                row.DefaultCellStyle.BackColor = System.Drawing.Color.LightBlue;
            }
        }
Example #10
0
        public void Restore()
        {
            ActiveItem.Deleted = false;

            if (Context.SaveChanges() > 0)
            {
                ActiveItem.NotifyAll();

                Dialog.ShowAsync("Restore Successful", "This item has been marked as restored.");
            }
            else
            {
                Dialog.ShowAsync("Error", "An error has occurred upon attempting to restore the item.");
            }

            NotifyAll();
        }
        public DataBindingConditionViewModel(DataBindingCondition <TLayerProperty, TProperty> dataBindingCondition,
                                             IProfileEditorService profileEditorService,
                                             IDataModelConditionsVmFactory dataModelConditionsVmFactory,
                                             IDataModelUIService dataModelUIService)
        {
            _profileEditorService = profileEditorService;
            DataBindingCondition  = dataBindingCondition;

            ActiveItem             = dataModelConditionsVmFactory.DataModelConditionGroupViewModel(DataBindingCondition.Condition, false);
            ActiveItem.IsRootGroup = true;
            ActiveItem.Update();
            ActiveItem.Updated += ActiveItemOnUpdated;

            ValueViewModel = dataModelUIService.GetStaticInputViewModel(typeof(TProperty), null);
            ValueViewModel.ValueUpdated += ValueViewModelOnValueUpdated;
            ValueViewModel.Value         = DataBindingCondition.Value;
        }
Example #12
0
        // when the 'buy' button is clicked buy a item from a list then remove it
        private void Btn_Buy_Click(object sender, EventArgs e)
        {
            PassiveItem passiveItem = listbox_PassiveItems.SelectedItem as PassiveItem;
            ActiveItem  activeItem  = listBox1.SelectedItem as ActiveItem;
            double      clicks      = double.Parse(lbl_clickValue.Text);

            // if an active item is selected do the following
            if (listBox1.SelectedItem != null)
            {
                double cost = activeItem.Cost;
                increase            = activeItem.ClickValueIncrease;
                lbl_clickValue.Text = (clicks - cost).ToString("#");

                lblDescription.Text = string.Format("Your {0} click purchase\n now makes each click worth\n {1} clicks!", cost, increase);
                listBox1.Items.Remove(listBox1.SelectedItem);
                listBox1.ClearSelected();
            }
            //if a passive item is second do the following
            if (listbox_PassiveItems.SelectedItem != null)
            {
                double cost      = passiveItem.Cost;
                double increment = passiveItem.PassiveClicks;
                lbl_clickValue.Text = (clicks - cost).ToString("#");
                lblDescription.Text = string.Format("You now have a passive income of\n {0} clicks per second!", increment);


                System.Timers.Timer timer1 = new System.Timers.Timer(1000);
                timer1.Elapsed  += new ElapsedEventHandler(TimerEventProcessor);
                timer1.Enabled   = true;
                timer1.AutoReset = true;
                timer1.Start();
                timer1.SynchronizingObject = this;
                void  TimerEventProcessor(object send, ElapsedEventArgs a)
                {
                    if (lbl_clickValue.Text == "")
                    {
                        lbl_clickValue.Text = "0";
                    }
                    lbl_clickValue.Text = (double.Parse(lbl_clickValue.Text) + increment).ToString();
                }

                listbox_PassiveItems.Items.Remove(listbox_PassiveItems.SelectedItem);
                listbox_PassiveItems.ClearSelected();
            }
        }
Example #13
0
        public void Stop()
        {
            if (_thread != null && _thread.IsAlive)
            {
                try
                { _thread.Abort(); }
                catch { }
                _thread = null;
            }
            _currentMode = ModeCategory.Stoped;

            SetButtonsEnable();
            ActiveItem.ResetCanvas();
            IsSortCategoriesEnabled = true;

            ConsoleContent = "画布已重置。";
            (GetView() as PUWindow).ResizeMode = ResizeMode.CanResize;
        }
Example #14
0
 private void checkMouseInput()
 {
     if (m_ActiveItem != null && m_ActiveItem.Bounds.Contains(InputManager.MouseState.X, InputManager.MouseState.Y))
     {
         if (InputManager.ButtonPressed(eInputButtons.Left))
         {
             ActiveItem.RunPressedOnItem();
         }
         else if (InputManager.ButtonPressed(eInputButtons.Right) || InputManager.ScrollWheelDelta > 0)
         {
             ActiveItem.RunPgUpPressedOnItem();
         }
         else if (InputManager.ScrollWheelDelta < 0)
         {
             ActiveItem.RunPgDownPressedOnItem();
         }
     }
 }
Example #15
0
        private void InitRipple(ActiveItem Context)
        {
            _RippleDraw = DrawNothing;
            RingText    = Context.Name;
            // RingText = "The quick Brown Fox Jumps Over the Lazy dog";

            if (Context is BookBannerItem)
            {
                BindItem = ( BookBannerItem )Context;

                if (BindItem.BannerExist)
                {
                    CoverUri = BindItem.UriSource;
                }

                BindItem.PropertyChanged += BindItem_PropertyChanged;
            }
        }
    private void ActivateItem()
    {
        if (PlayerStatus.Incapacitated || !inventoryUI.gameObject.activeInHierarchy)
            return;

        ActiveItem toActivate = null;

        if (Input.GetKeyDown(KeyCode.Alpha1))
            toActivate = items[0] as ActiveItem;
        if (Input.GetKeyDown(KeyCode.Alpha2))
            toActivate = items[1] as ActiveItem;
        if (Input.GetKeyDown(KeyCode.Alpha3))
            toActivate = items[2] as ActiveItem;
        if (Input.GetKeyDown(KeyCode.Alpha4))
            toActivate = items[3] as ActiveItem;

        toActivate?.Activate();
    }
Example #17
0
        public bool NextContainer(UnityAction onComplete)
        {
            if (ActiveItem == null)
            {
                return(false);
            }
            ActiveItem.RecordReactInfo(this);

            if (reactTuple.Count > 0)
            {
                Tuple <IInOutItem, int, string> item = reactTuple.Dequeue();
                activeItem = item.Element1;
                activeItem.FunctionIn(item.Element2, item.Element3, onComplete);
                return(true);
            }

            return(false);
        }
Example #18
0
        private void CopyClients(string Year, string TenClient)
        {
            string Working = sWFX32 + "\\Client";
            string ActiveItem;

            if (!Directory.Exists(TenClient))
            {
                Directory.CreateDirectory(TenClient);
            }
            //only proceed if WFX32\Client folder exists
            if (Directory.Exists(Working))
            {
                string destination;
                foreach (string d in Directory.GetDirectories(Working))
                {
                    //get folder name from full path to folder
                    ActiveItem = d.Substring(d.LastIndexOf('\\') + 1);
                    if (ActiveItem.StartsWith(Year))
                    {
                        destination = TenClient + "\\" + ActiveItem;
                        //If destination directory exists, copy all files from source folder using MoveSubDirecotry method
                        if (Directory.Exists(destination))
                        {
                            MoveSubdirectory(d, destination);
                        }
                        else
                        {
                            Directory.Move(d, destination);
                        }
                    }
                }
                //Get all files in Client folder with extension ".C00"
                foreach (string f in Directory.GetFiles(Working, "*.C00"))
                {
                    ActiveItem = f.Substring(f.LastIndexOf('\\'));
                    ActiveItem = TenClient + ActiveItem;
                    //do not overwrite files from previous archival attempts
                    if (!File.Exists(ActiveItem))
                    {
                        File.Copy(f, ActiveItem);
                    }
                }
            }
        }
 private void RefreshDataCore()
 {
     Application.Current.Dispatcher.BeginInvoke((Action)(() =>
     {
         if (this.needRefresh)
         {
             this.needRefresh = false;
             var ticket = this.Busy.GetTicket();
             var expr = this.GetGamesFilterExpression();
             var expr2 = this.GetArenasFilterExpression();
             Task.Run(
                 () =>
             {
                 ActiveItem.RefreshData(expr, expr2);
                 ticket.Dispose();
             });
         }
     }), DispatcherPriority.ContextIdle);
 }
Example #20
0
        /// <summary>
        /// Изменение выделения аккаунта в списке
        /// </summary>
        public void SelectionChanged()
        {
            ActiveItem?.TryClose();

            if (_selectedAccount == null)
            {
                return;
            }

            ActiveItem = _selectedAccount.Name == CreatingName
                                ? new EditableViewModel(new Account(), EditingState.CREATING)
                                : new EditableViewModel(new Account
            {
                AccountId = _selectedAccount.AccountId,
                Name      = _selectedAccount.Name,
                Email     = _selectedAccount.Email,
                Password  = _selectedAccount.Password
            }, EditingState.EDITING);
        }
 /// <summary>
 /// Сменить активную модель представления
 /// </summary>
 /// <param name="vm">Модель представления</param>
 /// <param name="episode">Эпизод (по умолч. null)</param>
 public void ChangeActiveItem(Screen vm, Episode episode = null)
 {
     if (vm is EpisodeEditingViewModel)
     {
         if (episode == null)
         {
             return;
         }
         ESVM.ResetSelectedEpisode(episode);
     }
     else
     {
         if (ActiveItem != null && ActiveItem.IsActive)
         {
             ActiveItem.TryClose();
         }
         ActiveItem = vm;
     }
 }
Example #22
0
        //清除画布
        public void Clear()
        {
            if (_thread != null)
            {
                if (_thread.IsAlive && _thread.ThreadState == ThreadState.Suspended)
                {
                    _thread.Resume();
                }
                _thread.Abort();
            }
            _currentData = null;
            _currentMode = ModeCategory.Stoped;

            InputDataString = "";
            ActiveItem.ClearCanvas();
            SetButtonsEnable();
            IsSortCategoriesEnabled            = true;
            (GetView() as PUWindow).ResizeMode = ResizeMode.CanResize;
        }
        public void ActivateItem(object item)
        {
            ActiveItem = item as IScreen;

            var child = ActiveItem as IChild;

            if (child != null)
            {
                child.Parent = this;
            }

            if (ActiveItem != null)
            {
                ActiveItem.Activate();
            }

            NotifyOfPropertyChange(() => ActiveItem);
            OnActivationProcessed(ActiveItem, true);
        }
        private async void Update()
        {
            if (IsBusy)
            {
                return;
            }

            var filter = Filters.ActiveItem.Model;

            IsBusy = true;
            try
            {
                await ActiveItem.Update(filter);
            }

            finally
            {
                IsBusy = false;
            }
        }
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
            case molAction.Copy:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    PaymentList listA = PaymentList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.ChangeStateContabilizado:
            case molAction.ChangeStateAnulado:
            case molAction.Unlock:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                break;

            case molAction.Delete:
                break;
            }

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
Example #26
0
    private void LateUpdate()
    {
        ActiveItem activeItem = Item as ActiveItem;

        // Active Indicator
        activeIndicator.SetActive(activeItem.IsActive);

        // Cooldown Indicator
        if (!activeItem.CooldownTimer.IsEnded && !activeItem.IsActive)
        {
            cooldownIndicator.SetActive(true);
            cooldownFill.Value = 1 - (activeItem.CooldownTimer.CurTime / activeItem.CooldownTimer.EndTime);

            float cooldown = activeItem.CooldownTimer.EndTime - activeItem.CooldownTimer.CurTime;
            cooldownTime.text = (cooldown >= 2) ? cooldown.ToString("0") : cooldown.ToString("0.0");
        }
        else
        {
            cooldownIndicator.SetActive(false);
        }
    }
Example #27
0
        protected void ItemSetUp()
        {
            DraftItem = CreateAndSave();

            ActiveItem = DomainRepository <T> .AddNew();

            ActiveItem.Publish();
            SaveItem(ActiveItem);

            ArchivedItem = DomainRepository <T> .AddNew();

            ArchivedItem.Publish();
            ArchivedItem.Archive();
            SaveItem(ArchivedItem);

            ActiveDeletedItem = DomainRepository <T> .AddNew();

            ActiveDeletedItem.Publish();
            With.Transaction(delegate
            {
                DomainRepository <T> .Delete(ActiveDeletedItem);
            });

            ArchivedDeletedItem = DomainRepository <T> .AddNew();

            ArchivedDeletedItem.Publish();
            ArchivedDeletedItem.Archive();
            With.Transaction(delegate
            {
                DomainRepository <T> .Delete(ArchivedDeletedItem);
            });


            DraftDeletedItem = DomainRepository <T> .AddNew();

            With.Transaction(delegate
            {
                DomainRepository <T> .Delete(DraftDeletedItem);
            });
        }
Example #28
0
    //Currently working function.
    public void AddActiveItemToInventoryList(int id, int buttonPosition)
    {
        ActiveItem activeItemToAdd = activeItemDatabase.FetchItemByID(id);

        activeItems[buttonPosition] = activeItemToAdd;
        if (buttonPosition == 1)
        {
            GameObject itemObj = Instantiate(rightActiveItem);
            itemObj.transform.SetParent(slotsForActiveItems[buttonPosition].transform);
            itemObj.transform.localPosition       = Vector2.zero;
            itemObj.GetComponent <Image>().sprite = activeItemToAdd.Sprite;
            itemObj.name = activeItemToAdd.Title;
        }
        else
        {
            GameObject itemObj = Instantiate(leftActiveItem);
            itemObj.transform.SetParent(slotsForActiveItems[buttonPosition].transform);
            itemObj.transform.localPosition       = Vector2.zero;
            itemObj.GetComponent <Image>().sprite = activeItemToAdd.Sprite;
            itemObj.name = activeItemToAdd.Title;
        }
    }
        public void Search()
        {
            var text = Text;

            if (string.IsNullOrEmpty(text))
            {
                return;
            }

            Telegram.Api.Helpers.Execute.BeginOnUIThread(TimeSpan.FromSeconds(0.5), () =>
            {
                if (!string.Equals(text, Text, StringComparison.OrdinalIgnoreCase))
                {
                    return;
                }

                SearchDialogs.Text  = Text;
                SearchMessages.Text = Text;

                ActiveItem.Search(Text);
            });
        }
Example #30
0
        public async void Delete()
        {
            var result = await Dialog.ShowAsync("Warning", "Are you sure you want to delete this item?", "Yes", "No");

            if (result == ModernWpf.Controls.ContentDialogResult.Primary)
            {
                ActiveItem.Deleted = true;

                if (Context.SaveChanges() > 0)
                {
                    ActiveItem.NotifyAll();

                    await Dialog.ShowAsync("Delete Successful", "This item has been marked as deleted. The item will remain in the system as a reference for past transactions.");
                }
                else
                {
                    await Dialog.ShowAsync("Error", "An error has occurred upon attempting to delete the item.");
                }
            }

            NotifyAll();
        }
Example #31
0
 private void SetListName( ActiveItem Item )
 {
     ListName = Item.Name;
     NotifyChanged( "ListName" );
 }
Example #32
0
 public GeneralSection(DroneConfiguration configuration)
     : base(configuration, "general")
 {
     ConfigVersion = new ReadOnlyItem<int>(this, "num_version_config");
     MotherboardVersion = new ReadOnlyItem<int>(this, "num_version_mb");
     SoftVersion = new ReadOnlyItem<string>(this, "num_version_soft");
     DroneSerial = new ReadOnlyItem<string>(this, "drone_serial");
     SoftBuildDate = new ReadOnlyItem<string>(this, "soft_build_date");
     Motor1Soft = new ReadOnlyItem<string>(this, "motor1_soft");
     Motor1Hard = new ReadOnlyItem<string>(this, "motor1_hard");
     Motor1Supplier = new ReadOnlyItem<string>(this, "motor1_supplier");
     Motor2Soft = new ReadOnlyItem<string>(this, "motor2_soft");
     Motor2Hard = new ReadOnlyItem<string>(this, "motor2_hard");
     Motor2Supplier = new ReadOnlyItem<string>(this, "motor2_supplier");
     Motor3Soft = new ReadOnlyItem<string>(this, "motor3_soft");
     Motor3Hard = new ReadOnlyItem<string>(this, "motor3_hard");
     Motor3Supplier = new ReadOnlyItem<string>(this, "motor3_supplier");
     Motor4Soft = new ReadOnlyItem<string>(this, "motor4_soft");
     Motor4Hard = new ReadOnlyItem<string>(this, "motor4_hard");
     Motor4Supplier = new ReadOnlyItem<string>(this, "motor4_supplier");
     ARDroneName = new ActiveItem<string>(this, "ardrone_name");
     FlyingTime = new ReadOnlyItem<int>(this, "flying_time");
     NavdataDemo = new ActiveItem<bool>(this, "navdata_demo");
     NavdataOptions = new ActiveItem<int>(this, "navdata_options");
     ComWatchdog = new ActiveItem<int>(this, "com_watchdog");
     Video = new ActiveItem<bool>(this, "video_enable");
     Vision = new ActiveItem<bool>(this, "vision_enable");
     BatteryVoltageMin = new ActiveItem<int>(this, "vbat_min");
     LocalTime = new ActiveItem<int>(this, "localtime");
 }
Example #33
0
 public LedsSection(DroneConfiguration configuration)
     : base(configuration, "leds")
 {
     Animation = new ActiveItem<string>(this, "leds_anim");
 }
Example #34
0
 public NetworkSection(DroneConfiguration configuration)
     : base(configuration, "network")
 {
     SsidSinglePlayer = new ActiveItem<string>(this, "ssid_single_player");
     SsidMultiPlayer = new ActiveItem<string>(this, "ssid_multi_player");
     WifiMode = new ActiveItem<int>(this, "wifi_mode");
     WifiRate = new ActiveItem<int>(this, "wifi_rate");
     OwnerMac = new ActiveItem<string>(this, "owner_mac");
 }
Example #35
0
 public PicSection(DroneConfiguration configuration)
     : base(configuration, "pic")
 {
     UltrasoundFreq = new ActiveItem<int>(this, "ultrasound_freq");
     UltrasoundWatchdog = new ActiveItem<int>(this, "ultrasound_watchdog");
     Version = new ReadOnlyItem<int>(this, "pic_version");
 }
Example #36
0
 public SyslogSection(DroneConfiguration configuration)
     : base(configuration, "syslog")
 {
     Output = new ActiveItem<int>(this, "output");
     MaxSize = new ActiveItem<int>(this, "max_size");
     NbFiles = new ActiveItem<int>(this, "nb_files");
 }
Example #37
0
 public UserboxSection(DroneConfiguration configuration)
     : base(configuration, "userbox")
 {
     UserboxCmd = new ActiveItem<string>(this, "userbox_cmd");
 }
Example #38
0
 public VideoSection(DroneConfiguration configuration)
     : base(configuration, "video")
 {
     CamifFps = new ReadOnlyItem<int>(this, "camif_fps");
     CodecFps = new ActiveItem<int>(this, "codec_fps");
     CamifBuffers = new ReadOnlyItem<int>(this, "camif_buffers");
     Trackers = new ReadOnlyItem<int>(this, "num_trackers");
     Codec = new ActiveItem<VideoCodecType>(this, "video_codec");
     Slices = new ActiveItem<int>(this, "video_slices");
     LiveSocket = new ActiveItem<int>(this, "video_live_socket");
     StorageSpace = new ReadOnlyItem<int>(this, "video_storage_space");
     Bitrate = new ActiveItem<int>(this, "bitrate");
     MaxBitrate = new ActiveItem<int>(this, "max_bitrate");
     BitrateCtrlMode = new ActiveItem<VideoBitrateControlMode>(this, "bitrate_ctrl_mode");
     BitrateStorage = new ActiveItem<int>(this, "bitrate_storage");
     Channel = new ActiveItem<VideoChannelType>(this, "video_channel");
     OnUsb = new ActiveItem<bool>(this, "video_on_usb");
     FileIndex = new ActiveItem<int>(this, "video_file_index");
 }
 public ShowItemList(ActiveItem showWindowT)
 {
     showWindow = showWindowT;
 }
Example #40
0
 public void SectionSelected( ActiveItem A )
 {
     foreach( XParameter Param in Customs )
     {
         Param.SetValue( new XKey( "custom", Param.Id == A.Payload ) );
         LayoutSettings.SetParameter( Param );
     }
     LayoutSettings.Save();
 }
Example #41
0
 public void LoadSubSections( ActiveItem Item )
 {
     Type ItemType = Item.GetType();
     if ( ItemType == typeof( Topic ) )
     {
         Topic Tp = Item as Topic;
         int TopicIndex = ListData.IndexOf( Item ) + 1;
         if ( ListData.IndexOf( Tp.Collections[ 0 ] ) != -1 )
         {
             foreach ( Digests d in Tp.Collections )
                 ListData.Remove( d );
         }
         else
         {
             foreach ( Digests d in Tp.Collections )
                 ListData.Insert( TopicIndex, d );
         }
         NotifyChanged( "ListData" );
     }
     else if ( ItemType == typeof( Digests ) )
     {
         Digests D = Item as Digests;
         SetListName( D );
         DownloadCategoryXml( D );
     }
     else if( ItemType == typeof( Press ) )
     {
         Press P = Item as Press;
         OpenNavigationList( P );
     }
 }
Example #42
0
 public DetectSection(DroneConfiguration configuration)
     : base(configuration, "detect")
 {
     EnemyColors = new ActiveItem<int>(this, "enemy_colors");
     GroundstripeColors = new ActiveItem<int>(this, "groundstripe_colors");
     EnemyWithoutShell = new ActiveItem<int>(this, "enemy_without_shell");
     DetectType = new ActiveItem<int>(this, "detect_type");
     DetectionsSelectH = new ActiveItem<int>(this, "detections_select_h");
     DetectionsSelectVHsync = new ActiveItem<int>(this, "detections_select_v_hsync");
     DetectionsSelectV = new ActiveItem<int>(this, "detections_select_v");
 }
Example #43
0
 private void OpenNavigationList( ActiveItem Item )
 {
     NavListItem = new SubtleUpdateItem( Item.Name, Item.Desc, Item.Desc2, Item.Payload );
     // This will cause an direct navigation to the navigation list view
     // in TopList mode
     NotifyChanged( "NavListItem" );
 }
Example #44
0
 public ControlSection(DroneConfiguration configuration)
     : base(configuration, "control")
 {
     accs_offset = new ReadOnlyItem<string>(this, "accs_offset");
     accs_gains = new ReadOnlyItem<string>(this, "accs_gains");
     gyros_offset = new ReadOnlyItem<string>(this, "gyros_offset");
     gyros_gains = new ReadOnlyItem<string>(this, "gyros_gains");
     gyros110_offset = new ReadOnlyItem<string>(this, "gyros110_offset");
     gyros110_gains = new ReadOnlyItem<string>(this, "gyros110_gains");
     magneto_offset = new ReadOnlyItem<string>(this, "magneto_offset");
     magneto_radius = new ReadOnlyItem<float>(this, "magneto_radius");
     gyro_offset_thr_x = new ReadOnlyItem<float>(this, "gyro_offset_thr_x");
     gyro_offset_thr_y = new ReadOnlyItem<float>(this, "gyro_offset_thr_y");
     gyro_offset_thr_z = new ReadOnlyItem<float>(this, "gyro_offset_thr_z");
     pwm_ref_gyros = new ReadOnlyItem<int>(this, "pwm_ref_gyros");
     osctun_value = new ReadOnlyItem<int>(this, "osctun_value");
     osctun_test = new ReadOnlyItem<bool>(this, "osctun_test");
     control_level = new ActiveItem<int>(this, "control_level");
     euler_angle_max = new ActiveItem<float>(this, "euler_angle_max");
     altitude_max = new ActiveItem<int>(this, "altitude_max");
     altitude_min = new ActiveItem<int>(this, "altitude_min");
     control_iphone_tilt = new ActiveItem<float>(this, "control_iphone_tilt");
     control_vz_max = new ActiveItem<float>(this, "control_vz_max");
     control_yaw = new ActiveItem<float>(this, "control_yaw");
     outdoor = new ActiveItem<bool>(this, "outdoor");
     flight_without_shell = new ActiveItem<bool>(this, "flight_without_shell");
     autonomous_flight = new ReadOnlyItem<bool>(this, "autonomous_flight"); // obsolete
     manual_trim = new ActiveItem<bool>(this, "manual_trim");
     indoor_euler_angle_max = new ActiveItem<float>(this, "indoor_euler_angle_max");
     indoor_control_vz_max = new ActiveItem<float>(this, "indoor_control_vz_max");
     indoor_control_yaw = new ActiveItem<float>(this, "indoor_control_yaw");
     outdoor_euler_angle_max = new ActiveItem<float>(this, "outdoor_euler_angle_max");
     outdoor_control_vz_max = new ActiveItem<float>(this, "outdoor_control_vz_max");
     outdoor_control_yaw = new ActiveItem<float>(this, "outdoor_control_yaw");
     flying_mode = new ActiveItem<int>(this, "flying_mode");
     hovering_range = new ActiveItem<int>(this, "hovering_range");
     flight_anim = new FlightAnimationItem(this, "flight_anim");
 }