示例#1
0
        public frmFavorites()
        {
            InitializeComponent();

            // Create text overlays with colors to match our theme.
            TextOverlay queueOverlay = lvFavorites.EmptyListMsgOverlay as TextOverlay;

            queueOverlay.BorderWidth = 0f;
            queueOverlay.Font        = new Font(Font.FontFamily, 12);
            queueOverlay.TextColor   = Color.DimGray;
            queueOverlay.BackColor   = Color.FromArgb(255, 255, 255);
            queueOverlay.BorderColor = Color.FromArgb(40, 146, 255);

            // Create our HotTracking decoration.
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen                       = new Pen(Color.FromArgb(64, Color.White), 0);
            rbd.FillBrush                       = new SolidBrush(Color.FromArgb(64, SystemColors.Highlight));
            rbd.BoundsPadding                   = new Size(0, 0);
            rbd.CornerRounding                  = 0.0f;
            lvFavorites.HotItemStyle            = new HotItemStyle();
            lvFavorites.HotItemStyle.Decoration = rbd;

            // Setup aspect getters programatically in case we decide to encrypt our executable.
            colName.AspectGetter += delegate(object x) { return(((FavoriteObject)x).Name); };
        }
示例#2
0
        public mainForm(string gameSelected, gameSelection gsF)
        {
            currentGame    = gameSelected;
            gameSelectForm = gsF;
            bgwListBuilder.WorkerReportsProgress = true;
            bgwListBuilder.DoWork             += new DoWorkEventHandler(bgwListBuilder_DoWork);
            bgwListBuilder.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgwListBuilder_RunWorkerCompleted);
            InitializeComponent();
            tb_search.Edit.KeyDown += new KeyEventHandler(tb_search_KeyDown);
            setImage();
            // Initialize hot item style
            this.hotItemStyle1.ForeColor = highlightCellColor;
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen                 = new Pen(primaryCellColor, 0.5f);
            rbd.FillBrush                 = new SolidBrush(Color.FromArgb(32, Color.White));
            rbd.CornerRounding            = 0;
            rbd.BoundsPadding             = new Size(0, 0);
            rbd.LeftColumn                = 1;
            this.hotItemStyle1.Decoration = rbd;
            HeaderFormatStyle headerstyle = new HeaderFormatStyle();

            headerstyle.SetBackColor(headerBackColor);
            filelistview.HeaderFormatStyle = headerstyle;
        }
示例#3
0
        public void ChangeHotItemStyle(ObjectListView olv, ComboBox cb)
        {
            olv.UseTranslucentHotItem = false;
            olv.UseHotItem            = true;
            olv.UseExplorerTheme      = false;

            switch (cb.SelectedIndex)
            {
            case 0:
                olv.UseHotItem = false;
                break;

            case 1:
                HotItemStyle hotItemStyle = new HotItemStyle
                {
                    ForeColor = Color.AliceBlue,
                    BackColor = Color.FromArgb(255, 64, 64, 64)
                };
                olv.HotItemStyle = hotItemStyle;
                break;

            case 2:
                RowBorderDecoration rbd = new RowBorderDecoration
                {
                    BorderPen      = new Pen(Color.SeaGreen, 2),
                    FillBrush      = null,
                    CornerRounding = 4.0f
                };
                HotItemStyle hotItemStyle2 = new HotItemStyle
                {
                    Decoration = rbd
                };
                olv.HotItemStyle = hotItemStyle2;
                break;

            case 3:
                olv.UseTranslucentHotItem = true;
                break;

            case 4:
                HotItemStyle hotItemStyle3 = new HotItemStyle
                {
                    Decoration = new LightBoxDecoration()
                };
                olv.HotItemStyle = hotItemStyle3;
                break;

            case 5:
                olv.FullRowSelect    = true;
                olv.UseHotItem       = false;
                olv.UseExplorerTheme = true;
                break;
            }
            olv.Invalidate();
        }
示例#4
0
        /// <summary>
        /// 1: None
        /// 2: Text Colour
        /// 3: Border
        /// 4: Translucent
        /// 5: Light Box
        /// </summary>
        /// <param name="olv"></param>
        /// <param name="vStyle"></param>
        internal static void ChangeHotItemStyle(ObjectListView olv, HotItemStyleNum vStyle)
        {
            olv.UseTranslucentHotItem = false;
            olv.UseHotItem            = true;
            olv.UseExplorerTheme      = false;

            switch (vStyle)
            {
            case HotItemStyleNum.TurnOff:    // 0:
                olv.UseHotItem = false;
                break;

            case HotItemStyleNum.None:
                HotItemStyle hotItemStyle = new HotItemStyle
                {
                    ForeColor = Color.AliceBlue,
                    BackColor = Color.FromArgb(255, 64, 64, 64)
                };
                olv.HotItemStyle = hotItemStyle;
                break;

            case HotItemStyleNum.TextColour:
                RowBorderDecoration rbd = new RowBorderDecoration
                {
                    BorderPen      = new Pen(Color.SeaGreen, 2),
                    FillBrush      = null,
                    CornerRounding = 4.0f
                };
                HotItemStyle hotItemStyle2 = new HotItemStyle
                {
                    Decoration = rbd
                };
                olv.HotItemStyle = hotItemStyle2;
                break;

            case HotItemStyleNum.Border:
                olv.UseTranslucentHotItem = true;
                break;

            case HotItemStyleNum.Translucent:
                HotItemStyle hotItemStyle3 = new HotItemStyle
                {
                    Decoration = new LightBoxDecoration()
                };
                olv.HotItemStyle = hotItemStyle3;
                break;

            case HotItemStyleNum.LightBox:
                olv.FullRowSelect    = true;
                olv.UseHotItem       = false;
                olv.UseExplorerTheme = true;
                break;
            }
            olv.Invalidate();
        }
示例#5
0
        private void InitializeHotStyle()
        {
            HotItemStyle        nHotItemStyle = new HotItemStyle();
            RowBorderDecoration rbd           = new RowBorderDecoration();

            rbd.BorderPen                     = new Pen(Color.LightBlue, 2);
            rbd.FillBrush                     = null;
            rbd.CornerRounding                = 16.0f;
            nHotItemStyle.Decoration          = rbd;
            this.objectListView1.HotItemStyle = nHotItemStyle;
        }
