Beispiel #1
0
 bool WriteFromGRDECL(string file)
 {
     try
     {
         using (StreamWriter sw = new StreamWriter(file, true))
         {
             sw.WriteLine(string.Empty);
             sw.WriteLine(grdecl_kw_specgrid);
             sw.WriteLine(NX.ToString() + " " + NY.ToString() + " " + NZ.ToString() + " 1 F /");
             sw.WriteLine(string.Empty);
             sw.WriteLine("COORDSYS");
             sw.WriteLine("1 " + NZ + " /");
         }
     }
     catch (Exception)
     {
         Init();
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ScreenWork();
            MessageBox.Show(SWH.ToString() + " " + SWW.ToString() + "\n" + NX.ToString() + " " + NY.ToString() + "\n" + PSH.ToString() + " " + PSW.ToString());



            int x = -SWW, y = 0;


            for (int i = 0; i < NY; i++)
            {
                for (int j = 0; j < NX; j++)
                {
                    Process P = Process.Start("notepad");
                    // Process P = Process.Start(S,"-File "+PS);

                    while (P.MainWindowHandle == IntPtr.Zero)
                    {
                        Application.DoEvents();
                    }

                    MoveWindow(P.MainWindowHandle, x + SWW, y, SWW, SWH, true);
                    SetWindowText(P.MainWindowHandle, "" + i + " " + j);
                    x += SWW;
                }
                x  = -SWW;
                y += SWH;
            }

            /*Process P1 = Process.Start("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe");
             * while (P1.MainWindowHandle == IntPtr.Zero)
             *  Application.DoEvents();
             *
             * MoveWindow(P1.MainWindowHandle, 201, 0, 200, 200, true);*/
        }