Пример #1
0
        private void NewButton_Click(object sender, EventArgs e)
        {
            var    button = (sender as Button);
            string text   = button.Tag.ToString();

            CopyPasta.PasteToDiscord(text);
        }
Пример #2
0
        private void NewButton_Click(object sender, EventArgs e)
        {
            var    button = (sender as Button);
            string text   = button.Tag.ToString().Replace("\\n", Environment.NewLine);

            CopyPasta.PasteToTarget(text);
        }
Пример #3
0
        private void LoadWindowPosition()
        {
            WindowRect.RECT myRect;
            var             discordWindow = CopyPasta.GetDiscordWindow();

            if (discordWindow != null)
            {
                WindowRect.GetWindowRect(new HandleRef(this, discordWindow), out myRect);
                AlignMainWindow(myRect);
            }
            if (Settings.Default.MainWindowSize.Height != 0 && Settings.Default.MainWindowSize.Width != 0)
            {
                this.Size = Settings.Default.MainWindowSize;
            }
        }