Exemplo n.º 1
0
        private void olvPermisos_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            //if (e.Column.Text == "Fecha Solicitud")
            //{
            //    if (((DataRow)e.Model)["FECHAEMISION"].ToString() != "")
            //    {
            //        DateTime dt = Convert.ToDateTime(e.Item.Text);
            //        e.SubItem.Text = dt.ToString("dd/MM/yyyy");
            //    }
            //}
            //else if (e.Column.Text == "Estado")
            //{
            //    if (((DataRow)e.Model)["ESTADO"].ToString() != "")
            //    {
            //        int estado = Convert.ToInt32(e.SubItem.Text);

            //        switch (estado)
            //        {
            //            case 1:
            //                e.SubItem.Text = "PENDIENTE";
            //                break;
            //            case 2:
            //                e.SubItem.Text = "APROVADO";
            //                break;
            //            case 3:
            //                e.SubItem.Text = "RECHAZADO";
            //                break;
            //        }
            //    }
            //}
        }
Exemplo n.º 2
0
        // listview row draw event handler sets background color corresponding to pkmn type
        private void pkmnTypeObjectListView_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            IPkmnType      pkmnTypeModel = (IPkmnType)e.Model;
            ColorConverter cc            = new ColorConverter();

            e.Item.BackColor = (Color)cc.ConvertFromString(pkmnTypeModel.TypeColor);
        }
Exemplo n.º 3
0
 private void OlvBinds_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     if ((e.Model as Bind).Error != null)
     {
         e.Item.BackColor = Color.LightCoral;
     }
 }
Exemplo n.º 4
0
 private void LstDriverStoreEntries_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     if (e.Item.Checked)
     {
         e.Item.BackColor = Color.FromArgb(unchecked ((int)0xFFCBE8F6));
     }
 }
Exemplo n.º 5
0
 private void olvUsuarios_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     if (((DataRow)e.Model)["RUT"].ToString() != "")
     {
         e.Item.Text = clsValidator.formatearRut(e.Item.Text);
     }
 }
Exemplo n.º 6
0
 private void OlvBoards_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     if ((e.Model as IBoard).IsChecked)
     {
         e.Item.ForeColor = Color.Red;
     }
 }
Exemplo n.º 7
0
        private async void FormatRow(object Sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            try
            {
                ClsPrediction OP = (ClsPrediction)e.Model;

                // If SPI IsNot Nothing Then
                if (OP.Result == ResultType.Relevant)
                {
                    e.Item.ForeColor = Color.DarkGreen;   //AppSettings.Settings.RectRelevantColor;
                }
                else if (OP.Result == ResultType.DynamicMasked || OP.Result == ResultType.ImageMasked || OP.Result == ResultType.StaticMasked)
                {
                    e.Item.ForeColor = AppSettings.Settings.RectMaskedColor;
                }
                else if (OP.Result == ResultType.Error)
                {
                    e.Item.ForeColor = Color.Black;
                    e.Item.BackColor = Color.Red;
                }
                else
                {
                    e.Item.ForeColor = AppSettings.Settings.RectIrrelevantColor;
                }
            }



            catch (Exception)
            {
            }
            finally
            {
            }
        }
Exemplo n.º 8
0
        private void FormatRow(object Sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            try
            {
                ObjectPosition OP = (ObjectPosition)e.Model;

                // If SPI IsNot Nothing Then
                if (OP.IsStatic && e.Item.ForeColor != Color.Blue)
                {
                    e.Item.ForeColor = Color.Blue;
                }
                else if (!OP.IsStatic && e.Item.ForeColor != Color.Black)
                {
                    e.Item.ForeColor = Color.Black;
                }
            }



            catch (Exception)
            {
            }
            // Log("Error: " & ExMsg(ex))
            finally
            {
            }
        }
Exemplo n.º 9
0
        void flvPackets_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            var p = (PacketInfo)e.Model;

            Colours.I.FormatRow(e.Item, p.Source, p.Destination);

            e.Item.ToolTipText = p.Comment;
        }
Exemplo n.º 10
0
 private void olvPermisos_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     //if (((DataRow)e.Model)["FECHAEMISION"].ToString() != "")
     //{
     //    DateTime dt = Convert.ToDateTime(e.Item.Text);
     //    e.Item.Text = dt.ToString("dd/MM/yyyy");
     //}
 }
