Ejemplo n.º 1
0
 public Form1()
 {
     InitializeComponent();
     drpShdw = new DropShadowCS();
     drpShdw.CreateWNDParams(CreateParams);
     drpShdw.CreateDropShadow(this, this);
 }
Ejemplo n.º 2
0
        public RichFontNameEditor(RichTextBox richEditor)
        {
            InitializeComponent();

            DropShadowCS dropShadow = new DropShadowCS();

            dropShadow.CreateDropShadow(this, new Control[]
            {
                this,
                label1,
                label2,
            });
            dropShadow.CreateWNDParams(CreateParams);

            string[] installedFontNames = new string[0];
            installedFontNames = GetInstalledFonts();
            fontName.Items.AddRange(installedFontNames);

            this.richEditor = richEditor;

            string editorFontName = richEditor.SelectionFont.Name;

            for (int i = 0; i < fontName.Items.Count; i++)
            {
                if (fontName.Items[i].ToString() == editorFontName)
                {
                    fontName.Text = editorFontName;
                }
            }
        }
Ejemplo n.º 3
0
        public RichFontSizeEditor(RichTextBox richEditor)
        {
            InitializeComponent();

            DropShadowCS dropShadow = new DropShadowCS();

            dropShadow.CreateDropShadow(this, new Control[]
            {
                this,
                label1,
                label2,
            });
            dropShadow.CreateWNDParams(CreateParams);

            this.richEditor = richEditor;

            string[] fontSizeParts = new string[2];
            string   fontSizeStr   = richEditor.SelectionFont.Size.ToString();

            if (fontSizeStr.Contains("."))
            {
                fontSizeParts         = fontSizeStr.Split('.');
                fontSizeWhole.Value   = Convert.ToDecimal(fontSizeParts[0]);
                fontSizeDecimal.Value = Convert.ToDecimal(fontSizeParts[1].Substring(0, 2));
            }
            else
            {
                fontSizeWhole.Value   = Convert.ToDecimal(fontSizeStr);
                fontSizeDecimal.Value = 0;
            }
        }
Ejemplo n.º 4
0
        public FontNameEditor(RichTextBox basicEditor, TextEditorControl advancedEditor, FastColoredTextBox superAdvancedEditor)
        {
            InitializeComponent();

            DropShadowCS dropShadow = new DropShadowCS();

            dropShadow.CreateDropShadow(this, new Control[]
            {
                this,
                label1,
                label2,
            });
            dropShadow.CreateWNDParams(CreateParams);

            string[] installedFontNames = new string[0];
            installedFontNames = GetInstalledFonts();
            fontName.Items.AddRange(installedFontNames);

            this.basicEditor         = basicEditor;
            this.advancedEditor      = advancedEditor;
            this.superAdvancedEditor = superAdvancedEditor;

            if (basicEditor != null && advancedEditor == null && superAdvancedEditor == null)
            {
                string editorFontName = basicEditor.Font.Name;

                for (int i = 0; i < fontName.Items.Count; i++)
                {
                    if (fontName.Items[i].ToString() == editorFontName)
                    {
                        fontName.Text = editorFontName;
                    }
                }
            }
            else if (basicEditor == null && advancedEditor != null && superAdvancedEditor == null)
            {
                string editorFontName = advancedEditor.Font.Name;

                for (int i = 0; i < fontName.Items.Count; i++)
                {
                    if (fontName.Items[i].ToString() == editorFontName)
                    {
                        fontName.Text = editorFontName;
                    }
                }
            }
            else if (basicEditor == null && advancedEditor == null && superAdvancedEditor != null)
            {
                string editorFontName = superAdvancedEditor.Font.Name;

                for (int i = 0; i < fontName.Items.Count; i++)
                {
                    if (fontName.Items[i].ToString() == editorFontName)
                    {
                        fontName.Text = editorFontName;
                    }
                }
            }
        }
Ejemplo n.º 5
0
        public Form1()
        {
            InitializeComponent();
            DropShadowCS shadow = new DropShadowCS();

            shadow.CreateWNDParams(CreateParams);
            shadow.CreateDropShadow(this);

            topmost.Checked = Settings.Default.TopMost;
            TopMost         = topmost.Checked;

            gameDir.Text = Settings.Default.GameDirectory;
        }
Ejemplo n.º 6
0
        public EditorSelectionWindow()
        {
            InitializeComponent();

            DropShadowCS dropShadow = new DropShadowCS();

            dropShadow.CreateDropShadow(this, new Control[]
            {
                this,
                windowTitle,
            });
            dropShadow.CreateWNDParams(CreateParams);

            CheckForUpdates(this);
        }
Ejemplo n.º 7
0
        public FontSizeEditor(RichTextBox basicEditor, TextEditorControl advancedEditor, FastColoredTextBox superAdvancedEditor)
        {
            InitializeComponent();

            DropShadowCS dropShadow = new DropShadowCS();

            dropShadow.CreateDropShadow(this, new Control[]
            {
                this,
                label1,
                label2,
            });
            dropShadow.CreateWNDParams(CreateParams);

            this.basicEditor         = basicEditor;
            this.advancedEditor      = advancedEditor;
            this.superAdvancedEditor = superAdvancedEditor;

            string[] fontSizeParts = new string[2];
            if (basicEditor != null && advancedEditor == null && superAdvancedEditor == null)
            {
                string fontSizeStr = basicEditor.Font.Size.ToString();
                if (fontSizeStr.Contains("."))
                {
                    fontSizeParts         = fontSizeStr.Split('.');
                    fontSizeWhole.Value   = Convert.ToDecimal(fontSizeParts[0]);
                    fontSizeDecimal.Value = Convert.ToDecimal(fontSizeParts[1].Substring(0, 2));
                }
                else
                {
                    fontSizeWhole.Value   = Convert.ToDecimal(fontSizeStr);
                    fontSizeDecimal.Value = 0;
                }
            }
            else if (basicEditor == null && advancedEditor != null && superAdvancedEditor == null)
            {
                string fontSizeStr = advancedEditor.Font.Size.ToString();
                if (fontSizeStr.Contains("."))
                {
                    fontSizeParts         = fontSizeStr.Split('.');
                    fontSizeWhole.Value   = Convert.ToDecimal(fontSizeParts[0]);
                    fontSizeDecimal.Value = Convert.ToDecimal(fontSizeParts[1].Substring(0, 2));
                }
                else
                {
                    fontSizeWhole.Value   = Convert.ToDecimal(fontSizeStr);
                    fontSizeDecimal.Value = 0;
                }
            }
            if (basicEditor == null && advancedEditor == null && superAdvancedEditor != null)
            {
                string fontSizeStr = superAdvancedEditor.Font.Size.ToString();
                if (fontSizeStr.Contains("."))
                {
                    fontSizeParts         = fontSizeStr.Split('.');
                    fontSizeWhole.Value   = Convert.ToDecimal(fontSizeParts[0]);
                    fontSizeDecimal.Value = Convert.ToDecimal(fontSizeParts[1].Substring(0, 2));
                }
                else
                {
                    fontSizeWhole.Value   = Convert.ToDecimal(fontSizeStr);
                    fontSizeDecimal.Value = 0;
                }
            }
        }