示例#6
0
        private void InitUIControl()
        {
            //materialSingleLineTextField_ThreadNum.Text = Convert.ToString(Environment.ProcessorCount * 4);

            comboBox_SelectTaskGroup.Items.Clear();
            List <string> taskGroupNameList = GlobalVar.Instance.taskGroupManager.TaskGroupNameList();

            foreach (var name in taskGroupNameList)
            {
                comboBox_SelectTaskGroup.Items.Add(name);
            }
            //if(comboBox_SelectTaskGroup.Items.Count >= 1)
            //{
            //    comboBox_SelectTaskGroup.SelectedIndex = 0;
            //}

            comboBox_UA.Items.Clear();
            List <string> uaTypeList = GlobalVar.Instance.uaList.uaTypeList;

            foreach (var name in uaTypeList)
            {
                comboBox_UA.Items.Add(name);
            }
            //if (comboBox_UA.Items.Count >= 1)
            //{
            //    comboBox_UA.SelectedIndex = 0;
            //}
            GlobalVar.Instance.logger.Debug($"加载UA成功 [{GlobalVar.Instance.uaList.Count()}] 个");


            fastObjectListView_main.UseTranslucentHotItem = false;
            fastObjectListView_main.UseHotItem            = true;
            fastObjectListView_main.FullRowSelect         = true;
            fastObjectListView_main.UseExplorerTheme      = false;

            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen      = new Pen(Color.Purple, 2);
            rbd.FillBrush      = null;
            rbd.CornerRounding = 4.0f;
            HotItemStyle hotItemStyle = new HotItemStyle();

            hotItemStyle.Decoration = rbd;
            fastObjectListView_main.HotItemStyle             = hotItemStyle;
            fastObjectListView_main.View                     = View.Details;
            fastObjectListView_main.OwnerDraw                = true;
            fastObjectListView_main.UseAlternatingBackColors = true;
            fastObjectListView_main.CheckBoxes               = false;
            fastObjectListView_main.TriStateCheckBoxes       = false;
            fastObjectListView_main.Invalidate();

            timer_Main.Enabled = true;
        }
示例#7
0
        /// <summary>
        /// Builds the list of items for the Symbol View
        /// Custom aspect getters are used to fine-tune the appearance of the address column
        /// </summary>
        /// <param name="s"></param>
        void PopulateSymbolLV(List <Symbol> s)
        {
            Debug.WriteLineIf(DEBUG, "PopulateSymbolLV!");
            // Make the decoration
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen      = new Pen(Color.FromArgb(128, Color.LightSeaGreen), 2);
            rbd.BoundsPadding  = new Size(1, 1);
            rbd.CornerRounding = 4.0f;

            // Put the decoration onto the hot item
            olv_SymbolView.HotItemStyle            = new HotItemStyle();
            olv_SymbolView.HotItemStyle.Decoration = rbd;
            olv_SymbolView.UseHotItem = true;

            // Special aspect getter for address coz we want to see that in hex
            this.symAddrColumn.AspectGetter = (x) => { return(((Symbol)x).LoadAddress.ToString("X6")); };
            colSection.AspectGetter         = x => { return(((Symbol)x).SectionName[1].ToString().ToUpper()); };
            columnGlobal.AspectGetter       = x =>
            {
                int type = ((Symbol)x).GlobalScope;
                if (type == Symbol.TYPE_GLOBAL)
                {
                    return("G");
                }
                else if (type == Symbol.TYPE_STATIC)
                {
                    return("S");
                }
                else if (type == Symbol.TYPE_HIDDEN)
                {
                    return("H");
                }
                else
                {
                    return("X");
                }
            };

            olv_SymbolView.SetObjects(s);

            olv_SymbolView.SecondarySortColumn = olv_SymbolView.AllColumns[3];
            olv_SymbolView.PrimarySortColumn   = olv_SymbolView.AllColumns[0];
            olv_SymbolView.PrimarySortOrder    = SortOrder.Descending;
            olv_SymbolView.SecondarySortOrder  = SortOrder.Descending;
            olv_SymbolView.Sort("SEC");
            AddSumRow(s); // Update the sum over currently displayed symbols
        }
示例#8
0
        private void InitializeObjectListView()
        {
            // Prevent the picture from showing selection
            this.olvColumnImage.Renderer = new NonSelectableRenderer();

            // Initialize hot item style
            this.hotItemStyle1.ForeColor = highlightCellColor;
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen                 = new Pen(primaryCellColor, 0.5f);
            rbd.FillBrush                 = new SolidBrush(Color.FromArgb(32, Color.White));
            rbd.CornerRounding            = 0;
            rbd.BoundsPadding             = new Size(0, 0);
            rbd.LeftColumn                = 1;
            this.hotItemStyle1.Decoration = rbd;
        }
示例#9
0
        public static void SetHotItemStyle(ObjectListView listView, OLVHotItemStyle style)
        {
            listView.UseTranslucentHotItem = false;
            listView.UseHotItem            = true;
            listView.UseExplorerTheme      = false;

            switch ((int)style)
            {
            case 0:
                listView.UseHotItem = false;
                break;

            case 1:
                HotItemStyle hotItemStyle = new HotItemStyle();
                hotItemStyle.ForeColor = Color.AliceBlue;
                hotItemStyle.BackColor = Color.FromArgb(255, 64, 64, 64);
                listView.HotItemStyle  = hotItemStyle;
                break;

            case 2:
                RowBorderDecoration rbd = new RowBorderDecoration();
                rbd.BorderPen      = new Pen(Color.SeaGreen, 2);
                rbd.FillBrush      = null;
                rbd.CornerRounding = 4.0f;
                HotItemStyle hotItemStyle2 = new HotItemStyle();
                hotItemStyle2.Decoration = rbd;
                listView.HotItemStyle    = hotItemStyle2;
                break;

            case 3:
                listView.UseTranslucentHotItem = true;
                break;

            case 4:
                HotItemStyle hotItemStyle3 = new HotItemStyle();
                hotItemStyle3.Decoration = new LightBoxDecoration();
                listView.HotItemStyle    = hotItemStyle3;
                break;

            case 5:
                listView.FullRowSelect    = true;
                listView.UseHotItem       = false;
                listView.UseExplorerTheme = true;
                break;
            }
            listView.Invalidate();
        }