Exemplo n.º 11
0
        void olvPreview_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            var m = (PacketInfo)e.Model;
            var k = new Key(m.Source, m.Destination);

            e.Item.ForeColor = Pairs[k].Item1;
            e.Item.BackColor = Pairs[k].Item2;
        }
Exemplo n.º 12
0
        private void olvPreview_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            var current = (FileName)e.Model;

            if (!current.IsValidName())
            {
                e.Item.BackColor = Color.FromArgb(255, 41, 56);
            }
        }
Exemplo n.º 13
0
        private void olstActivityDiary_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            ShiduchActivity s = (ShiduchActivity)e.Model;

            if (s.HideDelete)
            {
                e.Item.BackColor = Color.Gray;
            }
        }
Exemplo n.º 14
0
        private void OnFormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            var item = (MemTreeNode)e.Model;

            if (item.SizeBytes < 0)
            {
                e.Item.BackColor = Color.LightPink;
            }
        }
Exemplo n.º 15
0
        private void OlvAddresses_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            GoogleAddress address = e.Model as GoogleAddress;

            if (address.PlaceId == txtPlaceID.Text)
            {
                e.Item.BackColor = Color.LightGreen;
            }
        }
Exemplo n.º 16
0
 private void olv1_FormatRow(Object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     try
     {
         e.ListView.RowHeight = 10;
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 17
0
        void mTextBox_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            LogItem logItem = ( LogItem )e.Model;

            if (logItem != null)
            {
                e.Item.ForeColor = logItem.ForeColor;
                e.Item.BackColor = logItem.BackColor;
            }
        }
Exemplo n.º 18
0
        private void FastObjectListViewLogs_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            Log log = e.Model as Log;

            if (log == null)
            {
                return;
            }

            e.Item.ForeColor = log.GetLogColor();
        }
Exemplo n.º 19
0
 private void tree_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     if (e.Model is SbeField)
     {
         SbeField field = (SbeField)e.Model;
         if (field.Presence.ToLower().Equals("constant"))
         {
             e.Item.BackColor = Color.LightGray;
         }
     }
 }
Exemplo n.º 20
0
        private void listView_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            var balance = e.Model as Balance;

            if (balance != null)
            {
                if (balance.Available > 0)
                {
                    e.Item.Font = new Font(e.Item.Font, FontStyle.Bold);
                }
            }
        }
Exemplo n.º 21
0
 private void olvNotifications_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     if (e.Model == m_Notification)
     {
         e.Item.Decoration = new BrightIdeasSoftware.RowBorderDecoration()
         {
             BorderPen      = new Pen(Color.Transparent, 2),
             BoundsPadding  = new Size(1, 1),
             CornerRounding = 4.0f
         };
     }
 }
Exemplo n.º 22
0
 void tlvCondition_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
 {
     if (e.Model == m_CurrentExpression)
     {
         e.Item.Decoration = new BrightIdeasSoftware.RowBorderDecoration()
         {
             BorderPen      = new Pen(Color.Transparent, 2),
             BoundsPadding  = new Size(1, 1),
             CornerRounding = 4.0f
         };
     }
 }
Exemplo n.º 23
0
        //Color codes Combat View so players are harder to skip
        private void partyListView_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            Entity entity = (Entity)e.Model;

            if (entity.GetType() == typeof(Player) && !((Player)entity).IsNpc)
            {
                e.Item.BackColor = Color.LightBlue;
            }
            else if (entity.GetType() == typeof(Player) && ((Player)entity).IsNpc)
            {
                e.Item.BackColor = Color.LightGreen;
            }
        }
