private void tableBoneTransforms_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            bool enabledState = false;

            if (tableBoneTransforms.SelectedIndicies.Length > 0)
            {
                SceneItem sceneItem = SelectedCompositeBoneTransform.GetSceneItem();
                if (sceneItem != null && sceneItem is ISubItemCollection)
                {
                    SubItemRefConverter.SubItemsRefs = ((ISubItemCollection)sceneItem).GetSubItemsList();
                }
                propertyGridCompositeBoneTransform.SelectedObject = SelectedCompositeBoneTransform;
                _lastSelectedBone = SelectedCompositeBoneTransform.BoneReference;
                enabledState      = true;
            }
            if (this.IgnoreBoneTransformSelectionEvent == false)
            {
                IgnoreBoneTransformSelectionEvent = true;
                SelectBoneTransformsOnSceneFromTree();
                IgnoreBoneTransformSelectionEvent = false;
            }
            groupBoxCompositeBoneProperties.Enabled       = enabledState;
            toolStripButtonLevelDownBoneTransform.Enabled = enabledState &&
                                                            tableBoneTransforms.SelectedIndicies.Length > 0 &&
                                                            tableBoneTransforms.SelectedIndicies[0] !=
                                                            (SelectedCompositeKeyFrame.BoneTransforms.Count - 1);
            toolStripButtonLevelUpBoneTransform.Enabled = enabledState &&
                                                          tableBoneTransforms.SelectedIndicies.Length > 0 &&
                                                          tableBoneTransforms.SelectedIndicies[0] != 0;
        }
Exemple #2
0
 private void lvwPosition_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     if (e.NewSelectedIndicies.Length > 0)
     {
         selectedRowIndex = (int)lvwPosition.TableModel.Rows[e.NewSelectedIndicies[0]].Tag;
     }
 }
 /// <summary>
 /// Handles the SelectionChanged event of the tableCards control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="XPTable.Events.SelectionEventArgs"/> instance containing the event data.</param>
 /// <remarks>Documented by Dev05, 2007-10-01</remarks>
 private void tableCards_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     if (!selectingCard)
     {
         selectionTimer.Start();
     }
 }
Exemple #4
0
 private void lvwListInsurance_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     if (e.NewSelectedIndicies.Length > 0)
     {
         SelectedItem = (int)lvwListInsurance.TableModel.Rows[e.NewSelectedIndicies[0]].Tag;
     }
 }
Exemple #5
0
 private void iPG3_StatsTable_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     if (e.NewSelectedIndicies.Length > 0)
     {
         UpdateSelectionTotals();
     }
 }
        private void tableModel1_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            if (table1.TableModel.Rows.Count > 0)
            {
                try
                {
                    var row = e.TableModel.Selections.SelectedItems[0].Index;
                    Param.ProductId = table1.TableModel.Rows[row].Cells[1].Text;
                    DataTable dt = Util.DBQuery(string.Format(@"SELECT CoverImage FROM Product WHERE ID = '{0}' AND Shop = {1}", Param.ProductId, Param.ShopParent));
                    ptbProduct.Image   = null;
                    ptbProduct.Visible = true;

                    var filename = @"Resource/Images/Product/" + Param.ProductId + ".jpg";
                    if (!File.Exists(filename))
                    {
                        if (dt.Rows[0]["CoverImage"].ToString() != "")
                        {
                            DownloadImage(dt.Rows[0]["CoverImage"].ToString(), @"Resource/Images/Product/", Param.ProductId + ".jpg");
                        }
                    }
                    else
                    {
                        try { ptbProduct.Image = Image.FromFile(filename); }
                        catch
                        {
                            if (dt.Rows[0]["CoverImage"].ToString() != "")
                            {
                                DownloadImage(dt.Rows[0]["CoverImage"].ToString(), @"Resource/Images/Product/", Param.ProductId + ".jpg");
                            }
                        }
                    }
                }
                catch { }
            }
        }
Exemple #7
0
 private void iTable_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     if (e.NewSelectedIndicies.Length > 0)
     {
         int rowIndex            = e.NewSelectedIndicies[0];
         XPTable.Models.Row row  = e.TableModel.Rows[rowIndex];
         HeapCell           cell = (HeapCell)row.Tag;
         UpdateReferenceInfoList(cell);
     }
 }
        private void ObjectTable_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            var objectTable = sender as BOSObjectTable;

            Debug.Assert(objectTable != null);

            if (!toolStripProgressBar_.Visible)
            {
                downloadToolStripButton_.Enabled = objectTable.SelectedItems.Length == 1;
            }
            deleteToolStripButton_.Enabled     = objectTable.SelectedItems.Length > 0;
            propertiesToolStripButton_.Enabled = objectTable.SelectedItems.Length == 1;
        }
Exemple #9
0
 private void table1_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     foreach (Row row in table1.SelectedItems)
     {
         selectedUser = users.FirstOrDefault(u => u.Id == (int.Parse(row.Cells[0].Text)));
         if (selectedUser != null)
         {
             btnEditUser.Enabled = true;
         }
         else
         {
             btnEditUser.Enabled = false;
         }
     }
 }
        private void tableKeyFrames_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            bool enabledState = false;

            if (this.SelectedCompositeKeyFrame != null)
            {
                enabledState = true;
                RefreshTableCompositeBoneTransforms();
            }
            else
            {
                tableBoneTransforms.TableModel.Rows.Clear();
            }
            groupBoxBoneTransforms.Enabled        = enabledState;
            toolStripButtonDeleteKeyFrame.Enabled = enabledState;
            toolStripButtonKeyFrameCopy.Enabled   = enabledState;
            toolStripButtonKeyFramePaste.Enabled  = (CompositeKeyFrameClipBoard != null);
            tableKeyFrames.Invalidate();
        }