示例#10
0
        public void ChangeHotItemStyle(ObjectListView olv, int index)
        {
            olv.UseTranslucentHotItem = false;
            olv.UseHotItem            = true;
            olv.UseExplorerTheme      = false;

            switch (index)
            {
            case 0:
                olv.UseHotItem = false;
                break;

            case 1:
                HotItemStyle hotItemStyle = new HotItemStyle();
                hotItemStyle.ForeColor = Color.AliceBlue;
                hotItemStyle.BackColor = Color.FromArgb(255, 64, 64, 64);
                olv.HotItemStyle       = hotItemStyle;
                break;

            case 2:
                RowBorderDecoration rbd = new RowBorderDecoration();
                rbd.BorderPen      = new Pen(Color.SeaGreen, 2);
                rbd.FillBrush      = null;
                rbd.CornerRounding = 4.0f;
                HotItemStyle hotItemStyle2 = new HotItemStyle();
                hotItemStyle2.Decoration = rbd;
                olv.HotItemStyle         = hotItemStyle2;
                break;

            case 3:
                olv.UseTranslucentHotItem = true;
                break;

            case 4:
                HotItemStyle hotItemStyle3 = new HotItemStyle();
                hotItemStyle3.Decoration = new LightBoxDecoration();
                olv.HotItemStyle         = hotItemStyle3;
                break;

            case 5:
                olv.FullRowSelect    = true;
                olv.UseHotItem       = false;
                olv.UseExplorerTheme = true;
                break;
            }
            olv.Invalidate();
        }
示例#11
0
        private void InitializeObjectListView()
        {
            // Initialize hot item style
            this.hotItemStyle1.ForeColor = activeFontColor;
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen                  = new Pen(activeBorderColor, 0.5f);
            rbd.FillBrush                  = new SolidBrush(Color.FromArgb(100, activeBackColor));
            rbd.CornerRounding             = 0;
            rbd.BoundsPadding              = new Size(0, 0);
            rbd.LeftColumn                 = 1;
            this.hotItemStyle1.Decoration  = rbd;
            this.objectListView1.BackColor = this.backColor;
            this.objectListView1.ForeColor = this.fontColor;
            this.objectListView1.HighlightBackgroundColor = this.selectedBackColor;
            this.objectListView1.HighlightForegroundColor = this.selectedFontColor;
        }
示例#12
0
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            fastObjectListView1.UseTranslucentHotItem = false;
            fastObjectListView1.UseHotItem            = true;
            fastObjectListView1.FullRowSelect         = true;
            fastObjectListView1.UseExplorerTheme      = false;

            switch (comboBox3.SelectedIndex)
            {
            case 0:
                fastObjectListView1.UseHotItem = false;
                break;

            case 1:
                HotItemStyle hotItemStyle = new HotItemStyle();
                hotItemStyle.ForeColor           = Color.AliceBlue;
                hotItemStyle.BackColor           = Color.FromArgb(255, 64, 64, 64);
                fastObjectListView1.HotItemStyle = hotItemStyle;
                break;

            case 2:
                RowBorderDecoration rbd = new RowBorderDecoration();
                rbd.BorderPen      = new Pen(Color.Purple, 2);
                rbd.FillBrush      = null;
                rbd.CornerRounding = 4.0f;
                HotItemStyle hotItemStyle2 = new HotItemStyle();
                hotItemStyle2.Decoration         = rbd;
                fastObjectListView1.HotItemStyle = hotItemStyle2;
                break;

            case 3:
                HotItemStyle hotItemStyle3 = new HotItemStyle();
                hotItemStyle3.Decoration         = new LightBoxDecoration();
                fastObjectListView1.HotItemStyle = hotItemStyle3;
                break;

            default:
                fastObjectListView1.UseHotItem = true;
                break;
            }
            fastObjectListView1.Invalidate();
        }
示例#13
0
        /*********************************************************************/
        /// <summary>
        ///
        /// </summary>
        /// <param name="filename"></param>
        /// <param name="newFile"></param>
        public SRecordView(string filename, bool newFile)
        {
            InitializeComponent();

            try
            {
                FileInfo info = new FileInfo(filename);
                _S19Record = new S19(filename, newFile);
                this.Text  = info.Name;
                //SRecordizer.LogIt(LogView.LogType.Info, "Loaded \'" + filename + "\'...");

                /* set highlighted row style */
                RowBorderDecoration rbd = new RowBorderDecoration();
                rbd.BorderPen     = new Pen(Color.DarkOliveGreen, 1);
                rbd.BoundsPadding = new Size(0, -1);

                s19ListView.SelectedRowDecoration = rbd;
            }
            catch
            {
                ExceptionTrap.Trap("Error Parsing S19 File!!");
            }
        }
示例#14
0
        private async Task Init(AmazonDynamoDBClient dBClient, DynamoDBContext dBContext, SearchType[] SearchTypes, PresentationQualityAccess Access)
        {
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen      = new Pen(Color.FromArgb(128, Color.LightSeaGreen), 2);
            rbd.BoundsPadding  = new Size(1, 1);
            rbd.CornerRounding = 4.0f;

            gvResults.HotItemStyle            = new HotItemStyle();
            gvResults.HotItemStyle.Decoration = rbd;

            await Task.Run(() =>
            {
                StartAWSOperation("Contacting AWS...");
                Database.Connect(dBClient, dBContext,
                                 (bool isSuccess, string Message) =>
                {
                    EndAWSOperation(isSuccess ? "Connected to AWS!" : "Unable to connect to AWS: " + Message);
                });
            });

            StartAWSOperation("Verifying AWS database...");
            await Database.Verify(
                (bool isSuccess, string Message) =>
            {
                SetSearchButtons(isSuccess);
                EndAWSOperation(isSuccess ? "Ready" : Message);
            }
                );

            cmbSearchMethod.Items.Clear();
            cmbSearchMethod.Items.AddRange(SearchTypes);

            SetRoleMode(Access.isAdmin);
            this.Access = Access;
        }
