㈱東アジア国際産業グループ
ホールディングス
EAIIG HD の社内業務
㈱東アジア国際産業グループ
ホールディングス
EAIIG HD の社内業務
東アジア国際産業グループ ホールディングス
関連リンク:ソフトウェア開発の備忘録3
インテグレートグループではありません。
このサイトは、EAIIG企業グループ の指示連絡用です。
許可の無い方々の閲覧は、ご遠慮ください。
無関係の方々の閲覧は、ご遠慮ください。
《社内ページ》
《 in Company Page 》
EAIIG HDの社内業務 >ソフトウェア開発・備忘録・ヒント集
using System;
using System.IO;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string sourceDirectory = @"C:\current";
string archiveDirectory = @"C:\archive";
try
{
var txtFiles = Directory.EnumerateFiles(sourceDirectory);
foreach (string currentFile in txtFiles)
{
string fileName = currentFile.Substring(sourceDirectory.Length + 1);
Directory.Move(currentFile, Path.Combine(archiveDirectory, fileName));
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
2021/03/15 17:03:10
FileStream fs = File.OpenRead( "c:\\tmp\test.txt" );
byte[] b = new byte[ 16 ];
fs.Read( b, 0, b.Length );
int hash = b.GetHashCode();
fs.Close();
2021/01/23 09:58:55 日付をファイル名にするときは、半角スラッシュをハイフンに、空白をアンダーバーに、半角コロンを全角にすると良い。
2020/09/24 15:05:55 [Windows, Form, C#] ( false == Enabled )のとき、イベントハンドラを起動するには。
・たとえば、TextBox.Enabled が false なら、その上位のフォームに、イベントハンドラを置く。
2020/11/11 10:54:10 ファイルに対してのコマンドのヒント
・書き込み禁止のとき
・編集可能とするとき
2020/10/13 13:50:35
C#のインターフェース( interface )のメモ( memo )
・クラスのパブリックメソッドとなる名前だけで中身の無い定義である。が、少しあることもある。
ex1. It is a definition with no content, only the name that becomes the public method of the class. However, there may be a few.
ex2. It is a define with 'no content and only the name' that becomes the public method of the class. However, there may be a few Logic.
・中身はほとんどの場合アダプタメソッドとして実装、つまり他のメソッドである。しかし、直接、記述してよい。
Most of the content is implemented as an adapter method, that is, another method. However, it may be described directly.
・メリットとして、「コードセキュリティ」のアップと
As a merit, "code security" is improved and
クラスの一部のメソッドを、クラス名と異なる「インターフェース名」でパブリックオープンできる。
Some methods of a class can be publicly opened with an "interface name" different from the class name.
その結果、異なるクラスの「同じ名前」のメソッド群を、インターフェース名で、他のメソッドの引数に指定できる。
As a result, methods of different classes with "same name" can be specified as arguments of other methods by interface name.
たとえば、クラス名:OriginalClass01 のとき、このクラスの一部のメソッドをインターフェース名 IClass01b としておき、さらに、Class02、Class03 などで、インターフェース指定すれば、これらのクラスのメソッドを、IClass01b としてオープンできる。
For example, when the class name is OriginalClass01, some methods of this class are set to the interface name IClass01b, and if the interface is specified by Class02, Class03, etc., the methods of these classes can be opened as IClass01b.
クラスの一部を指定できるエイリアス名(別名)でもある。
It is also an alias name that allows you to specify part of the class.
メソッド名が同じで、そのロジックが少しずつ違うようなクラスで、応用できる。
It can be applied to a class that has the same method name but slightly different logic.
以下に記述例を示すが・・・
A description example is shown below ...
2021/02/22 15:14:40 ショートカットからファイル名の取得だが・・・以下を参考にしてくれ。要望があれば、PeacePad のソースを公開する。アセンブリの設定が必要だと記憶があるんだが・・・どうか?
https://social.msdn.microsoft.com/Forums/ja-JP/a4adb13f-ecae-4d85-b56e-4bb87e28d4b4/lnk?forum=netfxgeneralja
2021/01/23 09:58:55 日付をファイル名にするときは、半角スラッシュをハイフンに、空白をアンダーバーに、半角コロンを全角にすると良い。 メモ:F4に日付張り込み。ファイル名に使える形式で。
2020/10/14 10:21:02 PeacePad.exe v0.98.0088.03 セキュリティ強化
・TextBox、ログなどのクラッキング対策。
・c:\tmp にデバッグログが出力されるので注意してください。
2020/09/29 23:32:39 PeacePad.exe v0.98.0088.02 2020/10/01 09:51:44 ダウンロードできた!
( English sentence is not Just fiting. Please, Be careful. )
・メニューの文字を大きくした。IDE( Visual Studio 2015 )で調整。
( The Menu string is Large. by IDE adjust. )
・メニューの背景のデザインを若干修正した。(しかし、考えている。元に戻すかも)
( The Menu's background desing are adjusted a few(little), but thinking now, reset?)
・IDE で、Jpg, png ファイルなどを、Resource にする。
・新しく名前を付けて保存するとき、反転文字列がファイル名になる。
・しかし、既に、ファイル名があるときは、機能しない(仕様)。
・ファイル保存の確認メッセージBOXに、ファイル名を表示。
・編集メニュー>「編集ロック」機能を追加。
(重要:上位のForm にイベントハンドラを置くこと)
・ダブルクリック時の反転文字列の選択範囲を アジャストした。
・TextBoxで反転文字列を改行したとき、文字列が削除されないようにした。
・検索のとき、ボタンを押してからTextBoxにフォーカスを当て、マウスホイールでスクロールできる。
・(反転文字列の保持機能は変更になった ) 検索ボタンを押したときだけ機能する。
・下向き検索のとき、反転文字列がTextBoxの中心行の下側に出るようにしたが位置は不定(仕様)。
・潜在不具合/障害の修正
・上向き検索のとき、例外メッセージBOXが出る障害を修正。
・ログフォルダ名にアセンブリ番号が付いていた。
・その他
///////////////////////////////////////////////////////////////////////////
/// <summary>
/// TextBoxにフォーカス移動 v0.98.0080
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void xxx_TextEditBox011_MouseEnter( object sender, EventArgs e )
{
// v0.98.0080.01 v0.98.0084.01 trial
if ( ( false == this.comboBox1.Focused ) &&
( false == this.comboBox2.Focused ) ) {
this.getCurrentTextBox().Focus();
}
}
2020/09/29 18:54:23 BasePad の要求仕様
・企業活動との整合性の検討・・・無償提供フリーエディタのソースコードであるため。
・具体的な要求仕様の策定。
・マスターオーナーCEOの個人開発エディタ「PeacePad」から技術の伝承・継承のため。
・基本構造
・TextChangedイベントハンドラ による基本構造の実装
・書き直しができないログ
・「ファイル」メニュー
・エンコード BOMありUTF-8
・ファイルオープン機能
・「よく使うファイル」「最近使ったファイル」機能
・ファイル保存、クローズ機能
・Windows「メモ帳」程度の印刷機能
・基本の「編集」メニュー
・簡易検索機能
・「設定」メニュー
・「ヘルプ」