예제 #1
0
        public void Expand()
        {
            DoubleAnimation WidthAnimation = new DoubleAnimation()
            {
                From           = this.Width,
                To             = 300,
                Duration       = TimeSpan.FromSeconds(0.5),
                EasingFunction = new ExponentialEase()
                {
                    EasingMode = EasingMode.EaseInOut
                }
            };

            WidthAnimation.Completed += delegate
            {
                InfoGrid.Visibility = Visibility.Visible;
                InfoGrid.BeginAnimation(OpacityProperty, new DoubleAnimation()
                {
                    From           = 0,
                    To             = 1,
                    Duration       = TimeSpan.FromSeconds(0.5),
                    EasingFunction = new ExponentialEase()
                    {
                        EasingMode = EasingMode.EaseInOut
                    }
                });
            };
            this.BeginAnimation(WidthProperty, WidthAnimation);
        }
예제 #2
0
        protected internal InfoStyle(InfoGrid grid) : base(grid)
        {
            Lib.Win.Data.DALC.Documents.MessageDALC messageData = new Lib.Win.Data.DALC.Documents.MessageDALC(null);
            keyField = messageData.DateMessageField;
            this.grid.ColumnHeadersVisible = false;
            this.grid.GridColor            = SystemColors.Window;

            needBoldField      = null;
            needColorField     = messageData.ReadField;
            needUnderlineField = messageData.TitleField;
        }
예제 #3
0
 public void HideInfoGrid()
 {
     InfoGrid.BeginAnimation(MarginProperty, new ThicknessAnimation()
     {
         From           = InfoGrid.Margin,
         To             = new Thickness(-300, 0, 0, 0),
         Duration       = TimeSpan.FromSeconds(0.5),
         EasingFunction = new ExponentialEase()
         {
             Exponent = Math.E, EasingMode = EasingMode.EaseIn
         }
     });
 }
예제 #4
0
 public void ShowInfoGrid(bool Init = false)
 {
     if (Init)
     {
         InfoGrid.Init();
     }
     InfoGrid.BeginAnimation(MarginProperty, new ThicknessAnimation()
     {
         From           = InfoGrid.Margin,
         To             = new Thickness(0, 0, 0, 0),
         Duration       = TimeSpan.FromSeconds(0.5),
         EasingFunction = new ExponentialEase()
         {
             Exponent = Math.E, EasingMode = EasingMode.EaseOut
         }
     });
 }
        private void InitComposition()
        {
            _compositor              = this.GetVisual().Compositor;
            _detailGridVisual        = DetailGrid.GetVisual();
            _maskBorderGridVisual    = MaskBorder.GetVisual();
            _infoGridVisual          = InfoGrid.GetVisual();
            _loadingPath             = LoadingPath.GetVisual();
            _shareBtnVisual          = ShareBtn.GetVisual();
            _flipperVisual           = FlipperControl.GetVisual();
            _taskbarImageVisual      = TaskBarImageRoot.GetVisual();
            _lockScreenImageVisual   = LockImage.GetVisual();
            _previewBtnVisual        = PreviewBtn.GetVisual();
            _setAsSPVisual           = SetAsSP.GetVisual();
            _exifInfoVisual          = ExifInfoGrid.GetVisual();
            _operationSPVisual       = OperationSP.GetVisual();
            _detailContentGridVisual = DetailContentGrid.GetVisual();

            ResetVisualInitState();
        }
        private void BtnOK_Click(object sender, EventArgs e)
        {
            if (ValidateData())
            {
                InfoGrid.RefreshDataSource();

                if (BtnOK.Text.ToUpper() == "&OK")
                {
                    InfoGrid.RefreshDataSource();
                    var dr = dt.NewRow();
                    dr["PrdCode"]     = Convert.ToDecimal(txtProductCode.Text);
                    dr["PrdAsgnCode"] = txtProductACode.Text;
                    dr["PrdName"]     = txtProductName.Text;
                    dr["Qty"]         = Convert.ToDecimal(txtProductQty.Text);
                    dr["Amount"]      = Convert.ToDecimal(txtAmount.Text);
                    dt.Rows.Add(dr);
                    if (dt.Rows.Count > 0)
                    {
                        InfoGrid.DataSource = dt;
                        InfoGridView.BestFitColumns();
                    }
                    BtnUndo.PerformClick();
                }
                if (BtnOK.Text.ToUpper() == "&UPDATE")
                {
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["PrdCode"], Convert.ToDecimal(txtProductCode.Text));
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["PrdAsgnCode"], txtProductACode.Text);
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["PrdName"], txtProductName.Text);
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["Qty"], Convert.ToDecimal(txtProductQty.Text));
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["Amount"], Convert.ToDecimal(txtAmount.Text));
                    InfoGridView.RefreshData();

                    BtnUndo.PerformClick();
                }
            }
        }
