void AskEclipse() { while (true) { Eclipse eclipse = new Eclipse(); messages = eclipse.ProjectListString(); Thread.Sleep(200); } }
void AskEclipse() { while(true) { Eclipse eclipse = new Eclipse(); messages = eclipse.ProjectListString(); Thread.Sleep(200); } }
//String last_error = ""; public EclipseInput(string project_name, string file_name) : base(file_name) { this.project_name = project_name; eclipse = new Eclipse(); //This should definitely be moved into Euclid's API. Clients of an API should not have to do this much work! /* * string project_list_string = eclipse.ProjectListString(); * string project_string = ""; * foreach(string s in project_list_string.Split('\n')) * { * Debug.Log("Project : " + s); * if(!s.Equals("")) * { * string[] project_string_split = s.Split(','); * string name = project_string_split[1].Split(':')[1].Replace("\"",""); * * if(name.Equals(project_name)) * { * project_path = project_string_split[2].Split(':')[1].Replace("\"",""); * } * } * } * * * //If no Eclipse project was found, we create a new one. * if(project_string.Equals("")) * { * string[] file_name_split = file_name.Split('/'); * string[] file_name_split_path = new string[file_name_split.Length-1]; * * for(int i = 0; i < file_name_split.Length - 1; i++) * { * file_name_split_path[i] = file_name_split[i]; * } * * project_path = String.Join("/",file_name_split_path); * * eclipse.CreateNewProject(project_path); * } * * * * short_file_name = GetFileName().Replace(project_path,""); */ /* * Thread java_thread = (new Thread(javaCompile)); * java_thread.Start(); */ }
//String last_error = ""; public EclipseInput(string project_name, string file_name) : base(file_name) { this.project_name = project_name; eclipse = new Eclipse(); //This should definitely be moved into Euclid's API. Clients of an API should not have to do this much work! /* string project_list_string = eclipse.ProjectListString(); string project_string = ""; foreach(string s in project_list_string.Split('\n')) { Debug.Log("Project : " + s); if(!s.Equals("")) { string[] project_string_split = s.Split(','); string name = project_string_split[1].Split(':')[1].Replace("\"",""); if(name.Equals(project_name)) { project_path = project_string_split[2].Split(':')[1].Replace("\"",""); } } } //If no Eclipse project was found, we create a new one. if(project_string.Equals("")) { string[] file_name_split = file_name.Split('/'); string[] file_name_split_path = new string[file_name_split.Length-1]; for(int i = 0; i < file_name_split.Length - 1; i++) { file_name_split_path[i] = file_name_split[i]; } project_path = String.Join("/",file_name_split_path); eclipse.CreateNewProject(project_path); } short_file_name = GetFileName().Replace(project_path,""); */ /* Thread java_thread = (new Thread(javaCompile)); java_thread.Start(); */ }
public EclipseInput(string project_name, string file_name) : base(file_name) { this.project_name = project_name; eclipse = new Eclipse(); //This should definitely be moved into Euclid's API. Clients of an API should not have to do this much work! string project_list_string = eclipse.ProjectListString(); string project_string = ""; foreach (string s in project_list_string.Split('\n')) { Debug.Log("Project : " + s); if (!s.Equals("")) { string[] project_string_split = s.Split(','); string name = project_string_split[1].Split(':')[1].Replace("\"", ""); if (name.Equals(project_name)) { project_path = project_string_split[2].Split(':')[1].Replace("\"", ""); } } } //If no Eclipse project was found, we create a new one. if (project_string.Equals("")) { string[] file_name_split = file_name.Split('/'); string[] file_name_split_path = new string[file_name_split.Length - 1]; for (int i = 0; i < file_name_split.Length - 1; i++) { file_name_split_path[i] = file_name_split[i]; } project_path = String.Join("/", file_name_split_path); eclipse.CreateNewProject(project_path); } short_file_name = GetFileName().Replace(project_path, ""); }
private void draw_Click(object sender, EventArgs e) { if (circle.Checked || line.Checked || ellipse.Checked) { switch (operation) { case "line": { var coordinates = coordinate = Line.BresLineOrig(new Point(int.Parse(textBox1.Text), int.Parse(textBox2.Text)), new Point(int.Parse(textBox3.Text), int.Parse(textBox4.Text))); Bitmap bmp = new Bitmap(pictureBox1.Image); foreach (var item in coordinates) { bmp.SetPixel((bmp.Size.Width - item.X) / 2, (bmp.Size.Height - item.Y) / 2, Color.Red); } pictureBox1.Image = bmp; } break; case "circle": { var coordinates = coordinate = Circle.DrawCircle(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(R.Text)); Bitmap bmp = new Bitmap(pictureBox1.Image); foreach (var item in coordinates) { bmp.SetPixel((bmp.Size.Width - item.X) / 2, (bmp.Size.Height - item.Y) / 2, Color.Red); } pictureBox1.Image = bmp; } break; case "ellipse": { var coordinates = coordinate = Eclipse.DrawEclipse(double.Parse(textBox1.Text), double.Parse(textBox2.Text), double.Parse(textBox3.Text), double.Parse(textBox4.Text)); Bitmap bmp = new Bitmap(pictureBox1.Image); foreach (var item in coordinates) { bmp.SetPixel((bmp.Size.Width - item.X) / 2, (bmp.Size.Height - item.Y) / 2, Color.Red); } pictureBox1.Image = bmp; } break; } } }
void startStuff() { Eclipse eclipse = new Eclipse(); string eclim_running = eclipse.ProjectListString(); if(eclim_running.Contains("Connection refused")) { (new Thread(startEclimd)).Start(); while(eclim_running.Contains("Connection refused")) { eclim_running = eclipse.ProjectListString(); Thread.Sleep(10); } } unloader.Loaded(); }
void startStuff() { Eclipse eclipse = new Eclipse(); string eclim_running = eclipse.ProjectListString(); if (eclim_running.Contains("Connection refused")) { (new Thread(startEclimd)).Start(); while (eclim_running.Contains("Connection refused")) { eclim_running = eclipse.ProjectListString(); Thread.Sleep(10); } } unloader.Loaded(); }
// Use this for initialization void Start() { splittextdata = new string[100]; separate = new char[2]; touch_count = 0; amperage = new float[10]; voltage = new float[10]; kairo = new Texture2D[3]; num = Eclipse.CallFuncB(); //num = 221; if (num == 0) { txtxt = Resources.Load("kadai_text/tutorial") as TextAsset; kairo[0] = Resources.Load("gazou/tutorial") as Texture2D; ReadTextData(); separate = aaa.ToCharArray(); splittextdata = textdata.Split(separate, 100); } else if (num > 0) { kadai_dai = num / 100; //章番号 kadai_syou = (num - kadai_dai * 100) / 10; //節番号 file_path = "kadai_text/kadai_0" + kadai_dai + "_0" + kadai_syou; //ファイルパス指定 print(file_path); txtxt = Resources.Load(file_path) as TextAsset; file_path = "gazou/kadai_0" + kadai_dai + "_0" + kadai_syou;//ファイルパス指定 for (i = 0; i < 3; i++) { kairo[i] = Resources.Load(file_path + "_" + i) as Texture2D; } ReadTextData(); //テキストデータ読み込み(textdataにテキストデータを代入) separate = aaa.ToCharArray(); //区切り文字の設定 splittextdata = textdata.Split(separate, 100); //区切り文字ごとに区切る } for (i = 0; i < 10; i++) { amperage[i] = 0; voltage[i] = 0; } }
public void IsValueTypeTest() { Eclipse?it = new Eclipse(); Assert.IsTrue(TypeInterrogator.IsValueType(it.GetType())); SoundLevle sl = SoundLevle.Deaf; Assert.IsTrue(TypeInterrogator.IsValueType(sl.GetType())); double x = 6.0; Assert.IsTrue(TypeInterrogator.IsNumericType(x.GetType())); Assert.IsTrue(TypeInterrogator.IsStrcutType(typeof(Eclipse))); Assert.IsFalse(TypeInterrogator.IsStrcutType(typeof(EmployeeBase <int>))); Assert.IsFalse(TypeInterrogator.IsStrcutType(typeof(EmployeeBase <>))); Assert.IsTrue(TypeInterrogator.IsReferenceType(typeof(EmployeeBase <>))); Assert.IsTrue(TypeInterrogator.IsReferenceType(typeof(Employee.HasNetWork))); Assert.IsTrue(TypeInterrogator.IsDelegateType(typeof(Employee.HasNetWork))); }
//[TestMethod()] public void SubTypeTest() { Assert.IsTrue(TypeInterrogator.IsSubclass(typeof(EmployeeBase <>), typeof(Manager))); Assert.IsTrue(TypeInterrogator.IsSubclass(typeof(EmployeeBase <>), typeof(TemplatedInspector <int>))); Employee inspector = new TemplatedInspector <Insight>(); Assert.IsTrue(TypeInterrogator.IsSubclass(typeof(EmployeeBase <>), inspector.GetType())); Employee emp = new Employee(); Assert.IsFalse(emp.GetType().IsGenericType); Assert.IsTrue(TypeInterrogator.IsSubclass(emp.GetType(), inspector.GetType())); Assert.IsTrue(TypeInterrogator.IsSubclass(typeof(EmployeeBase <>), emp.GetType())); Eclipse?it = new Eclipse(); Assert.IsFalse(TypeInterrogator.IsSubclass(typeof(EmployeeBase <>), it.GetType())); List <EmployeeBase <int> > xlist = new List <EmployeeBase <int> >(); Assert.IsTrue(xlist.GetType().IsGenericType); }
private void ApplyEclipse() { Eclipse.ApplyElipse(pnRoot, 30); }
public static Shape TimHinhVe(OpenGLControl openGLControl, int chooseImg, Point start, Point end, Color userChoose, float thickness) { Shape imgToDraw = null; //Xem lựa chọn của user và chọn hinh vẽ if (start.X != -1000) { if (start == end) { chooseImg = -1; } switch (chooseImg) { case 0: imgToDraw = new Line(start, end, thickness, userChoose); break; case 1: imgToDraw = new Circle(start, end, thickness, userChoose); break; case 2: imgToDraw = new Eclipse(start, end, thickness, userChoose); break; case 3: imgToDraw = new Rectangel(start, end, thickness, userChoose); break; case 4: imgToDraw = new EqualTriangle(start, end, thickness, userChoose); break; case 5: imgToDraw = new EqualPentagon(start, end, thickness, userChoose); break; case 6: imgToDraw = new EqualHexagon(start, end, thickness, userChoose); break; default: imgToDraw = null; break; } } if (imgToDraw != null) { if (listDraw.Count > 0) { var tmpPop = listDraw.Pop(); if (tmpPop.upLeft == imgToDraw.upLeft && tmpPop.GetType() == imgToDraw.GetType()) { imgToDraw.thoiGianVe = tmpPop.thoiGianVe; } else { listDraw.Push(tmpPop); } } listDraw.Push(imgToDraw); } return(imgToDraw); }