示例#15
0
        /// <summary>
        /// Builds the list of items for the Module View
        /// The appearance of the list elements is adjusted here, and the list view data is bound here.
        /// Mapping between the list elements and the elemenst of <Module> class is preset in the Form designer.
        /// </summary>
        /// <param name="m"></param>
        void PopulateModuleLV(List <Module> m)
        {
            // Make the decoration
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen      = new Pen(Color.FromArgb(128, Color.LightSeaGreen), 2);
            rbd.BoundsPadding  = new Size(1, 1);
            rbd.CornerRounding = 4.0f;

            // Put the decoration onto the hot item
            olv_ModuleView.HotItemStyle            = new HotItemStyle();
            olv_ModuleView.HotItemStyle.Decoration = rbd;
            olv_ModuleView.UseHotItem = true;

            olv_ModuleView.SetObjects(m);
            olv_ModuleView.Sort("TEXT");
            // Extra: Update the actuals also
            this.BeginInvoke(new MethodInvoker(() =>
            {
                lbl_TextSizeActual.Text = "Text: " + MAPParser.Instance.TextSegSize.ToString() + " (" + (MAPParser.Instance.TextSegSize / 1024f).ToString("##.##") + " KB)";
                lbl_BssSizeActual.Text  = "Bss: " + MAPParser.Instance.BssSize.ToString() + " (" + (MAPParser.Instance.BssSize / 1024f).ToString("##.##") + " KB)";
                lbl_DataSizeActual.Text = "Data: " + MAPParser.Instance.DataSize.ToString() + " (" + (MAPParser.Instance.DataSize / 1024f).ToString("##.##") + " KB)";
            }));
        }