예제 #7
0
 /// <summary>
 ///   Required method for Designer support - do not modify the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.infoGrid = new InfoGrid();
     ((System.ComponentModel.ISupportInitialize)(this.infoGrid)).BeginInit();
     this.SuspendLayout();
     //
     // infoGrid
     //
     this.infoGrid.BackgroundColor   = System.Drawing.SystemColors.Window;
     this.infoGrid.DataMember        = "";
     this.infoGrid.Dock              = DockStyle.Fill;
     this.infoGrid.GridColor         = System.Drawing.SystemColors.Window;
     this.infoGrid.ImageTime         = new System.DateTime(((long)(0)));
     this.infoGrid.Location          = new System.Drawing.Point(0, 0);
     this.infoGrid.MainForm          = null;
     this.infoGrid.Name              = "infoGrid";
     this.infoGrid.ReadOnly          = true;
     this.infoGrid.RowHeadersVisible = false;
     this.infoGrid.DefaultCellStyle.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     this.infoGrid.DefaultCellStyle.SelectionForeColor = System.Drawing.SystemColors.Window;
     this.infoGrid.Size     = new System.Drawing.Size(292, 266);
     this.infoGrid.Style    = null;
     this.infoGrid.TabIndex = 5;
     this.infoGrid.TabStop  = false;
     //
     // MessageShowDialog
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(292, 266);
     this.Controls.Add(this.infoGrid);
     this.Location = new System.Drawing.Point(0, 0);
     this.Name     = "MessageShowDialog";
     this.Closed  += new System.EventHandler(this.MessageShowDialog_Closed);
     ((System.ComponentModel.ISupportInitialize)(this.infoGrid)).EndInit();
     this.ResumeLayout(false);
 }
예제 #8
0
 public static Style Instance(InfoGrid grid)
 {
     return(new InfoStyle(grid));
 }
 private void BindInfo()
 {
     InfoGrid.DataSource   = POClass.PO_Info_Table();
     InfoGrid.KeyFieldName = "PK";
     InfoGrid.DataBind();
 }
        private void BtnOK_Click(object sender, EventArgs e)
        {
            if (ValidateData())
            {
                InfoGrid.RefreshDataSource();
                if (BtnOK.Text.ToUpper() == "&OK")
                {
                    InfoGrid.RefreshDataSource();
                    var dr = dt.NewRow();
                    dr["AccCode"]   = txtAccCode.Text.Trim();
                    dr["AccName"]   = txtAccName.Text;
                    dr["Narration"] = txtNarration.Text;
                    if (txtDrCr.Text.ToUpper() == "DR")
                    {
                        dr["Debit"] = Convert.ToDecimal(txtAmount.Text);
                    }
                    else
                    {
                        dr["Debit"] = Convert.ToDecimal("0");
                    }
                    if (txtDrCr.Text.ToUpper() == "CR")
                    {
                        dr["Credit"] = Convert.ToDecimal(txtAmount.Text);
                    }
                    else
                    {
                        dr["Credit"] = Convert.ToDecimal("0");
                    }
                    dr["CrDr"]        = txtDrCr.Text;
                    dr["VutChequeNo"] = txtChqNo.Text;
                    if (txtChqDate.Text.Length > 0)
                    {
                        dr["VutChequeDate"] = Convert.ToDateTime(txtChqDate.Text).ToString("yyyy-MM-dd");
                    }
                    dt.Rows.Add(dr);
                    if (dt.Rows.Count > 0)
                    {
                        InfoGrid.DataSource = dt;
                        InfoGridView.BestFitColumns();
                    }
                }


                if (BtnOK.Text.ToUpper() == "&UPDATE")
                {
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["AccCode"], txtAccCode.Text.Trim());
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["AccName"], txtAccName.Text);
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["Narration"], txtNarration.Text);
                    if (txtDrCr.Text.ToUpper() == "DR")
                    {
                        InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["Debit"], Convert.ToDecimal(txtAmount.Text));
                    }
                    else
                    {
                        InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["Debit"], Convert.ToDecimal("0"));
                    }
                    if (txtDrCr.Text.ToUpper() == "CR")
                    {
                        InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["Credit"], Convert.ToDecimal(txtAmount.Text));
                    }
                    else
                    {
                        InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["Credit"], Convert.ToDecimal("0"));
                    }
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["CrDr"], txtDrCr.Text);
                    InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["VutChequeNo"], txtChqNo.Text);
                    if (txtChqDate.Text.Length > 0)
                    {
                        InfoGridView.SetRowCellValue(rowindex, InfoGridView.Columns["VutChequeDate"], Convert.ToDateTime(txtChqDate.Text));
                    }
                    InfoGridView.RefreshData();
                    BtnUndo.PerformClick();
                }
            }
        }
예제 #11
0
 public static Style CreateInfoStyle(InfoGrid grid)
 {
     return(InfoStyle.Instance(grid));
 }