X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=KancolleSniffer%2FErrorDialog.cs;h=cb3e37c75f7e9709b1e59b04f88340ce48a0a595;hb=b37823d86735fec439f3fe052e6adf8528fbbcad;hp=8e395d3a5a272e8392b014779c39a1bb5102fa81;hpb=eccd9f9f28625fcc4cadc8638d601d91ffeca869;p=kancollesniffer%2FKancolleSniffer.git diff --git a/KancolleSniffer/ErrorDialog.cs b/KancolleSniffer/ErrorDialog.cs index 8e395d3..cb3e37c 100644 --- a/KancolleSniffer/ErrorDialog.cs +++ b/KancolleSniffer/ErrorDialog.cs @@ -1,20 +1,18 @@ // Copyright (C) 2015 Kazuhiro Fujieda // -// This program is part of KancolleSniffer. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// KancolleSniffer is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. +// http://www.apache.org/licenses/LICENSE-2.0 // -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, see . +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System; using System.Drawing; using System.Windows.Forms; @@ -32,11 +30,22 @@ namespace KancolleSniffer public DialogResult ShowDialog(IWin32Window owner, string message, string details) { - if (Visible) + if (Visible || checkBoxDisable.Checked) return DialogResult.Ignore; labelMessage.Text = message; - textBoxDetails.Text = details.Length < 1500 ? details : details.Substring(0, 1500) + "..."; + textBoxDetails.Text = details; return ShowDialog(owner); } + + protected override void OnFontChanged(EventArgs e) + { + base.OnFontChanged(e); + textBoxDetails.Font = new Font(new FontFamily("MS Gothic"), Font.Size); + } + + private void buttonCopyToClipboard_Click(object sender, EventArgs e) + { + Clipboard.SetText(textBoxDetails.Text); + } } } \ No newline at end of file