Exemplo n.º 1
0
        private void OnSelect()
        {
            if (handlerAni.State == Animation.States.Playing)
            {
                handlerAni.Stop();
            }
            handlerAni.Clear();
            if (switchHandlerImage != null)
            {
                handlerAni.AnimateTo(switchHandlerImage, "PositionX", Size2D.Width - switchHandlerImage.Size2D.Width - switchHandlerImage.Position2D.X);
            }
            if (switchBackgroundImage != null)
            {
                switchBackgroundImage.Opacity = 0.5f; ///////need defined by UX
                handlerAni.AnimateTo(switchBackgroundImage, "Opacity", 1);
            }
            handlerAni.Play();

            if (SelectedEvent != null)
            {
                SelectEventArgs eventArgs = new SelectEventArgs();
                eventArgs.IsSelected = IsSelected;
                SelectedEvent(this, eventArgs);
            }
        }
 /// <summary>
 /// Called as we select a new node - pass this on to the caller
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fieldsTree_AfterSelect(object sender, SelectEventArgs e)
 {
     if (AfterSelect != null)
     {
         PopulateNode(e.NewSelections[0]);
         AfterSelect(this, e.NewSelections[0]);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 选中节点
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void treeAutoPartsType_AfterSelect(object sender, SelectEventArgs e)
 {
     if (treeAutoPartsType.SelectedNodes.Count == 0)
     {
         return;
     }
     btnConfirm.Enabled = true;
 }
Exemplo n.º 4
0
 private void OnSelect()
 {
     if (SelectedEvent != null)
     {
         SelectEventArgs eventArgs = new SelectEventArgs();
         eventArgs.IsSelected = IsSelected;
         SelectedEvent(this, eventArgs);
     }
 }
Exemplo n.º 5
0
 void selTool_Selected(object sender, SelectEventArgs e)
 {
     if (e.SelSet != null)
     {
         this.mapCtrl.FlashSelectSet();
         int objCount = getSelectSetCount(e.SelSet);
         MessageBox.Show("共选择了" + objCount + "个图元");
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// Handles the UltraTree's AfterSelect event
        /// </summary>
        private void locationsTree_AfterSelect(object sender, SelectEventArgs e)
        {
            UltraTreeNode selectedNode = e.NewSelections.Count == 1 ? e.NewSelections[0] : null;

            if (selectedNode == null)
            {
                return;
            }
            PopulateListView(selectedNode);
        }
Exemplo n.º 7
0
        private void ultraTree1_AfterSelect(object sender, SelectEventArgs e)
        {
            UltraTree tree = sender as UltraTree;

            if (tree.SelectedNodes.Count > 0)
            {
                UltraTreeNode node = (sender as UltraTree).SelectedNodes[0];
                activeOrganizationId = node.Key;
                QueryEmployees(activeOrganizationId);
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Called after we select a node is the tree - enable buttons depending on whether anything is selected
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tvAssetTypes_AfterSelect(object sender, SelectEventArgs e)
        {
            // Enable the select buitton if we have a node selected
            //this.bnSelect.Enabled = (tvAssetTypes.SelectedNodes.Count != 0);

            AssetType selectedType = tvAssetTypes.SelectedNodes[0].Tag as AssetType;

            this.tbSelectedType.Text = selectedType.Name;
            this.tbSelectedType.Tag  = selectedType;

            bnOK.Enabled = true;
        }
Exemplo n.º 9
0
        private void OnTSSelect(object sender, SelectEventArgs e)
        {
            switch (e.msg)
            {
            case Message.Selecting:
                SelectCell obj = sectdatas[e.idx] as SelectCell;
                obj.IsSelected = e.isSelect;
                break;

            case Message.DataChanged:
                buildView();
                break;
            }
        }
Exemplo n.º 10
0
        public void SelectComponent(bool forceAdd)
        {
            SelectEventArgs eventArgs = new SelectEventArgs();

            if (forceAdd == true || System.Windows.Forms.Control.ModifierKeys == Keys.Shift || System.Windows.Forms.Control.ModifierKeys == Keys.Control)
            {
                eventArgs.doAdd = true;
            }

            if (eventArgs.doAdd == false || (eventArgs.doAdd == true && Enabled == true))
            {
                SelectComponentHandler?.Invoke(this, eventArgs);
            }
        }
Exemplo n.º 11
0
        private void uTree_AfterSelect(object sender, SelectEventArgs e)
        {
            foreach (var node in uTree.SelectedNodes)
            {
                node.Expanded = true;
            }

            if (SelectedNode?.Tag == null)
            {
                return;
            }

            RefreshProc();
        }
Exemplo n.º 12
0
        public static void startupHowToGetHA(EventArgs args)
        {
            SelectEventArgs selectArgs = args as SelectEventArgs;

            switch (selectArgs.getSelected())
            {
            case "GPS Sync":
                args.source.getMainMenu().activateDialog("StartFindGPS");
                break;

            case "Manual Set":
                args.source.getMainMenu().activateDialog("StartEnterHA");
                break;
            }
        }
Exemplo n.º 13
0
            public override void Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
            {
                var selectArgs = new SelectEventArgs()
                {
                    DataSourceView = UnderlyingView,
                    SelectArgs     = arguments
                };

                selectArgs.Callback = delegate(IEnumerable data) {
                    selectArgs.Data = data;
                    callback(data);
                };

                AppContext.EventBroker.Publish(ActionDS, selectArgs);
            }
Exemplo n.º 14
0
        private void utPlantilla_AfterSelect(object sender, SelectEventArgs e)
        {
            UltraTreeNode Node = utPlantilla.ActiveNode;

            if (Node.Tag != null)
            {
                ItemPlantilla = (ItemPlantilla)Node.Tag;
                MostrarItem(utPlantilla.ActiveNode);
                utcDetalle.Enabled = true;
            }
            else
            {
                DeshabilitarControles();
            }
        }
Exemplo n.º 15
0
 private void Choose(SelectEventArgs e)
 {
     try
     {
         bool newStat = e.isSelect;
         //Debug.WriteLine($"choose {e.idx} one to {e.isSelect}, multi={MultiSelect}, null={NullSelect}");
         if (!newStat && !NullSelect)//deselect
         {
             if (MultiSelect)
             {
                 if (datas.Any(x => x != e.obj && x.IsSelected))//exists another selected
                 {
                     return;
                 }
             }
             e.isSelect = !newStat;
         }
         else if (newStat && !MultiSelect)//do select
         {
             int idx = 0;
             foreach (var c in datas)
             {
                 if (c.IsSelected)
                 {
                     c.IsSelected = false;
                     Select?.Invoke(this, new SelectEventArgs()
                     {
                         obj      = c,
                         idx      = idx,
                         isSelect = false,
                     });
                 }
                 idx++;
             }
         }
     }
     finally
     {
         Select?.Invoke(this, e);
         e.obj.IsSelected = e.isSelect;
         Select?.Invoke(this, new SelectEventArgs()
         {
             msg = Message.Selected
         });
     }
 }
Exemplo n.º 16
0
        private void deploymentTree_AfterSelect(object sender, SelectEventArgs e)
        {
            if (e.NewSelections.Count > 0)
            {
                UltraTreeNode node = e.NewSelections[0];

                // check if the 'Entire Network' node is selected
                if (node.Key == MiscStrings.EntireNetwork)
                {
                    List <ComputerGroup> group = new List <ComputerGroup>();
                    group.Add(presenter.GetGroup(node.Key));
                    if (GroupSelectionChanged != null)
                    {
                        GroupSelectionChanged(this, new GroupEventArgs(group));
                    }
                }
                else if (node.Parent == EntireNetworkNode)
                {
                    // fire GroupSelectionChanged event
                    List <ComputerGroup> groups = new List <ComputerGroup>();
                    foreach (UltraTreeNode groupNode in e.NewSelections)
                    {
                        ComputerGroup group = presenter.GetGroup(groupNode.Key);
                        groups.Add(group);
                    }
                    if (GroupSelectionChanged != null)
                    {
                        GroupSelectionChanged(this, new GroupEventArgs(groups));
                    }
                }
                else
                {
                    List <Computer> computers = new List <Computer>();
                    foreach (UltraTreeNode compNode in e.NewSelections)
                    {
                        Computer computer = presenter.GetComputer(compNode.Parent.Key, compNode.Key);
                        computers.Add(computer);
                    }
                    // fire ComnputerSelectionChanged event
                    if (ComputerSelectionChanged != null)
                    {
                        ComputerSelectionChanged(this, new ComputerEventArgs(computers));
                    }
                }
            }
        }
Exemplo n.º 17
0
        private void uTree_AfterSelect(object sender, SelectEventArgs e)
        {
            ResetNodeBackColor();
            SetToolsEnable(SelectedNode?.Tag is Project, "Add", "Delete", "Edit", "AddChild");

            foreach (var node in uTree.SelectedNodes)
            {
                node.Expanded = true;
            }

            var dataSource = new List <Project> {
                SelectedNode?.Tag as Project
            };

            dataSource.AddRange(_bll.GetChildren(uTree.SelectedNodes));
            GridBindingBll <Project> .BindingData(ug1, dataSource, FieldName);
        }
Exemplo n.º 18
0
            public override void Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
            {
                var selectActionArgs = new SelectEventArgs()
                {
                    DataSourceView = UnderlyingView, SelectArgs = arguments
                };

                selectActionArgs.Callback = delegate(IEnumerable data) {
                    selectActionArgs.Data = data;
                    callback(data);
                };
                WebManager.ExecuteAction(
                    new ActionContext(
                        selectActionArgs
                        )
                {
                    Origin = ActionDS.ActionSourceControl ?? ActionDS.NamingContainer, Sender = ActionDS
                });
            }
Exemplo n.º 19
0
        public static void startupIsHomePosition(EventArgs args)
        {
            SelectEventArgs selectArgs = args as SelectEventArgs;

            switch (selectArgs.getSelected())
            {
            case "Yes":
                args.source.getMainMenu().activateDialog("StartFindGPS");
                break;

            case "No":
                args.source.getMainMenu().activateDialog("StartManualControl");
                break;

            case "Cancl":
                args.source.getMainMenu().closeDialog();
                break;
            }
        }
Exemplo n.º 20
0
        private void ultraTree1_AfterSelect(object sender, SelectEventArgs e)
        {
            if (e.NewSelections.Count == 0)
            {
                return;
            }

            DateTime temp;
            string   Text = e.NewSelections[0].Text;
            List <SnapshotRecordNew> Record = new List <SnapshotRecordNew>();

            if (DateTime.TryParse(Text, out temp))
            {
                Record = UIUtils.DatabaseInst.ReadIntradaySnapshotFromDBNew(temp, temp,
                                                                            IntradaySnapshotReaderModes.StockAndDateTime,
                                                                            e.NewSelections[0].Parent.Text);

                PopulateMarketDepth(Record[0]);
            }
        }
Exemplo n.º 21
0
        private void LCDViewCtrl_MouseClick(object sender, MouseEventArgs e)
        {
            if (!Enabled)
            {
                return;
            }
            // obliczenie wiersza i kolumny
            float xs     = (float)Width / (float)_columns;
            float ys     = (float)Height / (float)_rows;
            int   column = (int)((float)e.X / xs);
            int   row    = (int)((float)e.Y / ys);

            if (column > -1 && row > -1 && column <= _columns && row <= _rows)
            {
                if ((_chars[row][column].State > 0 && e.Button == MouseButtons.Right) || (_chars[row][column].State == 0 && e.Button == MouseButtons.Left))
                {
                    if (SelectingCharPositionEvent != null)
                    {
                        SelectEventArgs sea = new SelectEventArgs(new CharPosition()
                        {
                            Row    = row,
                            Column = column
                        }, e.Button == MouseButtons.Left);
                        SelectingCharPositionEvent(this, sea);
                        if (sea.Proceed)
                        {
                            if (e.Button == MouseButtons.Left)
                            {
                                Select(row, column);
                            }
                            if (e.Button == MouseButtons.Right)
                            {
                                Unselect(row, column);
                            }
                            RefreshLCD();
                        }
                    }
                }
            }
        }
Exemplo n.º 22
0
        private void tvwSqlObjects_AfterSelect(object sender, SelectEventArgs e)
        {
            if (e.NewSelections.Count > 0)
            {
                UltraTreeNode node = e.NewSelections[0];

                if (node.GetType() == typeof(ServerNode))
                {
                    _view.tbManager.Ribbon.SelectedTab = _view.tbManager.Ribbon.Tabs[RibbonTabKeys.Server];
                }
                else if (node.GetType() == typeof(DatabaseNode))
                {
                    _view.tbManager.Ribbon.SelectedTab = _view.tbManager.Ribbon.Tabs[RibbonTabKeys.Database];
                }
//                else if (node.GetType() == typeof(TableNode))
//                {
//                    _view.tbManager.Ribbon.SelectedTab = _view.tbManager.Ribbon.Tabs[RibbonTabKeys.Table];
//                }
//                else if (node.GetType() == typeof(ViewNode))
//                {
//                    _view.tbManager.Ribbon.SelectedTab = _view.tbManager.Ribbon.Tabs[RibbonTabKeys.View];
//                }
            }
        }
Exemplo n.º 23
0
 void scene_OnSelect(object sender, SelectEventArgs e)
 {
     bone = (e.Item as ModelBone);
     resetWidget();
 }
Exemplo n.º 24
0
 void scene_OnSelect(object sender, SelectEventArgs e)
 {
     bone = (e.Item as ModelBone);
     resetWidget();
 }
Exemplo n.º 25
0
 private void OnTSSelect(object sender, SelectEventArgs e)
 {
     switch (e.msg)
     {
     case Message.Selecting:
         SelectCell obj = sectdatas[e.idx] as SelectCell;
         obj.IsSelected = e.isSelect;
         break;
     case Message.DataChanged:
         buildView();
         break;
     }
 }
Exemplo n.º 26
0
 private void utPlantilla_AfterSelect(object sender, SelectEventArgs e)
 {
     UltraTreeNode Node = utPlantilla.ActiveNode;
     if (Node.Tag != null)
     {
         ItemPlantilla = (ItemPlantilla)Node.Tag;
         MostrarItem(utPlantilla.ActiveNode);
         utcDetalle.Enabled = true;
     }
     else { DeshabilitarControles(); }            
 }
 private void OnSelectedEvent(SelectEventArgs obj)
 {
     Useful = obj.sl;
     ag     = obj.ag;
     load();
 }
Exemplo n.º 28
0
 private void Choose(SelectEventArgs e)
 {
     try
     {
         bool newStat = e.isSelect;
         //Debug.WriteLine($"choose {e.idx} one to {e.isSelect}, multi={MultiSelect}, null={NullSelect}");
         if (!newStat && !NullSelect)//deselect
         {
             if (MultiSelect)
                 if (datas.Any(x => x != e.obj && x.IsSelected))//exists another selected
                     return;
             e.isSelect = !newStat;
         }
         else if (newStat && !MultiSelect)//do select
         {
             int idx = 0;
             foreach (var c in datas)
             {
                 if (c.IsSelected)
                 {
                     c.IsSelected = false;
                     Select?.Invoke(this, new SelectEventArgs()
                     {
                         obj = c,
                         idx = idx,
                         isSelect = false,
                     });
                 }
                 idx++;
             }
         }
     }
     finally
     {
         Select?.Invoke(this, e);
         e.obj.IsSelected = e.isSelect;
         Select?.Invoke(this, new SelectEventArgs() { msg = Message.Selected });
     }
 }
Exemplo n.º 29
0
        /// <summary>
        /// Called after we select a different node in the Explorer Tree
        /// This function deals with the firing of the appropriate event to inform interested parties
        /// of the change in selection so that they may update themselves accordingly.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void applicationTree_AfterSelect(object sender, SelectEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            if (e.NewSelections.Count > 0)
            {
                UltraTreeNode node = e.NewSelections[0];

                // check if the 'All Publishers' node is selected and fire the PublisherSelectedChanged event
                // to inform other interested parties
                if (node.Key == MiscStrings.AllPublishers)
                {
                    List <ApplicationPublisher> allPublishers = new List <ApplicationPublisher>();
                    //allPublishers.Add(_presenter.FindPublisher(node.Key));

                    ApplicationPublisher thePublisher = new ApplicationPublisher(node.Key, 0);
                    //thePublisher.Populate(true, false);
                    allPublishers.Add(thePublisher);

                    if (PublisherSelectionChanged != null)
                    {
                        PublisherSelectionChanged(this, new PublishersEventArgs(allPublishers));
                    }
                }

                // If we have clicked on the Operating systems node and fire the OperatingSystemSelecyionChanged
                // event to inform other interested parties
                else if (node.Key == MiscStrings.OperatingSystems)
                {
                    List <InstalledOS> allPublishers = new List <InstalledOS>();
                    allPublishers.Add(null);

                    if (OperatingSystemSelectionChanged != null)
                    {
                        OperatingSystemSelectionChanged(this, new OperatingSystemEventArgs(allPublishers));
                    }
                }

                // If we have clicked on the Actions node and fire the ActionsSelectionChanged
                // event to inform other interestted parties
                else if (node.Key == MiscStrings.Actions)
                {
                    if (ActionsSelectionChanged != null)
                    {
                        ActionsSelectionChanged(this, new ActionsEventArgs());
                    }
                }

                // If the parent is the 'All Publishers' node, then we have selected a publisher in the tree
                // - populate the list of publishers in the tree and fire the PublisherSelectionChanged
                // event.
                else if (node.Parent == AllPublishersNode)
                {
                    // fire PublisherSelectionChanged event
                    List <ApplicationPublisher> allPublishers = new List <ApplicationPublisher>();
                    foreach (UltraTreeNode publisherNode in e.NewSelections)
                    {
                        ApplicationPublisher thePublisher = new ApplicationPublisher(publisherNode.Key, 0);
                        //thePublisher.Populate(true, false);
                        allPublishers.Add(thePublisher);
                    }

                    if (PublisherSelectionChanged != null)
                    {
                        PublisherSelectionChanged(this, new PublishersEventArgs(allPublishers));
                    }
                }

                // If the parent is the 'All Operating Systems' node, then we have selected an OS in the tree
                // Fire the OperatingSystemSelectionChanged event passing the selected OS.
                else if (node.Parent == AllOperatingSystemsNode)
                {
                    List <InstalledOS> listOSs = new List <InstalledOS>();
                    foreach (UltraTreeNode osNode in e.NewSelections)
                    {
                        InstalledOS thisOS = osNode.Tag as InstalledOS;
                        thisOS.LoadData();
                        listOSs.Add(thisOS);
                    }

                    if (OperatingSystemSelectionChanged != null)
                    {
                        OperatingSystemSelectionChanged(this, new OperatingSystemEventArgs(listOSs));
                    }

                    //UltraTreeNode OSNode = e.NewSelections[0] as UltraTreeNode;
                    //InstalledOS thisOS = OSNode.Tag as InstalledOS;
                    //if (OperatingSystemSelectionChanged != null)
                    //    OperatingSystemSelectionChanged(this, new OperatingSystemEventArgs(thisOS));
                }


                // Applications have a parent of publisher and grand-parent of the root node
                // So if our grand parent is the root node we know that we are an application
                else if (node.Parent.Parent == AllPublishersNode)
                {
                    List <InstalledApplication> listApplications = new List <InstalledApplication>();
                    foreach (UltraTreeNode applicationNode in e.NewSelections)
                    {
                        InstalledApplication thisApplication = applicationNode.Tag as InstalledApplication;
                        thisApplication.LoadData();
                        listApplications.Add(thisApplication);
                    }

                    // fire ApplicationSelectionChanged event
                    if (ApplicationSelectionChanged != null)
                    {
                        ApplicationSelectionChanged(this, new ApplicationsEventArgs(listApplications));
                    }
                }

                // OK we must be right at the bottom of the heirarchy displaying application/OS instances
                // and licenses nodes - determine which by checking the last entry in the key
                // If we have selected the 'licenses' node beneath an application/OS then we fire the
                // 'ApplicationLicenseSelectionChanged' event
                else if (node.Key.EndsWith(MiscStrings.ApplicationLicenseNode))
                {
                    Object nodeTag = node.Tag;

                    // fire ApplicationLicenseSelectionChanged event
                    if (ApplicationLicenseSelectionChanged != null)
                    {
                        ApplicationLicenseSelectionChanged(this, new ApplicationLicenseEventArgs(nodeTag));
                    }
                }

                else if (node.Key.EndsWith(MiscStrings.ApplicationInstanceNode))
                {
                    Object nodeTag = node.Tag;

                    // fire ApplicationLicenseSelectionChanged event
                    if (ApplicationInstallsSelectionChanged != null)
                    {
                        ApplicationInstallsSelectionChanged(this, new ApplicationInstallsEventArgs(nodeTag));
                    }
                }
            }

            Cursor.Current = Cursors.Default;
        }
Exemplo n.º 30
0
 protected void view_AfterSelect(object sender, SelectEventArgs e)
 {
 }
Exemplo n.º 31
0
 private void treeViewObjects_AfterSelect(object sender, SelectEventArgs e)
 {
     treeViewObjects.ActiveNode.Override.SelectedNodeAppearance.ResetBackColor();
     treeViewObjects.ActiveNode.Override.SelectedNodeAppearance.ResetForeColor();
     treeViewObjects.DrawsFocusRect = DefaultableBoolean.True;
 }
Exemplo n.º 32
0
 private void measuresTreeView_AfterSelect(object sender, SelectEventArgs e)
 {
 }
Exemplo n.º 33
0
 protected void alertView_BeforeSelect(object sender, SelectEventArgs e)
 {
     SetAlertFilter((Durados.Web.Mvc.View)e.View, (Durados.DataAccess.Filter)e.Filter);
 }
Exemplo n.º 34
0
 protected void view_BeforeSelect(object sender, SelectEventArgs e)
 {
     SetPermanentFilter((Durados.Web.Mvc.View)e.View, (Filter)e.Filter);
 }
Exemplo n.º 35
0
        private void ultraTree1_AfterSelect(object sender, SelectEventArgs e)
        {
            try
            {
                curSelectedNode = e.NewSelections[0];
            }
            catch (ArgumentOutOfRangeException ex)
            {

            }
        }
Exemplo n.º 36
0
 private void utCotizacion_AfterSelect(object sender, SelectEventArgs e)
 {
     
     try
     {
         UltraTreeNode Node = utOrdenProduccion.ActiveNode;
         if (Node != null)
         {
             ItemOrdenProduccion = (ItemOrdenProduccion)Node.Tag;
             utcItemCotizacion.Tabs[0].Text = Node.Text;
             MostrarItem(Node);
         }
     }
     catch (Exception ex)
     {
        SoftException.ShowException(ex);
     }
     
 }
Exemplo n.º 37
0
 public override void Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
 {
     var selectActionArgs = new SelectEventArgs() { DataSourceView = UnderlyingView, SelectArgs = arguments };
     selectActionArgs.Callback = delegate(IEnumerable data) {
         selectActionArgs.Data = data;
         callback(data);
     };
     WebManager.ExecuteAction(
         new ActionContext(
             selectActionArgs
         ) { Origin = ActionDS.ActionSourceControl ?? ActionDS.NamingContainer, Sender = ActionDS });
 }