コード例 #1
0
 OpenFile(int MAXFILECOUNT = 10)
 {
     openFiles = new OFile[MAXFILECOUNT];
     lenght    = 0;
     for (int i = 0; i < 10; i++)
     {
         openFiles[i] = new OFile();
     }
 }
コード例 #2
0
ファイル: FileSystem.cs プロジェクト: wxpftd/OSTraining
 private void listView2_DoubleClick(object sender, EventArgs e)
 {
     if (listView2.SelectedIndices.Count > 0)
     {
         if (currentPath == @"/")
         {
             if (listView2.SelectedItems[0].ImageIndex == 0)
             {
                 ViewFlush(currentPath + listView2.SelectedItems[0].Text);
             }
             else
             {
                 oneOpenFile = new OFile();
                 FileAttribute fa = fe.FindFileByFullPath(currentPath, listView2.SelectedItems[0].Text);
                 oneOpenFile.beginNum = fa.beginPiece;
                 oneOpenFile.flag     = fa.isReadOnly;
                 Editor editor = new Editor();
                 editor.Show();
             }
         }
         else
         {
             if (listView2.SelectedItems[0].ImageIndex == 0)
             {
                 ViewFlush(currentPath + @"/" + listView2.SelectedItems[0].Text);
             }
             else
             {
                 oneOpenFile = new OFile();
                 FileAttribute fa = fe.FindFileByFullPath(currentPath, listView2.SelectedItems[0].Text);
                 oneOpenFile.beginNum = fa.beginPiece;
                 oneOpenFile.flag     = fa.isReadOnly;
                 Editor editor = new Editor();
                 editor.Show();
             }
         }
     }
 }