private void EditWatchlistItem_Click(object sender, EventArgs e)
        {
            //throw new NotImplementedException();
            //ToolStripMenuItem item = sender as ToolStripMenuItem;
            //LogManager.AddLogMessage(Name, "WatchlistItem_Click", item.Text, LogManager.LogMessageType.DEBUG);
            //toolStripDropDownButton_watchlists.Text = item.Text;
            //FormManager.OpenUrl(item.Tag.ToString());
            Form form = new Form()
            {
                Text   = "Edit TradingView Watchlists",
                Width  = 1280,
                Height = 600
            };

            TradingViewOverviewsListEditorControl control = new TradingViewOverviewsListEditorControl()
            {
                Dock = DockStyle.Fill
            };

            control.tradingViewManagerControl = this;
            form.Controls.Add(control);
            PreferenceManager.SetTheme(PreferenceManager.preferences.Theme.type, form);

            form.Show();
        }
        private void EditWatchlistItem_Click(object sender, EventArgs e)
        {
            Form form = new Form()
            {
                Text   = "Edit Arbitrage Watchlists",
                Width  = 1280,
                Height = 600
            };

            ArbitrageWatchListEditorControl control = new ArbitrageWatchListEditorControl()
            {
                Dock = DockStyle.Fill
            };

            control.arbitrageManagerControl = this;
            form.Controls.Add(control);
            PreferenceManager.SetTheme(PreferenceManager.preferences.Theme.type, form);

            form.Show();
        }
        private void toolStripDropDownButton_options_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            //LogManager.AddLogMessage(Name, "toolStripDropDownButton_options_DropDownItemClicked", e.ClickedItem.Text + " | " + e.ClickedItem.Tag, LogManager.LogMessageType.OTHER);
            string propertyName = e.ClickedItem.Tag.ToString();

            switch (propertyName)
            {
            case "hide_top_toolbar":
            case "withdateranges":
            case "allow_symbol_change":
            case "save_image":
            case "hide_side_toolbar":
            case "hideideas":
            case "hideideasbutton":
            case "enable_publishing":
            case "ShowWatchlist":
            case "ShowIndicators":
            case "details":
            case "stocktwits":
            case "headlines":
            case "hotlist":
            case "calendar":
            {
                Type         type  = PreferenceManager.TradingViewPreferences.AdvancedChartParameters.GetType();
                PropertyInfo prop  = type.GetProperty(propertyName);
                bool         value = (bool)(prop.GetValue(PreferenceManager.TradingViewPreferences.AdvancedChartParameters, null));
                prop.SetValue(PreferenceManager.TradingViewPreferences.AdvancedChartParameters, !value, null);
                //LogManager.AddLogMessage(Name, "toolStripDropDownButton_options_DropDownItemClicked", "SWITCH : " + propertyName + " : " + value, LogManager.LogMessageType.OTHER);
                UpdateOptionsMenu();
                PreferenceManager.UpdatePreferenceFile(PreferenceManager.PreferenceType.TradingView);
                SetFullView();
                break;
            }

            case "light":
            case "dark":
            {
                //LogManager.AddLogMessage(Name, "toolStripDropDownButton_options_DropDownItemClicked", "LIGHT OR DARK : " + propertyName, LogManager.LogMessageType.OTHER);

                if (propertyName == "light")
                {
                    PreferenceManager.TradingViewPreferences.AdvancedChartParameters.theme = TradingViewColorTheme.Light;
                }
                else
                {
                    PreferenceManager.TradingViewPreferences.AdvancedChartParameters.theme = TradingViewColorTheme.Dark;
                }
                UpdateOptionsMenu();
                PreferenceManager.UpdatePreferenceFile(PreferenceManager.PreferenceType.TradingView);
                SetFullView();
                SetCustomView();
                UpdateUI(true);
                break;
            }

            case "Font":
                FontDialog dialog = new FontDialog()
                {
                    Font = ParentForm.Font
                };
                DialogResult result = dialog.ShowDialog();
                if (result == DialogResult.OK)
                {
                    if (PreferenceManager.SetFormFont(ParentForm, dialog.Font))
                    {
                        UpdateUI(true);
                    }
                }
                UpdateUI(true);
                break;

            case "FontIncrease":
                if (PreferenceManager.SetFormFont(ParentForm, new Font(ParentForm.Font.FontFamily, ParentForm.Font.Size + 1, ParentForm.Font.Style)))
                {
                    UpdateUI(true);
                }
                break;

            case "FontDecrease":
                if (PreferenceManager.SetFormFont(ParentForm, new Font(ParentForm.Font.FontFamily, ParentForm.Font.Size - 1, ParentForm.Font.Style)))
                {
                    UpdateUI(true);
                }
                break;

            case "EditOverviewList":
                LogManager.AddLogMessage(Name, "toolStripDropDownButton_options_DropDownItemClicked", "EDIT OVERVIEWS", LogManager.LogMessageType.OTHER);

                Form form = new Form()
                {
                    Text   = "Edit TradingView Overviews List",
                    Width  = 950,
                    Height = 600
                };

                TradingViewOverviewsListEditorControl control = new TradingViewOverviewsListEditorControl()
                {
                    Dock = DockStyle.Fill
                };
                control.tradingViewManagerControl = this;
                form.Controls.Add(control);
                PreferenceManager.SetTheme(PreferenceManager.preferences.Theme.type, form);

                form.Show();

                /*
                 * if (PreferenceManager.SetFormFont(ParentForm, new Font(ParentForm.Font.FontFamily, ParentForm.Font.Size - 1, ParentForm.Font.Style)))
                 * {
                 *  UpdateUI(true);
                 * }
                 */
                break;

            default:
            {
                LogManager.AddLogMessage(Name, "toolStripDropDownButton_options_DropDownItemClicked", "NOTDEFINED : " + propertyName, LogManager.LogMessageType.OTHER);
                break;
            }
            }
        }