Exemple #11
0
        /// <summary>
        /// <para>
        /// SelectionChanged event handler of listPackages.
        /// </para><para>
        /// Basically, first this function navigates to the depiction of
        /// selected package. Then it changes selectedPack variable to make
        /// cssBtnDownload can determine which package was selected.
        /// </para>
        /// </summary>
        private void listPackages_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            if (e.NewSelectedIndicies.Length == 0)
            {
                return;
            }

            var selected = e.TableModel.Selections.SelectedItems[0];

            selectedPack = (Package)selected.Tag;

            string depiction = selectedPack.Depiction;

            if (depiction.IsNullOrWhitespace())
            {
                depiction = new Uri(new Uri("http://cydia.saurik.com/package/"), selectedPack.Pkg).ToString();
            }

            NavigateWebBrowser(depiction);
        }
        private void Table_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            // Raise the select event
            if (Table.TableModel.Selections.SelectedItems.Length == 1)
            {
                var row = (ITwContextMenu)Table.TableModel.Selections.SelectedItems[0];
                switch (RowSelectionAction)
                {
                case RowSelectionActionEnum.RaiseSelectEvent:
                    if (RowSelected != null)
                    {
                        RowSelected(row, EventArgs.Empty);
                    }
                    break;

                case RowSelectionActionEnum.SelectVillage:
                    row.DisplayDetails();
                    break;
                }
            }
        }
 private void iTable_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     UpdateButtons();
 }
 private void artistTable_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     UpdateWindowState();
 }
Exemple #15
0
 private void tableLayers_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     RefreshLayerToolbarStatus();
 }
        private void tableFrames_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            bool enabledState = (this.SelectedAnimationFrameIndex > -1);

            toolStripButtonDeleteKeyFrame.Enabled = enabledState;
        }
 private void tableDialogs_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     UpdateWindowState();
 }
 void tableLoanedCDs_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
 {
     UpdateWindowState();
 }
Exemple #19
0
        private void table1_SelectionChanged(object sender, XPTable.Events.SelectionEventArgs e)
        {
            if (table1.TableModel.Rows.Count > 0)
            {
                try
                {
                    _ROW_INDEX         = e.TableModel.Selections.SelectedItems[0].Index;
                    pnlPrice.Visible   = true;
                    ptbProduct.Image   = null;
                    Param.ProductId    = table1.TableModel.Rows[_ROW_INDEX].Cells[1].Text;
                    Param.CategoryName = table1.TableModel.Rows[_ROW_INDEX].Cells[3].Text;
                    lblCategory.Text   = Param.CategoryName;

                    var       filename = @"Resource/Images/Product/" + Param.ProductId + ".jpg";
                    DataTable dt       = Util.DBQuery(string.Format("SELECT CoverImage FROM Product WHERE ID = '{0}' AND Shop = {1}", Param.ProductId, Param.ShopParent));


                    if (!File.Exists(filename))
                    {
                        if (dt.Rows.Count > 0 && dt.Rows[0]["CoverImage"].ToString() != "")
                        {
                            DownloadImage(dt.Rows[0]["CoverImage"].ToString(), @"Resource/Images/Product/", Param.ProductId + ".jpg");
                        }
                    }
                    else
                    {
                        try { ptbProduct.Image = Image.FromFile(filename); }
                        catch
                        {
                            if (dt.Rows.Count > 0 && dt.Rows[0]["CoverImage"].ToString() != "")
                            {
                                DownloadImage(dt.Rows[0]["CoverImage"].ToString(), @"Resource/Images/Product/", Param.ProductId + ".jpg");
                            }
                        }
                    }


                    lblCost.Text    = double.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[7].Data.ToString()).ToString("#,##0.00");
                    txtPrice.Text   = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[13].Data.ToString()).ToString("#,##0");
                    txtPrice1.Text  = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[14].Data.ToString()).ToString("#,##0");
                    txtPrice2.Text  = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[15].Data.ToString()).ToString("#,##0");
                    txtPrice3.Text  = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[16].Data.ToString()).ToString("#,##0");
                    txtPrice4.Text  = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[17].Data.ToString()).ToString("#,##0");
                    nudPrice.Value  = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[8].Data.ToString());
                    nudPrice1.Value = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[9].Data.ToString());
                    nudPrice2.Value = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[10].Data.ToString());
                    nudPrice3.Value = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[11].Data.ToString());
                    nudPrice4.Value = int.Parse(table1.TableModel.Rows[_ROW_INDEX].Cells[12].Data.ToString());
                    nudPrice_ValueChanged(sender, e);
                    nudPrice1_ValueChanged(sender, e);
                    nudPrice2_ValueChanged(sender, e);
                    btnSave.Enabled  = false;
                    lblCategory.Text = table1.TableModel.Rows[_ROW_INDEX].Cells[4].Text;
                    id = table1.TableModel.Rows[_ROW_INDEX].Cells[1].Text;
                }
                catch
                {
                    pnlPrice.Visible = false;
                }
            }
        }