示例#16
0
        /// <summary>
        /// Event on format cell
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private static void FastOlvOnFormatCell(object sender, FormatCellEventArgs args)
        {
            FileListItem obj = (FileListItem)args.Model;

            if (obj == null)
            {
                return;
            }

            // currently document
            if (obj.FullPath.Equals(Plug.CurrentFilePath))
            {
                RowBorderDecoration rbd = new RowBorderDecoration {
                    FillBrush      = new SolidBrush(Color.FromArgb(50, ThemeManager.Current.MenuFocusedBack)),
                    BorderPen      = new Pen(Color.FromArgb(128, ThemeManager.Current.MenuFocusedBack.IsColorDark() ? ControlPaint.Light(ThemeManager.Current.MenuFocusedBack, 0.10f) : ControlPaint.Dark(ThemeManager.Current.MenuFocusedBack, 0.10f)), 1),
                    BoundsPadding  = new Size(-2, 0),
                    CornerRounding = 6.0f
                };
                args.SubItem.Decoration = rbd;
            }

            // display the flags
            int offset = -5;

            foreach (var name in Enum.GetNames(typeof(FileFlag)))
            {
                FileFlag flag = (FileFlag)Enum.Parse(typeof(FileFlag), name);
                if (flag == 0)
                {
                    continue;
                }
                if (!obj.Flags.HasFlag(flag))
                {
                    continue;
                }
                Image tryImg = (Image)ImageResources.ResourceManager.GetObject(name);
                if (tryImg == null)
                {
                    continue;
                }
                ImageDecoration decoration = new ImageDecoration(tryImg, 100, ContentAlignment.MiddleRight)
                {
                    Offset = new Size(offset, 0)
                };
                if (args.SubItem.Decoration == null)
                {
                    args.SubItem.Decoration = decoration;
                }
                else
                {
                    args.SubItem.Decorations.Add(decoration);
                }
                offset -= 20;
            }

            // display the sub string
            if (offset < -5)
            {
                offset -= 5;
            }
            if (!string.IsNullOrEmpty(obj.SubString))
            {
                TextDecoration decoration = new TextDecoration(obj.SubString, 100)
                {
                    Alignment      = ContentAlignment.MiddleRight,
                    Offset         = new Size(offset, 0),
                    Font           = FontManager.GetFont(FontStyle.Bold, 11),
                    TextColor      = ThemeManager.Current.SubTextFore,
                    CornerRounding = 1f,
                    Rotation       = 0,
                    BorderWidth    = 1,
                    BorderColor    = ThemeManager.Current.SubTextFore
                };
                args.SubItem.Decorations.Add(decoration);
            }
        }
        private void UserControl1_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }
            userid = -1;

            generalListView.Font = new Font("Arial", 15.5F, GraphicsUnit.Pixel);

            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen      = new Pen(Color.FromArgb(128, Color.Aqua), 2);
            rbd.BoundsPadding  = new Size(1, 1);
            rbd.CornerRounding = 4.0f;
            this.generalListView.HotItemStyle            = new HotItemStyle();
            this.generalListView.HotItemStyle.Decoration = rbd;
            generalListView.AlternateRowBackColor        = Color.LightGoldenrodYellow;
            this.generalListView.CellToolTipShowing     += generalListView_CellToolTipShowing;
            this.fileListView.CellToolTipShowing        += fileListView_CellToolTipShowing2;
            TextOverlay textOverlay = this.generalListView.EmptyListMsgOverlay as TextOverlay;

            textOverlay.TextColor   = Color.Firebrick;
            textOverlay.BackColor   = Color.AntiqueWhite;
            textOverlay.BorderColor = Color.DarkRed;
            textOverlay.BorderWidth = 4.0f;
            textOverlay.Font        = new Font("Chiller", 36);
            textOverlay.Rotation    = -5;
            generalListView.Refresh();
            NameColumn.ImageGetter += delegate(object rowObject)
            {
                var ob = rowObject as DocumentsDTO;
                if (ob == null)
                {
                    return(0);
                }
                if (ob.Name.EndsWith(".doc"))
                {
                    return(2);
                }
                if (ob.Name.EndsWith(".docx"))
                {
                    return(3);
                }
                if (ob.Name.EndsWith(".txt"))
                {
                    return(1);
                }
                if (ob.Name.EndsWith(".pdf"))
                {
                    return(5);
                }
                if (ob.Name.EndsWith(".jpeg") || ob.Name.EndsWith(".gif") || ob.Name.EndsWith(".png") ||
                    ob.Name.EndsWith(".jpg"))
                {
                    return(4);
                }
                if (ob.Name.EndsWith(".mp3") || ob.Name.EndsWith(".wav") || ob.Name.EndsWith(".flac"))
                {
                    return(7);
                }
                if (ob.Name.EndsWith(".avi") || ob.Name.EndsWith(".mp4") || ob.Name.EndsWith(".flac"))
                {
                    return(6);
                }
                return(0);
            };
            NameColumn2.ImageGetter += delegate(object rowObject)
            {
                var ob = rowObject as FoundDocumentsDto;
                if (ob == null)
                {
                    return(0);
                }
                if (ob.Name.EndsWith(".doc"))
                {
                    return(2);
                }
                if (ob.Name.EndsWith(".docx"))
                {
                    return(3);
                }
                if (ob.Name.EndsWith(".txt"))
                {
                    return(1);
                }
                if (ob.Name.EndsWith(".pdf"))
                {
                    return(5);
                }
                if (ob.Name.EndsWith(".jpeg") || ob.Name.EndsWith(".gif") || ob.Name.EndsWith(".png") ||
                    ob.Name.EndsWith(".jpg"))
                {
                    return(4);
                }
                if (ob.Name.EndsWith(".mp3") || ob.Name.EndsWith(".wav") || ob.Name.EndsWith(".flac"))
                {
                    return(7);
                }
                if (ob.Name.EndsWith(".avi") || ob.Name.EndsWith(".mp4") || ob.Name.EndsWith(".flac"))
                {
                    return(6);
                }
                return(0);
            };
            fileListView.AllColumns.ForEach(a => a.FillsFreeSpace        = true);
            searchFilesListView.AllColumns.ForEach(a => a.FillsFreeSpace = true);
            LoadTab(1);
        }
        public SkillListView()
        {
            // forms settings
            Dock = System.Windows.Forms.DockStyle.Fill;

            // my settings
            m_ToolTip = new SkillToolTip(this);
            Options.RegisterEvent(Options.EVENT.OPTIONS_SHOWLISTGROUPS.ToString(), delegate(object x) { this.ShowGroups = Options.ShowListGroups; });
            Options.RegisterEvent(Data.EVENT.DATA_LEARNSKILL.ToString(),
                                  delegate(object x)
            {
                if (this.SelectedItem != null)
                {
                    List <Skill> list = x as List <Skill>;
                    foreach (var sk in list)
                    {
                        if (this.SelectedItem.RowObject == sk)
                        {
                            // unselect
                            this.SelectedItem = null;
                            break;     // done obv only 1 thing can be selected (by our settings on the OLV)
                        }
                    }
                }
                UpdateFilter();
            });

            m_decorRowRed.BorderPen      = UITools.Pen_Red;
            m_decorRowRed.BoundsPadding  = new Size(1, 1);
            m_decorRowRed.CornerRounding = 4.0f;
            m_decorRowRed.FillBrush      = new SolidBrush(Color.FromArgb(32, UITools.Red));
            Constant = false; // can change skills by default thru this listview

            // olv settings
            this.AutoGenerateColumns           = false;
            this.ShowGroups                    = true;
            this.SortGroupItemsByPrimaryColumn = false;
            this.ModelFilter                   = new ModelFilter(Delegate_Filter);
            this.UseFiltering                  = true;
            this.ShowGroups                    = Options.ShowListGroups;
            this.GroupingStrategy              = new SkillListGroupingStrategy(m_pSortProperties);
            this.ModelCanDrop                 += SkillListView_OnModelCanDrop;
            SimpleDropSink sink1 = (SimpleDropSink)DropSink;

            sink1.CanDropOnItem        = false;
            sink1.CanDropOnBackground  = true;
            SmallImageList             = UITools.SmallIconImageList;
            GroupImageList             = UITools.ClasstagsImageList;
            ShowFilterMenuOnRightClick = false;
            FullRowSelect = true;
            SelectColumnsOnRightClickBehaviour = ColumnSelectBehaviour.None;
            MultiSelect = false;
            // hot item selection
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen      = new Pen(Color.Black, 2);
            rbd.BoundsPadding  = new Size(1, 1);
            rbd.CornerRounding = 4.0f;
            rbd.FillBrush      = new SolidBrush(Color.FromArgb(64, 128, 128, 128));
            // Put the decoration onto the hot item
            HotItemStyle            = new HotItemStyle();
            HotItemStyle.Decoration = rbd;
            this.UseHotItem         = true;
            this.ClearHotItem(); // cuz it defaults to the first item for some reason without any mouse doing
            this.HideSelection     = false;
            this.MouseMove        += SkillListView_OnMouseMove;
            this.MouseLeave       += SkillListView_OnMouseLeave;
            FormatRow             += SkillListView_OnFormatRow;
            BeforeCreatingGroups  += SkillListView_OnBeforeCreatingGroups;
            AboutToCreateGroups   += SkillListView_OnAboutToCreateGroups;
            this.MouseClick       += SkillListView_OnMouseClick;
            this.MouseDoubleClick += SkillListView_OnMouseDoubleClick;

            // columns
            List <ColumnSetting> vColumns = new List <ColumnSetting>();

            vColumns.Add(new ColumnSetting("Name", "Name", 200));
            vColumns.Add(new ColumnSetting("Class", "Class", 80));
            vColumns.Add(new ColumnSetting("Spec", "Spec", 100));
            vColumns.Add(new ColumnSetting("RequiredLevel", "Req. Level", 90));
            vColumns.Add(new ColumnSetting("AECost", "AE", 50));
            vColumns.Add(new ColumnSetting("TECost", "TE", 50));

            foreach (var col in vColumns)
            {
                OLVColumn olvCol = GenerateColumn();
                //olvCol.AspectName = col.m_szAspectName;
                // aspectgetter way faster (doesnt use reflection for property names)
                switch (col.m_szAspectName)
                {
                case "Name":
                    // do our sortprops copy
                    m_pSortProperties.SortColumn = olvCol;
                    // init the real one to sync it
                    this.PrimarySortColumn   = olvCol;
                    this.PrimarySortOrder    = SortOrder.Ascending;
                    this.SecondarySortColumn = olvCol;
                    this.SecondarySortOrder  = SortOrder.Ascending;
                    olvCol.HeaderImageKey    = "letter";
                    olvCol.AspectGetter      = delegate(object sk) { return((sk as Skill).Name); };
                    olvCol.ImageGetter       = delegate(object sk) {
                        return((sk as Skill).IconAsString);
                    };
                    break;

                case "Class":
                    olvCol.HeaderImageKey = "warrior";
                    olvCol.AspectGetter   = delegate(object sk) { return((sk as Skill).Class); };
                    olvCol.ImageGetter    = delegate(object sk) { return((sk as Skill).Class); };
                    break;

                case "Spec":
                    olvCol.HeaderImageKey = "ability_marksmanship";
                    olvCol.AspectGetter   = delegate(object sk) { return(UITools.FixSpec((sk as Skill).Spec)); };
                    olvCol.ImageGetter    = delegate(object sk)
                    {
                        Skill skill = sk as Skill;
                        switch (skill.Spec)
                        {
                        case "Balance":
                            return("spell_nature_starfall");

                        case "Feral":
                            return("ability_racial_bearform");

                        case "Restoration":
                            if (skill.Class == "Druid")
                            {
                                return("spell_nature_healingtouch");
                            }
                            else         // shaman
                            {
                                return("spell_nature_magicimmunity");
                            }

                        case "BeastMastery":
                            return("ability_hunter_beasttaming");

                        case "Marksmanship":
                            return("ability_marksmanship");

                        case "Survival":
                            return("ability_hunter_swiftstrike");

                        case "Arcane":
                            return("spell_holy_magicalsentry");

                        case "Fire":
                            return("spell_fire_flamebolt");

                        case "Frost":
                            return("spell_frost_frostbolt02");

                        case "Holy":
                            return("spell_holy_holybolt");        // they both use this (pal/priest)

                        case "Protection":
                            if (skill.Class == "Paladin")
                            {
                                return("spell_holy_devotionaura");
                            }
                            else         // warrior
                            {
                                return("ability_warrior_defensivestance");
                            }

                        case "Retribution":
                            return("spell_holy_auraoflight");

                        case "Discipline":
                            return("spell_holy_wordfortitude");

                        case "Shadow":
                            return("spell_shadow_shadowwordpain");

                        case "Assassination":
                            return("ability_rogue_eviscerate");

                        case "Combat":
                            return("ability_backstab");

                        case "Subtlety":
                            return("ability_stealth");

                        case "Elemental":
                            return("spell_nature_lightning");

                        case "Enhancement":
                            return("spell_nature_lightningshield");

                        case "Affliction":
                            return("spell_shadow_deathcoil");

                        case "Demonology":
                            return("spell_shadow_metamorphosis");

                        case "Destruction":
                            return("spell_shadow_rainoffire");

                        case "Arms":
                            return("ability_rogue_eviscerate");

                        case "Fury":
                            return("ability_warrior_innerrage");

                        case "General":
                            return("ability_dualwield");

                        default:
                            return("");
                        }
                    };
                    break;

                case "RequiredLevel":
                    olvCol.HeaderImageKey = "level";
                    olvCol.AspectGetter   = delegate(object sk) { return((sk as Skill).RequiredLevel); };
                    break;

                case "AECost":
                    olvCol.HeaderImageKey = "ae";
                    olvCol.AspectGetter   = delegate(object sk) { return((sk as Skill).AECost); };
                    break;

                case "TECost":
                    olvCol.HeaderImageKey = "te";
                    olvCol.AspectGetter   = delegate(object sk) { return((sk as Skill).TECost); };
                    break;
                }
                olvCol.Text  = col.m_szText;
                olvCol.Width = col.m_nWidth;
            }

            SetObjects(new List <Skill>(Data.AvailableList));
        }
示例#19
0
        /// <summary>
        /// Event on format cell
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private static void FastOlvOnFormatCell(object sender, FormatCellEventArgs args)
        {
            CodeExplorerItem obj = (CodeExplorerItem)args.Model;
            var curScope         = ParserHandler.GetScopeOfLine(Npp.Line.CurrentLine);

            // currently selected block
            if (curScope != null && !obj.IsNotBlock && obj.DisplayText.Equals(curScope.Name))
            {
                RowBorderDecoration rbd = new RowBorderDecoration {
                    FillBrush      = new SolidBrush(Color.FromArgb(50, ThemeManager.Current.MenuFocusedBack)),
                    BorderPen      = new Pen(Color.FromArgb(128, ThemeManager.Current.MenuFocusedBack.IsColorDark() ? ControlPaint.Light(ThemeManager.Current.MenuFocusedBack, 0.10f) : ControlPaint.Dark(ThemeManager.Current.MenuFocusedBack, 0.10f)), 1),
                    BoundsPadding  = new Size(-2, 0),
                    CornerRounding = 6.0f
                };
                args.SubItem.Decoration = rbd;
            }

            // display the flags
            int offset = -5;

            obj.DoForEachFlag((name, flag) => {
                Image tryImg = (Image)ImageResources.ResourceManager.GetObject(name);
                if (tryImg != null)
                {
                    ImageDecoration decoration = new ImageDecoration(tryImg, 100, ContentAlignment.MiddleRight)
                    {
                        Offset = new Size(offset, 0)
                    };
                    if (args.SubItem.Decoration == null)
                    {
                        args.SubItem.Decoration = decoration;
                    }
                    else
                    {
                        args.SubItem.Decorations.Add(decoration);
                    }
                    offset -= 20;
                }
            });

            // display the sub string
            if (offset < -5)
            {
                offset -= 5;
            }
            if (!string.IsNullOrEmpty(obj.SubString))
            {
                TextDecoration decoration = new TextDecoration(obj.SubString, 100)
                {
                    Alignment      = ContentAlignment.MiddleRight,
                    Offset         = new Size(offset, 0),
                    Font           = FontManager.GetFont(FontStyle.Bold, 10),
                    TextColor      = ThemeManager.Current.SubTextFore,
                    CornerRounding = 1f,
                    Rotation       = 0,
                    BorderWidth    = 1,
                    BorderColor    = ThemeManager.Current.SubTextFore
                };
                args.SubItem.Decorations.Add(decoration);
            }
        }
示例#20
0
        public frmMain()
        {
            InitializeComponent();

            // Change the material skin color.
            var instance = MaterialSkin.MaterialSkinManager.Instance;

            instance.AddFormToManage(this);
            MaterialSkin.ColorScheme scheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.PGrey900, MaterialSkin.Primary.PGrey900,
                                                                           MaterialSkin.Accent.PGrey900, MaterialSkin.TextShade.BLACK);
            instance.ColorScheme = scheme;
            instance.RemoveFormToManage(this);

            // Create text overlays with colors to match our theme.
            TextOverlay fileOverlay = lvIcons.EmptyListMsgOverlay as TextOverlay;

            fileOverlay.BorderWidth = 0f;
            fileOverlay.Font        = new Font(Font.FontFamily, 12);
            fileOverlay.TextColor   = Color.DimGray;
            fileOverlay.BackColor   = Color.FromArgb(255, 255, 255);
            fileOverlay.BorderColor = Color.FromArgb(40, 146, 255);

            // Create our HotTracking decoration.
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen                   = new Pen(Color.FromArgb(64, Color.White), 0);
            rbd.FillBrush                   = new SolidBrush(Color.FromArgb(64, SystemColors.Highlight));
            rbd.BoundsPadding               = new Size(0, 0);
            rbd.CornerRounding              = 0.0f;
            lvIcons.HotItemStyle            = new HotItemStyle();
            lvIcons.HotItemStyle.Decoration = rbd;

            // Create a custom column sorter.
            lvIcons.CustomSorter = CustomSorter;

            // Set our image selection delegates for both of our listviews.
            colStatus.ImageGetter = delegate(object x)
            {
                IconObject casted = (IconObject)x;
                switch (casted.Status)
                {
                case "Injected":
                    return(0);

                case "Idle":
                    return(1);

                case "Warning":
                    return(2);

                case "Error":
                    return(3);

                default:
                    return(1);
                }
            };

            // Set listview column aspects programmatically since we're utilizing executable encryption.
            colName.AspectGetter += delegate(object x)
            { return(((IconObject)x).Name); };
            colExtension.AspectGetter += delegate(object x)
            { return(((IconObject)x).Extension); };
            colPath.AspectGetter += delegate(object x)
            { return(((IconObject)x).Path); };
            colSize.AspectGetter += delegate(object x)
            { return(((IconObject)x).Size); };
            colLength.AspectGetter += delegate(object x)
            { return(((IconObject)x).Length); };
            colStatus.AspectGetter += delegate(object x)
            { return(((IconObject)x).Status); };
        }
示例#21
0
        public frmResults(List <ScanObject> results)
        {
            InitializeComponent();

            // Create text overlays with colors to match our theme.
            TextOverlay queueOverlay = lvResults.EmptyListMsgOverlay as TextOverlay;

            queueOverlay.BorderWidth = 0f;
            queueOverlay.Font        = new Font(Font.FontFamily, 12);
            queueOverlay.TextColor   = Color.DimGray;
            queueOverlay.BackColor   = Color.FromArgb(255, 255, 255);
            queueOverlay.BorderColor = Color.FromArgb(40, 146, 255);

            // Create our HotTracking decoration.
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen                     = new Pen(Color.FromArgb(64, Color.White), 0);
            rbd.FillBrush                     = new SolidBrush(Color.FromArgb(64, SystemColors.Highlight));
            rbd.BoundsPadding                 = new Size(0, 0);
            rbd.CornerRounding                = 0.0f;
            lvResults.HotItemStyle            = new HotItemStyle();
            lvResults.HotItemStyle.Decoration = rbd;

            // Setup aspect getters programatically in case we decide to encrypt our executable.
            colHost.AspectGetter     += delegate(object x) { return(((ScanObject)x).IP); };
            colHostname.AspectGetter += delegate(object x) { return(((ScanObject)x).Hostname); };
            colMAC.AspectGetter      += delegate(object x) { return(((ScanObject)x).MAC); };
            colPing.AspectGetter     += delegate(object x) { return(((ScanObject)x).Ping); };
            colOnline.AspectGetter   += delegate(object x) { return(((ScanObject)x).Online); };

            // Set our image selection delegates for both of our listviews.
            colHost.ImageGetter += delegate(object rowObject)
            {
                int        imageIndex = 0;
                ScanObject fo         = (ScanObject)rowObject;
                if (fo.Status == ScanStatus.Unknown)
                {
                    imageIndex = 0;
                }
                else if (fo.Status == ScanStatus.Dead)
                {
                    imageIndex = 1;
                }
                else if (fo.Status == ScanStatus.Alive)
                {
                    int    ping  = 0;
                    string parse = fo.Ping;
                    parse = parse.Replace("ms", "");
                    parse = parse.Trim(null);
                    int.TryParse(parse, out ping);
                    if (ping > 0 && ping < 70)
                    {
                        imageIndex = 3;
                    }
                    else if (ping > 70 && ping < 200)
                    {
                        imageIndex = 4;
                    }
                    else if (ping >= 200)
                    {
                        imageIndex = 5;
                    }
                    else
                    {
                        imageIndex = 2;
                    }
                }
                else
                {
                    imageIndex = 0;
                }
                return(imageIndex);
            };

            // Set our objects.
            lvResults.AddObjects(results);
            Text += " - " + lvResults.Items.Count.ToString() + " Results";
        }
示例#22
0
        public MasterMDI(GlobalEnums.NmvnTaskID nmvnTaskID, Form loadedView, bool isMainView)
        {
            InitializeComponent();

            try
            {
                this.nmvnTaskID = nmvnTaskID;
                IModuleAPIRepository moduleAPIRepository = CommonNinject.Kernel.Get <IModuleAPIRepository>();
                this.moduleAPIs = new ModuleAPIs(moduleAPIRepository);

                if (GlobalEnums.NMVNOnly)
                {
                    this.panelTopRight.Visible = false;
                }

                switch (this.nmvnTaskID)
                {
                case GlobalEnums.NmvnTaskID.SmartCoding:
                    this.buttonEscape.Visible              = false;
                    this.buttonLoading.Visible             = false;
                    this.buttonNew.Visible                 = false;
                    this.buttonEdit.Visible                = false;
                    this.buttonSave.Visible                = false;
                    this.buttonDelete.Visible              = false;
                    this.buttonImport.Visible              = false;
                    this.buttonExport.Visible              = false;
                    this.toolStripSeparatorImport.Visible  = false;
                    this.buttonApprove.Visible             = false;
                    this.buttonVoid.Visible                = false;
                    this.toolStripSeparatorApprove.Visible = false;
                    this.toolStripSeparatorVoid.Visible    = false;
                    this.buttonPrint.Visible               = false;
                    this.buttonPrintPreview.Visible        = false;
                    this.toolStripSeparatorPrint.Visible   = false;
                    this.separatorInputData.Visible        = false;
                    this.labelSearchBarcode.Visible        = false;
                    this.toolStripTopHead.Visible          = false;
                    break;

                case GlobalEnums.NmvnTaskID.Batch:
                    this.Size            = new Size(1180, 732);
                    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
                    this.MinimizeBox     = false; this.MaximizeBox = false; this.WindowState = FormWindowState.Normal;

                    this.panelTopRight.Visible = false;
                    this.panelTopLeft.Dock     = DockStyle.Fill;
                    break;

                case GlobalEnums.NmvnTaskID.FillingLine:
                    this.Size            = new Size(620, 360);
                    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
                    this.MinimizeBox     = false; this.MaximizeBox = false; this.WindowState = FormWindowState.Normal;

                    this.toolStripTopHead.Visible = false;
                    this.panelTopRight.Visible    = false;
                    this.panelTopLeft.Dock        = DockStyle.Fill;
                    this.statusStrip.Visible      = false;
                    break;

                default:
                    break;
                }

                this.beginingDateBinding = this.dateTimexLowerFillterDate.DataBindings.Add("Value", GlobalEnums.GlobalOptionSetting, CommonExpressions.PropertyName <OptionSetting>(p => p.LowerFillterDate), true, DataSourceUpdateMode.OnPropertyChanged);
                this.endingDateBinding   = this.dateTimexUpperFillterDate.DataBindings.Add("Value", GlobalEnums.GlobalOptionSetting, CommonExpressions.PropertyName <OptionSetting>(p => p.UpperFillterDate), true, DataSourceUpdateMode.OnPropertyChanged);

                this.beginingDateBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete);
                this.endingDateBinding.BindingComplete   += new BindingCompleteEventHandler(CommonControl_BindingComplete);

                this.buttonNaviBarHeaderVisibleBinding         = this.buttonNaviBarHeader.DataBindings.Add("Visible", this.naviBarModuleMaster, "Collapsed", true, DataSourceUpdateMode.OnPropertyChanged);
                this.buttonNaviBarHeaderVisibleBinding.Parse  += new ConvertEventHandler(buttonNaviBarHeaderVisibleBinding_Parse);
                this.buttonNaviBarHeaderVisibleBinding.Format += new ConvertEventHandler(buttonNaviBarHeaderVisibleBinding_Format);

                #region fastNMVNTask
                this.fastNMVNTask.AboutToCreateGroups += fastNMVNTask_AboutToCreateGroups;
                this.fastNMVNTask.ShowGroups           = true;

                //this.fastNMVNTask.UseTranslucentHotItem = true; //DEFAULT HotItem
                fastNMVNTask.UseTranslucentHotItem = false;
                fastNMVNTask.UseHotItem            = true;
                fastNMVNTask.UseExplorerTheme      = false;

                RowBorderDecoration rbd = new RowBorderDecoration();
                rbd.BorderPen      = new Pen(Color.SeaGreen, 2);
                rbd.FillBrush      = null;
                rbd.CornerRounding = 4.0f;
                HotItemStyle hotItemStyle2 = new HotItemStyle();
                hotItemStyle2.Decoration  = rbd;
                fastNMVNTask.HotItemStyle = hotItemStyle2;
                #endregion fastNMVNTask


                if (loadedView != null)
                {
                    this.naviBarModuleMaster.Visible = false;
                    this.OpenView(loadedView);
                }
                else
                {
                    this.InitializeModuleMaster();
                    //this.buttonNaviBarHeader_Click(this.buttonNaviBarHeader, new EventArgs());
                }

                DateTime buildDate = new FileInfo(Assembly.GetExecutingAssembly().Location).LastWriteTime;
                this.statusVersion.Text        = "Version 1.0." + GlobalVariables.ConfigVersionID(GlobalVariables.ConfigID).ToString() + ", Date: " + buildDate.ToString("dd/MM/yyyy HH:mm:ss");
                this.labelDataSource.Text      = this.moduleAPIs.DataSource;
                this.labelApplicationRole.Text = ApplicationRoles.Required && ApplicationRoles.Name != "" && ApplicationRoles.ExceptionMessage == "" ? "[Application Role]" : "[Windows Authentication]";

                this.comboSearchBarcode.Text       = this.searchPlaceHolder;
                this.toolUserReferences.Visible    = ContextAttributes.User.IsDatabaseAdmin && false; //HIDE AT CHEVRON
                this.toolUserGroupControls.Visible = ContextAttributes.User.IsDatabaseAdmin;
                this.statusUserDescription.Text    = ContextAttributes.User.FullyQualifiedUserName;

                this.panelTopRight.Width = (this.nmvnTaskID == GlobalEnums.NmvnTaskID.SmartCoding ? 10 : this.labelSearchBarcode.Width) + this.comboSearchBarcode.Width + this.buttonSearchBarcode.Width + 10;
                this.panelTop.Height     = this.nmvnTaskID == GlobalEnums.NmvnTaskID.SmartCoding ? 61 : 39;

                #region JUST DISABLE FOR CHEVRON
                int?accessLevel = moduleAPIRepository.TotalSmartCodingEntities.GetAccessLevel(ContextAttributes.User.UserID, (int)TotalBase.Enums.GlobalEnums.NmvnTaskID.MonthEnd, 0).Single();
                if (accessLevel < (int)TotalBase.Enums.GlobalEnums.AccessLevel.Readable)
                {
                    this.buttonLockedDate.Enabled = false;
                }

                this.txtLockedDate.Visible = false;
                //this.buttonLockedDate.Visible = false;
                #endregion

                this.isMainView = isMainView;
                if (this.isMainView)
                {
                    this.AddEventLogs("Log on application");
                }
            }
            catch (Exception exception)
            {
                ExceptionHandlers.ShowExceptionMessageBox(this, exception);
            }
        }