Exemplo n.º 24
0
        private void preview_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            var row     = preview.GetItem(e.RowIndex);
            var indexes = preview_indexes_array();

            Debug.Assert(e.RowIndex < indexes.Length);
            var sel_index = preview_selected_index();
            List <category_colors> colors = new List <category_colors>();
            int color_index = 0;

            for (int i = 0; i < 3; ++i)
            {
                if (color_index == sel_index)
                {
                    ++color_index;
                }
                colors.Add(color_index < colors_.Count ? colors_[color_index] : null);
                ++color_index;
            }
            // add sel + selected -sel now
            category_colors sel_color = sel_index >= 0 ? colors_[sel_index] : null;

            colors.Add(sel_color);
            colors.Add(sel_color);

            Color default_ = Color.White;
            var   index    = indexes[e.RowIndex];
            Color bg       = default_;

            if (colors[index] != null)
            {
                if (index == 4)
                {
                    bg = util.darker_color(colors[index].this_category_bg, app.inst.selection_dark_effect);
                }
                else if (index == 3)
                {
                    bg = colors[index].this_category_bg;
                }
                else
                {
                    bg = colors[index].same_category_bg;
                }
            }
            row.BackColor = bg;
        }
Exemplo n.º 25
0
        private void ObjectTaskList_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            Task task = (Task)e.Model;

            switch (task.Priority)
            {
            case TaskPriority.Hi: e.Item.BackColor = _hiColor; break;

            case TaskPriority.Lo: e.Item.BackColor = _loColor; break;

            case TaskPriority.Med: e.Item.BackColor = _medColor; break;

            case TaskPriority.None: e.Item.BackColor = _noColor; break;
            }
        }
Exemplo n.º 26
0
        private void olvPacket_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            if (e.Item.RowObject == null)
            {
                return;
            }

            if (((LogRecord)e.Item.RowObject).input)
            {
                e.Item.ForeColor = Color.Blue;
            }
            else
            {
                e.Item.ForeColor = Color.Black;
            }
        }
Exemplo n.º 27
0
        private void FormatURLRow(object Sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            try
            {
                ClsURLItem url = (ClsURLItem)e.Model;

                // If SPI IsNot Nothing Then
                if (url.Enabled.ReadFullFence() && url.CurErrCount.ReadFullFence() == 0 && !url.UseAsRefinementServer && !url.UseOnlyAsLinkedServer)
                {
                    e.Item.ForeColor = Color.Green;
                }

                else if (url.Enabled.ReadFullFence() && url.CurErrCount.ReadFullFence() == 0 && url.UseAsRefinementServer)
                {
                    e.Item.ForeColor = Color.DarkOrange;
                }

                else if (url.Enabled.ReadFullFence() && url.CurErrCount.ReadFullFence() == 0 && url.UseOnlyAsLinkedServer)
                {
                    e.Item.ForeColor = Color.DarkCyan;
                }

                else if (url.Enabled.ReadFullFence() && url.CurErrCount.ReadFullFence() > 0)
                {
                    e.Item.ForeColor = Color.Black;
                    e.Item.BackColor = Color.Red;
                }
                else if (!url.Enabled.ReadFullFence())
                {
                    e.Item.ForeColor = Color.Gray;
                }
                else
                {
                    e.Item.ForeColor = Color.Black;
                }
            }


            catch (Exception)
            {
            }
            // Log("Error: " & ex.Msg())
            finally
            {
            }
        }
Exemplo n.º 28
0
        /// <summary>
        /// OLV color row
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void olvItem_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            var      itm = (Borrowing)e.Model;
            DateTime now = DateTime.Now;

            if (itm.Status == 2 || itm.Status == 3)
            {
                e.Item.ForeColor = Color.Gray;
            }
            else if ((itm.To ?? now) < now)
            {
                e.Item.ForeColor = Color.Red;
            }
            else
            {
                e.Item.ForeColor = Color.Black;
            }
        }
Exemplo n.º 29
0
        private void messagesListView_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            var row = e.Model as cBIV;

            switch (row.status)
            {
            case "Finished":
                e.Item.BackColor = Color.LightGreen;
                break;

            case "Generating":
                e.Item.BackColor = Color.LightGoldenrodYellow;
                break;

            default:
                e.Item.BackColor = Color.White;
                break;
            }
        }
        private void treeListView1_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
        {
            try
            {
                if (e.RowIndex == 0)
                {
                    e.Item.ForeColor = Color.Red;
                }

                dynamic item = e.Model; bool isChild = item.IsChild;
                if (isChild)
                {
                    e.Item.Font = new System.Drawing.Font("Courier New", 8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }